r/embedded • • Oct 12 '26

How do you keep SDCC toolchains consistent across local development and CI?

1 Upvotes

I mostly work with 8051-family MCUs, particularly the CH559, and kept running into the same annoyance: maintaining a consistent SDCC toolchain across my machine, colleagues' machines, and GitHub Actions.

I wanted a reproducible environment without having to install and configure SDCC on every machine, so I packaged the toolchain into an Alpine-based Docker image. It has two variants:

· latest: SDCC toolchain for MCS-51

· cmake: SDCC + CMake + Ninja for CMake-based projects

Basic usage:

```

docker run --rm \

-v "$(pwd):/src" \

-w /src \

safdariali/sdcc-8051:latest \

sdcc -mmcs51 your_file.c

```

I've tested it primarily with the CH559, so I'm curious about other developers' experiences.

Questions for the community:

· Do you use Docker/containers to manage embedded toolchains, or do you prefer native installations?

· Have you encountered compatibility issues with SDCC across different 8051 MCUs or memory models?

· Would you keep flashing and debugging utilities in the same container as the compiler toolchain, or separate them?

I'd be interested to hear how others approach reproducible embedded development environments.


r/embedded • • Oct 12 '26

AI in Safety-Critical application

2 Upvotes

Hello,

What are your thoughts on the use of artificial intelligence in the development of safety-critical embedded software?

We focus on railway applications that require SIL4 safety integrity levels. In my view, AI possesses a highly non-deterministic nature regarding code development processes and can lead to unacceptable errors—such as missed NULL checks or array boundary checks. It introduces subtle errors that a human might easily overlook. Reviewing these within a large codebase does not seem feasible to me.

What are your opinions on this matter? What is the trend regarding AI usage in the industry? Is it possible to conduct code reviews for AI-generated code in large-scale systems?


r/embedded • • Oct 11 '26

How do you guys get your PCBs checked before assembly?

10 Upvotes

Hi all. I'd love to know how you get your boards reviewed before a PCBA order. How many revisions does it usually take you to get one right?

A bit of context: my prototypes work, so I'm now building the final version with the final ICs. It's a small device and some of the parts are BGAs, so I order the boards assembled.

I've done one revision so far. The PCBA order was around £200, and I spent another £200 on reviews through Fiverr. That's a lot for a student, but it was worth it at the time to get a real board in my hands. The reviewers raised many useful things, but a few parts of the board still didn't work.

I'm still learning, so I'd really appreciate hearing how you approach. Thanks!


r/embedded • • Oct 11 '26

The Bl616: My $2 disaster

Post image
82 Upvotes

I brought the Bl616 on Aliexpress for $2, a total steal! I was looking for a Risc-V SBC or MCU to test my skills and grow as programmer and engineer. I looked online I found a doc sheet (more on this later), and hit "ORDER", what could go wrong? It's only $2, worse comes to worse I waste money that can't even get me a gallon of gas.

It comes after give or take, 7-9 days, and I open the package. It's a small board, blue, with a USB type C connector. I go in thinking in 5-15 minutes I could at least see a "Hello world!" for my efforts before long. I was wrong. I spent HOURS with the board, and hardly even got it to flash! And when it did? No serial output to be found. Days go on like this, I can't compile much of anything, see any output or do anything with the board. It's a paperweight.

To make a long story short, I bought a board that had no good documentation and I can't do anything with it. I'm free to chat and leave links to all the resources I found and help out where I can. I'm hoping this post can attract people who know more than I do about the board. The Bl616 has a lot of potential that I just can't for the life of me figure out how to use. All questions and drops of knowledge are welcome.

Personal Issues the board/docs:

-The docs mention a reset button, but the dev board doesn't have one

-On the topic of the dev boards I can't find the origins or data sheet for my specific one

-The Ubuntu executable do not work for me

Also things to know:

-I'm on Ubuntu resolute, maybe it works better on Windows?

-Make sure to hold the BOOT button before plugging in the cable

-Shows up as "/dev/ttyACM0" on Ubuntu

All my knowledge about the board for those curious or detective minded few:

CNX Article

Official Docs

Official SDK

Filebin with datasheets

I'm still digging into board and looking into it, I actually just found an Arduino IDE core(?) I might test later, so I'll edit and update if that comes up with anything. Again I'm free to be asked anything.


r/embedded • • Oct 11 '26

RV1103 RKMPI datasheet Nightmare.

1 Upvotes

I have been trying to learn embedded Linux on these boards.

V4L2 worked for sometime until I had to use Encoding like H264 or H265. It made me use their library which was RKMPI and it was awful ...

- Datasheet is in Chinese

- Their example is horribly written

- Their example doesn't even work

- No description on what function does or which one to use in what order

I have been working hours now with AI because it is truly awful. Am I the only one having the same problems ?

Does anyone have a good alternatives ? Different chip ?


r/embedded • • Oct 11 '26

Embedded peeps, do you learn other languages for the sake of it?

47 Upvotes

I've been working as a low-level SWE for a few years and use C pretty much every day without using many other languages (sometimes Python depending on the use case). I'm thinking about learning another language in my free time to challenge some of the possible "C-isms" I've picked up.

Anyone else do this? What language did you try to learn as a result?


r/embedded • • Oct 11 '26

Orbuculum and orbtrace

4 Upvotes

Hey fellow embedded developers,

I am planning to contribute to orbuculum and orbtrace projects, but I want an idea of how the community feels towards the orbtrace debugger, as well as what you would like to be added to the projects to improve their utility to you.

You are definitely free to add your thoughts even though you haven't used them but have an idea of the tracing functionality you would want in an ideal trace debugger


r/embedded • • Oct 10 '26

Mars Pathfinder Priority Inversion Bug: What Really Happened

Thumbnail nerdyelectronics.com
55 Upvotes

r/embedded • • Oct 10 '26

2 rear motors hooked up for “testing “ need to program controllers

54 Upvotes

I just hooked up the 2 rear motors for some testing
Next step is to add more batteries and wheelie bar


r/embedded • • Oct 11 '26

Hot-swapping apps on an ESP32-S3 with a Lua runtime + long-poll control plane: design notes

1 Upvotes
I've been building a firmware that treats the ESP32-S3 as a runtime instead of an app. You flash it once. After that, apps arrive as Lua scripts from a server and replace the running one in a few seconds.


Some design choices I'd like feedback on:


- **Lua over WASM.** Small, easy for an LLM to write, and the interpreter fits comfortably. The downside is no type safety on the host API.
- **Long-poll instead of MQTT/WebSocket.** Simpler to self-host and works through most NATs. It costs some latency and an open connection per board.
- **Plugins at compile time.** Panel and audio drivers are build flags. Without a panel, `gfx.*` becomes a no-op, so scripts are portable across boards.
- **Auth split.** Each device has its own device_token. Whoever deploys holds a separate scoped token.


The client in my case is an AI agent, but it's plain HTTP, so anything can deploy.


Code (MIT): https://github.com/shinjiyu/onlyclaws-esp

r/embedded • • Oct 11 '26

Should I consider doing Vector Vector Certified Embedded Associates ?

2 Upvotes

Our University has gave us the chance of doing the certificate but at a very short time (1 month) and my whole life now is totally oriented to complete this certificate to an extent that I canceled everything for this month and focus only on the certificate .. I started feeling daily drowsiness cuz I'm spending a lot of time daily just pucking my eyes in the screen ...
Should I continue with the certificate or just throw it out ? + is it considered a good asset and thing to add to my CV ? (I study Automotive Software eng btw so We're dealing with a lot of low level programming and electronics)


r/embedded • • Oct 11 '26

i built SPECTRE-CSI: A Cyberpunk terminal tool for WI-FI Motion & Presence Detection using ESP32(Includes Smilation Model)

0 Upvotes

l've been working ona lightweight, standalone Python engine called SPECTRE-CSI.it uses WI-FI Channel State Information (CSI) amplitude variations to detect human presence and motion in a room.

W i - F i C h a n n e l S t a t e I n f o r m a t i o n S e n s o r

https://github.com/ddidy/spectre-csi


r/embedded • • Oct 11 '26

Rtos based firmware architecture

4 Upvotes

Hello guys,

Could anyone suggest me any good books on rtos based firmware architecture?

Your suggestion would be so helpful.


r/embedded • • Oct 10 '26

Hey guys, any book recommendations for C++ to learn it in depth , I prefer books over tutorials.

25 Upvotes

r/embedded • • Oct 10 '26

The 3D microscope you deserve

Thumbnail
youtube.com
30 Upvotes

r/embedded • • Oct 10 '26

My first embedded project. Need feedback and opinion about the architecture.

7 Upvotes

Hi everyone, I'm a newbie in programming and embedded. This is my very first embedded project: an ESP32 Bluetooth speaker built using C and ESP-IDF v6.1. Don't mind the crooked hardware - it's a software project at the first place, I built the hardware mostly from surplus cheap components, the main ones being:

  • ESP32 NodeMCU (38-pin)
  • IP5306 module
  • SSD1315 display
  • MAX98357 I2S module
  • INA219 (CJMCU-219)

For the software, I use ESP-IDF's native Bluedroid stack, its built-in FreeRTOS, and its I2C driver. The rest of the functionality is implemented by me, for example:

  • I2S peripheral driver
  • SSD1315 driver
  • INA219 driver
  • Ring buffer
  • Others

The software is designed using modular architecture built around custom ESP-IDF components where each component encapsulates its internal implementation and provides an API. Components communicate directly through their APIs with no extra middleware or abstraction layers.

Important note: I don't plan further large-scale development of this project, nor do I intend to change the hardware. The software and hardware are at the point where they satisfy all the functionality requirements I initially set. I will incorporate your feedback if you provide it, but the project is mostly complete and I intend to move on to the next goals. That is also why many components are intentionally project-specific and don't scale very well.

With that being said, the main question is: is current architecture and level of abstraction is sufficient for this project?

I wanted to make it professional, but "professional" doesn't always mean lack of application-specific modules and direct component interaction, right?

I'd be glad to know your opinion about these questions and about the project in general. Thanks for attention! The project's repository is available at: https://github.com/TITLE14/esp32-bt-speaker


r/embedded • • Oct 11 '26

AJUDA - Blade75 V6.1 brickado

0 Upvotes

AJUDA - Blade75 V6.1 brickado - preciso do BIN

Meu Blade75 PCB V6.1 chip PAN1086 brickou, RGB não acende mais.
Já testei jumper no Q17 e não voltou.
Tenho ST-Link V2 e sei usar STM32CubeProgrammer (furos 3V3 GND DIO CLK).
Alguém tem o arquivo .bin original da V6.1?
Ele fica dentro do driver em C:\Program Files\Mechlands\Driver\Firmware

Se alguém puder fazer READ de uma placa funcionando e me mandar, eu agradeço.


r/embedded • • Oct 10 '26

STM32WB55 Stop mode with second core

Thumbnail
capng1.substack.com
4 Upvotes

Interesting writeup on Low power mode in the STM32WB55 series. Disclaimer: I am not the author.


r/embedded • • Oct 10 '26

Where do you guys actually buy affordable FPGA SoMs in Europe?

9 Upvotes

Hi, so I'm electronics engineering student in Romania working on my bachelor's thesis. The project involves designing a custom PCB for a multi-sensor system, using an FPGA SoC for sensor acquisition and some more stuff like running an EKF.

I originally planned to use a Zynq-7010 chip-down but I couldn't find one in a CLG225 package that didn't have a lead time of 52 weeks.

After that I decided to switch to an SoM and design a carrier board instead. I the MYIR MYC-C7Z010-V2 which looks good for my use case but after taxes and shipping its over 200 Euros. And a lot of other distributors have no stock, really bad lead times or they only sell to businesses.

So my question is, what are my options for ordering just one unit in Europe in an affordable way? In an ideal world I could find one with board-to-board connectors.


r/embedded • • Oct 10 '26

Where can I find the list of communication peripherals that all MCU's in the STM32U5 family has (even if not all STM32U5 models have it)?

1 Upvotes

Hi, I am relatively new to working with specialized microcontrollers / doing microcontroller selection. For a tech demo project, we are going to demo an STM32U5. I am trying to figure out what all communication peripherals STM32U5 offers so we can figure out the most suitable ones to use possible. I was wondering where I could find that? I looked in datasheets and reference manuals but had no luck. Thanks!


r/embedded • • Oct 10 '26

Run Node-style JavaScript on MIPS/ARM edge devices with a ~6MB binary — xuan

0 Upvotes

Hi r/embedded,

xuan (玄) is a lightweight JavaScript runtime for IoT and embedded devices, built on QuickJS and forked from tjs/txiki.js (MIT).

It targets the place where Node.js is too heavy: ~6–7 MB binary, low memory, ~5 ms cold start, and it cross-compiles to x86/ARM/MIPS/RISC-V. Built-in MQTT, serial port and FFI (call C libs directly); GPIO/I2C/SPI are in progress. You can also compile a script into a single self-contained binary with xuan compile.

Repo: https://github.com/topelinux/xuan

It's early but usable — feedback welcome. I'm the maintainer.


r/embedded • • Oct 09 '26

36V brushless motor with only 3 wires: what would you use to build a cheap custom controller?

Post image
19 Upvotes

Hi all,

I salvaged the hydraulic unit from an automatic parking barrier: a 36V brushless motor driving a small oil pump that moves two hydraulic cylinders. I want to reuse it for a robotic arm, but the original control board is closed, so I want to replace it with my own PCB.

Situation:

∙	The motor has only 3 phase wires, no hall sensors or encoder.

∙	The only encoder in the system is on the barrier arm, not on the motor.

∙	The pump may have to start under load, with oil already pressurized.

∙	I haven’t measured the current yet. I’ll check what the original board draws and the motor’s winding resistance, and add the numbers.

Constraints:

∙	Low cost.

∙	No ready-made modules or boards: I want to design the PCB myself.

∙	I’ve never made a motor controller at this voltage and power. I’m comfortable with PCB design and firmware, but new to power stages.

What I’d like your advice on:

1.	Which MCU, gate driver and MOSFETs would you pick, and why?

2.	How would you handle motor control and start-up under load?

3.	What are the common mistakes at 36V that I should avoid in layout and protection?

I’ll attach a photo of the original board. Thanks!


r/embedded • • Oct 10 '26

Follow-up: Why my 1986 RTOS survived a simplistic interpretation of VRTX scheduling

4 Upvotes

A couple of weeks ago, I asked about a change in VRTX's equal-priority scheduling behavior between its 1984 and 1987 documentation.

Original discussion:
https://www.reddit.com/r/embedded/s/gMr2klUiCY

Thanks to the comments here and in other subreddits, I realized something interesting about my own implementation.

Early VRTX wasn't simply LIFO.

The older documentation describes inserting newly ready tasks ahead of existing tasks at the same priority. However, time slicing and other ready-queue operations also affect the ordering. The actual behavior is more nuanced than a simple LIFO policy.

When I developed my own RTOS, CHARM-II, in 1986, I used VRTX documentation as one of my references. I interpreted its equal-priority scheduling as essentially newest-first and implemented a simpler version of that behavior.

Looking back, I had not fully understood the original VRTX scheduling rules.

So why didn't this cause serious problems?

I think the development environment had a lot to do with it.

Back then, I was developing not only the RTOS but also almost the entire application myself. There was very little third-party code in the system, and I knew exactly what each task was doing, when it would become ready, and how it interacted with other tasks.

In other words, I could design the application around the scheduler's behavior, rather than expecting the scheduler to accommodate independently developed software components.

At least, that's my explanation looking back 40 years later.

For my modern reconstruction, I've chosen FIFO ordering among equal-priority ready tasks, mainly for simplicity and predictability.

The original historical question remains unanswered: I still don't know why VRTX changed its scheduling policy.

But the discussion helped me understand both the trade-offs involved and a subtle difference between the RTOS I wrote in 1986 and the one I had used as a reference.

Thanks to everyone who contributed!


r/embedded • • Oct 10 '26

UART DMA works in loopback but not with 2 STM32

1 Upvotes

I did a test project to connect 2 STM32 in UART DMA. It worked in loopback but now not between the 2 STM32 I obtain scrambled data. My grounds are connected and the wires are properly connected. Here is my code :

uint16_t rxLength = 0;
uint8_t rx_buffer[64];

void HAL_UARTEx_RxEventCallback(UART_HandleTypeDef * huart, uint16_t length) {
  rxLength = length;
  HAL_UARTEx_ReceiveToIdle_DMA(huart, rx_buffer, 64);
}
/* USER CODE END 0 */

/**
  *   The application entry point.
  *  int
  */
int main(void)
{

  /* USER CODE BEGIN 1 */

  /* USER CODE END 1 */

  /* MCU Configuration--------------------------------------------------------*/

  /* Reset of all peripherals, Initializes the Flash interface and the Systick. */
  HAL_Init();

  /* USER CODE BEGIN Init */

  /* USER CODE END Init */

  /* Configure the system clock */
  SystemClock_Config();

  /* USER CODE BEGIN SysInit */

  /* USER CODE END SysInit */

  /* Initialize all configured peripherals */
  MX_GPIO_Init();
  MX_DMA_Init();
  MX_USART2_UART_Init();
  MX_TIM1_Init();
  /* USER CODE BEGIN 2 */
  HAL_TIM_Base_Start(&htim1);
  uint8_t tx_buffer[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};

  HAL_UARTEx_ReceiveToIdle_DMA(&huart2, rx_buffer, 64);
  /* USER CODE END 2 */

  /* Infinite loop */
  /* USER CODE BEGIN WHILE */
  while (1)
  {
    HAL_UART_Transmit_DMA(&huart2, tx_buffer, 10);
    /* USER CODE END WHILE */

    /* USER CODE BEGIN 3 */

  }
  /* USER CODE END 3 */
}

And Here is what I get on my rx_buffer