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
Normal Topic trouble getting STM32duino working properly (Read 1202 times)
Captain Credible
Junior Member
**
Offline


Posts: 11
Joined: Feb 6th, 2018
trouble getting STM32duino working properly
Apr 22nd, 2020 at 2:33pm
Print Post  
I am trying to use vmicro to program my stm32f103c8t6 "blue pill" boards. https://github.com/stm32duino Everything works flawlessly in the arduino IDE (1.8.12, 1.8.8 and 1.8.6) but when i use visual micro (with the IDE location set to any one of these 3 installs) It compiles, differently. One obvious difference is that the when compiling in Visual Studio, the compiler wont allow functions to be defined after void setup(), while in the Arduino IDE this is fine. And after making sure the functions are all defined in the right order, the code runs completely differently on the microcontroller when compiled in visual micro. Should there really be a difference in how VM and Arduino IDE compile code ?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: trouble getting STM32duino working properly
Reply #1 - Apr 22nd, 2020 at 2:46pm
Print Post  
It should be the same but there are options in visual micro that you might have altered that has affected things. This is why we have the big yellow not to request that you submit your build info, otherwise we are left guessing.

You also don't qualify what "with the IDE location set to any one of these 3 installs)" means.
  
Back to top
WWW  
IP Logged
 
Captain Credible
Junior Member
**
Offline


Posts: 11
Joined: Feb 6th, 2018
Re: trouble getting STM32duino working properly
Reply #2 - Apr 22nd, 2020 at 4:02pm
Print Post  
Sorry, here is a  build log file attached. 

regarding the "with the IDE location set to any one of these 3 installs" I meant regardless of what installed version of Arduino IDE i point to in the "configure IDE locations" menu, i get the same behaviour. 

I have the latest version in program files, installed with installer, and i have the other two versions mentioned installed in other locations using the "ZIP file for non admin install" option on arduino.cc . I have these 3 versions because of compatibility issues in other projects, and to be able to have altered libraries specific to one of these versions.
  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: trouble getting STM32duino working properly
Reply #3 - Apr 23rd, 2020 at 12:26pm
Print Post  
okay thanks

1)

There have been some improvements to the new prototype generation system which might be the solution. Please update.

https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES


2)

If that does not resolve then please switch off debugging and then submit build output again.

Also please give same from arduino ide after switching on file>preferences>compile verbose.

I expect we might see library or other paths are different.
  
Back to top
WWW  
IP Logged
 
Captain Credible
Junior Member
**
Offline


Posts: 11
Joined: Feb 6th, 2018
Re: trouble getting STM32duino working properly
Reply #4 - Apr 23rd, 2020 at 5:43pm
Print Post  
First off, thanks for the swift and helpful responses! 

I downloaded the latest update and presto, it seems to have completely fixed the problem! Compiled code behaves as it should on the microcontroller, and now I can define functions wherever the heck i want in the code. 

On a related note, though it doesn't seem to be affecting how the codecompiles and runs, I am getting an intellisense error : static_assert(sizeof(JoystickReport_t)==13, "Wrong endianness/packing!"); 
tracked down this thread that suggests the compiler needs to have "C99 support" enabled. 

dunno if this can or should be fixed..
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint