Currently, rshell will only initially connect to a single board at startup. You need to use the "connect serial port [baud]" command to connect to additional boards.
To determine the name, rshell executes the following on the board:
Code: Select all
try:
import board
name = board.name
except:
name = 'pyboard'
return repr(name)
/flash will map to the first device. /board-name/flash will be the device named 'board-name' (whatever shows in the boards command).
Here's a sample session which shows the new commands (boards, connect, and repl with a board):
Code: Select all
2972 >rshell.py
Welcome to rshell. Use Control-D to exit.
/home/dhylands> boards
moe @ /dev/ttyACM0
/home/dhylands> connect serial /dev/ttyACM1
/home/dhylands> boards
moe @ /dev/ttyACM0
larry @ /dev/ttyACM1
/home/dhylands> cat /flash/board.py
name = 'moe'
/home/dhylands> cat /moe/flash/board.py
name = 'moe'
/home/dhylands> cat /larry/flash/board.py
name = 'larry'
/home/dhylands> repl moe
Entering REPL. Use Control-X to exit.
Micro Python v1.4.6-49-gfd38799-dirty on 2015-10-07; PYBv1.0 with STM32F405RG
Type "help()" for more information.
>>>
>>> import board
>>> board.name
'moe'
>>>
/home/dhylands> repl larry
Entering REPL. Use Control-X to exit.
MicroPython v1.4.6-91-g641f348-dirty on 2015-10-17; PYBv1.0 with STM32F405RG
Type "help()" for more information.
>>>
>>>
>>> import board
>>> board.name
'larry'
>>>