LPC undefined reference

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

LPC undefined reference

1,239 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drvrh on Mon Jun 29 01:05:52 MST 2015
Hello,
I have a problem with compile my project in LPCXpresso.

When compiled I get out some error:
DescriptionResourcePathLocationType
make: *** [demo.axf] Error 1demo C/C++ Problem
undefined reference to `enable_timer16'demo.c/demo/srcline 48C/C++ Problem
undefined reference to `GPIOInit'demo.c/demo/srcline 31C/C++ Problem
undefined reference to `GPIOSetDir'demo.c/demo/srcline 50C/C++ Problem
undefined reference to `GPIOSetValue'demo.c/demo/srcline 71C/C++ Problem
undefined reference to `GPIOSetValue'demo.c/demo/srcline 76C/C++ Problem
undefined reference to `init_timer16'demo.c/demo/srcline 42C/C++ Problem
undefined reference to `timer16_0_counter'demo.c/demo/srcline 52C/C++ Problem
undefined reference to `timer16_0_counter'demo.c/demo/srcline 112C/C++ Problem


In Properties for "my_projects" in section C/C++ Build -> Settings I have Added that file:
"${workspace_loc:/CMSIS_CORE_LPC11xx/inc}"
"${workspace_loc:/CMSISv1p30_LPC11xx}"
"${workspace_loc:/CMSISv2p00_LPC11xx}"
"${workspace_loc:/LPC11xx_cmsis2_Lib/inc}"
"${workspace_loc:/CMSIS_DSPLIB_CM0/inc}"


I don't know how I declair my funcion. These function is from Blinky example.



0 Kudos
Reply
7 Replies

1,105 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drvrh on Mon Jun 29 03:48:37 MST 2015
Ok, thank you.

I now import exmaple fro LPCopen and all other file.

Now Debug blinky (11u14 periph blinky) program without error, and stopped when:

/* Timer rate is system clock rate */
timerFreq = Chip_Clock_GetSystemClockRate();


What I'am doing wrong.


0 Kudos
Reply

1,105 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Mon Jun 29 03:43:30 MST 2015

Quote:
Why LPCOpen?


Becuase NXP do not provide examples using CMSIS - all of their examples are based on LPCOpen. LPCXpresso supplies lots of LPCOpen examples (including a Blinky for all of their development boards). Read the User Guide for how to load the examples.

LPCXpresso also has some old-style CMSIS examples, but these are all several years old an not developed.
0 Kudos
Reply

1,105 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drvrh on Mon Jun 29 03:13:59 MST 2015
No I don't.

I would like to somebody help me how run first project, or what the correct first set project?

Why LPCOpen?
0 Kudos
Reply

1,105 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Mon Jun 29 02:52:46 MST 2015
Did you read the FAQ?
http://www.lpcware.com/content/faq/lpcxpresso/cmsis-support

BTW: FOr new projects, you should be using LPCOpen.
0 Kudos
Reply

1,105 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drvrh on Mon Jun 29 02:00:51 MST 2015
In MCU linker -> Libraries I have added

Section Libraries (-l)
CMSIS_CORE_LPC11xx
"${workspace_loc:/CMSISV1P30_lpc11XX}"
"${workspace_loc:/LPC11xx_cmsis2_Lib}"
CMSIS_DSPLIB_CM0


Section Library search path (-L)
"${workspace_loc:/CMSIS_CORE_LPC11xx/Debug}"
"${workspace_loc:/CMSIS_CORE_LPC11xx/inc}"
"${workspace_loc:/CMSISv1p30_LPC11xx}"
"${workspace_loc:/CMSISv2p00_LPC11xx}"
"${workspace_loc:/LPC11xx_cmsis2_Lib/inc}"
"${workspace_loc:/CMSIS_DSPLIB_CM0/inc}"
"${workspace_loc:/CMSIS_DSPLIB_CM0/lib}"


And I get error:

cannot find -lLPC11xx_cmsis2_Lib
cannot find -lCMSISv1p30_LPC11xx

0 Kudos
Reply

1,105 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by drvrh on Mon Jun 29 01:25:09 MST 2015
How to link?
0 Kudos
Reply

1,105 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Jun 29 01:14:20 MST 2015
These are linker errors. You need to link with the libraries that provide these functions.
0 Kudos
Reply