Skip to main content

Update information for CubeSuite

Build Tool for V850(CX)

Changes from V1.10 to V1.11.

Removal of restrictions

Restrictions below, which apply to CX Ver.1.10, have been removed.

No. 8  An variable referred after changed in function call becomes an invalid value.
[Description]
When all the following requirements are met, the value of variable "V" that is changed within the called function "F2" will become invalid.
1. One of the optimization options is chosen: -O, -Osize, or -Ospeed.
2. The variable "V" which is global or static (declared in file-scope) is not declared as volatile and the address of "V" is not taken in function "F1".
3. The function "F2" that rewrites the value of variable "V" is called in function "F1" and the variable "V" is read before and after the call to function "F2".
4. Variable "V" is read in basic block "B2" after function "F2" is called. There must be only one execution path back to basic block "B1".
5. In the execution path after basic block "B2", there are no function calls or there are function calls before which "B2" is always executed.
6. None of the built-in functions are contained in function "F1": asm/nop/halt/set_il/ldsr/stsr/ldgr/stgr.
No. 9  An variable referred after indirect assignment becomes an invalid value.
[Description]
When all the following requirements are met, the value of variable "V" after indirect assignment to "A" becomes invalid.
1. One of the optimization options is chosen: -O, -Osize, or -Ospeed.
2. The pointer is not declared as volatile when specifying initial address of variable "V" or the address of variable "V" is taken in another source file.
3. The value of variable "V" is accessed by pointer *P in function "F1". It is rewritten between two different accesses of variable "V".
4. There is one execution path to basic block "B2" from "B1" where variable "V" is read in each block, and no other execution path input to "B2".
5. None of the built-in functions are contained in function "F1": asm/nop/halt/set_il/ldsr/stsr/ldgr/stgr.

Changes from V1.01 to V1.10.

Multicore support

Multicore is now supported. It is possible to create a single load module file for an application that runs on each core of a multicore CPU.

Changes and functions added for controlling save/restore codes of interrupt functions

EIIC and EIWR regisiters are not saved and restored. And functions are added for fine-grained generation of save and restore codes of interrupt functions.

Improved optimization/changed output code

Optimization has been improved, and the output code changed. The main changes are as follows.
- Improved 1-bit manipulation instruction
- Removes if statements determined by compile-time conditions
- Replaces const variables with constants
- Improved register allocations
- Added patterns for inline expansion

Speedups in Some Mathematical Library Functions

The following numeric library functions were speeded up by using floating-point operation commands.
(Note) sinf, cosf, tanf, atanf, and sqrtf have been speeded up in version 1.01

- Single Precision (libf32.lib)
sinf, cosf, tanf, atanf, sqrtf, expf, logf, log10f, powf, ceilf, floorf, fmodf, frexpf, ldexpf, modff,
acosf, asinf, atan2f, coshf, sinhf, tanhf

- Double Precision (libf64.lib)
sin, cos, tan, atan, sqrt, exp, log, log10, pow, ceil, floor, fmod, frexp, ldexp, modf,
acos, asin, atan2, cosh, sinh, tanh

Improved access attribute checking of peripheral I/O register

Read checking of write-only peripheral I/O registers has been improved. An illegal read will cause an error (E0521622).

Added -Xsort_var option

An -Xsort_var option has been added. This option can be specified to align external variables allocated to sections other than const and sconst in order of largest to smallest.

Added -Xno_cube_suite_info option

An -Xno_cube_suite_info option has been added. CX outputs a CubeSuite information file (.cref) during compilation, but this could increase the build and rebuild times. In version 1.10, the -Xno_cube_suite_info option can be specified to prevent the CubeSuite information file from being generated, which can reduce build and rebuild times.

Partial change to object module file specification

Information was added to the object module file to indicate whether floating-point operation commands are included. This will cause an error (F0560115) when linking a program for a target device without a FPU (floating-point unit) to an object module file or library file that uses floating-point operation commands.

Additional error and warning messages

The following 13 error and warning messages have been added.
E0511157,E0511158,E0511159,E0511160,E0511161,E0521649,E0521650,E0550263,E0550264,F0550536,F0560115,F0560220,W0560116


Changes from V1.00 to V1.01.

Support for RX850V4

Renesas Electronics Real-Time OS “RX850V4” is supported.
Please use RX850V4 V4.30 Rev2 or later.

Speedups in Some Mathematical Library Functions

The following mathematical library functions were speeded up by using floating-point operation instructions.
sinf, cosf, tanf, atanf, sqrtf

-Xcall_lib Option Added

“-Xcall_lib” option was added to supress the automatic generation of sqrtf instruction at locations where the sqrtf function is called.

-U Option Function Added

It is possible to undefine predefined macro definitions in CX using the -U option.

Removal of restrictions

Restrictions below, which apply to CX Ver.1.00, have been removed.
No. 5  Interrupt functions with static modifier and smart correction functions
[Description]
If an interrupt function as a static modifier, then one of the 1 or 2 below will occur.
1. If the option "-Odelete_static_func=off" is specified, CX will crash.
2. If the option "-Odelete_static_func=off" is not specified, the interrupt function with static modifier will be deleted

If a function corrected via the "smart correction" feature is given a static modifier, it will cause an F0550508 error.
F0550508: identifier undefined.
No. 6  Restriction on arrays declared in sections that have the data or bss attribute
[Description]
If the following four conditions are satisfied, the access or address acquisition in 3 might be performed Incorrectly.
1. The optimization option -O, -Osize, or -Ospeed is specified.
2. An array is declared in a section that has the data or bss attribute.
3. A variable is used as an index to access an element of the array in 2 other than the first element or to acquire the address of such an element.
4. The index in 3 is handled as a constant due to optimization.

Changes from V3.43 to V3.45.

Addition of assembler option that suppresses output of the warning messages W3029, W3030, and W3031

The assembler option -woff=string has been added to suppress output of the warning messages W3029, W3030, and W3031. Either 3029, 3030, or 3031 can be specified for string. string must not be omitted.

Changes from V3.41 to V3.43.

Working around a V850ES core restriction on executing the mul or mulu instruction

If the V850ES core restriction might apply to an instruction, one of the warning messages below is output. W3029: can not use r0 as destination in mul/mulu in V850ES core. replaced to r1. W3030: can not use r0 as destination in mul/mulu in V850ES core. W3031: can not use mul/mulu X,Y,Y format in V850ES core.

Changes from V3.31 to V3.41.

Restrictions eliminated

Seven restrictions described below have been eliminated.
No. 104  Incorrect number of loop executions
[Description]
If all of the following conditions are satisfied, a loop might execute the incorrect number of times: Conditions:

[Conditions]
( 1 ) -Og, -O, -Os, or -Ot is specified as the optimization option.
( 2 )The loop counter is not declared as volatile.
( 3 )The loop termination condition involves comparing the loop counter to a constant.
( 4 )A constant is added to or subtracted from the loop counter within the loop.
( 5 )The loop counter is used within the loop as described in (A) or (B).

(A) Conditions a to e are satisfied:
a. The loop counter is used to index an array.
b. The elements of the array in a are structures, unions, or arrays.
c. The size of the elements of the array in a is not a power of 2.
d. The size of the elements of the array in a is within 65,534 bytes.
e. The product of the constant used for the loop termination condition in (3) and the size of an element of
   the array in a is too large to store in a 32-bit integer.

(B) Conditions f to i are satisfied:
f. The loop counter is used as one multiplier in an expression with a constant.
g. The constant in f is not a power of 2.
h. The constant in f is in the range from 65,534 to 65,534.
i. The product of the constant used for the loop termination condition in (3) and the constant in f is too
   large to store in a 32-bit integer.

* Loop counter: This controls when a loop ends.
No. 105  Incorrect string literals
[Description]
If the following conditions are satisfied, the contents of the string literal become incorrect:

[Conditions]
(1)ASCII code 0x00 is used in a string literal.
(2)An ASCII code from 0x30 through 0x37 immediately follows 0x00 in (1).
No. 106  Restriction involving format specifiers for the sscanf, fscanf, and scanf functions
[Description]
If conditions (1) to (3) are satisfied, the parameter for the format specifier described in (3) is overwritten:

[Conditions]
(1) The sscanf, fscanf, or scanf function is used.
(2) There are less entered fields than format specifiers.
(3) The first extra format specifier character is s, e, f, g, E, F, G, or [ ].

If conditions (4) and (5) are satisfied, the parameter for the format specifier described in (5) is overwritten.
[Conditions]
(4) The sscanf, fscanf, or scanf function is used.
(5) [ ] are used as format specifier characters, and the character pattern enclosed by them is not in the
   entered fields.
No. 107  Restriction involving the character string parameter for the atoi, atol, strtol, and strtoul functions
[Description]
If conditions (1) to (5) below are satisfied, the return value might be invalid. For the strtol and strtoul functions, the global variable errno is not set to ERANGE:

[Conditions]
(1) The atoi, atol, strtol, or strtoul function is used.
(2) For the atoi or atol function, the character string parameter exceeds 32 bits when expressed as a
     decimal number. For the strtol or strtoul function, the first character string parameter exceeds32 bits
    when expressed using the base specified as the third parameter.
(3) When the portion of the character string parameter in (2) from the first character to a given character is
    converted to a number and compared to the absolute value of the lower 32 bits of the value thatresults
    when the portion of the same character string from the first character to the character following
    the given character above is converted to a number, the latter value is greater than the former.
(4) The comparison in (3) includes all characters in the string.
(5) For the atoi, atol, or strtol function, the lower 32 bits of the number to which the character string was
    converted in (2) are within the range from LONG_MIN to LONG_MAX after adding a sign.

No. 108  Restriction involving initialization of a structure that includes a bit field among its members
[Description]
If conditions (1) and (2) are satisfied, the bit field is not correctly initialized:

[Conditions]
(1) A structure is used that includes a bit field immediately followed by another structure (or union) as
     members.
(2) Both of the members included in the structure in 1 are initialized using initial values.

If conditions (3) to (5) are satisfied, the bit field might not be correctly initialized.
(3) An automatic array of structures is used.
(4) The structure in 3 includes a bit field and an element that is at least 126 bytes among its members.
(5) The initializer for this element is omitted, and the element is implicitly initialized to 0.

No. 109  Restriction involving nested conditionally assembled pseudo instructions
[Description]
If the following conditions are satisfied, the error message F3510 is output:

[Conditions]
(1) An .elseif or .elseifn pseudo instruction is used.
(2) The condition in (1) evaluates to true.
(3) There is an .elseif or .else pseudo instruction that corresponds to the pseudo instruction in (1).
(4) There is a pseudo instruction that is conditionally assembled nested within the block that corresponds
     to the pseudo instruction in (1).

No. 110  Restriction involving assignment within switch and if statements
[Description]
If the following conditions are satisfied, the processing within switch or if statements might become incorrect as a result of optimization by the ca850:

1. The C source code satisfies conditions (A) to (C).
[Conditions]
(A) For a version earlier than 2.50, the compiler optimization option -Os or –Ot is specified in addition to
    -Ol, but –Wi,–O4 is not specified. For Ver. 2.50 or later, the compiler optimization option -Os or -Ot is
    specified, but –Wi,–O4 is not specified.
(B) Parallel processing is performed to assign a value to the same variable in a switch or if statement.
(C) After the assignment in (B), execution jumps back to the same position.

2. The assembly language output according to the C source code in (1) satisfies all of the following
[Conditions]
(a)The mov or ld directive is used to transfer data to the same register at the end of multiple basic blocks
   (Block A).
(b)Block A combines everything into one block (Block B).
(c)There are no directives (or output code) in Block B, which contains information used by the compiler.
    At least one information item is included.
(d)In Block C (the block following Block B), the data is transferred to a register other than the one used in
    Block A.
(e)Among the blocks directly combined into Block C, there is a block (Block D) that performs the same
    transfer as that performed in Block A.

Remark A basic block is group of directives that are processed in order and ends with a directive that causes execution to jump.

Addition of warning messages

The warning messages below have been added: (1) If an undefined escape character is used, the warning message W2181 is output. W2181: undefined escape character (code) An undefined escape character is used.
(2) In a shift operation, if the right operand value is outside the range 0 to 31, the warning message W5301 is output. W5301: shift count(num) in function 'func' is out of range The number of bits shifted (num) is outside the range 0 to 31 in the function func.
(3)In a division or modulo operation, if the second operand is 0, the warning message W5302 is output. W5302: division by zero in function 'func' Division by 0 is specified in the function func.

Modification of rule for outputting a warning message

In Ver. 3.31, the warning message W2784 is output if a variable is assigned to another variable of a smaller data type. In Ver. V3.41, W2784 is also output if a pointer is assigned to a variable of a smaller data type. W2784 is only output for an pointer assignment if the -wcast_type+ option is specified.
W2784: Conversion may lose significant digit Data might have been lost.




Back To Top



End of content

Back To Top