Good Morning,
I'm doing the inclusion of a bootloader on uC Kinetis using the GCC compiler. For this I am using the document "MCU_Kinetis_GCC" but had the problem include the binary file described in step 14c the page 45. This step says the following:
14. INCLUDE filename
CW LCF:
.my_text{ INCLUDE filename }>my_text
GCC LD:
Equivalent syntax in GCC LD,
INPUT(file, file, ...) INPUT(file file ...)
Command line options to include binary file [default section as .data.]
NOTE
Binary filename: data.raw, Format: binary
a. Create a stationary project.
b. Go to Properties > C/C++Build > Settings > ARM Ltd. Windows GCC C
Linker > Miscellaneous > Other flags
c. Add the following options. -Wl,-b,binary,"C:/data.raw",-b, elf32-littlearm
This makes linker to treat data.raw as raw binary and resume to elf32-littlearm
for subsequent objects.
The final elf will contain the following symbols for the sources to manipulate the
data:
_binary_C___data_raw_start _binary_C___data_raw_end _binary_C__data_raw_size
The default linker section will be .data.
To place the raw data in a specified linker section, define the section in the
Linker command file.
a. Define the following section.
MEMORY{
..
m_srecord (RX) : ORIGIN = 0x0000C000, LENGTH = 0x00004000/*define its memory
segment*/
}
TARGET(binary)/* specify the file format of binary file */
INPUT (data.raw)/* provide the file name */
OUTPUT_FORMAT(default)/* restore the out file format */
/* Define output sections */
SECTIONS
{
.srecord :
{
data.raw (.data)
. = ALIGN (0x4);
} > m_srecord
.text:
{
..
}>m_text
}
b. Add the path of the file added in the previous step to ARM Ltd. GCC C
Linker->Libraries->Library search path (-L)
When I finish running this script the following error is generated by the compiler :
"C:/Freescale/CW MCU v10.6/Cross_Tools/arm-none-eabi-gcc-4_7_3/bin/arm-none-eabi-gcc" @"MDL100_KL16Z128.args" -o"MDL100_KL16Z128.elf"
arm-none-eabi-gcc: error: elf32-littlearm: No such file or directory
mingw32-make: *** [MDL100_KL16Z128.elf] Error 1
The command that includes on step 14 (Add the following options. -Wl,-b,binary,"C:/data.raw",-b, elf32-littlearm) is the following:
-Wl,-b,binary,"${ProjDirPath}\FLASH\Boot_MK16Z128.bin",-b, elf32-littlearm
The command that includes on step 14 (Add the path of the file added in the previous step to ARM Ltd. GCC C Linker->Libraries->Library search path (-L)) is the following:
"${ProjDirPath}\FLASH\Boot_MK16Z128.bin"
Can you help me?