cancel
Showing results for 
Search instead for 
Did you mean: 

How to decompile STM8 firmware

Ihssen.R
Associate

Hi, I'm trying to reverse engineering a STM8 firmware. till now I can disassemble the binary firmware to get the assembler code using naken_asm : https://github.com/mikeakohn/naken_asm

Is it possible to decompile it ? can anyone point me to some tools to decompile a STM8 firmware?

thank you.

1 REPLY 1

https://stackoverflow.com/questions/63378507/how-to-decompile-stm8-firmware

Honestly I'd be surprised if there was much worth while. The 8-bit micro's have quite convoluted compiler and optimization methods. The code may also have been written in assembler originally, and not some higher language.

Generally the best approach is to make the disassembly very crisp, with a good break down of subroutines, branching, control loops, use cross referencing and variable/subroutine labelling. If you can't find specific tools to do that, write some simple parsing scripts for the disassembler output.

Establish what C library code is present, ie memcpy(), strlen(), etc and name those functions.

Determine what the portion critical to your understanding is, and manually translate that into C code blocks.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..