Skip to content

[WIP] Task/card10 alloc

rnd requested to merge rnd/rust-card10:task/card10-alloc into master

Based on the card10-sys branch (so only the commits from 300024b8 are actually part of this - going to rebase on master after merge).

The implementation should contain everything necessary to streamline the usage of the allocator crate based features like String or Vec (fixes #8 (closed)).


Warning: This is still not working as the application stopps working as soon as it enters malloc or free.

As the rust compiler doesn't complain about missing implementations and functions like abs() are usable it doesn't look like an issue with the linking of libc. I also verified that everything inside the rust code works properly as soon as the extern definition of malloc and free are not used. I also verified that __heap_start points to a plausible memory address.

@astro @kloenk Maybe we miss a small bit of initialization or setup code?

The last commit was a desperate try to reduce the differences in compiler and linker flags between the rust based example and the blinky c based l0dable example as this one is able to use malloc without a problem.

Merge request reports