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) Freezes STM32F103 with ST Link (Read 12523 times)
xmen
Junior Member
**
Offline


Posts: 56
Joined: Aug 22nd, 2016
Freezes STM32F103 with ST Link
Aug 27th, 2016 at 6:56am
Print Post  
I have a sketch to upload, which works fine if I upload it with arduino ide.
But whenever I upload it with visual micro, it just freezes the display attached to stm32. I tried some other sketches too. All does same. Works with arduino ide but not with visual micro.

I'm uploading to STM32F103C through ST Link. Also there is nothing connected to COM12. I dont know why it tries to reset the bootloader through COM12.

Here what happens when I run it.

Quote:
Compiling 'Test' for 'Generic STM32F103C series'
 
libnosys.a(sbrk.o)*: In function _sbrk
sbrk.c*: (.text._sbrk+0x30): warning: undefined reference to end
Program size: 1,00,728 bytes (used 77% of a 1,31,072 byte maximum) (9.31 secs)
 
Uploading 'Test' to 'Generic STM32F103C series' using 'COM12'
Resetting to bootloader via Serial
STM32 ST-LINK CLI v2.1.0
STM32 ST-LINK Command Line Interface
ST-LINK SN : 
ST-LINK Firmware version : V2J23S4
Connected via SWD.
SWD Frequency = 1800K.
Connection mode : Normal.
Device ID:0x410 
Device flash Size : 64 Kbytes
Device family :STM32F10xx Medium-density
Loading file...
Flash Programming:
  File : C:\Users\[USER]\AppData\Local\Temp\VMICRO~1\Test\ARDUIN~1\Test.BIN
     The upload process has finished.
  Address : 0x08000000
Flash memory programming...
±±±±±±±±±± 0%
0%ÛÛÛ 7%ÛÛÛÛ 15%ÛÛÛÛ 22%ÛÛÛÛ 30%ÛÛÛÛ 38%ÛÛÛ 45%ÛÛÛÛ 53%ÛÛÛÛ 60%ÛÛÛÛ 68%ÛÛÛÛ 76%ÛÛÛ 83%ÛÛÛÛ 91%ÛÛÛÛ 99%Û 100%
Flash memory programmed in 12s and 74ms.
Programming Complete.
MCU Reset.
Application started.


« Last Edit: Aug 27th, 2016 at 6:59am by xmen »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Freezes STM32F103 with ST Link
Reply #1 - Aug 27th, 2016 at 9:23am
Print Post  
Thanks for the post. 

I suspect the issue is related to the compiler warning prior to the upload. I might be wrong ...

Two other people reported previously something similar issue with mcu not working, but when asked for a verbose output they never responded.

I am keen to find this issue and would appreciate the following:-

1) In the arduino ide switch on file>preferences>compile verbose and upload verbose
2) Build and upload then attach the resulting output as .txt
3) In Visual micro switch on Vmicro>compiler>verbose then build and upload and again post the output as .txt file

If you would prefer to email the .txt files instead of posting then please do so to info[at]visualmicro.com along with link to this post

I will also do some testing shortly. If you expect to use a programmer then please ensure you have checked "vmicro>upload>always use programmer"

Thanks
« Last Edit: Aug 27th, 2016 at 9:25am by Tim@Visual Micro »  
Back to top
IP Logged
 
xmen
Junior Member
**
Offline


Posts: 56
Joined: Aug 22nd, 2016
Re: Freezes STM32F103 with ST Link
Reply #2 - Aug 27th, 2016 at 11:13am
Print Post  
« Last Edit: Aug 27th, 2016 at 11:16am by xmen »  
Back to top
 
IP Logged
 
xmen
Junior Member
**
Offline


Posts: 56
Joined: Aug 22nd, 2016
Re: Freezes STM32F103 with ST Link
Reply #3 - Aug 27th, 2016 at 11:23am
Print Post  
Also, if I check VMicro > Uploader > Always use programmer for Uploader. I get this error.

Quote:

Compiling 'stm32_graphicstest' for 'Generic STM32F103C series'
 
libnosys.a(sbrk.o)*: In function _sbrk
sbrk.c*: (.text._sbrk+0x30): warning: undefined reference to end
Program size: 51,052 bytes (used 39% of a 1,31,072 byte maximum) (10.71 secs)
 
Uploading 'stm32_graphicstest' to 'Generic STM32F103C series' using 'avrispmkii'
Upload failed. Did you select the correct upload method for this board? (Missing key exception)


I already have Upload method : ST Link in Option 2. I dont know from where its reading avrispmkii. But the programmer combobox is empty above the "Always use programmer" menu item.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Freezes STM32F103 with ST Link
Reply #4 - Aug 27th, 2016 at 4:00pm
Print Post  
Okay, don't use "upload using programmer" because it doesn't sound like the stm core uses the programmer system it does it a different way using a board option

I will look into it thanks

I expect you can ignore the com port COM12 report. Visual micro remembers the last port or Ip address that was used unless using a hardware programmer

In the case of stm it's not using the normal arduino system but is using a programmer but via board options. So it won't actually make use of the com port but Visual Micro can't know that (and doesn't need to know it). 

If COM12 doesn't exist it would be useful if Visual Micro didn't bother showing it however some boards boot to a "programming com port" when requested so in some cases setting a port that doesn't exist is required.

« Last Edit: Aug 27th, 2016 at 4:07pm by Tim@Visual Micro »  
Back to top
IP Logged
 
xmen
Junior Member
**
Offline


Posts: 56
Joined: Aug 22nd, 2016
Re: Freezes STM32F103 with ST Link
Reply #5 - Aug 27th, 2016 at 6:07pm
Print Post  
Thanks waiting for an update. If you need another hand for coding, let me know.
  
Back to top
 
IP Logged
 
xmen
Junior Member
**
Offline


Posts: 56
Joined: Aug 22nd, 2016
Re: Freezes STM32F103 with ST Link
Reply #6 - Aug 30th, 2016 at 12:11pm
Print Post  
Any update ?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Freezes STM32F103 with ST Link
Reply #7 - Aug 30th, 2016 at 12:22pm
Print Post  
Hi, Sorry Arduino changed some things in the latest 1.6.11 so I got wrapped up sorting that out.


STM32 is next. Which board do you have?
  
Back to top
IP Logged
 
xmen
Junior Member
**
Offline


Posts: 56
Joined: Aug 22nd, 2016
Re: Freezes STM32F103 with ST Link
Reply #8 - Aug 30th, 2016 at 12:23pm
Print Post  
STM32F103C8T6 blue board
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Freezes STM32F103 with ST Link
Reply #9 - Aug 31st, 2016 at 6:41am
Print Post  
There is an update with a fix.

Thanks for the info the issue was the core variant objects are no longer archived into a core.a, instead are passed to the linker before the core.a

  
Back to top
IP Logged
 
xmen
Junior Member
**
Offline


Posts: 56
Joined: Aug 22nd, 2016
Re: Freezes STM32F103 with ST Link
Reply #10 - Aug 31st, 2016 at 8:02am
Print Post  
Thank you very much, Admin.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Freezes STM32F103 with ST Link
Reply #11 - Sep 10th, 2016 at 4:33am
Print Post  
Hi,

There is a new update with some things that might help.

The intellisense might not have worked so well with the stm32 core in previous versions.

The gdb debugging is working the nucleo but if your board is capable you could try a couple of things if everything else is working okay.

Let me know if you want to try getting the gdb to work. I don't know your specific board so you would need to confirm stlink connection?
  
Back to top
IP Logged
 
xmen
Junior Member
**
Offline


Posts: 56
Joined: Aug 22nd, 2016
Re: Freezes STM32F103 with ST Link
Reply #12 - Sep 10th, 2016 at 2:35pm
Print Post  
I can't debug as I do not have pro version. And my board is stm32f103c8t6 with St Link.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12188
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Freezes STM32F103 with ST Link
Reply #13 - Sep 10th, 2016 at 3:14pm
Print Post  
Actually you can use the gdb if it's supported for your board but you get nag screens every so often when you start debug.

However I haven't added an openocd .cfg file for your board yet because I don't know which .cfg to use.

So let's just confirm where were are with your original report.

1)
Was the compile issue that probably caused the freeze was resolved by previous visual micro update?

2)
The uploading looked fine. The verbose output about resetting to bootloader is correct and is part of the output from the st link device programmer not produced by visual micro. The upload happened correctly and you should NOT try to use the "Always Use Programmer" option on the Visual Micro uploader menu because you hardware does not use that system (just normal usb).

Appreciate knowing the status

Thanks

here is your original report

Code
Select All
Compiling 'Test' for 'Generic STM32F103C series'

libnosys.a(sbrk.o)*: In function _sbrk
sbrk.c*: (.text._sbrk+0x30): warning: undefined reference to end
Program size: 1,00,728 bytes (used 77% of a 1,31,072 byte maximum) (9.31 secs)

Uploading 'Test' to 'Generic STM32F103C series' using 'COM12'
Resetting to bootloader via Serial
STM32 ST-LINK CLI v2.1.0
STM32 ST-LINK Command Line Interface
ST-LINK SN :
ST-LINK Firmware version : V2J23S4
Connected via SWD.
SWD Frequency = 1800K.
Connection mode : Normal.
Device ID:0x410
Device flash Size : 64 Kbytes
Device family :STM32F10xx Medium-density
Loading file...
Flash Programming:
  File : C:\Users\[USER]\AppData\Local\Temp\VMICRO~1\Test\ARDUIN~1\Test.BIN
     The upload process has finished.
  Address : 0x08000000
Flash memory programming...

±±±±±±±±±± 0%
0%ÛÛÛ 7%ÛÛÛÛ 15%ÛÛÛÛ 22%ÛÛÛÛ 30%ÛÛÛÛ 38%ÛÛÛ 45%ÛÛÛÛ 53%ÛÛÛÛ 60%ÛÛÛÛ 68%ÛÛÛÛ 76%ÛÛÛ 83%ÛÛÛÛ 91%ÛÛÛÛ 99%Û 100%
Flash memory programmed in 12s and 74ms.
Programming Complete.
MCU Reset.
Application started.
 

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