Email or username:

Password:

Forgot your password?
­

I'm trying to get into embedded programming without learning C or C++, the Rust-only way. I know Rust pretty well, and I don't really want to spend many hours learning C by Segfaulting :)

It's going surprisingly well so far! Lots of resources, guides, and libraries, there's even a special "rust board"¹. The community is very helpful.

The type system is able to express the hardware quirks, e.g. I can't write to a pin if it's an incorrect mode, the compiler will hold my hand here.

The only issue so far was when I tried to create a display buffer a naïve way: the firmware wasn't even starting the execution and didn't give any comprehensive errors.

With some help from a matrix chat, I've figured that it's a _really_ bad idea to keep 400Kb structures on the stack. Allocating it on the heap solved the issue. Moving forward!

[1] github.com/esp-rs/esp-rust-boa

#rust #devlog

3 comments
Martin 🧀

@bemyak do you own the rust devkit board? What is the benefit regarding another esp32 board?

­

@mart_e Yes, I have one. For me, the main benefit is that I could follow the Ferrous Systems Training¹ precisely.

Compared to other microcontroller manufacturers, Espressif has really good Rust support, even std lib works. I don't think I had that on STM32.

Compared to other officially available ESP boards, this one has built-in charge controller and a fair set of sensors. I don't need only the IMU. There are some 3rd party boards² which have the charge controller, but I'm not sure how good they are.

Also the ESP C-series has RISC-V microprocessor architecture, so I guess if I'm gonna go lower to the processor instructions, it would be easier and more enjoyable with this board.

So, all in all I'm quite happy with the purchase, I think it's a great starting board even without considering my Rust affection :)

[1] esp-rs.github.io/std-training/
[2] dfrobot.com/product-2195.html

@mart_e Yes, I have one. For me, the main benefit is that I could follow the Ferrous Systems Training¹ precisely.

Compared to other microcontroller manufacturers, Espressif has really good Rust support, even std lib works. I don't think I had that on STM32.

Compared to other officially available ESP boards, this one has built-in charge controller and a fair set of sensors. I don't need only the IMU. There are some 3rd party boards² which have the charge controller, but I'm not sure how good they are.

Martin 🧀

@bemyak I haven't tried (yet) to follow the tutorial but it's good to know in case I fail to adapt it for my board (at least the GPIO are going to be different I guess)

Go Up