Combine App & Bootloader - CW6.3, Coldfire V1, MCF51CN128

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Combine App & Bootloader - CW6.3, Coldfire V1, MCF51CN128

1,404件の閲覧回数
ignisuti
Contributor IV

I've seen lots of referrences to using an HEXFILE command in the PRM file for the purpose of adding your Bootloader's S19 file into your Application code. The output S19 can then be given to production so they only have to flash one file.

 

However, this doesn't seem to work with my project. I have a LCF file instead of a PRM file and it doesn't seem to allow me to add commands like HEXFILE.

 

Can someone please help?

ラベル(1)
0 件の賞賛
5 返答(返信)

395件の閲覧回数
kef
Specialist I

HEXFILE and PRM applies to (R)S08 and S12(X). Coldfire linker uses LCF file. Documentation says there's INCLUDE directive, which can load (binary?) file to specified section. I tried INCLUDE directive, but linker always complains that it can't find specified file. I tried putting my binary file to all project subfolders, but it doesn't help. Documentation for CW for MCUs V6.3 also says this:

"File Mappings target settings panel must specify resource file for all files that have the same extension as the binary file"

I was trying to include *.bin file. I checked that file mappings for bin is resource file.

 

Try making service request for this here

0 件の賞賛

395件の閲覧回数
ignisuti
Contributor IV

I thought I'd report back in case anyone else was having this issue.

 

The missing peice of the puzzle was that I had to "add" the BIN file to the CodeWarrior IDE. I added it to my "Linker Files" folder, but I think it can be added anywhere.

 

The other steps are also important:

-Edit > Standard Settings > Linker > ColdFire Linker > Generate Binary Image

-Edit > Standard Settings > Target > File Mappings > Set BIN file's "Flags" to be a resource file.

-Use the INCLUDE directive in your LCF file (similar to this exmaple):

 

  .text :  {    *(.text)    . = ALIGN (0x4);    *(.rodata)    . = ALIGN (0x4);    ___ROM_AT = .;    ___DATA_ROM = .;    INCLUDE Project.abs.bin      } >> code

 

 

0 件の賞賛

395件の閲覧回数
sebasira
Senior Contributor I

Hi!

I was also looking for the equivalent of HEXFILE for LCF files...

I've got a question regarding of where to put the INCLUDE keyword.

I've got a special section for the bootloader as you can see here:


MEMORY {

   userram           (RWX) :    ORIGIN = 0x00800000, LENGTH = 0x00002000

   BootLoad         (RX)  :      ORIGIN = 0x00000410, LENGTH = 0x000018F0

   myflash           (RX)  :      ORIGIN = 0x00001D00, LENGTH = 0x00000400    

   VectorReMap  (RX)  :      ORIGIN = 0x00002100, LENGTH = 0x00000400

   code              (RX)  :      ORIGIN = 0x00002500, LENGTH = 0x0001DB00 

}

I believe I should place the keyword so the binary would be inside BootLoad instead of code, right? Like this:

#  Code placement for bootloader section

.text_bootload : {

     * (.text_bootload)

     . = ALIGN (0x4);

     INCLUDE Project.abs.bin

} >> BootLoad


Thanks in advance!!

SebaS

0 件の賞賛

395件の閲覧回数
ZhangJennie
NXP TechSupport
NXP TechSupport

HEXFILE only work in prm file for 8bit/16bit device. it can't work in lcf file for coldfire. INCLUDE is used for coldfire,

i just posted the INCLUDE usage sample code here.

https://community.freescale.com/thread/308318

0 件の賞賛

395件の閲覧回数
trytohelp
NXP Employee
NXP Employee

Hi,

Same problem/question has been logged under

https://community.freescale.com/message/333829

Regards

Pascal

0 件の賞賛