Skip to content

Commit

Permalink
Remove -ffreestanding link and compile flags, and have main return int
Browse files Browse the repository at this point in the history
  • Loading branch information
danngreen committed Jan 10, 2025
1 parent 782604e commit 48069b9
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion firmware/cmake/arch_mp15xa7.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ add_compile_options(
-fdata-sections
-ffunction-sections
-nostartfiles
-ffreestanding
-fno-unwind-tables
-Wall
-Werror=return-type
Expand Down
4 changes: 1 addition & 3 deletions firmware/cmake/arch_mp15xm4.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ add_compile_options(
-fdata-sections
-ffunction-sections
-nostartfiles
-ffreestanding
-fno-unwind-tables
-Wall
-Werror=return-type
Expand All @@ -50,8 +49,7 @@ add_compile_options(

add_link_options(
-Wl,--gc-sections
-ffreestanding
-nostartfiles
${MCU_FLAGS}
)
endmacro()
endmacro()
1 change: 0 additions & 1 deletion firmware/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,6 @@ target_link_script(
-L${FWDIR}
-Wl,--gc-sections
-Wno-psabi
-ffreestanding
-nostartfiles
)

2 changes: 1 addition & 1 deletion firmware/src/core_a7/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct SystemInit : AppStartup, UartLog, Debug, Hardware {

} // namespace MetaModule

void main() {
int main() {
using namespace MetaModule;

StaticBuffers::init();
Expand Down
2 changes: 1 addition & 1 deletion firmware/src/core_m4/main_m4.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static void app_startup() {

} // namespace MetaModule

void main() {
int main() {
using namespace MetaModule;
using namespace mdrivlib;

Expand Down

0 comments on commit 48069b9

Please sign in to comment.