Hi,
I am trying to make a script to flash this micro (on Linux) without any user prompts but I am having a few issues.
The first was that I have to reset because the JTAG pins are used by the application - I tried various rsettype settings but to no avail as well as some attempts with rx.
In the end I did
and it worked but I am wondering if there is a better way.
The other as yet unsolved problem is that I am always prompted for the jtag configuration (IRlen etc).
My command file is..
Display All
And I run it like so
The output is as follows (I have to press enter at the 'JTAGConf>' prompt)
Display All
So far I am working around it by doing
but that is a pretty gross hack IMO
Any tips much appreciated, thanks!
I am trying to make a script to flash this micro (on Linux) without any user prompts but I am having a few issues.
The first was that I have to reset because the JTAG pins are used by the application - I tried various rsettype settings but to no avail as well as some attempts with rx.
In the end I did
and it worked but I am wondering if there is a better way.
The other as yet unsolved problem is that I am always prompted for the jtag configuration (IRlen etc).
My command file is..
Source Code
And I run it like so
The output is as follows (I have to press enter at the 'JTAGConf>' prompt)
Source Code
- [ubuntu 4:56] ~/firmware >JLinkExe -CommanderScript flashit
- SEGGER J-Link Commander V5.12d (Compiled Apr 26 2016 19:23:38)
- DLL version V5.12d, compiled Apr 26 2016 19:23:34
- Script file read successfully.
- Processing script file...
- J-Link connection not established yet but required for command.
- Connecting to J-Link via USB...O.K.
- Firmware: J-Link Ultra Rev.1 compiled Dec 3 2013 14:27:53
- Hardware version: V1.00
- S/N: 291200193
- OEM: IAR
- VTref = 3.332V
- Selecting JTAG as current target interface.
- Selecting 1000 kHz as target interface speed
- Sleep(10)
- Sleep(100)
- Device position in JTAG chain (IRPre,DRPre) <Default>: -1,-1 => Auto-detect
- JTAGConf>
- Device "LM3S5B91" selected.
- TotalIRLen = 4, IRPrint = 0x01
- Found Cortex-M3 r2p0, Little endian.
- FPUnit: 6 code (BP) slots and 2 literal slots
- CoreSight components:
- ROMTbl 0 @ E00FF000
- ROMTbl 0 [0]: FFF0F000, CID: B105E00D, PID: 002BB000 SCS
- ROMTbl 0 [1]: FFF02000, CID: B105E00D, PID: 002BB002 DWT
- ROMTbl 0 [2]: FFF03000, CID: B105E00D, PID: 002BB003 FPB
- ROMTbl 0 [3]: FFF01000, CID: B105E00D, PID: 002BB001 ITM
- ROMTbl 0 [4]: FFF41000, CID: B105900D, PID: 002BB923 TPIU-Lite
- Found 1 JTAG device, Total IRLen = 4:
- #0 Id: 0x4BA00477, IRLen: 04, IRPrint: 0x1, CoreSight JTAG-DP (ARM)
- Cortex-M3 identified.
- Reset delay: 0 ms
- Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
- PC = 01000D94, CycleCnt = 00000000
- R0 = 00079F96, R1 = 00000001, R2 = 078E3AD1, R3 = 00000002
- R4 = 400FE000, R5 = 04C00380, R6 = 078E3AD0, R7 = 07C06810
- R8 = 00000000, R9 = 00000000, R10= 00000000, R11= 00000000
- R12= 00000000
- SP(R13)= 2000C210, MSP= 2000C210, PSP= 00000000, R14(LR) = 01002BAF
- XPSR = 21000000: APSR = nzCvq, EPSR = 01000000, IPSR = 000 (NoException)
- CFBP = 00000000, CONTROL = 00, FAULTMASK = 00, BASEPRI = 00, PRIMASK = 00
- Erasing device (LM3S5B91)...
- Comparing flash [100%] Done.
- Erasing flash [100%] Done.
- Verifying flash [100%] Done.
- J-Link: Flash download: Total time needed: 2.273s (Prepare: 0.149s, Compare: 0.000s, Erase: 2.110s, Program: 0.000s, Verify: 0.000s, Restore: 0.013s)
- Erasing done.
- Downloading file [bl.bin]...Comparing flash [100%] Done.
- Erasing flash [100%] Done.
- Programming flash [100%] Done.
- Verifying flash [100%] Done.
- J-Link: Flash download: Flash programming performed for 1 range (7168 bytes)
- J-Link: Flash download: Total time needed: 0.403s (Prepare: 0.172s, Compare: 0.011s, Erase: 0.000s, Program: 0.169s, Verify: 0.002s, Restore: 0.048s)
- O.K.
- Downloading file [main.bin]...Comparing flash [100%] Done.
- Erasing flash [100%] Done.
- Programming flash [100%] Done.
- Verifying flash [100%] Done.
- J-Link: Flash download: Flash programming performed for 1 range (233472 bytes)
- J-Link: Flash download: Total time needed: 3.911s (Prepare: 0.202s, Compare: 0.089s, Erase: 0.000s, Program: 3.515s, Verify: 0.021s, Restore: 0.082s)
- O.K.
- Script processing completed.
So far I am working around it by doing
but that is a pretty gross hack IMO
Any tips much appreciated, thanks!
The post was edited 4 times, last by Darius ().