How do I generate a Map file from platformio ? Framework is mbed for stm32
I've tried passing linker flags in various ways but I get various errors
1. build_flags= -Wl, -Map=mapfile.map
2. build_flags= -Wl, Map=mapfile.map
For 1.
I get the error message arm-none-eabi-gcc: error: unrecognized command line option '-Map=mapfile.map'
For 2.
I get the linker error message ld.exe: error: 'Map=mapfile.map' not found
Your syntax of passing the build flags is not correct. Here is how to do it:
build_flags = -Wl,-Map,output.map
Reference: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html