Error building NXP SDK example project in Keil

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Error building NXP SDK example project in Keil

3,909 次查看
lkf
Contributor I

lkf_0-1689148719444.png

lkf_0-1689149033009.png

 

Load project LPC802-EX-CODE-KEIL\Keil_Projects\led_face in Keil.

Try to buiild it, but many errors. What is the problem ?

标签 (1)
0 项奖励
回复
9 回复数

3,675 次查看
lkf
Contributor I

I am able to compile the code successfully after I downloaded compiler 5.03.

Thanks for help.

0 项奖励
回复

3,806 次查看
lkf
Contributor I

There are 2 .lib files included in every project. These 2 .lib files are not included in the SDK download, so I need to rebuild them.

I am unable to rebuild the utilities_lib.lib. Below is the Keil output messages after build.

The warning msg ".... \core_cm0plus.h(104): warning: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" points to line 104 of core_cm0plus.h, which is 

#elif defined ( __GNUC__ )
#if defined (__VFP_FP__) && !defined(__SOFTFP__)
#warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
#endif

But I don't find where is __GNUC__  being defined after searching. 

Not sure what has gone wrong. I would like to know your Option for Target Setting for Compiler, ASM, and Linker, to do a cross-check. 

Rebuild started: Project: led_face
*** Using Compiler 'V6.19', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
Rebuild Project 'led_face' - Target 'flash'
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\led_face\driver\src\driver_key.c(1): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\LPC8xx.h(115): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\core_cm0plus.h(104): warning: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" [-W#warnings]
#warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
^
1 warning generated.
compiling driver_key.c...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\src\Serial.c(1): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\LPC8xx.h(115): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\core_cm0plus.h(104): warning: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" [-W#warnings]
#warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
^
1 warning generated.
compiling Serial.c...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\led_face\driver\src\driver_adc.c(1): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\LPC8xx.h(115): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\core_cm0plus.h(104): warning: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" [-W#warnings]
#warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
^
1 warning generated.
compiling driver_adc.c...
assembling Keil_startup.s...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\src\system.c(18): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\LPC8xx.h(115): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\core_cm0plus.h(104): warning: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" [-W#warnings]
#warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
^
1 warning generated.
compiling system.c...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\led_face\src\main.c(11): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\LPC8xx.h(115): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\core_cm0plus.h(104): warning: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" [-W#warnings]
#warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
^
1 warning generated.
compiling main.c...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\led_face\driver\src\driver_board.c(1): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\LPC8xx.h(115): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\core_cm0plus.h(104): warning: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" [-W#warnings]
#warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
^
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\led_face\driver\src\driver_board.c(6): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\peripherals_lib\inc\spi.h(55): warning: 'STAT_MSTIDLE' macro redefined [-Wmacro-redefined]
#define STAT_MSTIDLE (1<<8)
^
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\peripherals_lib\inc\i2c.h(49): note: previous definition is here
#define STAT_MSTIDLE (0x0 << 1)
^
2 warnings generated.
compiling driver_board.c...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\led_face\driver\src\driver_led.c(1): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\LPC8xx.h(115): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\core_cm0plus.h(104): warning: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" [-W#warnings]
#warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
^
1 warning generated.
compiling driver_led.c...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\led_face\driver\src\driver_lm75.c(1): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\LPC8xx.h(115): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\core_cm0plus.h(104): warning: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" [-W#warnings]
#warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
^
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\led_face\driver\src\driver_lm75.c(60): warning: operator '>>' has lower precedence than '+'; '+' will be evaluated first [-Wshift-op-parentheses]
*data = 0x800 - ((LM75_Buf[0]<<8) + LM75_Buf[1]>>5 );
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\led_face\driver\src\driver_lm75.c(60): note: place parentheses around the '+' expression to silence this warning
*data = 0x800 - ((LM75_Buf[0]<<8) + LM75_Buf[1]>>5 );
^
( )
2 warnings generated.
compiling driver_lm75.c...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\led_face\driver\src\driver_uart.c(1): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\LPC8xx.h(115): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\core_cm0plus.h(104): warning: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" [-W#warnings]
#warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
^
1 warning generated.
compiling driver_uart.c...
linking...
.\Objects\led_face.axf: Error: L6218E: Undefined symbol PutTerminalString (referred from main.o).
.\Objects\led_face.axf: Error: L6218E: Undefined symbol LED_Off (referred from i2c.o).
.\Objects\led_face.axf: Error: L6218E: Undefined symbol LED_On (referred from i2c.o).
Not enough information to list image symbols.
Not enough information to list load addresses in the image map.
Finished: 2 information, 0 warning and 3 error messages.
".\Objects\led_face.axf" - 3 Error(s), 11 Warning(s).
Target not created.
Build Time Elapsed: 00:00:01

 

0 项奖励
回复

3,790 次查看
Xu_Zhang
NXP Employee
NXP Employee

1.I have read your error message, and the Compiler version you use is still Compiler 'V6.19'. After testing, there will be some problems when using Compiler 'V6.19', so it is recommended to install compiler 'V5' and recompile.

Below is your compilation output, marked in red for the compiler you used

Rebuild started: Project: led_face
*** Using Compiler 'V6.19', folder: 'C:\Keil_v5\ARM\ARMCLANG\Bin'
Rebuild Project 'led_face' - Target 'flash'
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\led_face\driver\src\driver_key.c(1): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\LPC8xx.h(115): warning: In file included from...
C:\Keil_Projects\LPC802-EX-CODE-KEIL\Source_Code\common\inc\core_cm0plus.h(104): warning: "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)" [-W#warnings]
#warning "Compiler generates FPU instructions for a device without an FPU (check __FPU_PRESENT)"
^

 

2About the issue encountered with 2.lib files not included in the SDK download. First, you need to recompile the "peripherals_lib" and translation "utilities_lib" projects, and then compile the "led_face" project.

Xu_Zhang_0-1689307602413.png

Xu_Zhang_1-1689307612277.png

 

 

Xu Zhang

 

0 项奖励
回复

3,835 次查看
lkf
Contributor I

 

Th Keil Pack Installer always showing these errors. Any clue ?

lkf_0-1689236153903.png

 

 

0 项奖励
回复

3,826 次查看
Xu_Zhang
NXP Employee
NXP Employee

The installation may fail due to network problems.
If the online installation fails, you are advised to install Pack in the offline installation mode as follows:

Xu_Zhang_0-1689237748587.png

Default installation location after download

Xu_Zhang_1-1689239089065.png

Xu_Zhang_3-1689239293765.png

Then check in keil to see if pack was installed successfully

Xu_Zhang_4-1689239457731.png

If the installed package is found, the installation is successful, and the other packs follow the same path.

 

 

Xu Zhang

 

 

0 项奖励
回复

3,874 次查看
lkf
Contributor I

Hi, thanks for quick reply.

this is the Keil toolchain I am using.

lkf_0-1689219001495.png

 

This is the software pack I used. It is showing as Deprecated Pack. How do know if installed correctly?

lkf_1-1689219146071.png

Follow as you suggested, double-click peripherals_examples to open the project.

lkf_3-1689219443910.png

 

Set led_face Project  "Active Project".

lkf_4-1689219542698.png

 

Rebuild and got these errors. It seems it's related to the toolchain or the software pack issue.

lkf_5-1689219735160.png

 

0 项奖励
回复

3,845 次查看
Xu_Zhang
NXP Employee
NXP Employee

Hi,

lkf

Compiler Version 5 is no longer installed by default after Keil 5.37.

Xu_Zhang_2-1689232261133.png

I used Keil version 5.31, did not encounter your problem, you can also try the same version of keil with me.

Download link: http://www2.keil.com/mdk5

Xu_Zhang_3-1689232261169.png

 Where to download the required support pack:https://www.keil.arm.com/packs/lpc802_dfp-nxp/devices/

 

Xu Zhang

0 项奖励
回复

3,859 次查看
lkf
Contributor I

Below are my Option for Target Settings:

Keilerror_CompilerSetting.pngKeilerror_AsmSetting.pngKeilerror_LinkerSetting.png

 
 

 

 

 

 

0 项奖励
回复

3,892 次查看
Xu_Zhang
NXP Employee
NXP Employee

Hi,

lkf

       I tried to test the LPC802-EX-CODE-KEIL\Keil_Projects\led_face program in Keil and it didn't seem to be a problem.

Xu_Zhang_0-1689217033577.png

 

Here's how I did it:

  1. Install the required support pack.

Xu_Zhang_1-1689217033631.png

 

  1. Double-click peripherals_examples to open the project.

Xu_Zhang_2-1689217033760.png

 

  1. Right click and Set led_face Project to "Set as Active Project".

Xu_Zhang_3-1689217034233.png

 

In addition, you can check the keil version you are using and try to compile with keil version 5.16 or later.

 

BR

 

Xu Zhang