1:name: TWONODE-DEMO
2:description: This script runs the configured application on BRD4186C in a two-node setup.
3
4# Change this to the actual location of the application to run
5set bin $ORIGIN/rail_soc_railtest.out
6
7using sysbus
8emulation SetGlobalSerialExecution true
9emulation CreateIEEE802_15_4Medium "wireless"
10emulation SetGlobalQuantum "0.000020"
11
12# Start wireshark with 802.15.4 decoder
13#emulation LogIEEE802_15_4Traffic
14# Start wireshark with BLE decoder
15#emulation LogBLETraffic
16
17macro reset
18"""
19    sysbus LoadELF $bin
20    cpu VectorTableOffset `sysbus GetSymbolAddress "__Vectors"`
21    sysbus LogAllPeripheralsAccess false
22"""
23
24################################################
25# Create node1
26################################################
27mach create "node1"
28machine LoadPlatformDescription "platforms/boards/silabs/brd4186c.repl"
29runMacro $reset
30emulation CreateServerSocketTerminal 3451 "cli_node1"
31connector Connect sysbus.eusart0 cli_node1
32connector Connect sysbus.radio wireless
33logLevel 3
34### Debug
35# Uncomment to enable debugging of main CPU
36#machine StartGdbServer 3333 false cpu
37# Uncomment to enable debugging of Sequencer CPU
38#machine StartGdbServer 3333 false seqcpu
39
40mach clear
41
42################################################
43# Create node2
44################################################
45mach create "node2"
46machine LoadPlatformDescription "platforms/boards/silabs/brd4186c.repl"
47runMacro $reset
48emulation CreateServerSocketTerminal 3452 "cli_node2"
49connector Connect sysbus.eusart0 cli_node2
50connector Connect sysbus.radio wireless
51logLevel 3
52### Debug
53# Uncomment to enable debugging of main CPU
54#machine StartGdbServer 3333 false cpu
55# Uncomment to enable debugging of Sequencer CPU
56#machine StartGdbServer 3333 false seqcpu