Replies: 2 comments 1 reply
-
Sorry for the trouble, and thanks for the example code. Could you give psentee/teensy4-rs-example#1 a test? The BSP's Let me know if that works. If it does, I'll make sure to note this in the BSP documentation. |
Beta Was this translation helpful? Give feedback.
-
That fixes the problem, thank you! And I forgot to thank you for all the work on imxrt and teensy4 support! I have hacked together a Rust teensy4 project back in 2019, it was an uphill battle and I can only imagine the amount of work that went into the imxrt-rs/teensy4-rs ecosystem. |
Beta Was this translation helpful? Give feedback.
-
I'm starting a Teensy4 project, and I want to use RTIC (new shiny 2.0 if it matters), starting with the
rtic_usb_log
example, and it works – as long as I setrelease
profile to exactlylto = "thin"
in myCargo.toml
. Withlto = false
orlto = true
/"fat"
it tails to build withLinking globals named 'USB_OTG1': symbol multiply defined!
. This happens with both GNU ld and lld.I found some cryptic comment about default features of
teensy4-hal
conflicting withrtic
and LTO being able to sort it out (in practice, only "thin" LTO). I haven't been able to find any examples of how to setteensy4-rs
features to work withrtic
, or any features in itsCargo.toml
that look like they could do the trick.I found some historical mentions of patching
cortex-m-rt
in the app to point atteensy4-rt
crate that doesn't exist nowadays. Also, found some mentions of a replacement/patchedcortex-m-rt
crate that has been removed from this repo in the meantime. I'm confused and have no idea what can I do to make it work other than blindly settinglto = "thin"
without understanding what I'm doing and giving up on full LTO.Any hints?
ETA: my code is here: https://github.com/psentee/teensy4-rs-example – it fails to build with
Linking globals named 'USB_OTG1': symbol multiply defined!
and after switching tolto = "thin"
it builds fine.Beta Was this translation helpful? Give feedback.
All reactions