diff --git a/bootloader/.idea/workspace.xml b/bootloader/.idea/workspace.xml index 1d83622..a65d0c9 100644 --- a/bootloader/.idea/workspace.xml +++ b/bootloader/.idea/workspace.xml @@ -41,31 +41,11 @@ - - - - - - - - - - - - + - - - - - - - - - - - + + diff --git a/bootloader/Dockerfile b/bootloader/Dockerfile index 39c72d3..11f040e 100644 --- a/bootloader/Dockerfile +++ b/bootloader/Dockerfile @@ -10,9 +10,9 @@ RUN apt-get update && apt-get install -y \ COPY . /project WORKDIR /project -#RUN make -j$(nproc) +RUN mkdir build && cd build && cmake .. --preset=Release && cd Release && make -j$(nproc) FROM scratch -COPY --from=builder /project/build/xcore-boot.elf / -COPY --from=builder /project/build/xcore-boot.bin / +COPY --from=builder /project/build/Release/xcore-boot.elf / +COPY --from=builder /project/build/Release/xcore-boot.bin / diff --git a/bootloader/cfg/chconf.h b/bootloader/cfg/chconf.h index 81f0bd2..9d37b86 100644 --- a/bootloader/cfg/chconf.h +++ b/bootloader/cfg/chconf.h @@ -570,12 +570,14 @@ extern volatile uint32_t last_idle_tick; #if !defined(CH_DBG_SYSTEM_STATE_CHECK) #ifdef DEBUG_BUILD #define CH_DBG_SYSTEM_STATE_CHECK TRUE -#elifdef RELEASE_BUILD +#else +#ifdef RELEASE_BUILD #define CH_DBG_SYSTEM_STATE_CHECK FALSE #else #error "Need to define either DEBUG_BUILD or RELEASE_BUILD" #endif #endif +#endif /** * @brief Debug option, parameters checks. @@ -587,12 +589,14 @@ extern volatile uint32_t last_idle_tick; #if !defined(CH_DBG_ENABLE_CHECKS) #ifdef DEBUG_BUILD #define CH_DBG_ENABLE_CHECKS TRUE -#elifdef RELEASE_BUILD +#else +#ifdef RELEASE_BUILD #define CH_DBG_ENABLE_CHECKS FALSE #else #error "Need to define either DEBUG_BUILD or RELEASE_BUILD" #endif #endif +#endif /** * @brief Debug option, consistency checks. @@ -605,12 +609,14 @@ extern volatile uint32_t last_idle_tick; #if !defined(CH_DBG_ENABLE_ASSERTS) #ifdef DEBUG_BUILD #define CH_DBG_ENABLE_ASSERTS TRUE -#elifdef RELEASE_BUILD +#else +#ifdef RELEASE_BUILD #define CH_DBG_ENABLE_ASSERTS FALSE #else #error "Need to define either DEBUG_BUILD or RELEASE_BUILD" #endif #endif +#endif /** * @brief Debug option, trace buffer. @@ -644,12 +650,14 @@ extern volatile uint32_t last_idle_tick; #if !defined(CH_DBG_ENABLE_STACK_CHECK) #ifdef DEBUG_BUILD #define CH_DBG_ENABLE_STACK_CHECK TRUE -#elifdef RELEASE_BUILD +#else +#ifdef RELEASE_BUILD #define CH_DBG_ENABLE_STACK_CHECK FALSE #else #error "Need to define either DEBUG_BUILD or RELEASE_BUILD" #endif #endif +#endif /** * @brief Debug option, stacks initialization. @@ -662,12 +670,14 @@ extern volatile uint32_t last_idle_tick; #if !defined(CH_DBG_FILL_THREADS) #ifdef DEBUG_BUILD #define CH_DBG_FILL_THREADS TRUE -#elifdef RELEASE_BUILD +#else +#ifdef RELEASE_BUILD #define CH_DBG_FILL_THREADS FALSE #else #error "Need to define either DEBUG_BUILD or RELEASE_BUILD" #endif #endif +#endif /** * @brief Debug option, threads profiling. diff --git a/bootloader/cmake/gcc-arm-none-eabi.cmake b/bootloader/cmake/gcc-arm-none-eabi.cmake index 93e7055..0723b06 100644 --- a/bootloader/cmake/gcc-arm-none-eabi.cmake +++ b/bootloader/cmake/gcc-arm-none-eabi.cmake @@ -23,7 +23,7 @@ set(CMAKE_EXECUTABLE_SUFFIX_CXX ".elf") set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) -add_compile_definitions(-DCORTEX_USE_FPU=TRUE) +add_compile_definitions(CORTEX_USE_FPU=TRUE) # MCU specific flags set(TARGET_FLAGS "-mcpu=cortex-m7 -mfpu=fpv5-d16 -mfloat-abi=hard -fomit-frame-pointer -falign-functions=16 -mthumb -fno-common -flto -nostartfiles") diff --git a/bootloader/ext/ChibiOS_21.11.3/CMakeLists.txt b/bootloader/ext/ChibiOS_21.11.3/CMakeLists.txt index 72766d3..f4663ac 100644 --- a/bootloader/ext/ChibiOS_21.11.3/CMakeLists.txt +++ b/bootloader/ext/ChibiOS_21.11.3/CMakeLists.txt @@ -90,18 +90,18 @@ add_library( os/common/ports/ARMv7-M/compilers/GCC/chcoreasm.S #oslib os/oslib/src/chmboxes.c -os/oslib/src/chmemcore.c -os/oslib/src/chmemheaps.c -os/oslib/src/chmempools.c -os/oslib/src/chpipes.c -os/oslib/src/chobjcaches.c -os/oslib/src/chdelegates.c -os/oslib/src/chfactory.c + os/oslib/src/chmemcore.c + os/oslib/src/chmemheaps.c + os/oslib/src/chmempools.c + os/oslib/src/chpipes.c + os/oslib/src/chobjcaches.c + os/oslib/src/chdelegates.c + os/oslib/src/chfactory.c # board ${BOARD_DIR}/board.c # LwIP os/various/lwip_bindings/lwipthread.c -os/various/lwip_bindings/arch/sys_arch.c + os/various/lwip_bindings/arch/sys_arch.c os/various/evtimer.c ${lwipnoapps_SRCS} )