Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
You get the following problem when using `-Os`: = note: rust-lld: error: undefined symbol: __gnu_thumb1_case_uhi >>> referenced by DAP.c:1653 (CMSIS_5/CMSIS/DAP/Firmware/Source/DAP.c:1653) >>> DAP.o:(DAP_ProcessCommand) in archive /tmp/rustctmyFes/librp2040_selfdebug-254aa1d1b314f83f .rlib rust-lld: error: undefined symbol: __gnu_thumb1_case_uqi >>> referenced by DAP.c:90 (CMSIS_5/CMSIS/DAP/Firmware/Source/DAP.c:90) >>> DAP.o:(DAP_ProcessCommand) in archive /tmp/rustctmyFes/librp2040_selfdebug-254aa1d1b314f83f .rlib rust-lld: error: undefined symbol: strcpy >>> referenced by DAP_config.h:201 (CMSIS_Config/DAP_config.h:201) >>> DAP.o:(DAP_ProcessCommand) in archive /tmp/rustctmyFes/librp2040_selfdebug-254aa1d1b314f83f .rlib >>> referenced by DAP_config.h:218 (CMSIS_Config/DAP_config.h:218) >>> DAP.o:(DAP_ProcessCommand) in archive /tmp/rustctmyFes/librp2040_selfdebug-254aa1d1b314f83f .rlib >>> referenced by DAP_config.h:235 (CMSIS_Config/DAP_config.h:235) >>> DAP.o:(DAP_ProcessCommand) in archive /tmp/rustctmyFes/librp2040_selfdebug-254aa1d1b314f83f .rlib >>> referenced 1 more times - This fixes the issue of `strcpy` by just using `memcpy` - This fixes the issue of __gnu_thumb1_case_uhi/__gnu_thumb1_case_uqi which are defined in `libgcc.a` by adding the libgcc path to the linker search path, you might optionally need to add "-C", "link-args=-lgcc" to your .cargo/config.toml - We are not using `cargo:rustc-link-lib=static:+verbatim={}` as that had problems with libgcc being doubly-linked so there being duplicate symbols.
- Loading branch information