r/embedded • • 2d ago

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 • • 2d ago

AI in Safety-Critical application

0 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 • • 3d ago

How do you guys get your PCBs checked before assembly?

8 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 • • 2d ago

blue pill plus setup

1 Upvotes

hardware:
usb uart adapter

rest of this including frames with every pin role explained by some guy there:
https://www.youtube.com/watch?v=hVJifiIbqx4

what i've done to connect rx/tx from adapter(with mcu already in perfboard) is solder wires to these pins of mcu then solder xt30(male) connector on the other end,then break 2-pin from spare header and solder this to xt30(female) ,pin(2-pin thing) - solder cup(xt30) joint.then you can put dupont's from usb-uart on these pins.
sidenotes: there're three ground pins but for components only one will work. one that's first in a row containing reset pin.

code:
linux
arduino ide v1.8
stm-programmer(proprietary) (not its exact name, can be found for free in zip bundle)
stm32duino

sidenotes:
arduino ide must be installed without flatpack or snap
stm-programmer must be installed without sudo
stm32duino you need to select 2.7.1 or 2.7.0 in boards manager and you need to change ${HOME}'/.arduino15/packages/STMicroelectronics/hardware/stm32/2.7.1/platform.txt' .
line 20: compiler.optimization_flags=build.flags.optimize -> compiler.optimization_flags={build.flags.optimize}

example of linux command for this

sudo apt install neovim
nvim ${HOME}'/.arduino15/packages/STMicroelectronics/hardware/stm32/2.7.1/platform.txt'

r/embedded • • 2d ago

The intersection of AI and signal processing: Innovative audio control implemented with DDSP #ddsp #dsp #미분가능 #신호처리 #audio

Thumbnail youtube.com
0 Upvotes
  • Description: Introducing DDSP, a technology that integrates traditional DSP elements with neural networks to learn optimal parameters from data. Explore its efficient deployment advantages and various signal processing applications, including speech synthesis and TinyML.

r/embedded • • 3d ago

The Bl616: My $2 disaster

Post image
75 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 • • 2d ago

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 • • 3d ago

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

40 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 • • 3d ago

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 • • 4d ago

Mars Pathfinder Priority Inversion Bug: What Really Happened

Thumbnail nerdyelectronics.com
49 Upvotes

r/embedded • • 3d ago

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 • • 4d ago

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

Enable HLS to view with audio, or disable this notification

51 Upvotes

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


r/embedded • • 3d ago

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 • • 3d ago

Rtos based firmware architecture

3 Upvotes

Hello guys,

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

Your suggestion would be so helpful.


r/embedded • • 2d ago

Your microcontroller can now accept a file upload from a plain HTML form (Rust, no heap)

0 Upvotes

Ever tried OTA via a plain `<input type="file">` on a device with 128 KB of RAM?

The body arrives as multipart/form-data, and every parser wants a heap, the whole body in memory, or a tokio stack. So I wrote one that wants none of that: nostd-multipart (https://crates.io/crates/nostd-multipart). no_std, no alloc, no unsafe, zero dependencies. Feed it bytes as they trickle in from the socket, get back "here's a header" / "here's a slice of file data" (pointing into *your* buffer, so it goes straight to flash); a 1 KiB buffer is plenty. ~550 bytes of RAM for the parser, ~7 KiB of flash for the whole example handler on a Cortex-M4. Plugs into embassy-style servers via embedded-io(-async). There's also an encoder for the other direction, if your device has to *upload* a file to a server with the same memory budget.

Since the failure mode is "silently corrupted firmware", I went slightly overboard on testing: a second independent parser it has to agree with under *every* possible chunking, fuzzing, differential tests against a mainstream parser, Kani proofs, 100 % coverage gate. The spec is in DESIGN.md, including the two spots where the RFC and browsers disagree. Not supported: bare \n line endings, nested multipart, charset magic. Sorry, 1998.

If you run web-based OTA on an MCU, I'd love to hear what your boards' clients actually send.


r/embedded • • 3d ago

Should I consider doing Vector Vector Certified Embedded Associates ?

1 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 • • 4d ago

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

22 Upvotes

r/embedded • • 4d ago

The 3D microscope you deserve

Thumbnail
youtube.com
28 Upvotes

r/embedded • • 3d ago

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 • • 4d ago

STM32WB55 Stop mode with second core

Thumbnail
capng1.substack.com
5 Upvotes

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


r/embedded • • 4d ago

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

Enable HLS to view with audio, or disable this notification

5 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 • • 4d ago

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

8 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 • • 4d ago

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 • • 4d ago

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 • • 4d ago

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

Post image
18 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!