diff options
author | 2021-11-23 15:40:29 +0000 | |
---|---|---|
committer | 2021-11-23 15:40:29 +0000 | |
commit | ecf840b80bcc52b426afe93dba9b6d563adbbfce (patch) | |
tree | a9a74e96193739b331c5e6778a407abbe210b64c /cortex-m-rt/assemble.sh | |
parent | 008fd73a1bb8e3d6f635b8aeeb96c57621e52c54 (diff) | |
parent | b38af9d1b6ddd90e2d9a427179bd54e19095d8f6 (diff) | |
download | cortex-m-ecf840b80bcc52b426afe93dba9b6d563adbbfce.tar.gz cortex-m-ecf840b80bcc52b426afe93dba9b6d563adbbfce.tar.zst cortex-m-ecf840b80bcc52b426afe93dba9b6d563adbbfce.zip |
Merge #337
337: Fix unwinding through `Reset` r=thejpster a=jonas-schievink
Unwinders may detect the end of the program by seeing `0xFFFFFFFF` in `lr`, which is why code to ensure that it has that value was added in https://github.com/rust-embedded/cortex-m-rt/pull/293. However, the `bl main` overwrites that value with the current program counter. This PR saves the old `lr` value on the stack, and adds debuginfo entries to allow an external unwinder to restore the value.
This fixes https://github.com/knurling-rs/probe-run/issues/277
Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Diffstat (limited to 'cortex-m-rt/assemble.sh')
-rwxr-xr-x | cortex-m-rt/assemble.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cortex-m-rt/assemble.sh b/cortex-m-rt/assemble.sh index b914fed..9b1f15c 100755 --- a/cortex-m-rt/assemble.sh +++ b/cortex-m-rt/assemble.sh @@ -9,25 +9,25 @@ crate=cortex-m-rt # remove existing blobs because otherwise this will append object files to the old blobs rm -f bin/*.a -arm-none-eabi-gcc -c -march=armv6s-m asm.S -o bin/$crate.o +arm-none-eabi-gcc -g -c -march=armv6s-m asm.S -o bin/$crate.o ar crs bin/thumbv6m-none-eabi.a bin/$crate.o -arm-none-eabi-gcc -c -march=armv7-m asm.S -o bin/$crate.o +arm-none-eabi-gcc -g -c -march=armv7-m asm.S -o bin/$crate.o ar crs bin/thumbv7m-none-eabi.a bin/$crate.o -arm-none-eabi-gcc -c -march=armv7e-m asm.S -o bin/$crate.o +arm-none-eabi-gcc -g -c -march=armv7e-m asm.S -o bin/$crate.o ar crs bin/thumbv7em-none-eabi.a bin/$crate.o -arm-none-eabi-gcc -c -march=armv7e-m asm.S -DHAS_FPU -o bin/$crate.o +arm-none-eabi-gcc -g -c -march=armv7e-m asm.S -DHAS_FPU -o bin/$crate.o ar crs bin/thumbv7em-none-eabihf.a bin/$crate.o -arm-none-eabi-gcc -c -march=armv8-m.base asm.S -o bin/$crate.o +arm-none-eabi-gcc -g -c -march=armv8-m.base asm.S -o bin/$crate.o ar crs bin/thumbv8m.base-none-eabi.a bin/$crate.o -arm-none-eabi-gcc -c -march=armv8-m.main asm.S -o bin/$crate.o +arm-none-eabi-gcc -g -c -march=armv8-m.main asm.S -o bin/$crate.o ar crs bin/thumbv8m.main-none-eabi.a bin/$crate.o -arm-none-eabi-gcc -c -march=armv8-m.main -DHAS_FPU asm.S -o bin/$crate.o +arm-none-eabi-gcc -g -c -march=armv8-m.main -DHAS_FPU asm.S -o bin/$crate.o ar crs bin/thumbv8m.main-none-eabihf.a bin/$crate.o rm bin/$crate.o |