Skip to content

Commit

Permalink
added --print-memory-usage to linker parameters (#2195)
Browse files Browse the repository at this point in the history
* added --print-memory-usage to linker parameters

* included standalone apps
  • Loading branch information
bernd-herzog authored Jul 16, 2024
1 parent ae75540 commit 048359f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions firmware/application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ include_directories(. ${INCDIR})
link_directories(${LLIBDIR})
target_link_libraries(${PROJECT_NAME}.elf ${LIBS} "-L${CMAKE_CURRENT_LIST_DIR}/external")
target_link_libraries(${PROJECT_NAME}.elf -Wl,-Map=${PROJECT_NAME}.map)
target_link_libraries(${PROJECT_NAME}.elf -Wl,--print-memory-usage)

add_custom_command(
OUTPUT ${PROJECT_NAME}.bin
Expand Down
2 changes: 2 additions & 0 deletions firmware/baseband/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,9 @@ macro(DeclareTargets chunk_tag name)
include_directories(. ${INCDIR} ${MODE_INCDIR})
link_directories(${LLIBDIR})
target_link_libraries(${PROJECT_NAME}.elf ${LIBS})

target_link_libraries(${PROJECT_NAME}.elf -Wl,-Map=${PROJECT_NAME}.map)
target_link_libraries(${PROJECT_NAME}.elf -Wl,--print-memory-usage)

if(add_to_firmware)

Expand Down
1 change: 1 addition & 0 deletions firmware/standalone/pacman/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ target_link_libraries(${PROJECT_NAME}.elf -Wl,-Map=${PROJECT_NAME}.map)
# redirect std lib memory allocations
target_link_libraries(${PROJECT_NAME}.elf "-Wl,-wrap,_malloc_r")
target_link_libraries(${PROJECT_NAME}.elf "-Wl,-wrap,_free_r")
target_link_libraries(${PROJECT_NAME}.elf "-Wl,--print-memory-usage")

add_custom_command(
OUTPUT ${PROJECT_NAME}.ppmp
Expand Down

0 comments on commit 048359f

Please sign in to comment.