mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-15 20:34:03 -04:00
AP_HAL_ESP32: ensure malloc is wrapped to zero memory
The relevant linker flag needed to be put in the CMake script.
This commit is contained in:
parent
b0ebbd7823
commit
716a9dc433
@ -121,6 +121,9 @@ target_link_libraries(${elf_file}
|
|||||||
# linker script generation, partition_table generation, etc.
|
# linker script generation, partition_table generation, etc.
|
||||||
idf_build_executable(${elf_file})
|
idf_build_executable(${elf_file})
|
||||||
|
|
||||||
|
# wrap malloc to ensure memory is zeroed
|
||||||
|
target_link_options(${elf_file} PRIVATE "-Wl,--wrap,malloc")
|
||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
|
||||||
|
|
||||||
# Additional targets for measuring RAM use: size, size-components, size-files
|
# Additional targets for measuring RAM use: size, size-components, size-files
|
||||||
|
@ -121,6 +121,9 @@ target_link_libraries(${elf_file}
|
|||||||
# linker script generation, partition_table generation, etc.
|
# linker script generation, partition_table generation, etc.
|
||||||
idf_build_executable(${elf_file})
|
idf_build_executable(${elf_file})
|
||||||
|
|
||||||
|
# wrap malloc to ensure memory is zeroed
|
||||||
|
target_link_options(${elf_file} PRIVATE "-Wl,--wrap,malloc")
|
||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
|
||||||
|
|
||||||
# Additional targets for measuring RAM use: size, size-components, size-files
|
# Additional targets for measuring RAM use: size, size-components, size-files
|
||||||
|
Loading…
Reference in New Issue
Block a user