boards/iotlab-m3|a8: fix openocd configuration#8977
Conversation
|
I just recovered my M3 boards :) Well, with one board I had to rename the serial name from |
|
@cladmi can you maybe add a link to the info for the change @rfuentess just did? |
|
There should be no need to rename the FTDI description as we do not force to have the |
|
If someone needs to rename the ftdi description it can be done with https://github.com/iot-lab/iot-lab-ftdi-utils |
|
@cladmi can you verify if there's nothing referencing M3 in the openocd configurations files? I have a gut feeling it should be something inside, since FTDI drivers can be quite generic, they should have a way to "accept" only some, and thus identify them somehow. |
|
There is a link to the file in the openocd mirror in the PR description, you can see the content and check that it never changed during its history. The selection is done on identifiers that cannot be changed |
I don't think the verification of the FTDI device is there. Indeed, the VID and PID are there, but that's always the same since it's the FTDI chip which provide them. However, there might be a verification somewhere which checks for this "M3" on the device. |
|
Yes it was done in the IoT-LAB file https://github.com/iot-lab/iot-lab-gateway/blob/2.4.1/gateway_code/static/iot-lab-m3.cfg#L6 But not here. |
|
AFAIK, that's not the only place where you can declare those requirements. But still, the problem is that nodes flashed as "HiKOB" still don't work with this PR. |
I just played with my M3 board
Maybe there is another issue not addressed by this PR? Relevant info: Ubuntu 16.04.4 LTS 64-bit The following remain static on the boards: |
boards/iotlab-m3/dist/openocd.cfg
Outdated
| ftdi_layout_signal nTRST -data 0x0800 | ||
| ftdi_layout_signal nSRST -data 0x0400 | ||
| # use combined on interfaces or targets that can't set TRST/SRST separately | ||
| reset_config trst_and_srst |
There was a problem hiding this comment.
This doesn't work as is for me but adding connect_assert_srst works.
There was a problem hiding this comment.
Ah, adding connect_assert_srst also breaks the debug target (but this could be solved the same way as in #8856)... and now it works without it (connect_assert_srst).
There was a problem hiding this comment.
With reset_config trst_and_srst connect_assert_srst I indeed need to do a -c 'reset halt' before debugging. With it it works.
|
ping @PeterKietzmann we should try to recover our m3 nodes with this PR tomorrow |
|
For the What I get however, is on the first flash after plugging the board, I have error messages like: and but it still flashes at the end. On the second run I do not get any error messages. There could be missing some initial configuration somewhere. |
|
For me it works whatever the name I put in |
67a2938 to
e32c1ef
Compare
|
I re-organized the configuration to be done AFTER including Adding If I remove |
|
I updated according to @aabadie feedback and now it looks more robust on my side. As it is now using |
This is the purpose of #8976 but for boards using stlink. This is the same problem there. Otherwise, the changes there are valid to me. I need to retest though or maybe @cgundogan can give try ? |
|
I do not really understand my changes and why they fix things, so sure, please re-test on you boards before ACKing. @miri64 and @bergzand it would be cool if you could try on some of your broken boards that I could not flash with the old iotlab configuration. |
|
I tried just now with my broken boards and now they can be flashed without problems. So I'd validate this PR as a fix and merge it asap. |
|
Please squash. |
6e3fa1c to
2c6a123
Compare
|
I squashed the 3 commits and try to explain the last changes, please check the commit message if you find it clear enough. |
Actually the driver used in RIOT is the
s/kee/keep |
iotlab-m3 boards always ended up not being able to flash after time. This changes managed to fix and flash boards that where able to be flashed with the deprecated `ft2232` driver and not with the `ftdi` driver used in RIOT. It combines configuration from openocd, iot-lab, RIOT config and Alexandre Abadie feedback * http://repo.or.cz/openocd.git/blob/HEAD:/tcl/interface/ftdi/iotlab-usb.cfg * ftdi configuration * https://github.com/iot-lab/iot-lab-gateway/blob/2.4.1/gateway_code/static/iot-lab-m3.cfg * `trst_and_srst` config * Alexandre feedback and http://openocd.org/doc/html/Reset-Configuration.html * 'connect_assert_srst' reset configuration * it prevents errors in the output on first flash * should help on boards with invalid code * It was taken from what Alexandre found for board 'b-l072z-lrwan1' * It requires using '-c reset halt' instead of '-c halt' before debug * RIOT * Keep the `configure -rtos` auto
2c6a123 to
d4ca264
Compare
|
I reworded the commit
I reformulated to explain it was working with the
Fixed |
|
Great! Let's go then. |
iotlab-m3boards always ended up not being able to flash after time.This changes managed to fix and flash boards that where able to be flashed with
the old
ftdi2232driver and notRIOTIt combines configuration from openocd, iot-lab and RIOT config
trst_and_srstconfigconfigure -rtosautoI do not understand the configuration, just adapted and tested.
Contribution description
At IoT-LAB, we kept using the old
ftdi2232driver because the unreliability of the riot flashing usingftdibut never looked into how it was done.However, it will not fix issues where there are real hardware issues, just "unstuck" some of the non flashable nodes.
When trying, sometime we flashed two times to make it work I think.
Issues/PRs references
Anyone that got M3 nodes stuck that could not be flashed with RIOT but still flashed by using the IoT-LAB scripts.