Using MCU Eclipse IDE

To link a binary file using MCU eclipse IDE, perform the following steps:

  1. Launch MCU eclipse IDE and open the desired project to add the binary file.
  2. Update linker command file (.lcf) and place .BINARY section into memory. Listing 13.24 shows a sample linker command file with .BINARY section.
  3. Add a binary file (.bin) as an input file for linker (MWLDARM.exe)

For adding binary file, go to the project settings, Tool Settings > ARM Linker > General then add the binary file in the option Other Flags .

Listing: Linker Command File with .BINARY section

MEMORY
{

init: org = 0x00000020, len = 0x00000FE0

internal_flash: org = 0x00002000, len = 0x001FD000

my_binary_data: org = 0x001FE000, len = 0x00001000

...

}

SECTIONS

{

...

.binary1_area:

{

binary1Start = .;

bin_data1.bin

binary1End = .;

} > my_binary_data

}

.binary2_area:

{

binary2Start = .;

bin_data2.bin

binary2End = .;

} > my_binary_data

}

}