The 1KB of SRAM is admittedly very tight (even WCH's 10-cent RISC-V parts usually give you 2KB), so you are strictly in bare-metal, carefully-managing-your-stack territory.
The 1KB of SRAM is admittedly very tight (even WCH's 10-cent RISC-V parts usually give you 2KB), so you are strictly in bare-metal, carefully-managing-your-stack territory.
Plenty of DIY projects used ATtiny2313 with V-USB. That's a pure software USB implementation bit banging the IO pins (not a USB stack on top of hardware USB support)+ your application logic squeezed into 2K of flash + 128 bytes of ram.
Chips like this are great for digital glue logic. Read a sensor, read a button press, blink some LEDs with simple state machine or control loop.
C support is basically universal these days, very few chips require you to program in only assembly anymore.
I was extremely surprised by how much functionality is packed into "core", and runs without an OS when using freestanding rust. Even stuff that requires an allocator can run provided you provide your own heap!
A cool example of this was implementing fmt::Write for a memory mapped uart console thing. Then implementing a kprintln! macro that supports all of the formatting machinery that you are use to. This worked without even a heap available.
Compiled Rust code that relies on syscalls will not function on a “bare metal” microcontroller.
Rust's only requirement is that memcpy, memmove, memset, memcmp, bcmp, and strlen are available, and it can provide them if needed: https://github.com/rust-lang/compiler-builtins
Yes, I should have said binary opcodes instead of assembly. I just assumed anyone discussing embedded systems would know they are practically interchangeable.
(had to disable debug symbols, though)
Why should that be any harder than C?
Anything to save a few bucks on a 6264 SRAM component :-)