Hi All,
I'm building rust code to run on a raspberry pico. I need to generate a map file to better understand how variables are allocated.
The flag is passed below.
rustflags = [
"-C", "link-arg=--nmagic",
"-C", "link-arg=-Tlink.x",
"-C", "link-args=-Map=target/led_blink.map",
]
Is there a way to make sure that the map is always generated in the same folder as the final binary?
i.e. for release builds under target/thumbv6m-none-eabi/release and target/thumbv6m-none-eabi/releasefor debug build.
I don't know or found a way to pass the current output directory to the rustflags.
I'm looking for something like
"-C", "link-args=-Map=${OUT_DIR}/led_blink.map"