Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 8 Replies) STM32F103C8T6 debug error (Read 1874 times)
msafar
Junior Member
**
Offline


Posts: 12
Joined: Mar 7th, 2022
STM32F103C8T6 debug error
May 28th, 2022 at 9:50am
Print Post  
2 months ago it went, mosr unfortunately didn't go to programming and so debug either.
I can't program the chip with ST-Link v2, I always get the following messages:


Debugger: STLink v2 (External)
Compiling 'Grill6ServoSTM' for 'Generic STM32F1 series'
Program size: 22,340 bytes (used 34% of a maximum of 65,536 bytes) (160.42 secs)
Minimum Memory Usage: 1000 bytes (5% of a maximum of 20480 bytes)
 
Uploading 'Grill6ServoSTM' to 'Generic STM32F1 series' using 'COM5'
Uploader started for board Generic STM32F1 series
The upload method will be: bootloader
Uploading via Bootloader
C: \ ProgramData \ vmicro \ tools \ openocd-0.10.0.20200213 \ bin \ openocd.exe -d2 -s "C: \ ProgramData \ vmicro \ tools \ openocd-0.10.0.20200213 / scripts /" -f "interface / stlink. cfg "-c CPUTAPID 0x2ba01477 -f" target / stm32f1x.cfg "set -c" echo -n {**** [vMicro] **** Uploading ELF:} "-c" reset_config; telnet_port disabled; program {C: \ Users \ Cnc \ AppData \ Local \ Temp \ VMBuilds \ GRILL6 ~ 1 \ STMICR ~ 1 \ Debug / Grill6ServoSTM.ino.elf} reset; reset_config; shutdown "
The uploader returned an error
Open On-Chip Debugger 0.10.0 + dev-01058-g853a05287 (2020-02-13-16: 41)
Licensed under the GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
debug_level: 2
Unexpected command line argument: 0x2ba01477


Board.txt :

tools.stlinkv2.server.targetCmd=-c CPUTAPID 0x2ba01477 -f "{tools.openocd.debug.build.openocdscript}" 
tools.stlinkv2.upload.targetCmd=-c CPUTAPID 0x2ba01477 -f "{tools.openocd.upload.openocdscript}"


Do you also need a serial port for programming with ST-Link v2?
What have I done wrong ?

safi
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
msafar
Junior Member
**
Offline


Posts: 12
Joined: Mar 7th, 2022
Re: STM32F103C8T6 debug error
Reply #1 - May 28th, 2022 at 10:02am
Print Post  
I was able to program the panel.
Steps:
- holding down the RESET button,
- Start upload,
- Release the RESET button

Question:
To program with ST-Link v2, is a RESET issued via the serial port, or is it enough to connect the RESET pin to the STM32 RESET pin in ST-Link v2, or press the RESET button?

However, the debug still doesn't work. After a successful upload, I get an error message for "Attach to Process". (attached).

What else are you ruining?

safi
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
msafar
Junior Member
**
Offline


Posts: 12
Joined: Mar 7th, 2022
Re: STM32F103C8T6 debug error
Reply #2 - May 28th, 2022 at 10:07am
Print Post  
I will also attach the Debug log.
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: STM32F103C8T6 debug error
Reply #3 - May 28th, 2022 at 11:32am
Print Post  
Thanks for the report and detailed information.

The Error "Unexpected command line argument: 0x2ba01477" is due to the command not being quoted in the board.txt overrides.

If you alter the Board.txt to the below this should work:
Code
Select All
tools.stlinkv2.server.targetCmd=-c "CPUTAPID 0x2ba01477" -f "{tools.openocd.debug.build.openocdscript}"
tools.stlinkv2.upload.targetCmd=-c "CPUTAPID 0x2ba01477" -f "{tools.openocd.upload.openocdscript}" 

  
Back to top
 
IP Logged
 
msafar
Junior Member
**
Offline


Posts: 12
Joined: Mar 7th, 2022
Re: STM32F103C8T6 debug error
Reply #4 - May 28th, 2022 at 11:44am
Print Post  
I tried, unfortunately it doesn't work that way.

safi
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: STM32F103C8T6 debug error
Reply #5 - May 28th, 2022 at 12:40pm
Print Post  
Thanks for the update, the OpenOCD command is also missing the set keyword:
Code
Select All
tools.stlinkv2.server.targetCmd=-c "set CPUTAPID 0x2ba01477" -f "{tools.openocd.debug.build.openocdscript}"
tools.stlinkv2.upload.targetCmd=-c "set CPUTAPID 0x2ba01477" -f "{tools.openocd.upload.openocdscript}"  

  
Back to top
 
IP Logged
 
msafar
Junior Member
**
Offline


Posts: 12
Joined: Mar 7th, 2022
Re: STM32F103C8T6 debug error
Reply #6 - May 28th, 2022 at 5:34pm
Print Post  
Thanks for the tip !

I tried it, unfortunately it doesn't work:

safi
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
msafar
Junior Member
**
Offline


Posts: 12
Joined: Mar 7th, 2022
Re: STM32F103C8T6 debug error
Reply #7 - May 28th, 2022 at 6:08pm
Print Post  
I chose another STM32F103C8T6 board, which was a successful programming, even though the board.txt was empty.
However, "Attach to Process" indicates an error.

Something is still not good.

safi
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2174
Joined: Feb 13th, 2019
Re: STM32F103C8T6 debug error
Reply #8 - May 30th, 2022 at 10:15am
Print Post  
Thanks for the update.

Can you enable the options shown at the top of the page, as well as enabling vMicro > Uploader > Verbose.

Then perform a full build, and try attaching the debugger, and attach the full output as a text file.

Please also attach the OpenOCD.log file from the build folder which should reveal more information about the issue (How to Find OpenOCD Log File)
  
Back to top
 
IP Logged
 
msafar
Junior Member
**
Offline


Posts: 12
Joined: Mar 7th, 2022
Re: STM32F103C8T6 debug error
Reply #9 - May 30th, 2022 at 4:03pm
Print Post  
Sorry for the late response. Now it seems that the debug works ...
I'm still testing ...
I apply if I get stuck or if it goes steadily.
Thanks for the help!

safi
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint