-
Notifications
You must be signed in to change notification settings - Fork 95
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
Switch to GCC 13 #1273
base: master
Are you sure you want to change the base?
Switch to GCC 13 #1273
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
CMakeLists.txt
Outdated
@@ -224,7 +224,7 @@ configure_file(src/bootloader/bootloader_version.h.in src/bootloader/bootloader_ | |||
string(APPEND CMAKE_C_FLAGS " -std=c11 -pipe") | |||
if(CMAKE_CROSSCOMPILING) | |||
set(CMAKE_C_FLAGS "\ | |||
${CMAKE_C_FLAGS} -mcpu=cortex-m4 -mthumb -mlong-calls \ | |||
${CMAKE_C_FLAGS} -mcpu=cortex-m4 -mthumb -mlong-calls -mno-unaligned-access \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this safe, or does this introduce risk? If it's safer to not use this flag we could postpone using this trick until we need to save bytes more urgently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, not sure what the impact is. I think unaligned accesses can be problematic on some platforms, so I would assume that no unaligned access would be safer than allowing it.
I will wait this this PR until I have some other CI related things merged and I've tested the device. |
Firmware doesn't work. It doesn't pop up the "unlock" screen. |
To reduce the size of the binary a bit we add -mno-unaligned-access because that made struct initialization generate quite a lot more code.
In the new toolchain
assert
is defined as a macro. That interferes with the ASF function calledassert
so we undefined it right before that function is defined.We also have to provide the search path to the linker to our dummy files libssp and libssp_nonshared. The actual implementation of the stack protector functions are in common_main.c.