cancel
Showing results for 
Search instead for 
Did you mean: 

Burning custom bootloader in STM8s103F3.

Vivekanand Dhakane
Associate

Currently, I am working on STM8S103F3. I wanted to build custom bootloader for it as it doesn't have inbuilt bootloader. So I followed the procedure given in "AN2659" document which describes how to use example bootloader given by STmicroelectronics. Example program for boot loader is given for STM8s105xx so I changed parameters in /* USER BOOT CODE MEMORY PARAMETERS */ according to the STM8s103 in main.h file.

0693W000005CmyNQAS.jpgIn STM8s.h file I uncommented  the controller I am using

0693W000005CnNrQAK.jpg 

linker settings are done as given in AN2659 as following image

0693W000005Cn33QAC.jpgAbove are the only changes done in bootloader code. Then I uploaded it to STM8S103 using STlink. You can file project file of bootloader and user code on this link

Now, user code that is made for LED blinking is as follows

0693W000005Cn7kQAC.jpg 

 linker setting for user code (LED blink) is as follows

0693W000005CnFJQA0.jpg 

Then I used flash loader demonstrator for uploading but it gives error as shown in following images

STEP-1

0693W000005CnIcQAK.jpg 

STEP-2

0693W000005CnImQAK.jpg 

STEP-3

0693W000005CnIwQAK.jpgPlease tell where I am going wrong .You can file project file of bootloader and user code on this link.

0 REPLIES 0