Avoiding the Arduino Portenta H7 "Orange LED of Hell" with STM32CubeIDE

Whilst working on the earlier UART code with the Portenta H7, I wanted to ensure I was running the correct SMT32 power config, and decided to generate the config and run this on my Portenta H7.
Unfortunately, the STM32CubeIDE tools flash into memory 0x08000000 instead of 0x08040000, the significance here is that the bootloader resides between these two addresses. When the bootloader is effectively wiped from the H7, its Power Management controller IC (PMIC) is no longer correctly configured at cold-start, and this renders your board as DOA with the "Orange LED from Hell".

Rust RTOS in STM32: The first challenge, Blocking UART on Arduino Portenta H7

Dear reader, please be warned as I'm about to take you on a journey that one really shouldn't have to embark on.  The premise is simple, I want to send and read some data via UART (or commonly known as RS232/Serial comms).
This is pretty much your Embedded 101 task, and back in my day at University, this was something I'd bit-bang on a PIC mcu or rely on a hardware USART peripheral to get the job done.  I wanted to do the same thing, in bare-metal Rust + Embassy.
Should be easy right?
Well, in all fairness, it takes about 2-3 minutes to download a simple Arduino "sketch" to do the same thing, and the code is quite succinct. 
/* * Serial echo for the Arduino Portenta H7 * * This is a simple example, and can be cleaned up a lot more. * * Copyright (c) 2024 Michael de ...(continued)

Virtualised Gitlab setup with XCP-ng

This has been a long time coming, and I finally pulled up my shorts and wired up some SuperMicro servers I ordered last year.

Hardware Rack

This is the hardware setup.
Setting up the Gitlab host was based on a popular docker-compose repo on Github, but fine tuning its internal configs is orchestrated via Ansible. I have an extensive Ansible code-base that not only bootstraps a separate GoCD cluster, but the GoCD cluster itself, re-reuns the same Ansible playbooks to "bootstrap" itself, sort of in a recursive manner (It's kinda like how you build a 3D pr ...(continued)

HOWTO Setting up a RAK3172 Evaluation Board (with STM32WLE5CC) and Chirpstack

This board has a STM32WLE5CC which is based on the RAK3372. We will be following the RAK documentation for running a basic verification to ensure that our device and hotspots are working.
I am assuming you are already running at least one configured Helium hotspot; I am using a few RAK hotspots for this demo.
We will be using the RAK RUI SDK version 4.1.1_273 (as this is the latest right now) using the staging branch in ...(continued)

Updated homelab server

Quick look at the updated server stack, well at least the main server stack.

Sometimes I do silly things, even when the Rust compiler is trying to help (Impl Traits)...

Today I spent a bit of time scratching my head as I've been integrating a crate I wrote a long-time ago on ESP32 bare-metal rust into a new project with the Embassy-stm32 HAL (for ARM, in my case the STM32H747XI chip).
Here's the offending code:
impl<'a, I2C> RTClock<'a, I2C> where I2C: embedded_hal_1::i2c::I2c<Error = BoardError>, { #[allow(dead_code)] pub fn new(bus_manager: BusManagerCortexM<I2cDriver<'a>>) -> Result<Self, BoardError> { Ok(Self { datetime: None, bus_manager, phantom: PhantomData, }) } // snip... }
Bear with me as the error takes a bit of reading, but we'll break it down
error[E0599]: the function or associated item `new` exists for struct `RTClock< ...(continued)

Debugging ARM Cortex-M with Jlink-mini and Arduino (Portenta H7) GIGA R1 WiFi board (with Rust bare metal) with VSCode

I was having a few issues with my GIGA R1 WiFi board, well, actually, one of them has totally died on me (it no longer enters into DFU mode) so I've raised a support ticket with Arduino themselves.
There isn't much information online covering Rust bare-metal and the GIGA R1 WiFi board in particular but I found this blog post called "Visual Studio Code for C/C++ with ARM Cortex-M: Part 4 - Debug" which helped confirm some of my VSCode configuration.
I also came across this Cortex M Quickstart repo on Github which helped as a clean starting point. Of course, I needed to make updates for the target device (S ...(continued)

Arduino (Portenta H7) GIGA R1 WiFi Display Demo with HTTP Request

This is a quick demo of using the Arduino (Portenta H7) GIGA R1 WiFi board with its display shield. This features a STM32H747XI microcontroller which is described as
High-performance and DSP with DP-FPU, Arm Cortex-M7 + Cortex-M4 MCU with 2MBytes of Flash memory, 1MB RAM, 480 MHz CPU, Art Accelerator, L1 cache, external memory interface, large set of peripherals, SMPS
In this example I wanted to fetch some data over HTTP and render "pages" on screen.


Inventory Management System (with Rust & React): Part 2 - Planning for Production

Posted in Hobbies > Homelab: Virtualisation & Services > Tidy - Inventory Management

With my initial focus on the Rust API, I made sure to enable Github CI and ensure my test suite would run its full gamut of tests on every push of a commit. Other good practices involve
  • Use of ENV vars (this is pretty basic)
  • Use of dotenv, for both dev and production, of course.
  • Taking a Docker first approach (more on this later...)
Of course, an ideal DevOps solution would introduce a build-pipeline; there are many options in this space from the likes of Jenkins to GoCD, although a local GitLab instance can do all of this including hosting of a container registry. Instead, I decided to take a "scrappier" approach (for now), with simply Docker.  For those wondering, my local GoCD instance hasn't been involved in this project (yet).

The Homelab Stack

My Homelab produc ...(continued)

Building an Inventory Management System (from scratch) with Rust and React

Posted in Hobbies > Homelab: Virtualisation & Services > Tidy - Inventory Management

I don't always set myself hard to obtain goals, as you know, "ambition is the last refuge of failure". No, I haven't failed!
Look at those sexy UUIDs.  Oh my!
The premise was simple.  I wanted to create a "simple" Rust backend API that would basically be a RUST API around a Postgres DB.  The other part is of course the frontend; at the started I didn't put too much stock into this until I had the Rust API out of the way.
Much of the initial Rust work was in setting up the boilerplate Axum handlers, getting a test-harness setup for end-to- ...(continued)

Post Archive