-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This code hangs in PlatformIO, not in Arduino IDE #153
Comments
Given you are not initializing the struct, is it possible you have an invalid float that is causing a trap when you do your math? |
Thanks @cujomalainey . |
If you don't multiply by 3 does it work? |
Also might be worth dumping the pointer to see where it's at in each version to see if something is amuck |
Nothing strange about
Yes it does. |
And what is the location of
Hmm if the memset doesn't work then the float being invalid is likely not the issue |
Nothing funny:
On top of that, shouldn't an invalid float be considered as NaN and propagated in every float computation? |
I don't worth floats very often in C, but I wouldn't leave anything to chance here. At this point I would recommend objdumping the assembly code in the .o files and see if there is a difference in the type of instruction used for the multiplication |
Configuration
Operating system: Windows 11
PlatformIO Version: Core 6.0.2 - Home 3.4.2
Description of problem :
The code below targets an Arduino 33 BLE. It runs correctly when compiled and uploaded from the Arduino IDE, but it hangs when compiled and ran from PlatformIO.
Steps to Reproduce
Actual Results
Terminal output:
Expected Results
Terminal output:
Source file to reproduce issue:
Additional info
As far as I can tell, this is a minimum repro code: changing one single element (size of the struct, casting through function f, final multiplication) leads to a working code.
The text was updated successfully, but these errors were encountered: