Attention to Internet Explorer users: ROHM website does not recommend browsing in IE 11. Please use latest browser to ensure the best performance on ROHM website.
RAM variables can be arranged in the defined order. The procedure is shown below. (1) In C source, use seginit pragma and segnoinit pragma to group RAM variables. ・Place a variable with initialization to a desired segment using the seginit pragma. ・Place a variable without initialization to a desired segment using the seginit pragma. ・Define each segment name with a unique name.
(Example for writing seginit pragma and segnoinit pragma) --- file1.c --- #pragma seginit "file1_ram1" int gi1 = 0x1234; int gi2 = 0x3456; #pragma seginit
#pragma segnoinit "file1_ram2" int gi3; int gi4; #pragma segnoinit
(2) Specify the assigned segment with the target option of IDEU8. Select [Project] -> [Options] -> [Target...], and display the [Segment] tab in the [Target Option] dialog, and set the followings.
(1) Check [DATA segment to assign with priority], and specify segment in the [Specify segment] field.
<Example on specifying segment> 0e000h file1_ram1 file1_ram2
(2) Check [Specify segment assigning order], and specify segment in the [Specify segment] field.
<Example on specifying segment> (file1_ram1 file1_ram2)
When specified as (1) and (2) above, RAM variables are assigned in the order of file1_ram1 and file1_ram2 after 0E000H address.