Close

Bricking a Lerdge-X and other fun things to do

A project log for Lerdge 3d Printer Mainboard Hacking

Breaking the encryption on the Lerdge series mainboards so I can try porting Marlin 2.0 to it.

jc-nelsonJ.C. Nelson 12/21/2018 at 18:080 Comments

So to recap, I've been able to run code that blinks LEDs and reads/writes on both the Lerdge K and Lerdge X boards, but every attempt to use Serial or USB results in no fault, but no output, either, and I kept coming back to the fact that other code runs fine, but other code doesn't run after lerdge's bootloader.


It was time to put up or shut up and reset the board, test my recovered bootloader, and then get into the internals of the board to understand why anything short of bit-banging serial doesn't work. 

To do this, I first had to unlock the board, mostly using the steps here:

https://community.arm.com/iot/embedded/b/embedded-blog/posts/unlocking-the-stm32f4-discovery-board-with-openocd

Do not panic if the write takes a while - the chip is erasing itself. 

Once this was done, I could then flash on code using st-flash, which is very handy.

The problem? Remember my previous log, where I noted that if you hard hang the chip with no clock config, you can't use SWD? Yeah, that. I uploaded a sketch still using the variant code which allows the bootloader to init the clock.

My X board no longer responds to SWD.

All is not lost. I have wires soldered to both BOOT0 and BOOT1, so I can recover by pulling the right ones to ground. That will hold the chip for me to load better code on. 

But, family is coming into town. My time on this project will be limited until after the holidays. In the mean time, I may poke at the -K board using only the lerdge bootloader method, but don't expect a ton of updates.

Discussions