A quick story from our CEO (
@regalis_pl ) π
I have been working on a new library/framework for programming embedded systems with modern C (-std >= c 23).
I have started this project as an experiment with the RP2040 from {
@Raspberry_Pi,
@RaspberryPi_org} as a main CPU. The goal was simple - create hi-level, memory-safe zero-cost abstractions using modern C .
I added an additional restriction for myself - do not use absolutely any external dependency. This requirement automatically means that everything comes down to real bare-metal programming.
I ended up managing to implement literally everything myself without including any external header. Everything = linker scripts, memory maps and even a bootloader with a dedicated tool to embed a required checksum into the final UF2 file.
Things that are up and running as for today:
* booting from the external flash memory using hand-written bootloader (stage #2),
* running the system at 125MHz:
-> configuring a crystal oscillator (XOSC),
-> configuring PLLs,
-> configuring all system clocks (clk_gpout{0..3}, clk_ref, clk_sys, clk_peri, clk_usb, clk_adc, clk_rtc),
* configuring a watchdog timer,
* configuring timers,
* sending/receiving data with UART,
* configuring GPIOs,
* configuring PWMs.
#cpp #cpp23 #embedded #raspberrypi #security #rp2040 #stm32 #baremetal
More interesting things below π
ALT An example on a high-level API - GPIO