lujji / stm8-bootloader

Serial bootloader for STM8 microcontrollers
MIT License
94 stars 27 forks source link

Does not work with firmware from other compillers #1

Closed isnadh closed 6 years ago

isnadh commented 6 years ago

Hello lujji. Nice work you have here!!!

I've been playing around with your bootloader for days now i must commend your work. i however noticed when i upload hex file from iar or cosmic it does not work. What could be responsible for that?

Then could you possibly port your espstm8 bootloader code to arduino. That will push esp14 a long way. Thanks

I anticipate your response

lujji commented 6 years ago

This bootloader works with binaries, so you'll have to convert your hex files first. I'm pretty sure IAR has an option to output binary images.

I never worked with arduino. Besides, esp8266 flasher uses esp-open-rtos - porting the code would be a lot of work. On the other hand, bootloader protocol implementation only depends on SPIFFS, so it can be ported quite easily.

isnadh commented 6 years ago

i can get my output in binary on IAR and i am able to flash stm8s003 with it using boot.py but the app does not run except i flash with the normal stm8flash.exe via stlinkv2. So i feel there is a setting in the binary you generated(IVT address) with sdcc that is not present in IAR. Could you enlighten me on how to get it to work?. I'm on windows, working with sdcc is not so friendly

lujji commented 6 years ago

I can't reproduce this issue. Did you specify the correct start address? SDCC has --code-loc option - with IAR you have to adjust the *.icf file and shift NearFuncCode to 0x8280 (or whichever address you configured the bootloader for).