[riot-notifications] [RIOT-OS/RIOT] openocd: add debug_adapter gpio (#11175)

JonaRaemdonck notifications at github.com
Thu Apr 4 17:41:21 CEST 2019

> I was able to get it working with a bluepill and tests/leds and see some blinking.
> Could you add more information on which version(s) of openocd to install or add some links to how to install it, I used [this](https://learn.adafruit.com/programming-microcontrollers-using-openocd-on-raspberry-pi/compiling-openocd), I believe the version must be at least 0.10.0?
> The testing procedure is more for you to tell others how to test it. So maybe add something like:
>     1. Connect RPi pins to swd pins on <board_of_your_choice>
>     2. Run `BOARD=<board_of_your_choice> DEBUG_ADAPTER=sysfsgpio make flash -C <app_of_your_choice>`
>     3. Repeat with different choices (try tests/leds as a start)
> It seems like the udev rules or permissions need to be updated too, can you add some information about that?
> Can you give a concrete example on how this would be useful? The only thing I can think of is for boards like a bluepill without the dfu bootloader flashed on it.
> You may also want to add this since it can't find some configs.
> ```
> # if no openocd specific configuration file, check for default locations:
> # 1. Using the default dist/openocd.cfg (automatically set by openocd.sh)
> # 2. Using the common cpu specific config file
> ifeq (,$(OPENOCD_CONFIG))
>   # if no openocd default configuration is provided by the board,
>   # use the STM32 common one
>   ifeq (0,$(words $(wildcard $(RIOTBOARD)/$(BOARD)/dist/openocd.cfg)))
>     export OPENOCD_CONFIG := $(RIOTBASE)/boards/common/stm32/dist/$(CPU).cfg
>   endif
> endif
> ```

Thanks for the reply. I'm sorry I didn't respond earlier.
I've given a bit more information on the usage of openocd to make that part clearer and indeed that page from adafruit was one of the starting points to make this work.

I dind't have to add any particular udev rules to make this work, but I did have to be member of the gpio group of my system to run without sudo. Does that work for you?

I'm not sure if adding a default configuration is desired, because usually apps should have this specified, but I don't mind adding it.

About the bootloader, I'm not an expert so I don't really know if this would allow you to flash one. The board I'm using does not require me to flash the bootloader.
In this case it is really usefull because we can expand the nodes of our CI system without having to buy additional st-links, j-links, ...

I'll ask my colleagues about the bootloader, maybe they know

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190404/70c9dac7/attachment.html>

More information about the notifications mailing list