MCU on Eclipse
mcuoneclipse.com · Personal blog · on HN since 2013
Embedded developer blog on microcontrollers, ARM Cortex-M, FreeRTOS, debugging tools, and DIY electronics projects.
What HN saysHN commenters link its practical embedded posts, such as avoiding dynamic memory, address sanitizer on microcontrollers, and low-power techniques.
26HN people shared it
7linked it in comments
22stories submitted
550story points
7 months agolast shared
2013people per year2026
Most-shared posts
- 1Reverse Engineering of a Not-So-Secure IoT Device4 people · 19 points · first shared 2019 · discussion on HN
- 2Navigating AI: Critical Thinking in the Age of LLMs3 people · 3 points · first shared 2025 · discussion on HN
- 3How to make sure no dynamic memory is used2 people · 109 points · first shared 2022 · 42 comments on HN
- 4ARM Cortex-M, Interrupts and FreeRTOS2 people · 93 points · first shared 2016 · 12 comments on HN
- 5Finding Memory Bugs with Google Address Sanitizer (ASAN) on Microcontrollers2 people · 2 points · first shared 2021 · discussion on HN
- 6DIY ‘Meta Clock’ with 24 Analog Clocks1 people · 86 points · first shared 2019 · 18 comments on HN
- 7DIY Split Flap Display1 people · 83 points · first shared 2022 · 14 comments on HN
- 8DIY RFID Business Card and Badge Holder with Victorinox Swiss Army Knife Tools1 people · 77 points · first shared 2024 · 4 comments on HN
- 9Using a Time-Of-Flight LIDAR Sensor1 people · 64 points · first shared 2016 · 25 comments on HN
- 10Position-Independent Code with GCC for ARM Cortex-M1 people · 4 points · first shared 2021 · discussion on HN
- 11Semihosting with VS Code on RP20401 people · 3 points · first shared 2023 · discussion on HN
- 12Refilling the non-refillable Miele AutoDos Dishwasher1 people · 2 points · first shared 2022 · discussion on HN
- 13GNU Linker Wizardry: Wrapping Printf() with Timestamps1 people · 1 points · first shared 2023 · discussion on HN
- 14Added Heap Memory Monitoring and Tracking to FreeRTOS v10.51 people · 1 points · first shared 2023 · 1 comments on HN
- 15Free Static Code Analysis with Eclipse1 people · 1 points · first shared 2013 · discussion on HN
What HN people wrote when they linked it
jeffstephens · 2020-11-05
I found k3s to be VERY noisy in logs - I definitely recommend log2ram if you want your SD card to last very long! (Or use different external storage). I had two Pi nodes with corrupted filesystems until I made the switch.
https://mcuoneclipse.com/2019/04/01/log2ram-extending-sd-card-lifetime…
johndoe0815 · 2024-05-26
The link leads to some politics article that is not accessible in the EU.
This is probably the correct one: https://mcuoneclipse.com/2024/05/22/low-power-optimization-techniques-…
ebanorafael · 2023-04-30
Adding to other replies
https://mcuoneclipse.com/2021/05/31/finding-memory-bugs-with-google-ad…
https://interrupt.memfault.com/blog/ubsan-trap
I've tested the UBSan, it worked with some limitations but helped me catch some old hidden bugs.
tempodox · 2022-11-11
malloc() on an embedded platform can still present pitfalls. This article explains why:
https://mcuoneclipse.com/2022/11/06/how-to-make-sure-no-dynamic-memory…
elcritch · 2020-02-20
Hmm, maybe you could possibly instrument the functions[1] to write the function address to a register, presuming you have enough program space. Presuming you're in C and your compiler supports that.
1: https://mcuoneclipse.com/2015/04/04/poor-mans-trace-free-of-charge-fun…
kragen · 2025-03-26
In my sibling comment about the overall systems aspects of the situation, I asserted that there was in fact enormously more information available for how to program in the 32-bit ARM assembly used by the ATSAMD20 than in Z80 assembly. This is an overview of that information, starting, as you did, from the Internet Archive's texts collection.
Searching the Archive instead for [arm thumb programming] I find https://archive.org/details/armassemblylangu0000muha https://archive.org/details/digitaldesigncom0000harr_f4w3 https://archive.org/details/armassemblyforem0000lewi https://archive.org/details/SCE-ARMref-Jul1996 (freely available!) https://archive.org/details/armassemblylangu0000hohl https://archive.org/details/armsystemarchite0000furb https://archive.org/details/learningcomputer0000upto https://archive.org/details/raspberrypiuserg0000upto_i5z7 etc.
But the Archive isn't the best place to look. The most compact guide to ARM assembly language I've found is chapter 2 of "Archimedes Operating System: A Dabhand Guide" https://www.pagetable.com/docs/Archimedes%20Operating%20System.pdf#pag… which is 13 pages, though it doesn't cover Thumb and more recently introduced instructions. Also worth mentioning is the VLSI Inc. datasheet for the ARM3/VL86C020 https://www.chiark.greenend.org.uk/~theom/riscos/docs/ARM3-datasheet_A… sections 1 to 3 (pp. 1-3 (7/56) to 3-67 (45/56)), though it doesn't cover Thumb and also includes some stuff that's not true…
rpaddock · 2023-10-06
I can add a bit of historical context here. John wrote that during the development of WINAVR, the first GCC compiler for AVR. The discussions can be found in the AVR-GCC mailing list archives.
When the 'Small' optimization is used in AVR GCC it is aggressive and leads often to broken code if 'volatile' is not properly used.
AVR GCC, using Small optimization, would remove any variable that has no side effects from the compiler's view. Setting a value in an interrupt handler would be outside of the view of the compiler's abstract machine, so 'flag' variables were often removed. Changes in hardware registers fall into the same category.
These removals result in broken code.
Volatile is never a replacement for atomics or proper locks/mutexes/semaphores.
If hardware such as an interrupt handler or hardware register is not involved, then using volatile is a creating a race condition, which may or may not ever become apparent.
Erich Styger wrote more recently about volatile here.
https://mcuoneclipse.com/2021/10/12/spilling-the-beans-volatile-qualif…
John and I both make an appearance in the linked parent particle to that one.
Any earlier one of Erich's:
https://mcuoneclipse.com/2013/08/14/volatile-can-be-harmful/
If changing the optimization level breaks something, it is probably a missing volatile when doing bare hardware.