-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Serial broken with Nucleo F303K8 on GCC-ARM #1631
Comments
I attempted to do some debugging (with GCC 5.2, but hopefully results are still applicable), and found:
|
Thanks for the write-up ! We will have a look at the fix |
Hello, @ducky64 is right. The define in cmsis_nvic.h is not correct |
@adustm look at the referenced pull request (2 comments above) with the fix |
Hello, |
To be closed |
Deploying code exported to GCC-ARM from the mbed online compiler using Serial causes the microcontroller to freeze and end up in
WWDG_IRQHandler()
.If compiled against the mbed library (at tag mbed_lib_rev116) from scratch (as opposed to the pre-compiled .a supplied from the online compiler export), stepping through has it failing in
_file = std::fopen(buf, "w+");
(mbed/common/Stream.cpp:24)The instruction call stack looks like (inside the std::fopen call):
Serial uart(SERIAL_TX, SERIAL_RX);
mbed::Stream::Stream()
_fopen_r()
__sfp()
__sinit()
std.isra.0
where the last instruction executed is:
08005376: str r3, [r0, #0]
(where register r0 = 0, presumably what causes the hardfault)
Note that manually invoking the serial API functions seems to work:
so the root cause of the problem doesn't appear to be the serial HAL, but rather the interaction of the system libraries with ... something ...
I'm using
gcc version 5.2.1 20151202 (release) [ARM/embedded-5-branch revision 231848] (GNU Tools for ARM Embedded Processors)
.Possibly related to this issue:
https://developer.mbed.org/forum/bugs-suggestions/topic/25983
which is 24 days old without a resolution.
The text was updated successfully, but these errors were encountered: