[riot-notifications] [RIOT-OS/RIOT] jlink: handle flashing at IMAGE_OFFSET (#11200)

Gaƫtan Harter notifications at github.com
Wed Mar 20 15:55:21 CET 2019


I tested on my machine and it worked for the `openmote-cc2538`. I first flashed `examples/default` with the `cc2538-bsl` as explained in the documentation (cable + reset button) and then flashed `tests/shell` with Jlink and could run the test:

```
RIOT_CI_BUILD=1 PROGRAMMER=jlink BOARD=openmote-cc2538 make -C tests/shell/ flash test

make: Entering directory '/home/harter/work/git/RIOT/tests/shell'
Building application "tests_shell" for "openmote-cc2538" with MCU "cc2538".

   text	   data	    bss	    dec	    hex	filename
   9884	    136	   2604	  12624	   3150	/home/harter/work/git/RIOT/tests/shell/bin/openmote-cc2538/tests_shell.elf
/home/harter/work/git/RIOT/dist/tools/jlink/jlink.sh flash /home/harter/work/git/RIOT/tests/shell/bin/openmote-cc2538/tests_shell.bin
### Flashing Target ###
### Flashing at base address 0x200000 with offset 0 ###
SEGGER J-Link Commander V6.42d (Compiled Feb 15 2019 13:56:53)
DLL version V6.42d, compiled Feb 15 2019 13:56:43


J-Link Command 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 V9 compiled Oct 25 2018 11:46:07
Hardware version: V9.30
S/N: 269307832
License(s): FlashBP, GDB
OEM: SEGGER-EDU
VTref=3.291V
Target connection not established yet but required for command.
Device "CC2538SF53" selected.


Connecting to target via JTAG
InitTarget: Found ICE-Pick with ID: 0x8B96402F
InitTarget: Found CPU TAP 0x4BA00477
Scanning AP map to find all available APs
AP[1]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x412FC230. Implementer code: 0x41 (ARM)
Found Cortex-M3 r2p0, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 002BB000 SCS
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 002BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 002BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 002BB923 TPIU-Lite
Cortex-M3 identified.
Halting CPU for downloading file.
Downloading file [/home/harter/work/git/RIOT/tests/shell/bin/openmote-cc2538/tests_shell.bin]...
Comparing flash   [000%]000%]010%]010%]025%]025%]035%]035%]050%]050%]060%]060%]075%]075%]085%]085%]100%] Done.
Verifying flash   [000%]100%] Done.
J-Link: Flash download: Bank 0 @ 0x00200000: Skipped. Contents already match
O.K.

Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.



Script processing completed.

/home/harter/work/git/RIOT/dist/tools/pyterm/pyterm -p "/dev/ttyUSB0" -b "115200"
Twisted not available, please install it if you want to use pyterm's JSON capabilities
2019-03-20 15:53:53,553 - INFO # Connect to serial port /dev/ttyUSB0
Welcome to pyterm!
Type '/exit' to exit.
2019-03-20 15:53:57,012 - INFO # main(): This is RIOT! (Version: buildtest)
2019-03-20 15:53:57,012 - INFO # test_shell.
> start_test
2019-03-20 15:53:57,075 - INFO #  start_test
2019-03-20 15:53:57,076 - INFO # [TEST_START]
> end_test
2019-03-20 15:53:57,139 - INFO #  end_test
2019-03-20 15:53:57,140 - INFO # [TEST_END]


> 123456789012345678901234567890123456789012345678901234567890
2019-03-20 15:53:57,203 - INFO #  end_test
2019-03-20 15:53:57,204 - INFO # [TEST_END]
> 2019-03-20 15:53:57,204 - INFO #  end_test
2019-03-20 15:53:57,204 - INFO # [TEST_END]
> 2019-03-20 15:53:57,269 - INFO #  123456789012345678901234567890123456789012345678901234567890
2019-03-20 15:53:57,270 - INFO # shell: command not found: 123456789012345678901234567890123456789012345678901234567890
> unknown_command
2019-03-20 15:53:57,332 - INFO #  unknown_command
2019-03-20 15:53:57,333 - INFO # shell: command not found: unknown_command
help
> 2019-03-20 15:53:57,427 - INFO #  help
2019-03-20 15:53:57,428 - INFO # Command              Description
2019-03-20 15:53:57,428 - INFO # ---------------------------------------
2019-03-20 15:53:57,429 - INFO # start_test           starts a test
2019-03-20 15:53:57,429 - INFO # end_test             ends a test
2019-03-20 15:53:57,430 - INFO # echo                 prints the input command
2019-03-20 15:53:57,430 - INFO # reboot               Reboot the node
2019-03-20 15:53:57,431 - INFO # ps                   Prints information about running threads.
2019-03-20 15:53:57,431 - INFO # app_metadata         Returns application metadata
echo a string
> 2019-03-20 15:53:57,491 - INFO #  echo a string
2019-03-20 15:53:57,492 - INFO # "echo""a""string"
> ps
2019-03-20 15:53:57,564 - INFO #  ps
2019-03-20 15:53:57,565 - INFO # 	pid | state    Q | pri 
2019-03-20 15:53:57,566 - INFO # 	  1 | pending  Q |  15
2019-03-20 15:53:57,567 - INFO # 	  2 | running  Q |   7
reboot
> 2019-03-20 15:53:57,640 - INFO #  reboot
2019-03-20 15:53:57,641 - INFO # main(): This is RIOT! (Version: buildtest)
2019-03-20 15:53:57,641 - INFO # test_shell.
> 
make: Leaving directory '/home/harter/work/git/RIOT/tests/shell'
```

We can note the address is correctly handled
```
### Flashing Target ###
### Flashing at base address 0x200000 with offset 0 ###
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11200#issuecomment-474867800
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190320/146d5845/attachment.html>


More information about the notifications mailing list