Closed alexshirley closed 1 year ago
Quick update:
I decided to switch over to nightly, redownloaded the STM32 v6m compiler, and still got a very similar message, this time with the full context:
I updated
[package]
...
edition = "2021"
...
and that seemed to change something, which seems to indicate that the USB is not getting picked up
I completely removed the edition
section, and that seems to have done something
you need edition=2021
because it defaults to resolver=2
. Otherwise it's merging dependency features across deps and build-deps. For example, invalid register r0: unknown register
fails because it's trying to build ARM ASM for x86, and x86 has no r0
.
First, make sure you're using exactly the Rust nightly version that's supported by Embassy. Put this file at the root of your project.
Second, if that still doesn't fix it: Can you change it to back when you were getting the USB-related error? and then please paste
Cargo.toml
.cargo/config.toml
cargo tree --format '{p} {f}'
rustc --version
cargo --version
rustup show
Ok, I did put the rust-toolchain at the project root, and re-added the edition=2021, so now I'm back to the USB error
cargo tree --format {p}{f}:
app v0.1.0 (C:\Users\Me\Documents\embed-rust\app)
├── cortex-m v0.7.6 inline-asm
│ ├── bare-metal v0.2.5 const-fn
│ │ [build-dependencies]
│ │ └── rustc_version v0.2.3
│ │ └── semver v0.9.0 default
│ │ └── semver-parser v0.7.0
│ ├── bitfield v0.13.2
│ ├── embedded-hal v0.2.7 unproven
│ │ ├── nb v0.1.3 unstable
│ │ │ └── nb v1.1.0
│ │ └── void v1.0.2
│ └── volatile-register v0.2.1
│ └── vcell v0.1.3
├── cortex-m-rt v0.7.3 device
│ └── cortex-m-rt-macros v0.7.0 (proc-macro)
│ ├── proc-macro2 v1.0.58 default,proc-macro
│ │ └── unicode-ident v1.0.8
│ ├── quote v1.0.27 default,proc-macro
│ │ └── proc-macro2 v1.0.58 default,proc-macro ()
│ └── syn v1.0.109 clone-impls,default,derive,extra-traits,full,parsing,printing,proc-macro,quote,visit
│ ├── proc-macro2 v1.0.58 default,proc-macro ()
│ ├── quote v1.0.27 default,proc-macro ()
│ └── unicode-ident v1.0.8
├── cortex-m-semihosting v0.3.7
│ └── cortex-m v0.7.6 inline-asm ()
├── defmt v0.3.4
│ ├── bitflags v1.3.2 default
│ └── defmt-macros v0.3.5 (proc-macro)
│ ├── defmt-parser v0.3.3 unstable
│ │ └── thiserror v1.0.40
│ │ └── thiserror-impl v1.0.40 (proc-macro)
│ │ ├── proc-macro2 v1.0.58 default,proc-macro ()
│ │ ├── quote v1.0.27 default,proc-macro ()
│ │ └── syn v2.0.16 clone-impls,default,derive,full,parsing,printing,proc-macro,quote
│ │ ├── proc-macro2 v1.0.58 default,proc-macro ()
│ │ ├── quote v1.0.27 default,proc-macro ()
│ │ └── unicode-ident v1.0.8
│ ├── proc-macro-error v1.0.4 default,syn,syn-error
│ │ ├── proc-macro-error-attr v1.0.4 (proc-macro)
│ │ │ ├── proc-macro2 v1.0.58 default,proc-macro ()
│ │ │ └── quote v1.0.27 default,proc-macro ()
│ │ │ [build-dependencies]
│ │ │ └── version_check v0.9.4
│ │ ├── proc-macro2 v1.0.58 default,proc-macro ()
│ │ ├── quote v1.0.27 default,proc-macro ()
│ │ └── syn v1.0.109 clone-impls,default,derive,extra-traits,full,parsing,printing,proc-macro,quote,visit ()
│ │ [build-dependencies]
│ │ └── version_check v0.9.4
│ ├── proc-macro2 v1.0.58 default,proc-macro ()
│ ├── quote v1.0.27 default,proc-macro ()
│ └── syn v1.0.109 clone-impls,default,derive,extra-traits,full,parsing,printing,proc-macro,quote,visit ()
├── defmt-rtt v0.4.0
│ ├── critical-section v1.1.1
│ └── defmt v0.3.4 ()
├── embassy-executor v0.2.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-executor) defmt,integrated-timers
│ ├── atomic-polyfill v1.0.2
│ │ └── critical-section v1.1.1
│ ├── critical-section v1.1.1
│ ├── defmt v0.3.4 ()
│ ├── embassy-macros v0.2.0 (proc-macro) (C:\Users\Me\Documents\embed-rust\embassy\embassy-macros)
│ │ ├── darling v0.13.4 default,suggestions
│ │ │ ├── darling_core v0.13.4 strsim,suggestions
│ │ │ │ ├── fnv v1.0.7 default,std
│ │ │ │ ├── ident_case v1.0.1
│ │ │ │ ├── proc-macro2 v1.0.58 default,proc-macro ()
│ │ │ │ ├── quote v1.0.27 default,proc-macro ()
│ │ │ │ ├── strsim v0.10.0
│ │ │ │ └── syn v1.0.109 clone-impls,default,derive,extra-traits,full,parsing,printing,proc-macro,quote,visit ()
│ │ │ └── darling_macro v0.13.4 (proc-macro)
│ │ │ ├── darling_core v0.13.4 strsim,suggestions ()
│ │ │ ├── quote v1.0.27 default,proc-macro ()
│ │ │ └── syn v1.0.109 clone-impls,default,derive,extra-traits,full,parsing,printing,proc-macro,quote,visit ()
│ │ ├── proc-macro2 v1.0.58 default,proc-macro ()
│ │ ├── quote v1.0.27 default,proc-macro ()
│ │ └── syn v1.0.109 clone-impls,default,derive,extra-traits,full,parsing,printing,proc-macro,quote,visit ()
│ ├── embassy-time v0.1.1 (C:\Users\Me\Documents\embed-rust\embassy\embassy-time) defmt,defmt-timestamp-uptime
│ │ ├── atomic-polyfill v1.0.2 ()
│ │ ├── cfg-if v1.0.0
│ │ ├── critical-section v1.1.1
│ │ ├── defmt v0.3.4 ()
│ │ ├── embedded-hal v0.2.7 unproven ()
│ │ ├── futures-util v0.3.28 async-await,async-await-macro,futures-macro,futures-sink,sink
│ │ │ ├── futures-core v0.3.28
│ │ │ ├── futures-macro v0.3.28 (proc-macro)
│ │ │ │ ├── proc-macro2 v1.0.58 default,proc-macro ()
│ │ │ │ ├── quote v1.0.27 default,proc-macro ()
│ │ │ │ └── syn v2.0.16 clone-impls,default,derive,full,parsing,printing,proc-macro,quote ()
│ │ │ ├── futures-sink v0.3.28
│ │ │ ├── futures-task v0.3.28
│ │ │ ├── pin-project-lite v0.2.9
│ │ │ └── pin-utils v0.1.0
│ │ └── heapless v0.7.16 atomic-polyfill,cas,default
│ │ ├── atomic-polyfill v0.1.11
│ │ │ └── critical-section v1.1.1
│ │ ├── hash32 v0.2.1
│ │ │ └── byteorder v1.4.3
│ │ └── stable_deref_trait v1.2.0
│ │ [build-dependencies]
│ │ └── rustc_version v0.4.0
│ │ └── semver v1.0.17 default,std
│ ├── futures-util v0.3.28 async-await,async-await-macro,futures-macro,futures-sink,sink ()
│ └── static_cell v1.0.0
│ └── atomic-polyfill v1.0.2 ()
├── embassy-stm32 v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-stm32) default,defmt,stm32f070cb
│ ├── atomic-polyfill v1.0.2 ()
│ ├── bit_field v0.10.2
│ ├── bxcan v0.7.0 defmt,unstable-defmt
│ │ ├── bitflags v1.3.2 default
│ │ ├── defmt v0.3.4 ()
│ │ ├── embedded-hal v0.2.7 unproven ()
│ │ ├── nb v1.1.0
│ │ └── vcell v0.1.3
│ ├── cfg-if v1.0.0
│ ├── cortex-m v0.7.6 inline-asm ()
│ ├── cortex-m-rt v0.7.3 device ()
│ ├── critical-section v1.1.1
│ ├── defmt v0.3.4 ()
│ ├── embassy-cortex-m v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-cortex-m) default,prio-bits-4
│ │ ├── atomic-polyfill v1.0.2 ()
│ │ ├── cfg-if v1.0.0
│ │ ├── cortex-m v0.7.6 inline-asm ()
│ │ ├── critical-section v1.1.1
│ │ ├── embassy-executor v0.2.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-executor) defmt,integrated-timers ()
│ │ ├── embassy-hal-common v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-hal-common) defmt
│ │ │ ├── defmt v0.3.4 ()
│ │ │ └── num-traits v0.2.15
│ │ │ [build-dependencies]
│ │ │ └── autocfg v1.1.0
│ │ ├── embassy-macros v0.2.0 (proc-macro) (C:\Users\Me\Documents\embed-rust\embassy\embassy-macros) ()
│ │ └── embassy-sync v0.2.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-sync) defmt
│ │ ├── cfg-if v1.0.0
│ │ ├── critical-section v1.1.1
│ │ ├── defmt v0.3.4 ()
│ │ ├── embedded-io v0.4.0
│ │ ├── futures-util v0.3.28 async-await,async-await-macro,futures-macro,futures-sink,sink ()
│ │ └── heapless v0.7.16 atomic-polyfill,cas,default ()
│ ├── embassy-embedded-hal v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-embedded-hal) defmt
│ │ ├── defmt v0.3.4 ()
│ │ ├── embassy-sync v0.2.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-sync) defmt ()
│ │ ├── embedded-hal v0.2.7 unproven ()
│ │ ├── embedded-hal v1.0.0-alpha.10
│ │ ├── embedded-storage v0.3.0
│ │ └── nb v1.1.0
│ ├── embassy-executor v0.2.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-executor) defmt,integrated-timers ()
│ ├── embassy-futures v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-futures)
│ ├── embassy-hal-common v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-hal-common) defmt ()
│ ├── embassy-net-driver v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-net-driver) defmt
│ │ └── defmt v0.3.4 ()
│ ├── embassy-sync v0.2.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-sync) defmt ()
│ ├── embedded-hal v0.2.7 unproven ()
│ ├── embedded-storage v0.3.0
│ ├── futures v0.3.28 async-await
│ │ ├── futures-channel v0.3.28 futures-sink,sink
│ │ │ ├── futures-core v0.3.28
│ │ │ └── futures-sink v0.3.28
│ │ ├── futures-core v0.3.28
│ │ ├── futures-io v0.3.28
│ │ ├── futures-sink v0.3.28
│ │ ├── futures-task v0.3.28
│ │ └── futures-util v0.3.28 async-await,async-await-macro,futures-macro,futures-sink,sink ()
│ ├── nb v1.1.0
│ ├── rand_core v0.6.4
│ ├── sdio-host v0.5.0
│ ├── seq-macro v0.3.3 (proc-macro)
│ ├── stm32-fmc v0.2.4 default,sdram
│ │ └── embedded-hal v0.2.7 unproven ()
│ ├── stm32-metapac v7.0.0 cortex-m-rt,default,pac,rt,stm32f070cb
│ │ ├── cortex-m v0.7.6 inline-asm ()
│ │ └── cortex-m-rt v0.7.3 device ()
│ └── vcell v0.1.3
│ [build-dependencies]
│ ├── proc-macro2 v1.0.58 default,proc-macro ()
│ ├── quote v1.0.27 default,proc-macro ()
│ └── stm32-metapac v7.0.0 cortex-m-rt,metadata,rt,stm32f070cb
│ ├── cortex-m v0.7.6
│ │ ├── bare-metal v0.2.5 const-fn
│ │ │ [build-dependencies]
│ │ │ └── rustc_version v0.2.3 ()
│ │ ├── bitfield v0.13.2
│ │ ├── embedded-hal v0.2.7
│ │ │ ├── nb v0.1.3
│ │ │ │ └── nb v1.1.0
│ │ │ └── void v1.0.2
│ │ └── volatile-register v0.2.1
│ │ └── vcell v0.1.3
│ └── cortex-m-rt v0.7.3 device
│ └── cortex-m-rt-macros v0.7.0 (proc-macro) ()
├── embassy-time v0.1.1 (C:\Users\Me\Documents\embed-rust\embassy\embassy-time) defmt,defmt-timestamp-uptime ()
├── embassy-usb v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-usb) default,defmt,usbd-hid
│ ├── defmt v0.3.4 ()
│ ├── embassy-futures v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-futures)
│ ├── embassy-net-driver-channel v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-net-driver-channel)
│ │ ├── embassy-futures v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-futures)
│ │ ├── embassy-net-driver v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-net-driver) defmt ()
│ │ └── embassy-sync v0.2.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-sync) defmt ()
│ ├── embassy-sync v0.2.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-sync) defmt ()
│ ├── embassy-usb-driver v0.1.0 (C:\Users\Me\Documents\embed-rust\embassy\embassy-usb-driver) defmt
│ │ └── defmt v0.3.4 ()
│ ├── heapless v0.7.16 atomic-polyfill,cas,default ()
│ ├── ssmarshal v1.0.0
│ │ ├── encode_unicode v0.3.6
│ │ └── serde v1.0.163
│ └── usbd-hid v0.6.1
│ ├── serde v1.0.163
│ ├── ssmarshal v1.0.0 ()
│ ├── usb-device v0.2.9
│ └── usbd-hid-macros v0.6.0 (proc-macro)
│ ├── byteorder v1.4.3
│ ├── proc-macro2 v1.0.58 default,proc-macro ()
│ ├── quote v1.0.27 default,proc-macro ()
│ ├── serde v1.0.163
│ ├── syn v1.0.109 clone-impls,default,derive,extra-traits,full,parsing,printing,proc-macro,quote,visit ()
│ └── usbd-hid-descriptors v0.1.2
│ └── bitfield v0.13.2
├── panic-probe v0.3.1
│ └── cortex-m v0.7.6 inline-asm ()
├── static_cell v1.0.0 ()
└── stm32-metapac v7.0.0 cortex-m-rt,default,pac,rt,stm32f070cb (*)
Updated to remove some comments from the cargo.toml
Thanks for the detailed report! #1467 fixes it.
Oh.... you're not going to believe this:
so I git pulled the changes to master ( #1467 )
and now I get some really strange stuff
Disregard. Solution was to add
"critical-section-single-core"
[dependencies]
cortex-m = { version = "=0.7.6", features = ["inline-asm","critical-section-single-core"] }
So a bit of a n00b, but I'm running into troubles creating a new project
error logs
```bash libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol WWDG libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol RTC libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol FLASH libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol RCC libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol EXTI0_1 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol EXTI2_3 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol EXTI4_15 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol DMA1_CHANNEL1 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol DMA1_CHANNEL2_3 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol DMA1_CHANNEL4_5 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol ADC1 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol TIM1_BRK_UP_TRG_COM libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol TIM1_CC libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol TIM3 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol TIM6 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol TIM7 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol TIM14 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol TIM15 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol TIM16 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol TIM17 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol I2C1 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol I2C2 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol SPI1 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol SPI2 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol USART1 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol USART2 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol USART3_4 libstm32_metapac-bd62a65356f59473.rlib(stm32_metapac-bd62a65356f59473.stm32_metapac.160da54d-cgu.4.rcgu.o) : error LNK2001: unresolved external symbol USB libcortex_m_rt-e3b58d0a626900a1.rlib(cortex_m_rt-e3b58d0a626900a1.cortex_m_rt.2fb0f525-cgu.3.rcgu.o) : error LNK2001: unresolved external symbol Reset libcortex_m_rt-e3b58d0a626900a1.rlib(cortex_m_rt-e3b58d0a626900a1.cortex_m_rt.2fb0f525-cgu.3.rcgu.o) : error LNK2001: unresolved external symbol NonMaskableInt libcortex_m_rt-e3b58d0a626900a1.rlib(cortex_m_rt-e3b58d0a626900a1.cortex_m_rt.2fb0f525-cgu.3.rcgu.o) : error LNK2001: unresolved external symbol HardFaultTrampoline libcortex_m_rt-e3b58d0a626900a1.rlib(cortex_m_rt-e3b58d0a626900a1.cortex_m_rt.2fb0f525-cgu.3.rcgu.o) : error LNK2001: unresolved external symbol MemoryManagement libcortex_m_rt-e3b58d0a626900a1.rlib(cortex_m_rt-e3b58d0a626900a1.cortex_m_rt.2fb0f525-cgu.3.rcgu.o) : error LNK2001: unresolved external symbol BusFault libcortex_m_rt-e3b58d0a626900a1.rlib(cortex_m_rt-e3b58d0a626900a1.cortex_m_rt.2fb0f525-cgu.3.rcgu.o) : error LNK2001: unresolved external symbol UsageFault libcortex_m_rt-e3b58d0a626900a1.rlib(cortex_m_rt-e3b58d0a626900a1.cortex_m_rt.2fb0f525-cgu.3.rcgu.o) : error LNK2001: unresolved external symbol SVCall libcortex_m_rt-e3b58d0a626900a1.rlib(cortex_m_rt-e3b58d0a626900a1.cortex_m_rt.2fb0f525-cgu.3.rcgu.o) : error LNK2001: unresolved external symbol DebugMonitor libcortex_m_rt-e3b58d0a626900a1.rlib(cortex_m_rt-e3b58d0a626900a1.cortex_m_rt.2fb0f525-cgu.3.rcgu.o) : error LNK2001: unresolved external symbol PendSV libcortex_m_rt-e3b58d0a626900a1.rlib(cortex_m_rt-e3b58d0a626900a1.cortex_m_rt.2fb0f525-cgu.3.rcgu.o) : error LNK2001: unresolved external symbol SysTick ```Here are my dependencies
My kneejerk reaction is that
embassy-stm32
andcortex-m-rt
are missing additional dependencies, or some additional toml settings, which I've tried to remediate by pulling them into my dependencies as well. However, I have no idea what seems to be wrong with my current setup.