-
Notifications
You must be signed in to change notification settings - Fork 103
Switch to GCC 14 #1273
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 14 #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.
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.
removed
I will wait this this PR until I have some other CI related things merged and I've tested the device. |
6ada352
to
9b20c61
Compare
Firmware doesn't work. It doesn't pop up the "unlock" screen. |
c7b41e9
to
1813f5a
Compare
Since usb stack refactoring modern GCC works. |
@@ -228,7 +228,7 @@ bool sd_list_subdir(sd_list_t* list_out, const char* subdir) | |||
} | |||
list_out->num_files = 0; | |||
size_t allocated_files = 16; | |||
list_out->files = (char**)calloc(sizeof(char*), allocated_files); | |||
list_out->files = (char**)calloc(allocated_files, sizeof(char*)); |
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.
🙈
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.
tACK
echo "$GNU_TOOLCHAIN_HASH gcc.tar.${GNU_TOOLCHAIN_FORMAT}" | sha256sum -c &&\ | ||
tar -xvf gcc.tar.${GNU_TOOLCHAIN_FORMAT} -C /usr/local --strip-components=1 &&\ | ||
rm -f gcc.tar.${GNU_TOOLCHAIN_FORMAT} | ||
curl -sSL -o gcc.tar.xz ${GNU_TOOLCHAIN} && \ |
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.
out of curiosity, why wget->curl?
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.
I think we should pick one and not install the other and I think curl is better than wget.
To reduce the size of the binary a bit we could add -mno-unaligned-access because that made struct initialization generate quite a lot more code.