Hi all,
I need to develop my own bootloader program to update my application code. After reading lots of articles on the internet, the following are my developing setup and environment,
MCU: MKE06Z128VLD4 (Flash 128K, RAM 16K)
IDE: KDS 3.2.0 with Processor Expert.
Bootloader program addr: 0x0
Applicaion program addr: 0x5000
Bootloader program:
There are a few example of bootloader on KDS with Processor expert, however, i found some and the following is the bootloader to jump to application code(0x5000).
(btw, i don't think it's correct to define SCB_VTOR in this way.)
Application program:
In my application program, i setup the linker files as below,
MEMORY {
m_interrupts (RX) : ORIGIN = 0x00005000, LENGTH = 0x000000C0
m_text (RX) : ORIGIN = 0x00005410, LENGTH = 0x0001A000
m_data (RW) : ORIGIN = 0x1FFFF000, LENGTH = 0x00004000
NVM_data (RWX) : ORIGIN = 0x0001F800, LENGTH = 0x00000800
m_cfmprotrom (RX) : ORIGIN = 0x00005400, LENGTH = 0x00000010
}
Result:
After all those setting up, it works to jump from bootloader to application code!
However after jump to 0x5000, some of my application project run correctly, but some of application project didn't run.
I found out that the size of "bss" of application code will decide my application code run or fail,
If the "bss" size is less than 5K, then the application code run, if "bss" is larger the application will fail. This mcu has 16K for RAM.
My problem is why "bss" size affects my application code to run or fail? Is the bootloader code wrong? How do I fix it?
Most example of bootloader on the internet is developed on IAR or Keil, but I need to develop it on KDS(Processor Expert).
Hello Roger Chang,
‘bss’ is for the uninitialized data in RAM, with data in RAM and bootloader use some RAM,
maybe more than 16K.
Have a great day,
TIC
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------