 |
|
 |
MAEC TOOL NEWS:
MAECT-NC308WA_2-010701D
NC308WA and NC30WA Precautions
|
Please take note of the following problems in using C compilers (with an assembler and integrated development environment) NC308WA and NC30WA and assemblers AS308 and AS30 for the M16C family MCUs:
- On assembler macro descriptions in C-language source files
- On link command option "-LOC"
- Problem on Assembler Macro Descriptions in C-Language Source Files
- 1.1 Products and Versions Concerned
-
| For the M16C/80 series MCUs | : NC308WA V.3.10 Release 2 |
| For the M16C/60 and M16C/20 series MCUs | : NC30WA V.4.00 Release 2 |
- 1.2 Description
- When assembler macros are defined in C-language source files by using inline assembler functions, the following error message of Windows appears depending on the combinations of label names within macros and optimizing options, resulting in unsuccessful compilation.
- "This program has performed an illegal operation and . . ."
- 1.3 Conditions
- This problem may occur if the following three conditions are satisfied:
- (1) String concatenation directive "@" is used in a label name within an assembler macro
- (2) There exist no lines containing assembler instructions except assembler directives after the label name using "@" up to the final line of the file
- (3) Any of the optimizing options "-O3", "-O4", "-O5", "-OR", and "-OS" is used at compilation
- 1.4 Example
--------------------------------------------------------------------
#pragma ASM
MemName .macro sec_name,label
.section sec_name.DATA
_@label: ; Condition (1)
.blkb 1 ; Condition (2)
.endm ; Condition (2)
#pragma ENDASM
--------------------------------------------------------------------
- 1.5 Workaround
- In files where the above conditions are satisfied, use optimizing option "-ONA".
- 1.6 Schedule of Fixing the Problem
- We plan to fix this problem in our next release.
NC308WA and NC30WA Precautions MAECT-NC308WA_2-010701D
- Problem on option "-LOC" for locating section data
- 2.1 Products and Versions Concerned
| For the M16C/80 series MCUs |
| Compiler | : NC308WA V.1.00 Release 1 -- V.3.10 Release 3 |
| Assembler | : AS308 V.1.00 Release 1 -- V.2.00 Release 1 |
| For the M16C/60 and M16C/20 series MCUs |
| Compiler | : NC30WA V.3.00 Release 1 -- V.4.00 Release 2 |
| Assembler | : AS30 V.3.00 Release 1 -- V.3.20 Release 1 |
- 2.2 Description
- When sections are relocated using section-data locating option "-LOC", branch instruction and subroutine call instruction described within the relocated sections are incorrectly compiled; that is, their destinations will be wrong in the generated code.
- 2.3 Conditions
- This problem may occur if the following four conditions are satisfied:
- (1) Two or more sections with the same name exist in the program.
- (2) One of those sections is of a relative attribute and its beginning address is corrected to even by "ALIGN" in the operand of directive command ".SECTION".
- (3) Between two sections with the same name exists a branch instruction that makes a jump to a relative address.
- (4) The beginning address of a section is even and the one after relocated is odd, or vice versa.
- 2.4 Example
--------------------------------------------------------------------
.section prg1 ; Condition (1)
.org 0F0000H
nop
jmp label ; Condition (3)
nop
.section prg1,align ; Conditions (1) and (2)
nop
label:
nop
.end
-----------------------------------------------------------------
- Condition (4) is satisfied when the above assembly-language source file is relocated at an odd address by "-LOC prg1=0E0001", and then an absolute module file is generated. In the generated file, "jmp label" will be coded to make a jump to a wrong address.
- 2.5 Workaround
- When using the "-LOC" option, relocate a section whose beginning address is even to an even address, and one whose beginning address is odd to an odd address.
- 2.6 Schedule of Fixing the Problem
- We plan to fix this problem in our next release.
|
 |