Skip to content

Files

Failed to load latest commit information.

Latest commit

 Cannot retrieve latest commit at this time.

History

History
 
 

iot-lab_M3

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

License and Acknowledgment

The BSL script iotlab-m3-bsl.py for iot-lab_M3 nodes is a Python version of the doFlash.sh script with additions regarding openocd handling.

The doFlash.sh script is itself an adaptation of code from the IoT-lab team.

The OpenOCD config file iotlab-m3.cfg is a copy of iotlab-m3.cfg; the same license and copyright applies.

We are grateful to Cedric Adjih and the IoT-lab team, in particular Roger Pissard-Gibollet and Gaetan Harter, for their help and for making this code available.

Program the IoT-lab_M3 in Windows

  1. Download openocd Windows binary package from http://openocd.org/
  2. Extract to C:\openocd (or similar)
  3. Add C:\openocd\bin (32-bit Windows) or C:\openocd\bin-x64 (64-bit Windows) to your Windows PATH environment variable.
  4. Rename the openocd executable from openocd-xxx-x.x.x.exe to openocd.exe. The OpenWSN bootloader Python script expects openocd.exe to be found in the PATH. You can test all is OK by typing openocd.exe in a Windows command prompt.
  5. Positions the switch on the IoT-lab_M3 mote in the position away from the USB connector.
  6. Connect the IoT-lab_M3 mote to the USB port of your Windows computer.
  7. Download Zadig from http://zadig.akeo.ie/. This will use to install the libusb-win32 drivers openocd requires.
  8. Open the Zadig executable. Click Options > List All Devices.
  9. Two entries corresponding to the same IoT-lab_M3 node should appear:
    1. M3 (Interface 0)
    2. M3 (Interface 1)
  10. For interfacing with openocd, one of the two ports must be associated with the OpenOCD usb-win32_ft2232 driver available in the OpenOCD installation (see tutorial). We will use M3 (Interface 0).
  11. Select M3 (Interface 0) from the drop down list in Zadig. Select libusb-win32 (xxx) driver and click on the button to replace/install the driver for this interface. Once this is done successfully, openocd in Windows can interact with IoT-lab_M3 node and flash it.
  12. To reprogram the mote, use the usual OpenWSN build scripts. Navigate to the openwsn-fw/ directory and type scons board=iot-lab_M3 toolchain=armgcc bootload=0

NOTE: openocd does not support flashing using typical /dev/ttyUSB* or COMX interfaces. The Python script will flash the first IoT-lab_M3 node connected to the PC, independent from the bootload= argument value.

Program the IoT-lab_M3 in Linux

  1. install openocd by issuing 'sudo apt-get install openocd'
  2. To flash, use the same OpenWSN workflow as in the Windows instructions above.