8.2.3 Passing information between projects

When a program for a multi-core device is configured of a single boot loader project and multiple application projects, the -fsymbol option of the optimizing linker is used to reference information of application programs from the boot loader program.

If an application project is linked with the -fsymbol option specified in the optimizing linker, the name and address value of the public label existing in the section specified by the option are output to the symbol address file (.fsy file). Information can be referenced by specifying the symbol address file that is output from each application project as input to the boot loader project.

An example of passing information is shown below.

;; cstart.asm
    .section  ".text.cmn", text
    .public   __cstart_pm1       ; public is specified to output information to .fsy.
__cstart_pm1:

 

When the application project is linked, the -fsymbol option specifies the .text.cmn section where the __cstart_pm1 label exists. In this case, the pm1.fsy file is generated.

> rlink cstart.obj -output=pm1.abs -fsymbol=.text.cmn

 

The boot loader project references the label on the application project side.

;; boot.asm
    jr32     #__cstart_pm1

 

When the boot loader project is compiled, by inputting the .fsy file generated from each application project, the address values in .fsy files resolve references to labels.

> ccrh boot.asm pm1.fsy pm2.fsy -oboot.abs

Caution

Labels output in .fsy files are handled as public labels also in the boot loader project. Therefore, if labels with the same name have been output to .fsy files from multiple application projects or a label with the same name has been defined in the boot loader project, a multiple definition error will occur at linking of the boot loader project.