-
Notifications
You must be signed in to change notification settings - Fork 47
Using M3 open node standalone
Saint-Marcel edited this page Jun 16, 2015
·
1 revision
1 - on your computer, you need to install
- gcc arm compiler : see this FAQ
- openocd (on ubuntu/debian) :
> apt-get install openocd
2 - Then configure your account and udev to allow flashing the node as your regular user. Put yourself in the dialout
group:
sudo usermod -a -G dialout $USER
# Then logout/login to make it effective
and write the following file /etc/udev/rules.d/iot-lab-ftdi.rules
:
# Udev rules for iot-lab ftdi files
# open nodes TTY
SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ENV{ID_SERIAL}=="IoT-LAB_M3", ENV{ID_USB_INTERFACE_NUM}=="01", SYMLINK+="ttyON_M3"
# Allow accessing jtag as dialout group
# idProduct and idVendor got with 'udevadm -a -n /dev/bus/usb/001/00[34]'
# https://wiki.archlinux.org/index.php/Udev#Accessing_firmware_programmers_and_USB_virtual_comm_devices
SUBSYSTEM=="usb", ATTR{idProduct}=="6010", ATTR{idVendor}=="0403", MODE="0664", GROUP="dialout"
3 - Re-Plug the M3 node on your PC to trigger udev
- Plug the M3 node on your PC through USB line, then you can see 2 Linux usb ports :
-
/dev/ttyUSB0
for jtag programmation -
/dev/ttyUSB1
for printf debug on uart1
-
- If the node is well configured you should also see:
-
/dev/ttyON_M3 -> /dev/ttyUSB1
for easier access.
-
4 - If you don't have the /dev/ttyON_M3
the node is badly configured, you should reconfigure it, else goto 5
- download and compile this code.
- To reconfigure it run
> ./ftdi-eeprom-config M3
- and then plug/unplug the node
- The expected output should now be the following:
> ./ftdi-devices-list
FTx232 devices lister by IoT-LAB
Listing FT2232 devices...
Found 1 device(s)
Device 0:
Manufacturer: IoT-LAB
Description: M3
Serial:
All done, success!
5 - Flash an openlab example on the node
- clone openlab
- compile openlab
- you can program and flash an openlab example :
> cd build.m3/
> make flash_test_leds
- if you want to reset the node :
> make reset
That's it !
6 - If you have firmware with uart interaction (printf,..), you should use minicom or
miniterm.py
on our PC.
> miniterm.py /dev/ttyON_M3 500000
To quit Ctrl+]
You can also use minicom :
```
> minicom -s
* Serial port setup (A) /dev/ttyON_M3
* (E) 500 000
* (F) Hardware Flow control NO
* Modem and Dialing : (A & B = null)
```
7 - For debug :
> cd build.m3/
> make debug
> arm-none-eabi-gdb bin/test_leds.elf
>gdb
Make the connection
(gdb) target remote localhost:3333
Launch the program
(gdb) br main
Continue
(gdb) c
Reset the program to be restarted
(gdb) monitor reset halt
© 2015-2019 FIT/IoT-LAB - ABOUT US - CONTACT US