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 Raspberry Pi Pico Compiles, and after upload, freezes chip (Read 89 times)
Corey Cooper
Newbies
*
Offline


Posts: 5
Joined: May 10th, 2014
Raspberry Pi Pico Compiles, and after upload, freezes chip
Aug 12th, 2025 at 6:54pm
Print Post  
I have been using VS2019 and VS2022 for many years, and for a year or so on a project using a Pico card using the Earl Philhower Pico library.  I didn't do anything on it for a month or so, and when I got back to it, when I compiled and downloaded the program the card did nothing, not even showing a Com port any more.  After trying a few different Pico cards, I though I might have updated the Philhower library, and I did change a few lines of code, so I started to figure out what was wrong. I tried many things starting with going to older versions of my program, (by booting the Pico holding down the button so it appeared on my system as a USB drive), reinstalling to an older version of the Pico board library, and ending with a simple "Blink" program, all to no avail.

I finally tried to compile with the Arduino IDE, and everything, Blink and the larger project, worked properly.

I just tried to install an older version (25.0314.1) of Visual Micro, but is still does not work.  In going to the older version, I had to uninstall the newer one first, so theoretically, it should have reset everything to 'defaults', and I have checked all the "Option" parameters and they match the Arduino 2.3.5 parameters, so I'm at a loss.

I've attached the Build Properties text file. and since the zip of the folder with the project is "too large" to attach, here is a link to the zipped Blink program I created, which will also have the Solution and project files: 
https://www.dropbox.com/scl/fi/193l7jfes0gg816us6c66/PicoBlink.zip?rlkey=405c8h2...


« Last Edit: Aug 12th, 2025 at 6:56pm by Corey Cooper »  

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


Posts: 2758
Joined: Feb 13th, 2019
Re: Raspberry Pi Pico Compiles, and after upload, freezes chip
Reply #1 - Aug 12th, 2025 at 8:40pm
Print Post  
Thanks for the project and the log from vMicro.

Tip: When Zipping a project you can exclude the ".vs" folder which is quite large and is only a cache.

Can you try setting the "Stack Protector" Board Menu option to "Disabled", and reupload the code to the board in vMicro?

Reinstalling Visual Micro does not reset all options, as these are stored in the project or registry.
  
Back to top
IP Logged
 
Corey Cooper
Newbies
*
Offline


Posts: 5
Joined: May 10th, 2014
Re: Raspberry Pi Pico Compiles, and after upload, freezes chip
Reply #2 - Aug 12th, 2025 at 10:00pm
Print Post  
I disabled the Stack Protector, and that seems to have fixed the issue.  I don't remember adding that,. but it does seem to be default disabled in the Arduino IDE, I missed that.

I suppose I should add the bool core1_separate_stack = true; to increase the stack sizes.

Any explanation why that causes an issue, even on a project with minimal stack and single core?
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2758
Joined: Feb 13th, 2019
Re: Raspberry Pi Pico Compiles, and after upload, freezes chip
Reply #3 - Aug 14th, 2025 at 11:31am
Print Post  
Quote:
Any explanation why that causes an issue, even on a project with minimal stack and single core?


Currently no, and it would need debugging with GDB to gain further insight into why it is crashing so early in the code.

The GCC flag was changed in this Pull Request from -fstack-protector to -fstack-protector-all, which seems to have caused the issue (Affecting the board package from v4.5.4 onwards)

If you add a Local Board.txt to the project with the below entry it all works as expected with the Stack Protector Enabled.
menu.stackprotect.Enabled.build.flags.stackprotect=-fstack-protector

We will log an issue on GitHub regarding this and post the link here when it is completed.
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint