Bootloader problem.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bootloader problem.

Jump to solution
1,045 Views
john71
Senior Contributor I

CPU - MK10FN1M0VLQ12
ENviroment - Kinetis Design Studio

For the Bootloader project I left ProcessorExpert settings as is

               Address   Size
m_interrupts   0x0       0x1E8
m_text         0x410     0xFBE18

and generated Linker file

MEMORY {
m_interrupts (RX) : ORIGIN = 0x00000000, LENGTH = 0x000001E8
m_text (RX) : ORIGIN = 0x00000410, LENGTH = 0x000FBE18
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
m_data_20000000 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00010000
m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
}


For Main project I set

               Address   Size
m_interrupts   0x4000    0x1E8
m_text         0x4410    0xF7A08

and generated Linker file

MEMORY {
m_interrupts (RX) : ORIGIN = 0x00004000, LENGTH = 0x000001E8
m_text (RX) : ORIGIN = 0x00004410, LENGTH = 0x000F7A08
m_data (RW) : ORIGIN = 0x1FFF0000, LENGTH = 0x00010000
m_data_20000000 (RW) : ORIGIN = 0x20000000, LENGTH = 0x00010000
m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010
}

Then I start Universal Bootloader (win_hc08sprg.exe) and get


Bootloader protocol version: 0x08 (Kinetis, read command supported)
CRC protocol NOT supported)
Bootloader version string: MK_10
System device ID: 0x14A [Kinetis K60] rev. 0
Kinetis Package: 144-pin .
Number of memory blocks: 1
Memory block #1: 0x00004000-0x00100000
Erase block size: 4096 bytes
Write block size: 64 bytes
Original vector table: 0x00000000-0x000003FF
New vector table: 0x00004000-0x000043FF

S19 Image Control.
Parsed S-record lines: 12949 Bytes total: 207088
Source address range: 0x000400-0x036B07

The S19 image also contains redirected vectors. The automatic redirection is skipped now.
WARNING! S19 image will not fit into available memory (at address 0x00000400)!

If I start program it stops at 79% and the Bootloader project goes to the hard fault exception.

What's wrong with my settings?

Labels (1)
0 Kudos
Reply
1 Solution
1,029 Views
mjbcswitzerland
Specialist V

Hi

When building an application that will work with a boot loader you must remove

m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010

since this can only be occupied by the boot loader. This is redundant in such an application.

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key!

View solution in original post

3 Replies
1,030 Views
mjbcswitzerland
Specialist V

Hi

When building an application that will work with a boot loader you must remove

m_cfmprotrom (RX) : ORIGIN = 0x00000400, LENGTH = 0x00000010

since this can only be occupied by the boot loader. This is redundant in such an application.

Regards

Mark
[uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training, solutions to problems or rapid product development requirements

For professionals searching for faster, problem-free Kinetis and i.MX RT 10xx developments the uTasker project holds the key!

1,014 Views
john71
Senior Contributor I

Thank you. I removed the line and now it works.

0 Kudos
Reply
1,032 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello john71

Thank you for your interest in NXP Semiconductor products and the opportunity to serve you, I will gladly help you with this. I suggest you refer to chapter 7.7 of this application note: https://www.nxp.com/docs/en/application-note/AN2295.pdf

 

Let me know if this is helpful, if you have more questions do not hesitate to ask me.

Best regards,

Omar