There are valid use cases for the infinite while(1) loop in microcontroller programming (contrary to popular belief it seems). Autogenerated HAL code for the stm32 uses it for error handlers, and they support C++ so I am surprised this was UB.
I only use it for error handling and of course it is a bad idea to use this to wait/stall in power sensitive applications, in that case use wake from interrupt.
As an aside, I like to include a software breakpoint in my error handlers. It makes debugging easier without wasting a hardware breakpoint (which are physically limited by the microcontroller):
UB according to the standard committee is "we didn't think of it". It's not literal UB it's well known what it compiles down to, every time.
(.loop:
jmp .loop)
It's not "we didn't think of it", it's literally "the standard has nothing to say about it", which means that any standard-conforming implementation is free to do whatever it wants, meaning that different implementations may handle it differently.
> It's not literal UB it's well known what it compiles down to, every time. (.loop: jmp .loop)
That might be true for a particular version of a particular compiler, but if you assume that it's true for all standard-conforming compilers (now and in the future) then you're making an assumption that is not supported by the standard.
Another low cost fpga board I've found is the EBAZ4205, which has a Zynq7010 SoC (fpga and dual core arm CPU). I got one a few years ago for 40 AUD. They were originally Bitcoin miner control boards. https://theokelo.co.ke/getting-starting-with-ebaz4205-zynq-7...
He also made circuitjs, a very useful circuit simulator which I regularly use for prototyping. It lets you modify and probe elements in real time unlike spice simulators, so it is faster to modify a design in it.
I use spice simulators to check the final design since sometimes circuitjs can have instability issues in complex circuits involving stuff like the nonideal op amp.
He also wrote zsh ( https://en.wikipedia.org/wiki/Z_shell ) as a sophomore in 1990, moved onto other things a few years later, and a couple decades later in 2019 it became the MacOS's default shell.
That's wild. I knew he was the circuitjs guy which is impressive on its own, and vaguely knew of the other simulations as well, but writing zsh as an undergrad... Wow
I use it rather often in professional projects, usually for figuring out power supply inrush transients, and I usually point anyone who wants to learn electronics to it.
Just be sure you set the simulation step size appropriately if there's high frequency stuff happening, or the results will not make any sense.
I get the reasons for not supporting out of order execution and the % variable, it makes for more readable and usable notebooks. Unfortunately most of the time I use Mathematica it is not to make a readable and repeatable notebook but just to help with uni work, so I do take shortcuts like putting multiple statements in a block and using % frequently.
If you are planning to add another component, I'd like to +1 the control systems module. It's a lot less clunky than Matlab in my opinion and faster to use. I've used the classical analysis, state space model and matrix equation solver features in that module, none of the microcontroller stuff https://reference.wolfram.com/language/guide/ClassicalAnalys...
Either way, I'll probably be using this after I graduate and no longer have the site license, since I cannot imagine using a different CAS, so thanks for developing this
Thanks for the links. This doesn't seem to be a true RISC-V MMU (according to the Sv32 specification) integrated into the CPU core itself, but just a peripheral designed for memory mapped SPI flash and PSRAM. So as far as I understand there is no true process isolation with page faults and dynamic paging.
Ok, I see. The S3’s "MMU" is just an external-memory mapper, not a virtual-memory MMU. The S31 apparently has both, that mapper plus an architectural CPU-side Sv32 MMU; that offers indeed a lot of interesting possibilities. Even sel4 would run on this machine as it seems. The ARM world has no microcontroller with a true MMU as far as I know. Risc-V now has at least two (here is the other one: https://www.bunniestudios.com/blog/2026/baochip-1x-a-mostly-...).
The Microchip PIC32MZ MCU has an MMU as well. But not with wireless options in a 8x8 QFN80 package like this ESP32-S31. That's pretty small. No flash though.
He was just ahead of its time in terms of grind and realism. I remember one of the first times gregtech was introduced to the mainstream was with the Mindcrack FTB modpack, most people hated it because they were used to being able to unlock ore doubling (with the ic2 macerator) within the first 20 minutes of a new world. He increased the difficulty by making the recipe need diamond cutting heads instead of a ton of iron. As you said he did this by modifying another mod's recipe (in this example ic2) which was frowned upon at the time.
In a sense, he created expert mode modpacks before they were a thing, where it is common and expected to modify recipes from multiple mods to make a more interconnected recipe chain.
No it doesn't, the time to first fix from cold start of modern GNSS receivers is in seconds (24s on the NEO M9N). Assisted GNSS using data from the internet reduces that to under 2 seconds (see https://content.u-blox.com/sites/default/files/NEO-M9N-00B_D...). Of course this can change based on the GNSS environment.
Even in the worst case the almanac (the data that is streamed at 50 bits/second) repeats every 12.5 minutes not hours.
I only use it for error handling and of course it is a bad idea to use this to wait/stall in power sensitive applications, in that case use wake from interrupt.
As an aside, I like to include a software breakpoint in my error handlers. It makes debugging easier without wasting a hardware breakpoint (which are physically limited by the microcontroller):
reply