summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrent Kowal <[email protected]>2024-07-02 11:54:23 -0400
committerBrent Kowal <[email protected]>2024-07-02 11:54:23 -0400
commit835a6ed62299ea29c04215d3a4547b74803661c6 (patch)
tree23d94007ca698e91b8d80cb003a6a41c5ebde1f1
parent2353c4ffbaa50072d89008df7a06a7732c824018 (diff)
Build System Updates
Updated MAX32690 and MAX78002 linker and cmake scripts to work with CMake + Ninja build system. Verified all example projects build with the tools/build.py script for both board, and both make and cmake build systems.
-rw-r--r--hw/bsp/max32690/family.cmake12
-rw-r--r--hw/bsp/max32690/max32690.ld2
-rw-r--r--hw/bsp/max78002/family.cmake8
-rw-r--r--hw/bsp/max78002/max78002.ld2
4 files changed, 19 insertions, 5 deletions
diff --git a/hw/bsp/max32690/family.cmake b/hw/bsp/max32690/family.cmake
index e1d797f58..8b117bae5 100644
--- a/hw/bsp/max32690/family.cmake
+++ b/hw/bsp/max32690/family.cmake
@@ -88,7 +88,7 @@ function(add_board_target BOARD_TARGET)
${PERIPH_SRC}/UART
)
- target_compile_options(${TARGET} PRIVATE
+ target_compile_options(${BOARD_TARGET} PRIVATE
-Wno-error=strict-prototypes
)
update_board(${BOARD_TARGET})
@@ -139,10 +139,14 @@ function(family_configure_example TARGET RTOS)
target_sources(${TARGET}-tinyusb PUBLIC
${TOP}/src/portable/analog/max32/dcd_max32.c
)
- target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
+ target_compile_options(${TARGET} PRIVATE
+ -Wno-error=strict-prototypes
+ )
+
+ target_link_libraries(${TARGET}-tinyusb PUBLIC board_${BOARD})
target_compile_options(${TARGET}-tinyusb PRIVATE
- -Wno-error=strict-prototypes
- )
+ -Wno-error=strict-prototypes
+ )
# Link dependencies
target_link_libraries(${TARGET} PUBLIC board_${BOARD} ${TARGET}-tinyusb)
diff --git a/hw/bsp/max32690/max32690.ld b/hw/bsp/max32690/max32690.ld
index 35886fe3a..3d857b4e8 100644
--- a/hw/bsp/max32690/max32690.ld
+++ b/hw/bsp/max32690/max32690.ld
@@ -151,6 +151,8 @@ SECTIONS {
.heap (COPY):
{
. = ALIGN(4);
+ PROVIDE ( end = . );
+ PROVIDE ( _end = . );
*(.heap*)
__HeapLimit = ABSOLUTE(__StackLimit);
} > SRAM
diff --git a/hw/bsp/max78002/family.cmake b/hw/bsp/max78002/family.cmake
index 43b172b9f..28eaaa7e9 100644
--- a/hw/bsp/max78002/family.cmake
+++ b/hw/bsp/max78002/family.cmake
@@ -86,7 +86,7 @@ function(add_board_target BOARD_TARGET)
${PERIPH_SRC}/UART
)
- target_compile_options(${TARGET} PRIVATE
+ target_compile_options(${BOARD_TARGET} PRIVATE
-Wno-error=strict-prototypes
-Wno-error=redundant-decls
)
@@ -133,6 +133,12 @@ function(family_configure_example TARGET RTOS)
${CMAKE_CURRENT_FUNCTION_LIST_DIR}/boards/${BOARD}
)
+ target_compile_options(${TARGET} PRIVATE
+ -Wno-error=strict-prototypes
+ -Wno-error=redundant-decls
+ )
+
+
# Add TinyUSB target and port source
family_add_tinyusb(${TARGET} OPT_MCU_MAX78002 ${RTOS})
target_sources(${TARGET}-tinyusb PUBLIC
diff --git a/hw/bsp/max78002/max78002.ld b/hw/bsp/max78002/max78002.ld
index 5f9ed9356..60f99e28f 100644
--- a/hw/bsp/max78002/max78002.ld
+++ b/hw/bsp/max78002/max78002.ld
@@ -159,6 +159,8 @@ SECTIONS {
.heap (COPY):
{
. = ALIGN(4);
+ PROVIDE ( end = . );
+ PROVIDE ( _end = . );
*(.heap*)
__HeapLimit = ABSOLUTE(__StackLimit);
} > SRAM