Settings

Theme

An STM32 emulator written in Rust for 3D printers

github.com

113 points by nviennot 3 years ago · 22 comments

Reader

_fizz_buzz_ 3 years ago

I 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!

  • keewee7 3 years ago

    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?

    • mmoskal 3 years ago

      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.

      • kurtjd 3 years ago

        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.

    • taneq 3 years ago

      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.

    • an-unknown 3 years ago

      > 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.

    • the__alchemist 3 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.

    • vbezhenar 3 years ago

      RP2040

    • swamp40 3 years ago

      > What is actually possible to get your hands on now?

      Nobody's going to tell you that. Closely guarded secrets. Sorry.

  • riffraff 3 years ago

    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.

kmeisthax 3 years ago

Could this be used to, say, reverse-engineer the Chitubox-proprietary file format that a lot of 4K+ MSLA printers use?

  • tslater2006 3 years ago

    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...

  • st_goliath 3 years ago

    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?

sbf501 3 years ago

Impressive. This would be great for drone flight controller software, as almost 100% of the racing controller market is STM32 processors.

  • stavros 3 years ago

    And great for development/testing too, if you can emulate an entire drone.

ostenning 3 years ago

Could this be used for automated tests?

  • kennywinker 3 years ago

    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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection