Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Unabe to upload via openocd to Adafruit Feather M4 (STM32F405) (Read 140 times)
Marco S
Newbies
*
Offline



Posts: 4
Unabe to upload via openocd to Adafruit Feather M4 (STM32F405)
Feb 8th, 2020 at 9:37am
 
Hallo,
I try to upload a simple program (blink) to a Adafruit Feather M4 (STM32F405)https://learn.adafruit.com/adafruit-stm32f405-feather-express using the upload method "STLink 2.1 + OpenOCD (vMicro)".

Uploading does not work and I got the output:
...
Info : device id = 0x10076413
Warn : Cannot identify target as a STM32 family.
Error: auto_probe failed
embedded:startup.tcl:476: Error: ** Programming Failed **


The Command line executed is:
C:\ProgramData\vmicro\tools\openocd-0.10.0.1\bin\openocd.exe -d2 -s "C:\ProgramData\vmicro\tools\openocd-0.10.0.1/share/openocd/scripts/" -f "interface/stlink-v2-1.cfg" -f "target/stm32
f3x
.cfg" -c "echo -n {****[vMicro]**** Uploading ELF :}" -c "reset_config; telnet_port disabled; program {{C:\Users\ms\AppData\Local\Temp\VMBuilds\CIE-Test\STM32_~1\Debug/CIE-Test.ino.e
lf}} reset;reset_config;shutdown"

I think the problem comes from the wrong script because it is not a STM32F3x, it is a STM32F405. How can I change this ?

The selected board is "Generic STM32F4 series -> Adafruit Feather STM32F405".

Best regards,
Marco
Back to top
 
 
IP Logged
 
Simon Hopkinson
Administrator
*****
Offline



Posts: 115
Re: Unabe to upload via openocd to Adafruit Feather M4 (STM32F405)
Reply #1 - Feb 8th, 2020 at 1:19pm
 
Thanks for the report, and we will correct this in an upcoming release.

In the meantime if you add a Local Board.txt to the project and put the below entry in, it will override the upload script for the project. (Right Click Project in Solution Explorer > Add > Local Board.txt)

Code:
tools.openocd.upload.openocdscript=target/stm32f4x.cfg 

Back to top
 
 
IP Logged
 
Marco S
Newbies
*
Offline



Posts: 4
Re: Unabe to upload via openocd to Adafruit Feather M4 (STM32F405)
Reply #2 - Feb 8th, 2020 at 4:30pm
 
Thank you. Cheesy It works now.
Back to top
 
 
IP Logged
 
Marco S
Newbies
*
Offline



Posts: 4
Re: Unabe to upload via openocd to Adafruit Feather M4 (STM32F405)
Reply #3 - Feb 9th, 2020 at 6:50am
 
I tried the same fix with an other board: A ST Nucleo-144 STM32H743ZI (the older one with a ST-LINK 2.1)
https://os.mbed.com/platforms/ST-Nucleo-H743ZI/
.

The OpenOCD is invoked with -f "target/stm32f1x.cfg".
I changed the entry in board.txt to target/stm32h7x.cfg" but the file for the STM32H7 is missing:

embedded:startup.tcl:60: Error: Can't find target/stm32h7x.cfg

What should I do ?

Best regards
Marco
Back to top
 
 
IP Logged
 
Simon Hopkinson
Administrator
*****
Offline



Posts: 115
Re: Unabe to upload via openocd to Adafruit Feather M4 (STM32F405)
Reply #4 - Feb 9th, 2020 at 11:29am
 
Thanks for the information, we will double check these before the next major release.

It appears this config is not in the version of OpenOCD which is integrated with vMicro at present, but it seems others have authored this config in the meantime (an example at the below link).  If you download this and drop it into the "C:\ProgramData\VMicro\tools\openocd-0.10.0.1\scripts\target" folder on your PC, and then try it again.

https://github.com/ntfreak/openocd/blob/master/tcl/target/stm32h7x.cfg

We can integrate these in future builds, and if this works please let us know.
Back to top
 
 
IP Logged
 
Marco S
Newbies
*
Offline



Posts: 4
Re: Unabe to upload via openocd to Adafruit Feather M4 (STM32F405)
Reply #5 - Feb 11th, 2020 at 4:54pm
 
This does not work for me. Maybe the most current stm32h7x.cfg file is not compatible with the openocd version from visual micro ?

The output is:

C:\ProgramData\vmicro\tools\openocd-0.10.0.1\bin\openocd.exe -d2 -s "C:\ProgramData\vmicro\tools\openocd-0.10.0.1/share/openocd/scripts/" -f "interface/stlink-v2-1.cfg" -f "target/stm32h7x.cfg" -c "echo -n {****[vMicro]**** Uploading ELF :}" -c "reset_config; telnet_port disabled; program {{C:\Users\ms\AppData\Local\Temp\VMBuilds\Sketch1\STM32_~2\Debug/Sketch1.ino.elf
}} reset;reset_config;shutdown"
Open On-Chip Debugger 0.10.0
The uploader process failed
Licensed under GNU GPL v2
For bug reports, read
     http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
C:/ProgramData/vmicro/tools/openocd-0.10.0.1/bin/..//scripts/target/stm32h7x.cfg
:70: Error: invalid command name "dap"

in procedure 'script'
at file "embedded:startup.tcl", line 60
at file "C:/ProgramData/vmicro/tools/openocd-0.10.0.1/bin/..//scripts/target/stm32h7x.cf
g", line 70
Back to top
 
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print