Common IAR compilation errors

Publisher:psi33Latest update time:2015-08-14 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Error[Cp001]: Copy protection check, No valid license found for this prod t [20]

Reason: The lowercase letters of the 0x..... string of the registration machine were not changed to uppercase letters during installation.

 

Warning[Pe001]: last line of file ends without a newline F:emoTionIARPK 升级CC1110-8main.c

Reason: When using IAR, a warning like this often pops up. In fact, as long as you add a carriage return to the last line, this warning will no longer appear.

 

Error[e72]: Segment BANK_RELAYS must be defined in a segment definition option (-Z, -b or -P)

Cause: This is an error when compiling with 730B, which may be due to the version being too high relative to the target project. Later, 720H ​​was used instead and no error occurred.

 

Error[Pe005]: could not open source file "stdio.h"

Cause: The header file path is incorrect. The solution is to add $TOOLKIT_DIR$INCCLIB to the Incl? paths in the C/C++ Compiler -> Preprocessor option in the Settings tab.

 

Error[Pe005]: could not open source file "hal.h" C:UsersuserDesktopExample ProgramWireless Communication Integrated TestLibrarycc2430HALsourcesetTimer34Period.c

Cause: First check whether there is a file called setTimer34Period.c in C:UsersuserDesktopExample ProgramWireless Communication Comprehensive TestLibrarycc2430HALsource. If so, it is because IAR does not support Chinese paths well. Copy this project to an English path and compile it without errors.

 

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 -D_CODE_END=0x3B58

 

Error[e16]: Segment XDATA_Z (size: 0x1ea7 align: 0) is too long for segment definition. At least 0x2a7 more bytes

Reason: Modify the segment size in the xcl file, -D_IXDATA_END=0xFD53     // Revison D (this setting is safe for all revisions) It may also be that too many large arrays are defined. Sometimes the arrays defined in some functions are a bit large. When testing this function alone in the main function, no error is reported.

 

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 RAM occupied by the defined global variables and array buffers exceeding the hardware support. Size: 0x50 is the excess size. Just reduce unnecessary global variables and minimize the array buffers!

 

Error[e46]: Undefined external "OnBoard_SendPhoto::?relay" referred in hal_key ( C:Texas InstrumentsZStack-1.4.3-1.2.1ProjectszstackSamplesSimpleAppCC2430DBSimpleControllerEBObjhal_key.r51 )

Cause: The function definition OnBoard_SendPhoto() was not found, only the declaration and use were found. This error usually occurs during linking.

 

Error[e89]:Too m h object code prod ed(more than 0x1000 bytes)for this package

Reason: 4K restricted version, please use the non-restricted version.

Please start with the following aspects for common IAR errors:

1.    Is the serial number correct?

2. Check    whether the version used is correct. Project files that should be opened with 7.30B cannot be opened with 7.20H.

3.    Try not to use Chinese paths.

4.    The Zigbee protocol stack folder needs to be placed in the root directory of the IAR installation disk.

5.    Please make sure that the current compilation folder has read and write permissions.

6.    Is the version used a restricted edition?

 

 

The following is my own supplement (continuously updated)

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

 

My modification is project options---->C/C++ Compiler----->Optimizations(optimization)----->size----->High(maximum optimization)

That is, optimize the code to the maximum extent possible to save space.
 2.   configuration is up-to-data.

 When creating a new project and adding program files, please note that you must add valid .c or assembly files.

Hey, when I create a new project, I often forget to add a suffix to the saved .c file. When I add it to the project, the system cannot recognize it. This kind of low-level mistake is written down to remind myself.

3. Warning[Pe069]: integer conversion resulted in truncation     The 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

Reason: After the values ​​of SEG_A to SEG_H were calculated, for example, ~0x04 was changed to 0xFB. The problem was solved because the calculation amount in the array was too complicated.

Reference address:Common IAR compilation errors

Previous article:RS232 serial port power supply circuit diagram
Next article:Why use 4~20mA current to transmit analog quantity?

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号