diff options
| author | HiFiPhile <[email protected]> | 2025-11-21 23:14:29 +0100 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2025-12-14 18:55:34 +0100 |
| commit | 23451ce886ba1eddf194edba4f9b65794dcdc3bd (patch) | |
| tree | 97fe9c132207555201cb86b37813537545061299 | |
| parent | 3d809988b2fc7ff567c3bc98f8bd2a154095837a (diff) | |
bsp/samx7x: add IAR build
Signed-off-by: HiFiPhile <[email protected]>
| -rw-r--r-- | hw/bsp/same7x/boards/same70_qmtech/board.cmake | 2 | ||||
| -rw-r--r-- | hw/bsp/same7x/boards/same70_xplained/board.cmake | 3 | ||||
| -rw-r--r-- | hw/bsp/same7x/family.cmake | 17 |
3 files changed, 14 insertions, 8 deletions
diff --git a/hw/bsp/same7x/boards/same70_qmtech/board.cmake b/hw/bsp/same7x/boards/same70_qmtech/board.cmake index cde4c3da6..7937330e3 100644 --- a/hw/bsp/same7x/boards/same70_qmtech/board.cmake +++ b/hw/bsp/same7x/boards/same70_qmtech/board.cmake @@ -1,4 +1,4 @@ -set(JLINK_DEVICE SAME70N19B) +set(JLINK_DEVICE ATSAME70N19B) set(LD_FILE_GNU ${TOP}/hw/mcu/microchip/same70/same70b/gcc/gcc/same70q21b_flash.ld) function(update_board TARGET) diff --git a/hw/bsp/same7x/boards/same70_xplained/board.cmake b/hw/bsp/same7x/boards/same70_xplained/board.cmake index b226b6c4f..2350a4a28 100644 --- a/hw/bsp/same7x/boards/same70_xplained/board.cmake +++ b/hw/bsp/same7x/boards/same70_xplained/board.cmake @@ -1,5 +1,6 @@ -set(JLINK_DEVICE SAME70Q21B) +set(JLINK_DEVICE ATSAME70Q21B) set(LD_FILE_GNU ${TOP}/hw/mcu/microchip/same70/same70b/gcc/gcc/same70q21b_flash.ld) +set(LD_FILE_IAR ${TOP}/hw/mcu/microchip/same70/same70b/iar/config/linker/Microchip/atsame70q21b/flash.icf) function(update_board TARGET) target_compile_definitions(${TARGET} PUBLIC diff --git a/hw/bsp/same7x/family.cmake b/hw/bsp/same7x/family.cmake index a9c9de413..fcfa9b583 100644 --- a/hw/bsp/same7x/family.cmake +++ b/hw/bsp/same7x/family.cmake @@ -15,6 +15,7 @@ set(FAMILY_MCUS SAMX7X CACHE INTERNAL "") #------------------------------------ set(STARTUP_FILE_GNU ${SDK_DIR}/same70b/gcc/gcc/startup_same70q21b.c) set(STARTUP_FILE_Clang ${STARTUP_FILE_GNU}) +set(STARTUP_FILE_IAR ${SDK_DIR}/same70b/iar/iar/startup_same70q21b.c) set(LD_FILE_Clang ${LD_FILE_GNU}) #------------------------------------ @@ -47,12 +48,14 @@ function(family_add_board BOARD_TARGET) update_board(${BOARD_TARGET}) - target_compile_options(${BOARD_TARGET} PUBLIC - -Wno-error=unused-parameter - -Wno-error=cast-align - -Wno-error=redundant-decls - -Wno-error=cast-qual - ) + if (CMAKE_C_COMPILER_ID STREQUAL "GNU") + target_compile_options(${BOARD_TARGET} PUBLIC + -Wno-error=unused-parameter + -Wno-error=cast-align + -Wno-error=redundant-decls + -Wno-error=cast-qual + ) + endif() endfunction() #------------------------------------ @@ -89,9 +92,11 @@ function(family_configure_example TARGET RTOS) "LINKER:--config=${LD_FILE_IAR}" ) endif () + if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang") set_source_files_properties(${STARTUP_FILE_${CMAKE_C_COMPILER_ID}} PROPERTIES SKIP_LINTING ON COMPILE_OPTIONS -w) + endif() family_add_bin_hex(${TARGET}) family_flash_jlink(${TARGET}) |
