首页 > 代码库 > [NIOS] 如何Erase EPCS flash內容

[NIOS] 如何Erase EPCS flash內容

以下資料是給我自己做個以後查詢使用。

==================================================

手動清除EPCS內的資料步驟:

1. 先開啟 Nios II 1X.X Command Shell

2. 下指令 

    nios2-flash-programmer -e --base=0x1800 --erase-all --override=c:/nios2-flash-override.txt

 

參數說明:

   -e : 這個動作只對 EPCS flash使用

   --base : EPCS的基底位置 (base address)

   --erase-all : 清除全部資料

   --override: 指定EPCS的型式及磁區大小

 

-----------nios2-flash-override.txt 內容如下-----------

[EPCS-202011] # EPCS1N (lead-free)
sector_size = 32768
sector_count = 4
[EPCS-202013] # EPCS4N (lead-free)
sector_size = 65536
sector_count = 8

[EPCS-202015] # EPCS16N (lead-free)
sector_size = 65536
sector_count = 32

[EPCS-202017] # EPCS64N (lead-free)
sector_size = 65536
sector_count = 128

[EPCS-010215] #EPCS32N(lead-free)
sector_size = 65536
sector_count = 64

[EPCS-010216] # EPCS64N (lead-free)
sector_size = 65536
sector_count = 128

[EPCS-FF] # EPCS64N (lead-free)
sector_size = 65536
sector_count = 128

[EPCS-012018] #EPCS128N(lead-free)
sector_size = 262144
sector_count = 64

-----------nios2-flash-override.txt end-----------

[NIOS] 如何Erase EPCS flash內容