[riot-users] Flashing RIOT in OpenMote-CC2538 Rev. A1

Aboodi Ahed Hussein Ali aboodi at student.usm.my
Fri Sep 13 10:51:43 CEST 2019


Hi,

Ok, I have successfully flashed some of the tasks in the RIOT tutorials.
For those having similar OpenMote-CC2538_Rev.A1, I will put the solution below but first I have a question to ask.

My question is how can I debug the openmote-cc2538 device using eclipse? I mean does it necessarily required JLink-programmer to do so? can I use the USB port for debugging instead?
Please help.


The solution:
It turns out, rev. A1 requires different ldscript since it has lower memory (at least that's the difference I know). Therefore, I made a copy of the current ldscript of the CC2538SF53 CPU found here "RIOT/cpu/cc2538/ldscripts/cc2538sf53.ld" and name it "cc2538sf23.ld" as the ldscript of CC2538SF23. I put the copy in the same place "RIOT/cpu/cc2538/ldscripts/cc2538sf23.ld" and edit the lines starting with "rom (rx) :" and "cca : " with these lines:

    rom (rx)    : ORIGIN = 0x00200000, LENGTH = 256K - 44
    cca         : ORIGIN = 0x0023ffd4, LENGTH = 44

I also made some changes to the file "RIOT/boards/openmote-cc2538/Makefile.include", specifically edit the lines with "export CPU_MODEL" and "export JLINK_DEVICE" to equal "cc2538sf23". Now you can just flash the Rev.A1 device with the make command specifying the cc2538 board like this: "> sudo BOARD=openmote-cc2538 make flash all term". I hope this help anyone having a similar issue.

Best,
Ahed


________________________________
From: users <users-bounces at riot-os.org> on behalf of Aboodi Ahed Hussein Ali <aboodi at student.usm.my>
Sent: Sunday, September 1, 2019 9:41 PM
To: users at riot-os.org <users at riot-os.org>
Subject: [riot-users] Flashing RIOT in OpenMote-CC2538 Rev. A1

Hi,

I am new to RIOT OS and I am hoping that you help me with my issue.

I have obtained 3 OpenMoteCC2538 Rev.A1 (attached with OpenUSB Rev.A2 and battery container), and I followed the provided Tutorial of RIOT's GitHub page. I believe I have failed to complete the first task (task-01), I get multiple messages "Target returned: 0x43, Invalid address" whenever I execute the make flash command inside the "..Tutorial/task-01" directory. This is the command log result:

--------------------
ahed at ubuntu:~/myRIOT/Tutorials/task-01$ sudo BOARD=openmote-cc2538 make all flash term
Opening port /dev/ttyUSB0, baud 460800
Reading data from /home/ahed/myRIOT/Tutorials/task-01/bin/openmote-cc2538/Task01.bin
Cannot auto-detect firmware filetype: Assuming .bin
Connecting to target...
CC2538 PG2.0: 256KB Flash, 32KB SRAM, CCFG at 0x0023FFD4
Primary IEEE Address: 00:12:4B:00:04:30:53:D1
Erasing 262144 bytes starting at address 0x00200000
    Erase done
Writing 524288 bytes starting at address 0x00200000
Target returned: 0x43, Invalid address
Target returned: 0x43, Invalid address
Target returned: 0x43, Invalid address
Target returned: 0x43, Invalid address
Target returned: 0x43, Invalid address
Target returned: 0x43, Invalid address

... (Many of the same lines)...

Target returned: 0x43, Invalid address
Target returned: 0x43, Invalid address
Write 16 bytes at 0x0027FFF0
Target returned: 0x43, Invalid address
Target returned: 0x43, Invalid address
ERROR: Write failed
make: *** [flash] Error 1
--------------------

You can see that there is a connection started and the earse procedure completed but when it comes to writing it fails. This is happened to me before when I was trying to flash the OpenWSN. I resolve it by specifying the hardware revision for the OpenMote devices (i.e. "revision=A1"), although I am not sure if this is the same issue.
The GitHub-page<https://github.com/contiki-os/contiki/tree/master/platform/openmote-cc2538> of the Contiki-os also mentions that I should write the BOARD_REVISION for the hardware device "OpenMote-CC2538 Rev.A1" as it comes with CC2538SF23 (256 KB) instead of CC2538SF53 (512 KB) that the older OpenMote-CC2538 comes with.

I have tried to check on the "board" directory of RIOT and I only found the older version openmote-cc2538 for CC2538SF53 (512 KB). I am not sure if RIOT supports this hardware, or provides a revision parameter for the make command, or I am doing it wrong. I would appreciate If someone could advise on this issue, knowing that I don't have JTAG to use as an alternative way for flashing the task-01 tutorial?

Thank you,

Ahed

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/users/attachments/20190913/31626bb8/attachment-0001.htm>


More information about the users mailing list