This repository provides instructions on how to dump and flash LKS32 microcontroller units (MCUs) using a standard ST-Link probe, and how to modify certain parameters. Please check the Disclaimer before proceeding.
- Install python
- Install
pyocd
with pip:pip install pyocd
- Download and extract the appropriate Pack file:
The image is showing Brightway "3 Lite" controller. TP locations can vary across controllers.
Using pyocd
and the Pack file downloaded before, see examples below.
LKS32MC08x:
python -m pyocd cmd -c savemem 0 0x10000 mcu_fw.bin --pack Linko.LKS08x.1.1.7.pack --target lks32mc081c8t8
LKS32MC07x:
python -m pyocd cmd -c savemem 0 0x20000 mcu_fw.bin --pack Linko.LKS07x.1.1.7.pack --target lks32mc071cbt8
Copy mcu_fw.bin
to mcu_fw_mod.bin
and make changes. See Modifications for examples.
Using pyocd
and the Pack file downloaded before, see examples below.
LKS32MC08x:
python -m pyocd load mcu_fw_mod.bin --pack Linko.LKS08x.1.1.4.pack --target lks32mc081c8t8
LKS32MC08x:
python -m pyocd load mcu_fw.bin --pack Linko.LKS07x.1.1.7.pack --target lks32mc071cbt8
Simply run the above command with mcu_fw.bin
instead of mcu_fw_mod.bin
.
Advise: Keep the original binary in a safe place!
- Download the SN script
- Using the script:
python bw_change_sn.py mcu_fw_mod.bin <SN>
For <SN>
check the following table.
Model | SN |
---|---|
3 Lite | 35793 |
4 | 46441 |
4 Lite | 46419 |
4 Ultra | 37829 |
5 | 60562 |
5 Max | 60559 |
The information provided on this page is intended for educational purposes only. The methods discussed are aimed at understanding the functionality and security aspects of microcontroller units (MCUs).
By accessing this information, you agree that the creators and publishers of this content are not responsible for any misuse of the knowledge shared here. You acknowledge that you are solely responsible for ensuring your activities comply with all applicable laws and regulations. The creators and publishers do not condone or encourage illegal activities in any form.
Always seek explicit permission from the relevant parties before attempting any form of modification or analysis of electronic systems. Use this information responsibly and ethically.