renode
renode copied to clipboard
Connection error cc2538 with RIOT os
I have been trying to emulate the riot gnrc_network example in renode with the cc2538 board, I have followed the renode documentation on how to use the IEEE802_15_4Medium and wireless.
How's is the problem
There is no problem when emulating, you can start RPL and server UDP, the problem occurs when I try to ping from one board to another or send data from a UDP client the console is completely stuck, and you have to close renode completely.
The RIOT Code
https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_networking
The resc FILES are:
:name: CC2538DK
$name?="cc2538dk"
using sysbus
mach create $name
machine LoadPlatformDescription @platforms/cpus/cc2538.repl
machine PyDevFromFile @scripts/pydev/rolling-bit.py 0x400D2004 0x4 True "sysctrl"
# show the UART output
showAnalyzer uart0
# get an id value starting with 1
$id = `next_value 1`
$bin?=@../firmwares/gnrc_networking.elf
macro reset
"""
# set node address based on the $id variable. 0x00 0x12 0x4B is TI OUI
sysbus WriteByte 0x00280028 $id
sysbus WriteByte 0x0028002C 0x00
sysbus WriteByte 0x00280030 0xAB
sysbus WriteByte 0x00280034 0x89
sysbus WriteByte 0x00280038 0x00
sysbus WriteByte 0x0028003C 0x4B
sysbus WriteByte 0x00280040 0x12
sysbus WriteByte 0x00280044 0x00
sysbus LoadBinary @http://antmicro.com/projects/renode/cc2538_rom_dump.bin-s_524288-0c196cdc21b5397f82e0ff42b206d1cc4b6d7522 0x0
sysbus LoadELF $bin
cpu VectorTableOffset 0x200000
"""
runMacro $reset
c2538-rpl-test
:name: cc2538dk range medium 3 nodes
logLevel 0
emulation CreateIEEE802_15_4Medium "wireless"
wireless SetRangeWirelessFunction 100
######################### DODAG - begin #########################
$bin=@../firmwares/gnrc_networking.elf
$name="client"
i $CWD/../nodes/cc2538dk.resc
connector Connect radio wireless
wireless SetPosition radio 0 0 0
mach clear
########################## DODAG - end ##########################
######################### DAG - begin #########################
$bin=@../firmwares/gnrc_networking.elf
$name="client"
i $CWD/../nodes/cc2538dk.resc
connector Connect radio wireless
wireless SetPosition radio 0 10 0
mach clear
########################## DAG - end ##########################
Warnings in the console
15:23:34.0058 [WARNING] client/sysbus: [cpu: 0x20D9DA] (tag: 'GPTIMER0') WriteDoubleWord to non existing peripheral at 0x40030038, value 0xF.
15:23:34.0060 [WARNING] client/sysbus: [cpu: 0x20D9E2] (tag: 'GPTIMER0') WriteDoubleWord to non existing peripheral at 0x4003003C, value 0xF.
15:23:34.0061 [WARNING] client/sysbus: [cpu: 0x20D928] (tag: 'GPTIMER0') WriteDoubleWord to non existing peripheral at 0x40030000, value 0x4.
15:23:34.0063 [WARNING] client/sysbus: [cpu: 0x20D930] (tag: 'GPTIMER0') WriteDoubleWord to non existing peripheral at 0x40030004, value 0x22.
15:23:34.0120 [WARNING] client/sysbus: [cpu: 0x20D78E] (tag: 'SYS_CTRL_CLOCK_CTRL') ReadDoubleWord from non existing peripheral at 0x400D2008, returning 0x1.
server/sysbus: [cpu: 0x20D612] (tag: 'ADC') WriteDoubleWord to non existing peripheral at 0x400D7000, value 0x4.
15:23:34.0407 [WARNING] client/sysbus: [cpu: 0x20D612] (tag: 'ADC') WriteDoubleWord to non existing peripheral at 0x400D7000, value 0x4.
15:23:34.0411 [WARNING] server/sysbus: [cpu: 0x20D612] (tag: 'ADC') ReadDoubleWord from non existing peripheral at 0x400D7014, returning 0x0.
15:23:34.0415 [WARNING] server/sysbus: [cpu: 0x20D612] (tag: 'ADC') ReadDoubleWord from non existing peripheral at 0x400D7018, returning 0x0.
15:23:34.0419 [WARNING] server/sysbus: [cpu: 0x20D612] (tag: 'ADC') ReadDoubleWord from non existing peripheral at 0x400D7000, returning 0x0.
Hi,
Sorry to reply on a stale issue, did you manage to make it work eventually? I have the same issue and I found that you don't need to ping from one node to another, if you just ping yourself the terminal stucks too.
Also could you share more details about your setup? I type ifconfig
on the first node and get fe80::acea:911c:fbc6:ee68
, which looks good for a link-local address. Then I starts the udp server on the first node, which also looks good to me.
# on the first node
> udp server start 8808
Success: started UDP server on port 8808
But then doing this doesn't give me anything on the first node.
# on the second node
> udp send fe80::acea:911c:fbc6:ee68 8808 asdasd
Success: sent 6 byte(s) to [fe80::acea:911c:fbc6:ee68]:8808
Any clue what might be missing? (I didn't create the tap as mentioned here because I think we already create CreateIEEE802_15_4Medium
to connect two nodes in renode)