跳转到主内容
Knowledgebase
Home
Renesas Electronics China - Knowledgebase

How to allocate group of variables to the same address?

Latest Updated:05/18/2015

Question:

I am using the CC-RL compiler for RL78 devices. Since I am using specified ranges of RAM for different purposes depending on the program, I want to allocate groups of variables for given purposes to the same addresses. How do I do this?

Answer:

Divide the groups of variables into individual sections, and allocate them to the same addresses by using the colon (:) with the linker’s –start option.

Example:

Allocating sections .C, .D, and .F to the address 0xffe20.
-start=.A,.B,.E/400,.C:.D:.F/ffe20

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