-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example: String (alloc) #302
Comments
I'm not too enthusiastic about showing people |
I have no strong opinion on |
Note for the examples:
I can provide PRs with example later on unless you want to write and test them yourself. With the information above, those are trivial. |
I am happy to take a PR from you :) |
Even with this profile? Lines 1 to 4 in 189c6c6
If yes, that's something we need to look into... |
yes, even with the profile you mentioned.
You must have the 2 last ones so the following is also ok:
|
Okay, can you paste the errors you get without them? I have a feeling I know where this is going... |
Sure:
|
Yeah, that's what I was expecting... See rust-lang/compiler-builtins#347 (comment) for more context. |
if you want use alloc::string::String, you need provide gloabl-allocater. you can write one from scratch. or use a exist code to write youself. suggest using allocator for arm , the source code is very litter, and it also providing helpful samples. the thing only needed is migrating the alloc-cortex-m to avr. it is easy, you only need: replace "cortex_m::interrupt::free" with "avr_device::interrupt::free", and replace "cortex_m::interrupt::Mutex" with "avr_device::interrupt::Mutex" in the alloc-cortex-m source code. |
#308 also talks about this. |
It would be great to see an example using
String
.From what I tested, this requires pulling
alloc
and add extra requirements such as providing a#[alloc_error_handler]
.The text was updated successfully, but these errors were encountered: