Is it possible to disassemble hex stm8 firmware?
-
File firmware .hex - http://rgho.st/download/7vsCNsnB8/2416d20a3037ed3f1c515f6c29af79f9c2304d0e/oldtermo.hex – Smeshariki Feb 10 '17 at 18:48
2 Answers
Your file consist of two sections 8000-87FFh and 8800-BFFFh. Apparently first is bootloader, second is main programm. You can disassemble they separately.
I have tried to do the following:
- Just cut and save first section to one file, and second to another.
- Disassemble each file with naked_asm:
naken_util.exe -disasm -stm8 ./fw.hex > ./fw.asm
- As result I have got two asm files: main.asm and boot.asm
Boot file begin with common IRQ table. Main file destine all IRQs to 886Bh where seems begin main()
function, and the first instruction is asm("sim")
that disable all IRQs.
Further you can use some more complex programm such as IDA and decomplie they to source if you need.

- 999
- 7
- 22
This IDA Pro 6.6 plugin seems to work. https://github.com/derbroti/Stm8Ida
Assuming you're on Windows:
Open the VS2013 solution and build using IDA 6.6 SDK headers and libs. You will need to add idasdk66\include and idasdk66\module to the list of includes and idasdk66\lib\x86_win_vc_32 to the list of library locations in your project file.
Then copy the output, st8.w32 to: C:\Program Files (x86)\IDA 6.6\procs

- 5,675
- 2
- 39
- 37