SparkFun Thing Plus - Ambiq Apollo3 - part 1

Driven by the idea of building a Bluetooth keyboard like device, I've bought the SparkFun Artemis Thing Plus board. It's a board designed for small, power efficient devices with Bluetooth capability. SparkFun Artemis Thing Plus The board carries an Ambiq Apollo3 processor. It's an ARM Cortex-M4F chip. Runs at 48MHz but can, for a brief amount of time, go up to 96MHz. Here you can read more about the whole Apollo line-up. [Read More]

Debugging image resources

I work a lot with image processing. There is a lot of transformations and sub images extraction. Often, it would be great to actually see those images when debugging. Quick Google search pointed me to the dump command present in gdb. In short, to get the memory dump, you would do something like this: set $source=pointer_to_the_memory set $size_of_the_dump=4096 dump memory filename.bin $source $source+size_of_the_dump You have to know the size of your data. [Read More]

Black magic probe out of cheap STLink programmers

If you have ever worked with ARM Cortex M processors you've probably used GDB + OpenOCD combo for debugging. If you didn't: OpenOCD connects to the processor via a STLink programmer and opens a socket to which GDB can connect. It will push data necessary for debugging (and understandable for GDB) through this socket. That means that if you connect GDB to this socket (so called remote debugging) you can debug processor's software like any other application on your PC. [Read More]

Using + Python as a data dashboard

Have you ever heard about It's a basic web page creator. You can basically create a very simple website by typing content into a form. I thought it might be used as a very simple frontend. I always dabbled with automation. An example would be a scraping script that gets the job postings from a specific website or one that checks when the bus I take every morning leaves and sends this information by e-mail. [Read More]

[STM32] - part 3 - Start your engine!

I think it's time to go through what happens when you power on the STM32 Cortex-M microcontroller. There is a lot of resources on this topic (if you are reading this one… thank you!). I will explain this process in my own words. You have powered on your microcontroller. Less than a second has passed and it is already munching through data, sending and receiving messages, controlling motors and blinking leds. [Read More]

[Knowledge snippet] - STM32 bootloader

You programmed STM32 microcontroller using Nucleo or Discovery boards. Those use Serial Wire Debug (SWD) for programming/debugging. Now you are designing a PCB with STM32 microcontroller on it which means you have to be able to program it. One of the solutions is uploading the code through a bootloader - small piece of software made by ST that's in the protected memory of the microcontroller (read-only). It reads the data being sent from the PC and copies it into FLASH memory. [Read More]

[STM32] - part 2 - Lets look inside!

Still wondering why it all works? Why this black square does things? Lets go deeper. Previously I explained a bit about processor architecture. It's the basis of the chip. It's a fundament. You won't find anything about an UART in a Technical Reference Manual of Cortex-M4. It's just not a part of this fundament. When you get an STM32 microcontroller based on the Cortex-M4 architecture you just get microcontroller made by ST which uses this specific architecture. [Read More]

[STM32] - part 1 - Cortex what...?

Recently I wrote a short article about setting up an environment for programming STM32 microcontrollers with the libopencm3 library. You can read it here. I wanted to write the second part as soon as possible but I found out that even though I could, I didn't understand everything well enough. I just didn't feel comfortable with the subject. That's why I started this series. I want to explore what actually happens when you program STM32 microcontroller. [Read More]

Adventures in libopencm3 - part 1

Recently I started working on a new project. It will take some time before the goal of the project is even worth mentioning. The important part is that it is an electronics/hardware project and it needs an energy efficient compyting unit. For early development I chose an ARM Cortex M3 STM32F3 microcontroller. More precisely STM32F303K8T6 mostly because I have a Nucleo board with this chip laying around. What's intersting is that ARM chips are so popular you can also choose a framework. [Read More]

Compiling Raylib programs with SCons

If you like writing programs in C, are interested in game developement and don't enjoy all those complicated and ancient build systems I think I've got something of interest to you. I belive there is something enjoyable in the simple setup I'm describing below. Hope you will enjoy as well. Raylib Raylib is a C library made by @Ray San. On the Raylib's website it says ‘raylib is a simple and easy-to-use library to learn videogames programming'. [Read More]