cortex-m-rt 0.7.0
xieren58 opened this issue · 5 comments
xieren58 commented
Any plan to update flip-link for cortex-m-rt 0.7.x?
japaric commented
@xieren58 could you please describe the problem you are running into?
I have instantiated cortex-m-quickstart
template (1c1a7c6), set cortex-m-rt to 0.7.0
and the linker to flip-link (v0.1.5) and I'm seeing it work as expected.
$ rg cortex-m-rt Cargo.toml
10:cortex-m-rt = "0.7.0"
$ rg flip-link .cargo/config.toml
22: "-C", "linker=flip-link",
$ cargo b --example hello
$ size -Ax target/thumbv7m-none-eabi/debug/examples/hello
target/thumbv7m-none-eabi/debug/examples/hello :
section size addr
.vector_table 0x400 0x0
.text 0xd3c 0x400
.rodata 0x30c 0x1140
.data 0x0 0x2000fff8
.gnu.sgstubs 0x0 0x1460
.bss 0x8 0x2000fff8
xieren58 commented
Update stm32f4xx-hal to 0.10.0, then could not compile. And stm32f4xx-hal 0.10.0 using cortex-m-rt 0.7.0.
error: linking with `flip-link` failed: exit status: 1
|
= note: "flip-link" "-flavor" "gnu" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/main-d94f69d88422417f.main.4a743b0f-cgu.0.rcgu.o" "--as-needed" "-L" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps" "-L" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/debug/deps" "-L" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/build/cortex-m-a34d3e3deb6eb4eb/out" "-L" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/build/defmt-473a7749feff89ba/out" "-L" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/build/cortex-m-rt-702b3bac6193091e/out" "-L" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/build/stm32f4-1af4436d775d301d/out" "-L" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/build/cortex-m-rt-3109aec5a509553e/out" "-L" "/Users/cz/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/thumbv7em-none-eabihf/lib" "-Bstatic" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/librtic-12c01b0c32476484.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libbare_metal-7ff5c8a04603d48a.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/librtic_monotonic-6cc574a1b4454868.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libembedded_time-a297b98236bca129.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libnum-b18ea56d90ee8542.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libnum_iter-e4438ac0d3b79ad6.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libnum_rational-90bc0b82c6f9c03f.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libnum_complex-7751ce14f54324cb.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/librtic_core-03cc4a5d80f97b5e.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libnom-75d9eaf4a49d43fc.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libminimal_lexical-67255f31c184e93c.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libmemchr-5ef224e78ceba66d.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32_device_signature-85a4a48c84b4a21b.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libpostcard-06760e3d6e082406.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libpostcard_cobs-f0c3b3417f66b054.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libmoveslice-646e4388b2ec318c.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libheapless-d9b3a192a7fb9381.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libserde-cf7e0a56229ef804.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libhash32-eba331906d72f7de.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libbyteorder-496436df3f8abc53.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libgoban-8dffb3b4701a5e43.rlib" "--start-group" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libpanic_probe-18fdbe6bb6b01559.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4xx_hal-d6b48b9fe9c52552.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/librtcc-596e468f15223f24.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libchrono-c029775d28eab163.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libnum_integer-1795e6df39caea92.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libnum_traits-7d71e6a4306cb730.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libembedded_dma-4eebe916bb489dd9.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/librand_core-03ba6b8c7b4260b9.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libcast-b17d5d3fba05a59e.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libcortex_m_rt-f08a7b0aeafd9f0a.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libr0-986462dae548d42e.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libdefmt_rtt-43c1c8d6b0351ce0.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libdefmt-bd558dc3a0ef37a9.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libcortex_m-bb78161619962a6e.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libcortex_m-9cfde0655982703f.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libembedded_hal-4248c0e22f339e5f.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libvoid-575aa95f258f9951.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libnb-7b4882a32c4f5c6b.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libnb-33ff59a5d7eff763.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libvolatile_register-a4d19da6b0b8bed2.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libvcell-f21657c0097d9f9f.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libbare_metal-6d699345155556b0.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libaligned-c2380f8797ebd7f3.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libas_slice-02688b6e2db7ac95.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstable_deref_trait-1b438b573420c62d.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libgeneric_array-87bd3238b8dcac35.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libgeneric_array-2e22769cf8e72a7a.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libgeneric_array-8b6096efd2fce6f7.rlib" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libtypenum-23d6a22fa55a2fb5.rlib" "/Users/cz/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/thumbv7em-none-eabihf/lib/librustc_std_workspace_core-f5e50862e11e2490.rlib" "/Users/cz/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/thumbv7em-none-eabihf/lib/libcore-87c45edd00288221.rlib" "--end-group" "/Users/cz/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/thumbv7em-none-eabihf/lib/libcompiler_builtins-bf4341c12e226c41.rlib" "-Bdynamic" "--eh-frame-hdr" "-znoexecstack" "-L" "/Users/cz/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/thumbv7em-none-eabihf/lib" "-o" "/Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/main-d94f69d88422417f" "--gc-sections" "-Tlink.x" "-Tdefmt.x" "--nmagic"
= note: rust-lld: error: undefined symbol: WWDG
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: PVD
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: TAMP_STAMP
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: RTC_WKUP
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: RCC
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: EXTI3
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: DMA1_STREAM0
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: DMA1_STREAM1
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: DMA1_STREAM2
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: DMA1_STREAM3
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: DMA1_STREAM4
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: DMA1_STREAM5
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: DMA1_STREAM6
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: ADC
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: CAN1_TX
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: CAN1_RX0
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: CAN1_RX1
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: CAN1_SCE
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: EXTI9_5
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: undefined symbol: TIM1_BRK_TIM9
>>> referenced by stm32f4.1feb194d-cgu.0
>>> stm32f4-16a56e8984ed12c7.stm32f4.1feb194d-cgu.0.rcgu.o:(__INTERRUPTS) in archive /Users/cz/dev/projects/cz/33ieg/repos/client/goban/target/thumbv7em-none-eabihf/debug/deps/libstm32f4-16a56e8984ed12c7.rlib
rust-lld: error: too many errors emitted, stopping now (use -error-limit=0 to see all errors)
jonas-schievink commented
And it works if you comment out "-C", "linker=flip-link",
in .cargo/config
?
xieren58 commented
@jonas-schievink Aslo not work.
jonas-schievink commented
Then this is not caused by flip-link