From 1444f0a39e5ac5bd1b2788e99df4d65c666328dc Mon Sep 17 00:00:00 2001 From: Oxore Date: Sun, 4 Jun 2023 14:09:19 +0300 Subject: Fix for GCC 12.2, add map file generation --- CMakeLists.txt | 2 ++ 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"); } -- cgit v1.2.3