Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Attempting to download C projects with releases 0.3.x and later result in hard fault error #21
After upgrading tools to the 0.3.x firmware release and later, attempts to program a project containing a C file results in a hard fault blinking red LED error condition as described by Particle Docs.
Reverting the configuration to the values used before this commit and adding -mthumb as was done with the C++ flags as shown in this commit resolves this issue.
The issue can be demonstrated and fix can be tested with a small change to pull in a C file within the Blink.ino example project. See this branch and example project Blink_C for an example. Building/downloading this project with the platform.txt file on the master tree results in a hard fault condition. Modifying the platform.txt file at C:\Users\Username\AppData\Local\Arduino15\packages\RedBear\hardware\STM32F2\0.3.1\platform.txt as shown in this commit resolves the issue. Tested with Arduino 1.8.5 on Windows.