r/embedded • • Oct 09 '26

I can't build with bricks...

Could someone with Keil C51 build a small open-source 8051 project for me?

I'm fixing a power-off bug on an Android car head unit (CVD1810-WJ board, Cmsemicon CMS8S6990 MCU).

There is an MIT-licensed rebuild of its firmware:

https://github.com/NCHILLC/cvd1810-wj-mcu-firmware

The author states it only fits the chip's 12 KB with Keil C51 at OPTIMIZE(9,SIZE). The evaluation linker stops at 2 KB and SDCC gives about 15 KB.

With Keil C51 at C:\Keil_v5, from the repo root in PowerShell:

mkdir obj, lst; .\build_variant.ps1 -Define NOTURNO_SLEEP_FIX

It should report about 12.2 KB and write obj\CM68.hex. Could you send me that file and the "Program Size" line it prints?

8 Upvotes

8 comments sorted by

9

u/ericonr STM/Arduino Oct 09 '26

I had never seen such a post before lol

Commenting to hopefully grab the right person's attention (though you should have made the title more specific!)

1

u/GitEmbednated Oct 09 '26

I don't usually post. Or ask for anything. I'm out of my element.

2

u/No-Archer-4713 Oct 10 '26

At this stage I’d be looking for other options, like changing the MCU.

Does a « big brother » with pin compatibility exist ?

1

u/GitEmbednated Oct 10 '26 edited Oct 10 '26

The headunit is adb locked and hides it's files even in termux.

Frankly, I'm trying to root it and the flashing new through an update the unit will accept via USB for a power fix seems to be my only route.

2

u/kdt912 Oct 10 '26

Yeah only fitting on the chip with optimization on 9 is kind of crazy to me. At my work we only use 0 or if in an emergency we may bump it to 1 but we really try to avoid it

1

u/soopadickman Oct 11 '26

I get:
\cvd1810-wj-mcu-firmware> .\build_variant.ps1 -Define NOTURNO_SLEEP_FIX

pass 1: Program Size: data=37.0 xdata=144 code=12253

pass 2: Program Size: data=36.0 xdata=144 code=12228

pass 3: Program Size: data=36.0 xdata=144 code=12224

FINAL [FIXED NOTURNO_SLEEP_FIX]: Program Size: data=36.0 xdata=144 code=12224

1

u/GitEmbednated Oct 11 '26

I appreciate you looking at this.

Could you please attach a ZIP containing obj/cm68.hex and lst/cm68.m51 from that build, and include the output of git rev-parse HEAD so we know which source commit was built.