Unresolved inclusion in a new project

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unresolved inclusion in a new project

2,817 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JSalisbury on Mon Mar 21 05:16:18 MST 2011
Hi,

I have just tried generating a new project and the produced code is as shown below I am getting unresloved inclusion on a standard library what am I doing wrong?

Thanks

/*
===============================================================================
Name        : main.c
Author      : $(author)
Version     :
Copyright   : $(copyright)
Description : main definition
===============================================================================
*/

#ifdef __USE_CMSIS
#include "LPC11xx.h"  <--- UNRESLOVED INCLUSION
#endif

#include <cr_section_macros.h>
#include <NXP/crp.h>

// Variable to store CRP value in. Will be placed automatically
// by the linker when "Enable Code Read Protect" selected.
// See crp.h header for more information
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;

#include <stdio.h>

// TODO: insert other definitions and declarations here

int main(void) {
   
    printf("Hello World\n");
   
    // Enter an infinite loop, just incrementing a counter
    volatile static int i = 0 ;
    while(1) {
        i++ ;
    }
    return 0 ;
}
0 Kudos
7 Replies

1,904 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JSalisbury on Tue Mar 22 08:43:27 MST 2011
Hi,
Yes it was a problem when useing the quick start -> build project. The issue has gone away for the moment. There may have been an issue with the example set for both the 301 and 302 varients in the same workspace.  It now seems to work now that I only have the 302 varient samples and the CMSISv1p30_LPC11xx libary in the workspace.




Quote: CodeRedSupport
So the fundamental question is - is your problem actually a build failure when you choose [B][FONT=Courier New][SIZE=2]Quickstart -> Build <project>[/SIZE][/FONT][/B], or is your issue just that the indexer not having indexed your source files yet?

Regards,
CodeRedSupport

0 Kudos

1,904 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Tue Mar 22 00:48:09 MST 2011

Quote: GYUR22
having a same issue:

Building file: ../src/cr_startup_lpc11.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv1p30_LPC11xx -O0 -Os -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/cr_startup_lpc11.d" -MT"src/cr_startup_lpc11.d" -o"src/cr_startup_lpc11.o" "../src/cr_startup_lpc11.c"
../src/cr_startup_lpc11.c:51:28: error: system_LPC11xx.h: No such file or directory
../src/cr_startup_lpc11.c: In function 'ResetISR':
../src/cr_startup_lpc11.c:301: warning: implicit declaration of function 'SystemInit'
make: *** [src/cr_startup_lpc11.o] Error 1



system_LPC11xx.h is one of the files provided by CMSIS. The most likely reason for the above error is that you have not imported the CMSISv1p30_LPC11xx library project from the examples subdirectory into your workspace.

More background information on CMSIS at:

http://support.code-red-tech.com/CodeRedWiki/Support4CMSIS

If you haven't read it already, I would also suggest looking at the LPCXpresso IDE Getting Started...

http://ics.nxp.com/support/documents/microcontrollers/pdf/lpcxpresso.getting.started.pdf

Regards,
CodeRedSupport
0 Kudos

1,904 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by GYUR22 on Mon Mar 21 23:17:16 MST 2011
having a same issue:

Building file: ../src/cr_startup_lpc11.c
Invoking: MCU C Compiler
arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_CMSIS=CMSISv1p30_LPC11xx -O0 -Os -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/cr_startup_lpc11.d" -MT"src/cr_startup_lpc11.d" -o"src/cr_startup_lpc11.o" "../src/cr_startup_lpc11.c"
../src/cr_startup_lpc11.c:51:28: error: system_LPC11xx.h: No such file or directory
../src/cr_startup_lpc11.c: In function 'ResetISR':
../src/cr_startup_lpc11.c:301: warning: implicit declaration of function 'SystemInit'
make: *** [src/cr_startup_lpc11.o] Error 1
0 Kudos

1,904 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Mar 21 10:38:30 MST 2011

Quote: JSalisbury

I have just tried generating a new project and the produced code is as shown below I am getting unresloved inclusion on a standard library what am I doing wrong?



So the fundamental question is - is your problem actually a build failure when you choose [B][FONT=Courier New][SIZE=2]Quickstart -> Build <project>[/SIZE][/FONT][/B], or is your issue just that the indexer not having indexed your source files yet?

Regards,
CodeRedSupport
0 Kudos

1,904 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Mar 21 06:59:10 MST 2011
Is

Properties -> C/C++ Build -> Settings -> Tool Settings-> MCU C Compiler -> Directories

"${workspace_loc:/CMSISv1p30_LPC11xx/inc}"

pointing to the correct directory ?

1,904 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by JSalisbury on Mon Mar 21 06:13:12 MST 2011
Hi,
Yes I did use the wizard.
Thanks
0 Kudos

1,904 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by ex-kayoda on Mon Mar 21 05:41:16 MST 2011
Did you generate a new 'LPCXpresso C Project' with enabled 'CMSIS selection' ?
0 Kudos