Hello,
I'm trying to add a binary file to my K60 project. It's a bootloader BIN.
CW10.2 send me this link error : "Linker command file error at line 32 File not found: bootloader.bin"
In the LCF file, I add a MEMORY line :
MEMORY
{
...
my_boot (RX) : ORIGIN = 0x00000000, LENGTH = 0x0000FFFF
...
}
And a new section :
SECTIONS
{
...
.zoneBootloader:
{
INCLUDE bootloader.bin
} > my_boot
...
}
I add the path in the -L argument of the linker executable :
-L "C:\"
The bootloader.bin file is added to the project, at different place but always the same message appaears :-(
It seems very easy in the doc : "Listing 13.15 Embedding Data Directly into Output" :
_musicStart = .;
INCLUDE music.mid
_musicEnd = .;
} > DATA
When I try the other doc exemple, without the INCLUDE file, "Listing 13.15 Embedding Data Directly into Output" :
WRITEB 0x48; /* 'H' */
WRITEB 0x69; /* 'i' */
WRITEB 0x21; /* '!' */
These hex values are placed in my S19 file, at the good address, without any linker error
Is it a path problem ? A linker problem ? A doc problem ? Anything else ???
Yvan
Hello Yvan BOURNE,
shall I request some more clarification? The name of the doc you referred to, and if possible, create and attach small example with including bin file. I'll test it in CW10.2.
Regards,
MartinK
Kojto,
The help is just the inline doc in CW10.2 :
"MQX Tools -> MQX Documentation -> CodeWarrior for Microcontrollers V10.x -> Kinetis for Miconcontrollers -> Kinetis Build Tools Reference Manual -> ELF linker and Command Language -> LCF Syntax -> Writing Data Directly to Memory"
The test to do is just add these lines in the LCF file of any Kinetis project (even if the memory position will not be correct) :
MEMORY
{
...
my_boot (RX) : ORIGIN = 0x00000000, LENGTH = 0x0000FFFF
...
}
and :
SECTIONS
{
...
.zoneBootloader:
{
INCLUDE bootloader.bin
} > my_boot
...
}
I tried with a new blank ColdFire V1 project and have the same error message.
Yvan
For information, on a ColdFire V1 project, it's possible and work fine.
In the Kinetis linker documentation, it seems that the keyword 'include' has not the same function as in the ColdFire linker.
So... is there another solution to include BIN file with the Kinetis linker ?
Yvan
Hello Yvan,
I was reading something today and I ended up in this thread : CW10 Including external files in .lcf, can't find file
Isn't this the problem you are having?
Regards,
MartinK
Kojto,
No, this problem, in your link, is on a ColdFire. I tried to do a test project for ColdFire target an it's working.
The linker is different for Kietis (ARM) and its syntax is different.
Thanks to you Kojto.
My problem is still open, if anybody has other ideas !!!
Yvan