Content originally posted in LPCWare by woodchuck on Fri Jul 30 13:20:39 MST 2010
Quote: CodeRedSupport
The gpio functionality (and a bunch of other stuff) is included in the CMSISxxx library. You need to link with the library for it to be found.
You don't mention which LPCXpresso you are using. I am going to assume LPC1114.
Select your project, right-click and select Properties.
In the Properties dialog, open C/C++ Build and then Settings
Now, in the Tools Settings Tab, click on Libraries underneath MCU Linker
Under Libraries(-l) add CMSISv1p30_LPC11xx
Under Library Search path (-L) add "${workspace_loc:/CMSISv1p30_LPC11xx/Debug}"
Now, this library will be linked with you application.
Many thanks for your help!
In my workspace, I have both LPC1114 and LPC1343 projects. And I've encountered this same problem with both boards, whenever it involves GPIO.
I followed the path you outlined (which disclosed a part of the IDE I'd never seen or visited before). I found that the proper CMSIS library was already included.
FWIW, under the Quickstart panel I had previously poked around the Quick Settings and had, in the process of comparing my project with other projects, added a second include path, but it didn't fix the problem.
Time after time I get the same error messages, that I'm making undefined referrences to various GPIO functions, like GPIOSetDir and GPIOSetValue.
Is there a workaround that avoids this formalism? Some sort of expression that will allow me to toggle I/O lines w/o the need of libraries?
One other tidbit of info: I have, with both the 1114 and 1343, eventually (after an hour or more of dinking around) been able to build and run programs I've written that contain GPIO references. But I've never been able to determine what it was that made the difference. There's nothing I can see different between sample code, code of mine that now runs, and code of mine that doesn't run.
Anyway, thank you for your time. I'll keep poking around this new area - the Properties area -of various projects. Who knows what crazy thing will turn up!?