diff options
author | Oxore <oxore@protonmail.com> | 2023-06-04 14:09:19 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2023-06-04 14:09:45 +0300 |
commit | 1444f0a39e5ac5bd1b2788e99df4d65c666328dc (patch) | |
tree | 2eb7e3158f75cd90ae157fe700ea8889a686ccd6 | |
parent | 7ef56c95b2130e5a23d5e7877f69cc72b80d72b0 (diff) |
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | app/led_driver/led_driver_process.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index af639db..2deb0cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -131,6 +131,7 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE STM32F072=1 LED_DRIVER=1 __FREERTOS__=1 + _POSIX_C_SOURCE=200809L ) set(linker_script_mcu "${CMAKE_SOURCE_DIR}/app/ld/stm32f072x8.ld") @@ -172,6 +173,7 @@ target_link_options(${PROJECT_NAME} PRIVATE -T${linker_script_mcu} -T${linker_script_flash} -T${linker_script_sram} + -Wl,-Map=${PROJECT_NAME}.map -nostartfiles -nostdlib ) diff --git a/app/led_driver/led_driver_process.c b/app/led_driver/led_driver_process.c index 165ef99..1bfc80c 100644 --- a/app/led_driver/led_driver_process.c +++ b/app/led_driver/led_driver_process.c @@ -9,7 +9,7 @@ void LEDDriverProcessFromISR ( void ) { return; - asm volatile("cpsid i"); + __asm__ volatile("cpsid i"); LED_ST_PIN_RESET; for (int j = 0; j < 4; j++) { LED_SPIx->DR = 0; @@ -27,5 +27,5 @@ void LEDDriverProcessFromISR ( void ) while (SPI_I2S_FLAG_BSY & LED_SPIx->SR); } } - asm volatile("cpsie i"); + __asm__ volatile("cpsie i"); } |