跳至主要內容
Knowledgebase
Home
Renesas Electronics Taiwan - Knowledgebase

Inserting Binary Data_CC-RL

Last Updated:01/31/2018

Question:

I am using the CC-RL compiler for RL78 devices. How do I insert a sizable amount of binary data?

Answer:

Use the BINCLUDE directive of the assembler or the -binary option of the linker.
-    BINCLUDE directive

$BINLULUDE"test.bin"

Use the BINCLUDE directive of the assembler to include a binary data file.
Example) $BINLULUDE"test.bin"

-    -binary option
Use the -binary option of the linker to specify the binary data file.
Example:
Specifying the contents of the test.bin file as the bsec section name of the CONSTF attribute.
-binary=test.bin(bsec/CONSTF)

Note that, in CC-RL V1.04.00 or earlier, the binary data is only allocated to an address from 0x0000 to 0xffff by using the -binary option of the linker. For allocating the binary data to an address greater than 0x10000, use the BINCLUDE directive of the assembler.

Suitable Products
e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family