Closed Ciusss89 closed 2 years ago
Hi. If you need openocd only for flashing (not debugging) as a workaround you could use other programmer for STM boards.
See PR #17550 for more detailed explanation, but if you add at the begin of the file boards/nucleo-l479rg/Makefile.include these lines:
DIR_NAME_AT_REMED = "NODE_L479RG"
PROGRAMMERS_SUPPORTED += cpy2remed
And later you can flash program using command:
make BOARD=nucleo-l479rg PROGRAMMER=cpy2remed flash
It works, but IMHO this implementation has some troubles:
/run/media/giuseppe/NODE_L476RG
, so there is a mismatch between (that excludes run
) the prefixed path and the current one.BTW, Why openocd doesn't work anymore? I used it last year and the flashing was fine.
How did you install openocd ? Using the package manager or by building from source ?
I'm using an openocd version built from source (master at aad87180586a43500f8af1cf79255c7293bb258b, from October 25, 2021) and I can flash without any problem.
It works, but IMHO this implementation has some troubles:
Thanks for information - I'm not aware that in various Linux distros removable media are mounted in various directories. I look at this issue and add some logic to the cpy2remed tool which finds appropriate path to mounted flash. I agree that manual patching for each distro is not a good solution.
How did you install openocd ? Using the package manager or by building from source ?
I'm using an openocd version built from source (master at aad87180586a43500f8af1cf79255c7293bb258b, from October 25, 2021) and I can flash without any problem.
The openocd
programmer is coming from the fedora's package manager (0.11.0).
which Linux distro are you using and which is your stm target? I want to isolate the problem, there are three things involved:
I'm trying to compile with on old tag (to exclude a regression on 2, but I got another error on the linking phase :facepalm:)
~/tuttecose/RIOT/examples/hello-world ((2021.01)) $ make BOARD=nucleo-l476rg clean flash
Building application "hello-world" for "nucleo-l476rg" with MCU "stm32".
"make" -C /home/giuseppe/tuttecose/RIOT/boards/nucleo-l476rg
"make" -C /home/giuseppe/tuttecose/RIOT/boards/common/nucleo
"make" -C /home/giuseppe/tuttecose/RIOT/core
"make" -C /home/giuseppe/tuttecose/RIOT/cpu/stm32
"make" -C /home/giuseppe/tuttecose/RIOT/cpu/cortexm_common
"make" -C /home/giuseppe/tuttecose/RIOT/cpu/cortexm_common/periph
"make" -C /home/giuseppe/tuttecose/RIOT/cpu/stm32/periph
"make" -C /home/giuseppe/tuttecose/RIOT/cpu/stm32/stmclk
"make" -C /home/giuseppe/tuttecose/RIOT/cpu/stm32/vectors
"make" -C /home/giuseppe/tuttecose/RIOT/drivers
"make" -C /home/giuseppe/tuttecose/RIOT/drivers/periph_common
"make" -C /home/giuseppe/tuttecose/RIOT/sys
"make" -C /home/giuseppe/tuttecose/RIOT/sys/auto_init
"make" -C /home/giuseppe/tuttecose/RIOT/sys/malloc_thread_safe
"make" -C /home/giuseppe/tuttecose/RIOT/sys/newlib_syscalls_default
"make" -C /home/giuseppe/tuttecose/RIOT/sys/pm_layered
"make" -C /home/giuseppe/tuttecose/RIOT/sys/stdio_uart
/usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld:cortexm_base.ld:215: warning: memory region `bkup' not declared
/usr/lib/gcc/arm-none-eabi/11.1.0/../../../../arm-none-eabi/bin/ld:cortexm_base.ld:215: syntax error
collect2: error: ld returned 1 exit status
make: *** [/home/giuseppe/tuttecose/RIOT/examples/hello-world/../../Makefile.include:615: /home/giuseppe/tuttecose/RIOT/examples/hello-world/bin/nucleo-l476rg/hello-world.elf] Error 1
~/tuttecose/RIOT/examples/hello-world ((2021.01)) $
Closed: tested on ubuntu and it works fine. There is some issue with fedora.
Description
Cannot flash the target (a nucleo-l476rg board) due to several errors on the flash procedure.
Steps to reproduce the issue
Basically from the riot-os examples, after compiling the hello-world the flash of target fails due to openocd' errors..
Versions
RIOT v2022.01