Author Topic: Is it possible to convert STM8 hex to C code?  (Read 1343 times)

0 Members and 1 Guest are viewing this topic.

Offline ChrissTopic starter

  • Frequent Contributor
  • **
  • Posts: 534
  • Country: 00
Is it possible to convert STM8 hex to C code?
« on: December 07, 2019, 01:20:51 am »
Hi!
I have a battery charger with an STM8S003F3 in there.
I would like to change a startup function and add a reset/restart button function.
I know, I could add the reset manually on the pcb too, but just for fun I would poke around the firmware.

Is it possible to convert the firmware from this uC to C/C++ code if I read out the content?

Thanks.
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6278
  • Country: ca
  • Non-expert
Re: Is it possible to convert STM8 hex to C code?
« Reply #1 on: December 07, 2019, 01:38:28 am »
No, not in any way you would want. Try reading out the code first then go from there.

https://stackoverflow.com/questions/42166539/microcontroller-stm8-disassembly
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: Chriss

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11228
  • Country: us
    • Personal site
Re: Is it possible to convert STM8 hex to C code?
« Reply #2 on: December 07, 2019, 01:57:15 am »
It is impossible automatically. However, it is an 8K device, and the real HEX size is probably less. If you know what you are doing, you can reverse that in a couple days.
Alex
 
The following users thanked this post: Chriss


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf