iot-lab_M3

Hi all,

I'm trying to flash the iot-lab_M3 board and constantly fail on:

...
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description 'FITECO M3' and serial '*'

I've compiled and installed OpenOCD (0.9.0-dev-00186-g30203b3) which perfectly works with the SAMR21-xpro board.

I use `make BOARD=iot-lab_M3 flash` to try flashing. I also tried to invoke the flash script manually: `sudo BOARD=iot-lab_M3 ./flash.sh hello-world.hex` with the same result.

Has anyone a hint for me what I'm doing wrong.

Thanks and best regards, Martin

Hi Martin, I have a stupid question at this point: did you set PORT correctly?Cheers Emmanuel

Hi Martin!

Sorry, my bad.

I'm trying to flash the iot-lab_M3 board and constantly fail on:

...
Error: no device found
Error: unable to open ftdi device with vid 0403, pid 6010, description
'FITECO M3' and serial '*'

I was told that on the newer nodes they changed the device description from "FITECO M3" to simply "M3" (or "A8-M3" for the nodes connected over an A8).

So, changing this in boards/iot-lab_M3/dist/iot-lab_M3_jtag.cfg should help.

Cheers, Oleg

Hi again!

So, changing this in boards/iot-lab_M3/dist/iot-lab_M3_jtag.cfg should help.

Or try with https://github.com/RIOT-OS/RIOT/pull/1996 - apparently `dev_desc` isn't really necessary.

Cheers, Oleg

Hi Oleg,

thx for the reply and the PR, its better now, but now fails with:

...
Info : clock speed 1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020, part: 0x6414, ver: 0x0)
Error: Failed to read memory at 0x00000000
Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed
Error: MEM_AP_CSW 0x23000042, MEM_AP_TAR 0xe000edf0
...

Best regards, Martin

Hi Martin!

thx for the reply and the PR, its better now, but now fails with:

``` ... Info : clock speed 1000 kHz Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3) Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020, part: 0x6414, ver: 0x0) Error: Failed to read memory at 0x00000000 Error: JTAG-DP OVERRUN - check clock, memaccess, or reduce jtag speed Error: MEM_AP_CSW 0x23000042, MEM_AP_TAR 0xe000edf0 ...

Indeed, I had a similar problem. Reverting to the old configuration (git revert e455664cfc75f9b5dfb3a8f04349dadac6a85c7d) helped. After flashing once with the legacy configuration, it worked again with the current settings. I have no idea why. But maybe we should revert to the legacy settings for now.

Cheers, Oleg

Hi Oleg,

sorry for bothering. I reverted, but still no luck :frowning:

invoking `make BOARD=iot-lab_M3 flash` results in

...
DEPRECATED! use 'adapter_khz' not 'jtag_khz'
adapter speed: 1000 kHz
Error: The specified debug interface was not found (ft2232)
...

I tried to change iot-lab_M3_jtag.cfg:5 to FT2232H -> same result. using ftdi resulted in `invalid command name "ft2232_layout"` for the next line

dmesg states with the connected device:

[19263.378582] usb 2-1.2: new high-speed USB device number 15 using ehci-pci
[19263.473542] usb 2-1.2: New USB device found, idVendor=0403, idProduct=6010
[19263.473550] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[19263.473555] usb 2-1.2: Product: M3
[19263.473559] usb 2-1.2: Manufacturer: IoT-LAB
[19263.474569] ftdi_sio 2-1.2:1.0: FTDI USB Serial Device converter detected
[19263.474637] usb 2-1.2: Detected FT2232H
[19263.474643] usb 2-1.2: Number of endpoints 2
[19263.474648] usb 2-1.2: Endpoint 1 MaxPacketSize 512
[19263.474654] usb 2-1.2: Endpoint 2 MaxPacketSize 512
[19263.474659] usb 2-1.2: Setting MaxPacketSize 512
[19263.474961] usb 2-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
[19263.475803] ftdi_sio 2-1.2:1.1: FTDI USB Serial Device converter detected
[19263.475874] usb 2-1.2: Detected FT2232H
[19263.475880] usb 2-1.2: Number of endpoints 2
[19263.475885] usb 2-1.2: Endpoint 1 MaxPacketSize 512
[19263.475889] usb 2-1.2: Endpoint 2 MaxPacketSize 512
[19263.475893] usb 2-1.2: Setting MaxPacketSize 512
[19263.476231] usb 2-1.2: FTDI USB Serial Device converter now attached to ttyUSB1

Best regards, Martin

Hi Martin!

sorry for bothering.

No problem.

invoking `make BOARD=iot-lab_M3 flash` results in

...
DEPRECATED! use 'adapter_khz' not 'jtag_khz'
adapter speed: 1000 kHz
Error: The specified debug interface was not found (ft2232)
...

If you have built OpenOCD yourself, make sure to run the configure script with --enable-legacy-ft2232_ftd2xx to enable the legacy interface (IIRC). Thomas might correct me if I'm wrong.

Cheers, Oleg

Hi Oleg,

tried it, but still no luck. I also tried it together with @PeterKietzmann on a different linux distribution but all the same results for all steps.

Best regards, Martin

Hi Martin,

below the configuration options I use to build for OS X

./configure —disable-dependency-tracking —prefix=<your/desired/path> —enable-dummy —enable-buspirate —enable-jtag_vpi —enable-remote-bitbang —enable-usb_blaster_libftdi —enable-presto_libftdi —enable-openjtag_ftdi —enable-legacy-ft2232_libftdi

Let me know if this helps, I’d update the wiki accordingly.

Best, Thomas

Hi Thomas,

it worked! :smiley:

  1. I had to install libftdi-dev first. ./configure complained checking for LIBFTDI... no using your provided options.

  2. I used: ./configure --disable-dependency-tracking --prefix=<my/desired/path> --enable-dummy --enable-buspirate --enable-jtag_vpi --enable-remote-bitbang --enable-usb_blaster_libftdi --enable-presto_libftdi --enable-openjtag_ftdi --enable-legacy-ft2232_libftdi as you provided.

This didn’t helped alone.

  1. I applied git revert e455664cfc75f9b5dfb3a8f04349dadac6a85c7d as Oleg stated, and

  2. I removed the ftdi_device_desc form iot-lab_M3_jtag.cfg and viola, it flashes.

Now the spooky part (confirms Oleg’s observation): After flashing the device once I reverted the revert, and can flash with the current iot-lab_M3_jtag.cfg configuration (still have to remove ftdi_device_desc)

Thx Thomas, thx Oleg.

Best regards, Martin