AnsweredAssumed Answered

KINETIS GCC - Adding binary file with the ld file

Question asked by Tiago Guimaraes on May 19, 2015
Latest reply on May 22, 2015 by Tiago Guimaraes

Good afternoon,

 

I am implementing a bootloader into the microcontroller Kinetis

MKL16Z128 , but I can not add a binary file in memory of my

application.

 

I'm following the steps in the " MCU_Kinetis_GCC " from page 45

( 14. Include Filename) .

 

Follows the aqruivo ld I'm changing . See that created a memory

area for the boot and want to add the binary file of the bootloader

in this area.

 

----------------------------------------------------------------------------------------------------

....

....

MEMORY {

m_bootloader (RX) : ORIGIN = 0x00000000, LENGTH = 0x00004000

m_interrupts (RX) : ORIGIN = 0x00004000, LENGTH = 0x00000400

m_cfmprotrom (RX) : ORIGIN = 0x00004400, LENGTH =0x00000100

m_app_info (RX) : ORIGIN = 0x00004500, LENGTH = 0x00000100

m_text (RX) : ORIGIN = 0x00004600, LENGTH = 0x0000D900

m_app_flash_vars (RX) : ORIGIN = 0x00011F00, LENGTH = 0x00000400

m_new_image (RX) : ORIGIN = 0x00012300, LENGTH = 0x0000D900

m_new_image_status (RX) : ORIGIN = 0x0001FC00, LENGTH = 0x00000400

m_data (RW) : ORIGIN = 0x1FFFF000, LENGTH = 0x00004000

}

 

TARGET(binary)/* specify the file format of binary file */

INPUT (Boot_MK16Z128.bin)/* provide the file name */

OUTPUT_FORMAT(default)/* restore the out file format */

 

SECTIONS

{

 

.bootloader :

{

Boot_MK16Z128.bin (.Boot_MK16Z128)

. = ALIGN (0x4);

} > m_bootloader

 

.app_info :

{         

* (.info)

KEEP(*(.info))

. = ALIGN(0x1);

} > m_app_info

 

...

...

 

}

 

----------------------------------------------------------------------------------------------------

 

In this case no compilation error occurs, only not appear the data

of the binary file on my memory map presented in the application

.s19 .

 

Has anyone done this? Can anyone help me ?

 

Thanks!!

Outcomes