diff --git a/tcl/utility/README.txt b/tcl/utility/README.txt new file mode 100644 index 000000000..a0292a006 --- /dev/null +++ b/tcl/utility/README.txt @@ -0,0 +1,36 @@ +this folder contains openocd scripts to full erase flash memory and check memory is fully erased + + +eg. to fully erase flash memory of spc582b (Chorus 1M): + +open a dos command prompt and run following command: + +C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc582b_dis_FLASH_ERASE_ALL.cfg + +to check that all memory has been cleared use the following command + +C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc582b_dis_FLASH_ERASE_CHECK.cfg + + + +to flash an spc582b elf program the following command can be used: + +C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f board\spc582b_dis.cfg -c "program blinkled_demo.elf reset exit" + + +be careful to use the right script for the device you are using +above command don't apply for elf file compiled to run from RAM + + +if your openocd installation come from SPC5Studio or StellarStudio the path above must be modified as follow + +C:\SPC5Studio-6.0\openocd\bin\openocd.exe -d0 -s C:\SPC5Studio-6.0\openocd\scripts -f utility\spc582b_dis_FLASH_ERASE_ALL.cfg + +C:\SPC5Studio-6.0\openocd\bin\openocd.exe -d0 -s C:\SPC5Studio-6.0\openocd\scripts -f board\spc582b_dis.cfg -c "program blinkled_demo.elf reset exit" + +or + +C:\StellarStudio-2.0\openocd\bin\openocd.exe -d0 -s C:\StellarStudio-2.0\openocd\scripts -f utility\sr5e1_evbe7000p_FLASH_ERASE_ALL.cfg + +C:\StellarStudio-2.0\openocd\bin\openocd.exe -d0 -s C:\StellarStudio-2.0\openocd\scripts -f board\sr5e1_evbe7000p.cfg -c "program blinkled_portE13.elf reset exit" + diff --git a/tcl/utility/SPC564B_program.cfg b/tcl/utility/SPC564B_program.cfg new file mode 100644 index 000000000..7819bc4d6 --- /dev/null +++ b/tcl/utility/SPC564B_program.cfg @@ -0,0 +1,61 @@ +# SPC58NG-DISP Boards. +# https://www.st.com/en/evaluation-tools/spc58ng-disp.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/spc564B.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\openOCD\openOCD.git\openocd\build\spc5\bin\openocd.exe -d0 -s C:\openOCD\openOCD.git\config\scripts -f utility\SPC564B_program.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +flash probe 0 +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]\n" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]\n" +puts -nonewline "TEST: flash probe 2 -> [flash probe 2]\n" + + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts "" + +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts "" + +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts "" + + + +puts "TEST: flash erase_sector 0 0 last" +puts "[flash erase_sector 0 0 last]" + +puts "TEST: flash erase_sector 1 0 last" +puts "[flash erase_sector 1 0 last]" + +puts "TEST: flash erase_sector 2 0 last" +puts "[flash erase_sector 2 0 last]" + + +# puts "[flash write_image C:/Temp/out.elf]" +program c:/Temp/out.elf + +reset init +resume + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/spc582b_dis_FLASH_ERASE_ALL.cfg b/tcl/utility/spc582b_dis_FLASH_ERASE_ALL.cfg new file mode 100644 index 000000000..148b83ee1 --- /dev/null +++ b/tcl/utility/spc582b_dis_FLASH_ERASE_ALL.cfg @@ -0,0 +1,44 @@ +# SPC582B-DIS Boards. +# https://www.st.com/en/evaluation-tools/spc582b-dis.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/spc582b.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc582b_dis_FLASH_ERASE_ALL.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts "" + +puts "TEST: flash erase_sector 0 0 13" +puts "[flash erase_sector 0 0 13]" + +puts "TEST: flash erase_sector 1 0 3" +puts "[flash erase_sector 1 0 3]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/spc582b_dis_FLASH_ERASE_CHECK.cfg b/tcl/utility/spc582b_dis_FLASH_ERASE_CHECK.cfg new file mode 100644 index 000000000..d7a438228 --- /dev/null +++ b/tcl/utility/spc582b_dis_FLASH_ERASE_CHECK.cfg @@ -0,0 +1,44 @@ +# SPC582B-DIS Boards. +# https://www.st.com/en/evaluation-tools/spc582b-dis.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/spc582b.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc582b_dis_FLASH_ERASE_CHECK.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts "" + +puts -nonewline "TEST: flash erase_check 0 -> " +puts "[flash erase_check 0]" + +puts -nonewline "TEST: flash erase_check 1 -> " +puts "[flash erase_check 1]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/spc584b_cut_12_dis_FLASH_ERASE_ALL.cfg b/tcl/utility/spc584b_cut_12_dis_FLASH_ERASE_ALL.cfg new file mode 100644 index 000000000..e32e2115b --- /dev/null +++ b/tcl/utility/spc584b_cut_12_dis_FLASH_ERASE_ALL.cfg @@ -0,0 +1,46 @@ +# SPC584B-DIS Boards. +# https://www.st.com/en/evaluation-tools/spc584b-dis.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +set TAPID 0x20144041 + +source [find target/spc584b.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 2000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc584b_cut_12_dis_FLASH_ERASE_ALL.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts "" + +puts "TEST: flash erase_sector 0 0 12" +puts "[flash erase_sector 0 0 12]" + +puts "TEST: flash erase_sector 1 0 1" +puts "[flash erase_sector 1 0 1]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/spc584b_cut_12_dis_FLASH_ERASE_CHECK.cfg b/tcl/utility/spc584b_cut_12_dis_FLASH_ERASE_CHECK.cfg new file mode 100644 index 000000000..815a0a3ab --- /dev/null +++ b/tcl/utility/spc584b_cut_12_dis_FLASH_ERASE_CHECK.cfg @@ -0,0 +1,46 @@ +# SPC584B-DIS Boards. +# https://www.st.com/en/evaluation-tools/spc584b-dis.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +set TAPID 0x20144041 + +source [find target/spc584b.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 2000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc584b_cut_12_dis_FLASH_ERASE_CHECK.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts "" + +puts -nonewline "TEST: flash erase_check 0 -> " +puts "[flash erase_check 0]" + +puts -nonewline "TEST: flash erase_check 1 -> " +puts "[flash erase_check 1]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/spc58ec_dis_FLASH_ERASE_ALL.cfg b/tcl/utility/spc58ec_dis_FLASH_ERASE_ALL.cfg new file mode 100644 index 000000000..5e17f4ab1 --- /dev/null +++ b/tcl/utility/spc58ec_dis_FLASH_ERASE_ALL.cfg @@ -0,0 +1,56 @@ +# SPC58EC-DIS Boards. +# https://www.st.com/en/evaluation-tools/spc58ec-dis.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +set TAPID 0x01142041 + +source [find target/spc58xc.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc58ec_dis_FLASH_ERASE_ALL.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts "TEST: flash probe 0 -> [flash probe 0]" +puts "TEST: flash probe 1 -> [flash probe 1]" +puts "TEST: flash probe 2 -> [flash probe 2]" +puts "TEST: flash probe 3 -> [flash probe 3]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts "" + +puts "TEST: flash erase_sector 0 0 23" +puts "[flash erase_sector 0 0 23]" + +puts "TEST: flash erase_sector 1 0 2" +puts "[flash erase_sector 1 0 2]" + +puts "TEST: flash erase_sector 2 0 1" +puts "[flash erase_sector 2 0 1]" + +puts "TEST: flash erase_sector 3 0 3" +puts "[flash erase_sector 3 0 3]" + +puts "TEST: Exit" +shutdown \ No newline at end of file diff --git a/tcl/utility/spc58ec_dis_FLASH_ERASE_CHECK.cfg b/tcl/utility/spc58ec_dis_FLASH_ERASE_CHECK.cfg new file mode 100644 index 000000000..49d683a23 --- /dev/null +++ b/tcl/utility/spc58ec_dis_FLASH_ERASE_CHECK.cfg @@ -0,0 +1,56 @@ +# SPC58EC-DIS Boards. +# https://www.st.com/en/evaluation-tools/spc58ec-dis.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +set TAPID 0x01142041 + +source [find target/spc58xc.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc58ec_dis_FLASH_ERASE_CHECK.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts "TEST: flash probe 0 -> [flash probe 0]" +puts "TEST: flash probe 1 -> [flash probe 1]" +puts "TEST: flash probe 2 -> [flash probe 2]" +puts "TEST: flash probe 3 -> [flash probe 3]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts "" + +puts -nonewline "TEST: flash erase_check 0 -> " +puts "[flash erase_check 0]" + +puts -nonewline "TEST: flash erase_check 1 -> " +puts "[flash erase_check 1]" + +puts -nonewline "TEST: flash erase_check 2 -> " +puts "[flash erase_check 2]" + +puts -nonewline "TEST: flash erase_check 3 -> " +puts "[flash erase_check 3]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/spc58ng_dis_FLASH_ERASE_ALL.cfg b/tcl/utility/spc58ng_dis_FLASH_ERASE_ALL.cfg new file mode 100644 index 000000000..0ea2b8136 --- /dev/null +++ b/tcl/utility/spc58ng_dis_FLASH_ERASE_ALL.cfg @@ -0,0 +1,59 @@ +# SPC58NG-DISP Boards. +# https://www.st.com/en/evaluation-tools/spc58ng-disp.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/spc58ng.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc58ng_dis_FLASH_ERASE_ALL.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts -nonewline "TEST: flash probe 2 -> [flash probe 2]" +puts -nonewline "TEST: flash probe 3 -> [flash probe 3]" +puts -nonewline "TEST: flash probe 4 -> [flash probe 4]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts -nonewline "TEST: flash info 4\n[flash info 4]" +puts "" + +puts "TEST: flash erase_sector 0 0 31" +puts "[flash erase_sector 0 0 31]" + +puts "TEST: flash erase_sector 1 0 0" +puts "[flash erase_sector 1 0 0]" + +puts "TEST: flash erase_sector 2 0 2" +puts "[flash erase_sector 2 0 2]" + +puts "TEST: flash erase_sector 3 0 1" +puts "[flash erase_sector 3 0 1]" + +puts "TEST: flash erase_sector 4 0 3" +puts "[flash erase_sector 4 0 3]" + +puts "TEST: Exit" +shutdown \ No newline at end of file diff --git a/tcl/utility/spc58ng_dis_FLASH_ERASE_CHECK.cfg b/tcl/utility/spc58ng_dis_FLASH_ERASE_CHECK.cfg new file mode 100644 index 000000000..eaa5dea74 --- /dev/null +++ b/tcl/utility/spc58ng_dis_FLASH_ERASE_CHECK.cfg @@ -0,0 +1,59 @@ +# SPC58NG-DISP Boards. +# https://www.st.com/en/evaluation-tools/spc58ng-disp.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/spc58ng.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc58ng_dis_FLASH_ERASE_CHECK.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts -nonewline "TEST: flash probe 2 -> [flash probe 2]" +puts -nonewline "TEST: flash probe 3 -> [flash probe 3]" +puts -nonewline "TEST: flash probe 4 -> [flash probe 4]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts -nonewline "TEST: flash info 4\n[flash info 4]" +puts "" + +puts -nonewline "TEST: flash erase_check 0 -> " +puts "[flash erase_check 0]" + +puts -nonewline "TEST: flash erase_check 1 -> " +puts "[flash erase_check 1]" + +puts -nonewline "TEST: flash erase_check 2 -> " +puts "[flash erase_check 2]" + +puts -nonewline "TEST: flash erase_check 3 -> " +puts "[flash erase_check 3]" + +puts -nonewline "TEST: flash erase_check 4 -> " +puts "[flash erase_check 4]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/spc58nh-disp_FLASH_ERASE_ALL.cfg b/tcl/utility/spc58nh-disp_FLASH_ERASE_ALL.cfg new file mode 100644 index 000000000..5c1db27eb --- /dev/null +++ b/tcl/utility/spc58nh-disp_FLASH_ERASE_ALL.cfg @@ -0,0 +1,59 @@ +# SPC58NH-DISP Boards. +# https://www.st.com/en/evaluation-tools/spc58nh-disp.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/spc58xh.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc58nh-disp_FLASH_ERASE_ALL.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts -nonewline "TEST: flash probe 2 -> [flash probe 2]" +puts -nonewline "TEST: flash probe 3 -> [flash probe 3]" +puts -nonewline "TEST: flash probe 4 -> [flash probe 4]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts -nonewline "TEST: flash info 4\n[flash info 4]" +puts "" + +puts "TEST: flash erase_sector 0 0 47" +puts "[flash erase_sector 0 0 47]" + +puts "TEST: flash erase_sector 1 0 3" +puts "[flash erase_sector 1 0 3]" + +puts "TEST: flash erase_sector 2 0 0" +puts "[flash erase_sector 2 0 0]" + +puts "TEST: flash erase_sector 3 0 2" +puts "[flash erase_sector 3 0 2]" + +puts "TEST: flash erase_sector 4 0 1" +puts "[flash erase_sector 4 0 1]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/spc58nh-disp_FLASH_ERASE_CHECK.cfg b/tcl/utility/spc58nh-disp_FLASH_ERASE_CHECK.cfg new file mode 100644 index 000000000..acddfea80 --- /dev/null +++ b/tcl/utility/spc58nh-disp_FLASH_ERASE_CHECK.cfg @@ -0,0 +1,59 @@ +# SPC58NH-DISP Boards. +# https://www.st.com/en/evaluation-tools/spc58nh-disp.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/spc58xh.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc58nh-disp_FLASH_ERASE_CHECK.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts -nonewline "TEST: flash probe 2 -> [flash probe 2]" +puts -nonewline "TEST: flash probe 3 -> [flash probe 3]" +puts -nonewline "TEST: flash probe 4 -> [flash probe 4]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts -nonewline "TEST: flash info 4\n[flash info 4]" +puts "" + +puts -nonewline "TEST: flash erase_check 0 -> " +puts "[flash erase_check 0]" + +puts -nonewline "TEST: flash erase_check 1 -> " +puts "[flash erase_check 1]" + +puts -nonewline "TEST: flash erase_check 2 -> " +puts "[flash erase_check 2]" + +puts -nonewline "TEST: flash erase_check 3 -> " +puts "[flash erase_check 3]" + +puts -nonewline "TEST: flash erase_check 4 -> " +puts "[flash erase_check 4]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/spc58nn-disp_FLASH_ERASE_ALL.cfg b/tcl/utility/spc58nn-disp_FLASH_ERASE_ALL.cfg new file mode 100644 index 000000000..421dc9308 --- /dev/null +++ b/tcl/utility/spc58nn-disp_FLASH_ERASE_ALL.cfg @@ -0,0 +1,58 @@ +# SPC58NN-DISP Board + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/spc58xn.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc58nn-disp_FLASH_ERASE_ALL.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts -nonewline "TEST: flash probe 2 -> [flash probe 2]" +puts -nonewline "TEST: flash probe 3 -> [flash probe 3]" +puts -nonewline "TEST: flash probe 4 -> [flash probe 4]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts -nonewline "TEST: flash info 4\n[flash info 4]" +puts "" + +puts "TEST: flash erase_sector 0 0 31" +puts "[flash erase_sector 0 0 31]" + +puts "TEST: flash erase_sector 1 0 3" +puts "[flash erase_sector 1 0 3]" + +puts "TEST: flash erase_sector 2 0 0" +puts "[flash erase_sector 2 0 0]" + +puts "TEST: flash erase_sector 3 0 2" +puts "[flash erase_sector 3 0 2]" + +puts "TEST: flash erase_sector 4 0 1" +puts "[flash erase_sector 4 0 1]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/spc58nn-disp_FLASH_ERASE_CHECK.cfg b/tcl/utility/spc58nn-disp_FLASH_ERASE_CHECK.cfg new file mode 100644 index 000000000..1a27d60fb --- /dev/null +++ b/tcl/utility/spc58nn-disp_FLASH_ERASE_CHECK.cfg @@ -0,0 +1,58 @@ +# SPC58NN-DISP Board + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/spc58xn.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc58nn-disp_FLASH_ERASE_CHECK.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts -nonewline "TEST: flash probe 2 -> [flash probe 2]" +puts -nonewline "TEST: flash probe 3 -> [flash probe 3]" +puts -nonewline "TEST: flash probe 4 -> [flash probe 4]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts -nonewline "TEST: flash info 4\n[flash info 4]" +puts "" + +puts -nonewline "TEST: flash erase_check 0 -> " +puts "[flash erase_check 0]" + +puts -nonewline "TEST: flash erase_check 1 -> " +puts "[flash erase_check 1]" + +puts -nonewline "TEST: flash erase_check 2 -> " +puts "[flash erase_check 2]" + +puts -nonewline "TEST: flash erase_check 3 -> " +puts "[flash erase_check 3]" + +puts -nonewline "TEST: flash erase_check 4 -> " +puts "[flash erase_check 4]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/spc58xc_dis_FLASH_ERASE_ALL.cfg b/tcl/utility/spc58xc_dis_FLASH_ERASE_ALL.cfg new file mode 100644 index 000000000..0ffcb5328 --- /dev/null +++ b/tcl/utility/spc58xc_dis_FLASH_ERASE_ALL.cfg @@ -0,0 +1,54 @@ +# SPC58EC-DISP Boards. +# https://www.st.com/en/evaluation-tools/spc58ec-disp.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/spc58xc.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc58xc_dis_FLASH_ERASE_ALL.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts -nonewline "TEST: flash probe 2 -> [flash probe 2]" +puts -nonewline "TEST: flash probe 3 -> [flash probe 3]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts "" + +puts "TEST: flash erase_sector 0 0 23" +puts "[flash erase_sector 0 0 23]" + +puts "TEST: flash erase_sector 1 0 2" +puts "[flash erase_sector 1 0 2]" + +puts "TEST: flash erase_sector 2 0 1" +puts "[flash erase_sector 2 0 1]" + +puts "TEST: flash erase_sector 3 0 3" +puts "[flash erase_sector 3 0 3]" + +puts "TEST: Exit" +shutdown \ No newline at end of file diff --git a/tcl/utility/spc58xc_dis_FLASH_ERASE_CHECK.cfg b/tcl/utility/spc58xc_dis_FLASH_ERASE_CHECK.cfg new file mode 100644 index 000000000..b994c6805 --- /dev/null +++ b/tcl/utility/spc58xc_dis_FLASH_ERASE_CHECK.cfg @@ -0,0 +1,54 @@ +# SPC58EC-DISP Boards. +# https://www.st.com/en/evaluation-tools/spc58ec-disp.html + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/spc58xc.cfg] + +# use hardware reset +reset_config trst_and_srst + +# reasonable default +adapter speed 4000 +adapter srst delay 100 +adapter srst pulse_width 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\spc58xc_dis_FLASH_ERASE_CHECK.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts -nonewline "TEST: flash probe 2 -> [flash probe 2]" +puts -nonewline "TEST: flash probe 3 -> [flash probe 3]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts "" + +puts -nonewline "TEST: flash erase_check 0 -> " +puts "[flash erase_check 0]" + +puts -nonewline "TEST: flash erase_check 1 -> " +puts "[flash erase_check 1]" + +puts -nonewline "TEST: flash erase_check 2 -> " +puts "[flash erase_check 2]" + +puts -nonewline "TEST: flash erase_check 3 -> " +puts "[flash erase_check 3]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/sr5e1_evbe7000p_FLASH_ERASE_ALL.cfg b/tcl/utility/sr5e1_evbe7000p_FLASH_ERASE_ALL.cfg new file mode 100644 index 000000000..f3ee3a830 --- /dev/null +++ b/tcl/utility/sr5e1_evbe7000p_FLASH_ERASE_ALL.cfg @@ -0,0 +1,59 @@ +# Should work with SR5E1-EVBE7000P Boards. +# http://www.st.com/... + +source [find interface/ftdi/stellarlink.cfg] + + +transport select jtag + +source [find target/sr5e1.cfg] + +# use hardware reset +reset_config srst_only + +# reasonable default +adapter speed 4000 +adapter srst delay 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\sr5e1_evbe7000p_FLASH_ERASE_ALL.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts -nonewline "TEST: flash probe 2 -> [flash probe 2]" +puts -nonewline "TEST: flash probe 3 -> [flash probe 3]" +puts -nonewline "TEST: flash probe 4 -> [flash probe 4]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts -nonewline "TEST: flash info 4\n[flash info 4]" +puts "" + +puts "TEST: flash erase_sector 0 0 5" +puts "[flash erase_sector 0 0 5]" + +puts "TEST: flash erase_sector 1 0 5" +puts "[flash erase_sector 1 0 5]" + +puts "TEST: flash erase_sector 2 0 3" +puts "[flash erase_sector 2 0 3]" + +puts "TEST: flash erase_sector 3 0 1" +puts "[flash erase_sector 3 0 1]" + +puts "TEST: flash erase_sector 4 0 2" +puts "[flash erase_sector 4 0 2]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/sr5e1_evbe7000p_FLASH_ERASE_CHECK.cfg b/tcl/utility/sr5e1_evbe7000p_FLASH_ERASE_CHECK.cfg new file mode 100644 index 000000000..e3c2cd193 --- /dev/null +++ b/tcl/utility/sr5e1_evbe7000p_FLASH_ERASE_CHECK.cfg @@ -0,0 +1,59 @@ +# Should work with SR5E1-EVBE7000P Boards. +# http://www.st.com/... + +source [find interface/ftdi/stellarlink.cfg] + + +transport select jtag + +source [find target/sr5e1.cfg] + +# use hardware reset +reset_config srst_only + +# reasonable default +adapter speed 4000 +adapter srst delay 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\sr5e1_evbe7000p_FLASH_ERASE_CHECK.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts -nonewline "TEST: flash probe 0 -> [flash probe 0]" +puts -nonewline "TEST: flash probe 1 -> [flash probe 1]" +puts -nonewline "TEST: flash probe 2 -> [flash probe 2]" +puts -nonewline "TEST: flash probe 3 -> [flash probe 3]" +puts -nonewline "TEST: flash probe 4 -> [flash probe 4]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts -nonewline "TEST: flash info 4\n[flash info 4]" +puts "" + +puts -nonewline "TEST: flash erase_check 0 -> " +puts "[flash erase_check 0]" + +puts -nonewline "TEST: flash erase_check 1 -> " +puts "[flash erase_check 1]" + +puts -nonewline "TEST: flash erase_check 2 -> " +puts "[flash erase_check 2]" + +puts -nonewline "TEST: flash erase_check 3 -> " +puts "[flash erase_check 3]" + +puts -nonewline "TEST: flash erase_check 4 -> " +puts "[flash erase_check 4]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/sr6g6_evb_FLASH_ERASE_ALL.cfg b/tcl/utility/sr6g6_evb_FLASH_ERASE_ALL.cfg new file mode 100644 index 000000000..7ab6c5dfa --- /dev/null +++ b/tcl/utility/sr6g6_evb_FLASH_ERASE_ALL.cfg @@ -0,0 +1,63 @@ +# Should work with SR6G6-EVB Boards. +# http://www.st.com/... + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/sr6g6.cfg] + +# use hardware reset +reset_config srst_only + +# reasonable default +adapter speed 1800 +adapter srst delay 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\sr6g6_evb_FLASH_ERASE_ALL.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts "TEST: flash probe 0 -> [flash probe 0]" +puts "TEST: flash probe 1 -> [flash probe 1]" +puts "TEST: flash probe 2 -> [flash probe 2]" +puts "TEST: flash probe 3 -> [flash probe 3]" +puts "TEST: flash probe 4 -> [flash probe 4]" +puts "TEST: flash probe 5 -> [flash probe 5]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts -nonewline "TEST: flash info 4\n[flash info 4]" +puts -nonewline "TEST: flash info 5\n[flash info 5]" +puts "" + +puts "TEST: flash erase_sector 0 0 22" +puts "[flash erase_sector 0 0 22]" + +puts "TEST: flash erase_sector 1 0 22" +puts "[flash erase_sector 1 0 22]" + +puts "TEST: flash erase_sector 2 0 22" +puts "[flash erase_sector 2 0 22]" + +puts "TEST: flash erase_sector 3 0 22" +puts "[flash erase_sector 3 0 22]" + +puts "TEST: flash erase_sector 4 0 3" +puts "[flash erase_sector 4 0 3]" + +puts "TEST: flash erase_sector 5 0 0" +puts "[flash erase_sector 5 0 0]" + +puts "TEST: Exit" +shutdown diff --git a/tcl/utility/sr6g6_evb_FLASH_ERASE_CHECK.cfg b/tcl/utility/sr6g6_evb_FLASH_ERASE_CHECK.cfg new file mode 100644 index 000000000..22774261d --- /dev/null +++ b/tcl/utility/sr6g6_evb_FLASH_ERASE_CHECK.cfg @@ -0,0 +1,63 @@ +# Should work with SR6G6-EVB Boards. +# http://www.st.com/... + +source [find interface/ftdi/stellarlink.cfg] + +transport select jtag + +source [find target/sr6g6.cfg] + +# use hardware reset +reset_config srst_only + +# reasonable default +adapter speed 1800 +adapter srst delay 100 + +# C:\StellarLINK\openocd\bin\openocd.exe -d0 -s C:\StellarLINK\openocd\scripts -f utility\sr6g6_evb_FLASH_ERASE_CHECK.cfg + +init +catch {halt} +catch {reset init} +catch {halt} + +puts "\nTEST: Reset init and halt: [reg pc]" + +puts "TEST: flash probe 0 -> [flash probe 0]" +puts "TEST: flash probe 1 -> [flash probe 1]" +puts "TEST: flash probe 2 -> [flash probe 2]" +puts "TEST: flash probe 3 -> [flash probe 3]" +puts "TEST: flash probe 4 -> [flash probe 4]" +puts "TEST: flash probe 5 -> [flash probe 5]" +puts "" + +puts "TEST: flash banks\n[flash banks]" + +puts -nonewline "TEST: flash info 0\n[flash info 0]" +puts -nonewline "TEST: flash info 1\n[flash info 1]" +puts -nonewline "TEST: flash info 2\n[flash info 2]" +puts -nonewline "TEST: flash info 3\n[flash info 3]" +puts -nonewline "TEST: flash info 4\n[flash info 4]" +puts -nonewline "TEST: flash info 5\n[flash info 5]" +puts "" + +puts -nonewline "TEST: flash erase_check 0 -> " +puts "[flash erase_check 0]" + +puts -nonewline "TEST: flash erase_check 1 -> " +puts "[flash erase_check 1]" + +puts -nonewline "TEST: flash erase_check 2 -> " +puts "[flash erase_check 2]" + +puts -nonewline "TEST: flash erase_check 3 -> " +puts "[flash erase_check 3]" + +puts -nonewline "TEST: flash erase_check 4 -> " +puts "[flash erase_check 4]" + +puts -nonewline "TEST: flash erase_check 5 -> " +puts "[flash erase_check 5]" + +puts "TEST: Exit" +shutdown