Hi!
I can not find a straightforward answer to this question so I thought, why not ask here, it might help other people.
When compiling embedded software in C/C++, I find it really useful to generate a map file. This file contains specific information on where certain segments and data structures are placed. This can be really useful when I want to place certain data structures in other memory segments for example and I want to inspect the actual memory layout.
When using CMake, I have a directive like this to generate the map file:
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
target_link_options(${TARGET_NAME} PRIVATE "-Wl,-Map=${OUTPUT_NAME_VAR}.map")
endif()
How would I do this in Rust?
Kind Regards
Robin