BIN_FILE_TYPE

Controls the generation of a binary file. By default, the linker does not generate any binary file, even if the s-record generation is enabled.

BIN_FILE_TYPE (NO_BIN_FILE | ONE_BIN_FILE 
  |MULTIPLE_BIN_FILES)
  
Parameters

NO_BIN_FILE

No binary file will be generated even if s-record generation is on.

ONE_BIN_FILE

Generates a single binary file with all the loadable code and data, even if s-record generation is off.

MULTIPLE_BIN_FILES

A separate binary file is generated for each MEMORY directive. When selected, the hexidecimal address of the location, the file should be loaded is inserted between the filename and extension.

Example

Binary File for a non-ROM Image Build Exampleis an example of a binary file generated using the MULTIPLE_BIN_FILES parameter for a non-ROM Image build.

Listing 1. Binary File for a non-ROM Image Build Example 

Binary File for a ROM Image Build Example is an example of a binary file generated using the MULTIPLE_BIN_FILES parameter for a ROM Image build.

Listing 2. Binary File for a ROM Image Build Example 

The code of Change Binary File Name in the MEMORY Directive uses the MULTIPLE_BIN_FILES parameter to change the name of a binary file in the MEMORY directive.

Listing 3. Change Binary File Name in the MEMORY Directive
MEMORY {
        code : org = 0x00002000 > my_binary_file.xyz

Any MEMORY directive without a custom name will be given a name like Test.ffe00000.bin, where the binary file reflects the ROM address of the segement.

The code of Merge Binary Files Together Example uses the MULTIPLE_BIN_FILES parameter to merge some binary files together, assuming that there are no segments between them.

Listing 4. Merge Binary Files Together Example
MEMORY {
        code : org = 0x00002000 > my_binary_file.xyz

        special : org = 0x00004000 > my_binary_file.xyz