An STM32 emulator written in Rust for 3D printers
github.comI suppose emulating STM32s is all we can do at the moment. Impossible to buy one until sometime in 2023. On a more serious note: Great project!
I thought MCUs popular in both industry, college, and among hobbyists would be more readily available by now.
What is actually possible to get your hands on now? What about 32-bit ARM Arduinos and ESP32s?
Popular in production = hard to get mostly. Eg you can get STM32G030 and similar at quite normal prices at LCSC (and thus JLCPCB assembly service, highly recommended over hand soldering BTW). OTOH stm32f030 (older and 2x worse in most respects) are way overpriced.
In addition to various esp32s (which have very decent sdk) you can easily get rp2040. You can also get a number of Chinese chips other than esp32 but good luck programming these.
I had success programming Chinese clones of the STM32F103C8T6 aka Blue Pill by just changing the device signature the programmer looks for via a flag in openocd. Fortunately these blue pill clones behave identically (so far, in my experience) to the real thing and are abundant and cheap on eBay so might be a good option for those who still want to work with a STM32 chip.
We're using ESP32s in everything, originally because they're pretty great (what's not to love about lots of IO combined with wifi and bluetooth?) but also now because they're the only thing you can get.
> What is actually possible to get your hands on now?
You can get your hands on many different chips right now, including many different STM32 microcontrollers. The more important question is "at what price" though, because some of these chips are more than 10x more expensive than years ago.
ESP32s in most (all?) variant are available. So are nRFs. Most ICs that were out of stock 1-2 years ago are avail again.
STM32s (most/all variants?) are unavailable. It's frustrating since these are very nice MCUs for a number of use cases. Ie fast, loads of hardware peripherals, variants and footprints to fit various project requirements.
RP2040
> What is actually possible to get your hands on now?
Nobody's going to tell you that. Closely guarded secrets. Sorry.
How come STM32s are not available? I thought the chip supply issues were mostly related to smaller process nodes while these should be made on relatively older ones.
No there's an everything shortage in electronics. Fancy chips, old chips, power chips, capacitors, connectors, epoxy resin.
https://www.digikey.com/en/resources/reports/lead-time-trend...
The short answer is that they are not building more fabs for non-leading edge processes, like those used by STM32.
There is an interesting video about this:
There are variants of STM32 that are 90nm. A 90nm foundry was just announced. Not sure if they’re planning on making STM32s, probably not, but there are non-leading edge foundries being run and more are being made.
Here is an announcement from this month
https://www.eetimes.com/skywater-to-build-1-8-billion-fab-in...
Pretty interesting, thanks!
Could this be used to, say, reverse-engineer the Chitubox-proprietary file format that a lot of 4K+ MSLA printers use?
I'm guessing you are referring to the new format they released with Chitubox 1.9 that encrypts portions of the layer data. The Chitubox file format has been reverse engineered and their encryption as well. The format is in the CTBEncryptedFile.cs of the UVTools project, and the encryption specifically is handled in the CryptFile mehtod: https://github.com/sn4k3/UVtools/blob/master/UVtools.Core/Fi...
010 Editor templates for both the encrypted CTB and the decrypted CTB are also provided in the repository: https://github.com/sn4k3/UVtools/tree/master/Scripts/010%20E...
I found this sentence (emphasis mine):
> This emulator is done in the context of my work on reverse engineering 3D printers
in the README of the repo, right there on the page being linked to, pretty much at the top of the README.
Given that it is an STM32 emulator, developed specifically for reverse engineering 3D printer firmware, I suppose it can be used for reverse engineering how a specific 3D printers firmware decodes a file format then?
Impressive. This would be great for drone flight controller software, as almost 100% of the racing controller market is STM32 processors.
And great for development/testing too, if you can emulate an entire drone.
Could this be used for automated tests?
My thoughts exactly! It’s confusing to me coming from the desktop+mobile software world, how little automated off-device testing there is in the embedded world.