Embedded Systems Weekly #111
Tags: embedded, c
Published: 2022-07-29 08:08:06

Sometimes people do interesting things and end up writing a quick brief in a forum post, Twitter or Reddit. The last one is where you can read how to [free up two GPIOs on the Raspberry Pi Pico](https://www.reddit.com/r/raspberry_pi/comments/w37gx2/i_freed_up_two_gpios_on_the_raspberry_pi_pico/). I thought it is a cool enough trick to be included just like that in the introduction. A kind of icing on the cake.

Thank you to [Daniel Bogdanoff](https://twitter.com/DanielBogdanoff) for the header's picture.

Happy reading!

### Articles 
[Debugging with JTAG](https://www.actuatedrobots.com/debugging-with-jtag/)
After a tiny history of the JTAG interface the article describes in details how to debug with the JTAG through the TAP controller. It finishes by demonstrating how to control hardware without firmware by using the boundary scan features and the [BSDL](https://en.wikipedia.org/wiki/Boundary_scan_description_language) file specific to the target.

[Rules for secure C language software development](https://www.ssi.gouv.fr/en/guide/rules-for-secure-c-language-software-development/)
Written by the ANSSI (In French Agence Nationale de la sécurité des systèmes d'information), this guide exists to help secure developments in fields not covered by normative constraints such as automotive or aeronautical industries.

[STM32F4 Embedded Rust at the HAL: Timer Ultrasonic Distance Measurement](https://apollolabsblog.hashnode.dev/stm32f4-embedded-rust-at-the-hal-timer-ultrasonic-distance-measurement)
Omar Hiari is doing a series of post on embedded development with Rust with the constraint to not go deeper than the HAL (Hardware Abstraction Layer) crate. It means no direct usage of the PAC (Peripheral Access Crate) that gives more control but makes the portability complicated. The article linked above is the most recent one. In it, you can find a direct link to the previous ones.

[Locking Engineering Principles](https://blog.ffwll.ch/2022/07/locking-engineering.html)
Reading this one, I discovered [lockdep](https://www.kernel.org/doc/html/v5.6/locking/lockdep-design.html): the Linux kernel runtime locking correctness validator. Daniel Vetter is a very experienced developer. He shares with us a very valuable experience here.

[The different ways to handle errors in C](https://mccue.dev/pages/7-27-22-c-errors)
A total of 11 different ways are presented. Some of them are direct recipes to catastrophe, but I have included the article anyway. It's interesting to be confronted to "different" ways of doing routine code.

### News / Business
[The Ferrocene Language Specification is here!](https://ferrous-systems.com/blog/the-ferrocene-language-specification-is-here/)
The first draft of the Ferrocene Language Specification (FLS) is out. The FLS aims to deliver an [ISO26262](https://en.wikipedia.org/wiki/ISO_26262) qualified Rust compiler tool chain. The plan includes as well an expansion in others sectors than automotive like avionic ([DO-178C](https://en.wikipedia.org/wiki/DO-178C)) or railway ([IEC 62278](https://www.en-standard.eu/iec-62278-2002-railway-applications-specification-and-demonstration-of-reliability-availability-maintainability-and-safety-rams/)). The collaboration between AdaCore and Ferrous Systems makes me believe in the project.

### Education / Community
[Big O notation](https://www.lgervasi.com/big-o-notation/)
Most of the article is focused, with the help of graphs, on explaining what is time complexity. After this clear explanation, I believe the introduction of the Big O notation at the end is really easy to understand.

### Tools / Libraries
[STM32 Emulator](https://github.com/nviennot/stm32-emulator)
The developer created this emulator to facilitate his effort reverse engineering the
[Anycubic Photon Mono 4K 3D printer](https://github.com/nviennot/reversing-mono4k). If you're waiting for a STM32 microcontroller (really?) it's probably your chance to run your code before you die.

### Misc
[How Does The James Webb Telescope Phone Home?](https://hackaday.com/2022/07/25/how-does-the-james-webb-telescope-phone-home/)
The JWT is a fantastic technical achievement in so many aspects that it looks like there is always something interesting to write about it. This time it is mainly about the 68 GB SSD onboard ([the Solid State Recorder](https://jwst-docs.stsci.edu/jwst-observatory-hardware/jwst-solid-state-recorder)) and its role in the communication with Earth.