Replies: 2 comments 2 replies
-
We're not as polished as what's available in the official Teensy ecosystem, but you shouldn't have to build everything from scratch. Ethernetimxrt-enet should work on the Teensy 4's MCU. When paired with smoltcp, you should be able to create UDP sockets and talk with your other devices. I've used this MAC driver with RMII, MII, and GMII PHYs, but not specifically that TI PHY. I have a long-standing TODO to finish integration into imxrt-hal; see imxrt-rs/imxrt-hal#146. Once that's done, I'll make the driver available through the SD cardimxrt-usdhc has been tested with 1 SD card on 1 board. With your help, we'll double that. Here's a demo. Again, if you start exploring on the Teensy 4, don't forget to check the USDHC clocks and pin mux. NeoPixel arraySorry, I've never worked with these parts. You could see if ws2812-flexio fits the bill. This uses a different peripheral than the official driver, which might affect the pins you're able to use. I2C displayTry using the |
Beta Was this translation helpful? Give feedback.
-
Hey @Nbelles. I'm also new to Rust and trying to move some Teensyduino code over. Did you make progress on the SD card integration? Any gotchas for a newbie? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all,
I've been using the Teensy 4.1 for a few years now with the Teensyduino architecture and am quite familiar with it. I have a decent-sized project (~20K lines of cpp, not including external libraries) built on Teensyduino that I'd really like to migrate to rust but I'm concerned about the level of difficulty to make that happen given the current reliance on external libraries. I'm happy to commit a couple months of time to making it happen but I want to know that it's possible given I'm a beginner in rust. The project currently utilizes a few hardware peripherals that are necessities for the project to migrate successfully:
The ethernet interface driver is an absolute necessity, it needs to be able to communicate over UDP to another device on the network. This is something I don't think I would have the technical knowledge to accomplish on my own, especially given the drivers use of the RMII communication protocol and DMA's as a beginner to rust, so a driver that already exists would be pretty much a requirement. The SD card driver would be a nice to have, although any small-volume (~10KB) persistent storage mechanism could be a hold-over solution. The NeoPixel array driver is another nice to have and seems pretty simple on the surface until you look into the code where you find that it again utilizes DMA's so an off-the-shelf driver would be preferred. The display driver would be nice to have but I'm confident I could create the driver myself given access to an I2C bus and enough development time.
I've done a little bit of searching for some of these drivers/libraries but as a newbie it's really hard to understand which ones are meant for generic rust vs. embedded rust vs. teensy4 rust vs. specifically teensy4-rs. I'd love people's help finding which off-the-shelf repos I could use and which ones I would have to write from scratch. I'd be more than happy to help write some documentation for other beginners and test examples as I get some of these things working.
I can't wait to see the rust tooling around the Teensy 4(.1) become a viable replacement for Teensyduino and get more people writing memory-safe code for microcontrollers!
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions