IAR compilation Common Errors

Source: Internet
Author: User
Tags arrays ranges valid

ERROR[CP001]: Copy protection Check, No valid license found for this prod T [20]

Reason: The installation of the time did not put the registration machine 0x ..... The lowercase letter of the string is changed to uppercase.


WARNING[PE001]: Last line of file ends without a newline F:\emoTion\IAR\PK upgrade \cc1110-8\main.c

Reason: When using iar often pops up like such a warning, in fact, as long as the last line to add a carriage return will not have this warning.


ERROR[E72]: Segment bank_relays must be defined in a Segment definition option (-Z,-b or-p)

Cause: This is a 730B compilation error, possibly due to the fact that the target project version is too high, and instead 720H is used, no error occurred.


ERROR[PE005]: Could not open source file "Stdio.h"

Cause: The header file path is wrong, the correct way is to add $toolkit_dir$\inc\clib\ to the incl in the preprocessor option of the Compiler/C + + box in the Settings tab? The paths.


ERROR[PE005]: Could not open source file "hal.h" C:\Users\user\Desktop\ example program \ Wireless Communication Comprehensive test \library\cc2430\hal\source\ Settimer34period.c

Reason: First check C:\Users\user\Desktop\ example program \ Wireless Communication Comprehensive test \library\cc2430\hal\source\ There is no settimer34period.c this file, if any, it is because the IAR to the Chinese path support is not good reason, the project copied to the English path compiled without error.


ERROR[E16]: Segment code_c (size:0x1869 align:0) is too long for Segment definition. At least 0x1259 more bytes needed.

Reason: CODE is not enough, modify its size in the Xcl file, 0x28ff+0x1259=0x3b58, set to-d_code_end=0x3b58


ERROR[E16]: Segment xdata_z (Size:0x1ea7 align:0) is too long for Segment definition. At least 0x2a7 more bytes

Cause: Modify the segment size in the Xcl file,-d_ixdata_end=0xfd53//Revison D (This setting was safe for all revisions) there may be too many large arrays defined, sometimes the arrays defined in some functions have Large, no error when testing the function individually in the main function.


ERROR[E16]: Segment cstack (size:0x50 align:0x1) is too long for Segment definition. At least 0x50 more bytes needed. The problem occurred while processing the segment placement command "-Z (DATA) cstack+_stack_size#",

Cause: This error is caused by the amount of RAM that is defined by the global variable and the array buffer, which exceeds the hardware support, size:0x50 is out of size. As long as you reduce the global variables and minimize the array buffer.


ERROR[E46]: Undefined external "onboard_sendphoto::?relay" referred in Hal_key (C:\Texas instruments\ ZSTACK-1.4.3-1.2.1\PROJECTS\ZSTACK\SAMPLES\SIMPLEAPP\CC2430DB\SIMPLECONTROLLEREB\OBJ\HAL_KEY.R51)

Reason: Only the definition of the function is not found Onboard_sendphoto (), only declaration and use. This error generally occurs at link time.


Error[e89]:too m H Object code prod ed (more than 0x1000 bytes) for the This package

Cause: 4K Limited Edition, please use non-restricted version.

Common errors in IAR please start with the following:

1, the serial number is correct.

2, the use of the correct version, you should use 7.30B open project files can not be opened with 7.20H.

3, try not to use Chinese path.

4, the ZigBee protocol stack folder needs to be placed in the IAR installation packing directory.

5. Please determine if the current compiled folder has read and write permissions.

6. Whether the version used is limited edition.

Here is my own supplement (constantly updated OH)

1. Error[e16]: Segment CODE (Size:0xffe align:0x1) is too long for Segment definition. At least 0x4a more bytes needed. The problem occurred while processing the segment placement command "-Z (CODE) code=_. X_flash_base-_. X_flash_end ", where at the moment of placement the available memory ranges were" CODE:4B-FFF "

Reserved ranges relevant to this placement:

Code:34-44 Near_f
CODE:45-4A INITTAB

CODE:4B-FFF CODE

This my modification is the project options---->c/c++ Compiler----->optimizations (Optimization)----->size----->high (maximum Optimization)

That is, maximize the optimization of your code to save space.
2. Configuration is up-to-data.

When you create a new project, add a program file, and be aware that you must add a valid. C or assembly file.

Hey, the author of the new project, save. c files often forget to add suffixes, added into the project, the system is not recognized, this low-level error is written to remind yourself.

3. warning[pe069]: The integer conversion resulted in truncation program is as follows:
#define SEG_A ~0x04
#define SEG_B ~0X01
#define Seg_c ~0x40
#define SEG_D ~0x10
#define SEG_E ~0x08
#define SEG_F ~0x02
#define SEG_G ~0x80
#define SEG_H ~0x20

Seg_a&seg_b&seg_g&seg_d&seg_e,//2

Cause: After the value of seg_a to Seg_h is calculated, the eg,~0x04 is changed to 0xFB. The problem is solved because it is too complex to compute in an array.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.