Skip to content

dnandha/stlink-lks32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ST-Link LKS32

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.

Installation

  1. Install python
  2. Install pyocd with pip: pip install pyocd
  3. Download Pack (Source)

Note: These examples use a LKS08x package. You can apply the procedure to a different MCU series using the appropriate Pack file.

Basic procedure

Hookup ST-Link

image The image is showing Brightway "3 Lite" controller.

Dump flash

Using pyocd and the Pack file downloaded before:

python -m pyocd cmd -c savemem 0 0x10000 mcu_fw.bin --pack Linko.LKS08x.1.1.4.pack --target lks32mc081c8t8

Modify bin

Copy mcu_fw.bin to mcu_fw_mod.bin and make changes. See Modifications for examples.

Write bin back to flash

Using pyocd and the Pack file downloaded before:

python -m pyocd load mcu_fw_mod.bin --pack Linko.LKS08x.1.1.4.pack --target lks32mc081c8t8

Restore original binary

Simply run the above command with mcu_fw.bin instead of mcu_fw_mod.bin.

Advise: Keep the original binary in a safe place!

Modifications

Change SN of Brightway controller

  1. Download the SN script
  2. Using the script:

python bw_change_sn.py mcu_fw_mod.bin <SN>

For <SN> check the following table.

Serial Number Prefixes (Global)

Model SN
3 Lite 35793
4 46441
4 Lite 46419
4 Ultra 37829

Disclaimer

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages