SAM-BA problems using "historyCommand.tcl" script

Discussion about SAM7 Series and ARM7TDMI based products.

Moderator: nferre

t.bohler@unitechenergy.no
Posts: 24
Joined: Wed Jun 25, 2014 8:47 am

SAM-BA problems using "historyCommand.tcl" script

Tue Feb 23, 2016 12:56 am

Hi.

I'm using AT91SAM7X512 and I try to create a smooth way to program/FLASH over 200 MCU units (over USB) by creating a script running the SAM-BA (2.15) executable (in command line mode). First I created the script-file "historyCommand.tcl", by recording the following simple SAM-BA (GUI) commands:
1) Enable Flash Access - Execute
2) Boot From Flash - Execute
3) Send file name ... <"filename1 to adress1"> + "Send File"
==> Pop-up arrives "Lock region(s)" ... "Yes, Lock it" (I push "No")
4) Send file name ... <"filename2 to adress2"> + "Send File"
==> Pop-up arrives "Lock region(s)" ... "Yes, Lock it" (I push "No")
5) Send file name ... <"filename3 to adress3"> + "Send File"
==> Pop-up arrives "Lock region(s)" ... "Yes, Lock it" (I push "No")
6) Send file name ... <"filename4 to adress4"> + "Send File"
==> Pop-up arrives "Lock region(s)" ... "Yes, Lock it" (I push "No")


BUT, WHEN I RUN THESE TCL-COMMANDS FROM A DOS_BATCH-FILE it doesn't work!
The program/flashsegments do not seems to have been programmed/flashed, even though no error-messages is seen!
I guess a clue maybe is that no TCL-script-code is generated for the pop-up waiting for my "No" (regarding the Lock regions, see above)?

I really appreciate some assistance with this to optimize the FLASH-programming of > 200 MCUs ...


My DOS batch file simply contain this line:
SAM-BA \USBserial\COM5 at91sam7x512-ek ./my.tcl > log.txt

And my "recorded historyCommand.tcl" (renamed to my.tcl) contains:
FLASH::Init
FLASH::ScriptGPNMV 4
send_file {Flash} "C:/EBLANKS_AUDIO/flash_segements/0x100000_firmware.bin" 0x100000 0
send_file {Flash} "C:/EBLANKS_AUDIO/flash_segements/0x144000_flashaudio_med.bin" 0x144000 0
send_file {Flash} "C:/EBLANKS_AUDIO/flash_segements/0x160000_datamag_66666.bin" 0x160000 0
send_file {Flash} "C:/EBLANKS_AUDIO/flash_segements/0x161000_flashaudio_med.bin" 0x161000 0

And here is the resulting output log-file "log.txt", which do NOT indicate any errors (but my MCU is still not programmed/flashed…):
-I- Waiting ...
-I- TCL platform : Windows NT
-I- SAM-BA 2.15 on : windows
-I- current connection is \USBserial\COM5, \\USBserial\\COM5 to be matched
-I- Retrieved arguments from command line :
-I- argv 0 : \USBserial\COM5
-I- argv 1 : at91sam7x512-ek
-I- argv 2 : eblanks.tcl
-I- Connection \USBserial\COM5
-I- Connection : \USBserial\COM5 (target(comType) = 0)
-I- Board : at91sam7x512-ek
-I- Traces Level : 4
-I- target(handle) : 50819200
-I- sourcing board description file C:/Program Files (x86)/Atmel/sam-ba_2.15/sam-ba.exe/../tcl_lib/at91sam7x512-ek/at91sam7x512-ek.tcl
Read device Chip ID at 0xFFFFF240 --- get 0x275c0a40
-I- Found chip : at91sam7x512 (Chip ID : 0x275c0a40)
-I- Loading applet applet-lowlevelinit-at91sam7x512.bin at address 0x202000
-I- Memory Size : 0x0 bytes
-I- Buffer address : 0x4
-I- Buffer size: 0x0 bytes
-I- Applet initialization done
-I- Low level initialized
-I- Loading applet applet-flash-at91sam7x512.bin at address 0x202000
-I- Memory Size : 0x80000 bytes
-I- Buffer address : 0x202B44
-I- Buffer size: 0x1D300 bytes
-I- Applet initialization done
-I- FLASH initialized
-I- Command line mode : Execute script file : eblanks.tcl
-I- Loading applet applet-flash-at91sam7x512.bin at address 0x202000
-I- Memory Size : 0x80000 bytes
-I- Buffer address : 0x202B44
-I- Buffer size: 0x1D300 bytes
-I- Applet initialization done
-I- GPNVM2 set

I really appreciate some assistance on this matter.

Best regards
Terje Bohler

Return to “SAM7 ARM7TDMI MCU”

Who is online

Users browsing this forum: No registered users and 3 guests