Hurdle #1

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

Hurdle #1

286 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MrFox on Mon Feb 21 05:57:02 MST 2011
Hi there.
First time with LPC Expresso and already its driving me crazy. Hurray, Blinky compiles successfully after bodging the instructions (the guide says Blinky and CMSIS is all you need, when you also need the library in the list too). But everytime I try to start a new project on a LPC1343 (going through all the menus to select it), it then hides all the .h files related to the board, so just entering:
#include[SIZE=2][COLOR=#2a00ff][SIZE=2][COLOR=#2a00ff]"gpio.h"[/COLOR][/SIZE][/COLOR][/SIZE]
Produces an error of cannot find file....
Ok, fair enough, I'll go locate it. Steal it from Blinky as it doesnt exist in LPC Expresso's folders? Could do.
Already this is annoying the hell out of me. I've used AVRStudio before and when you select the chip, it tends to offer you the files needed to use it..

Basically, I must of missed something simple but not mentioned in any of the "Getting Started" documents about how to actually set up a file in LPCExpresso...


[SIZE=2][COLOR=#2a00ff]
[/COLOR][/SIZE]
0 Kudos
2 Replies

279 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by MrFox on Mon Feb 21 08:16:28 MST 2011
I was using the NXP ones. Explains why I had to copy and paste from the other examples :(
Finally got half the files I needed to be included, the other half I'm still working on (adc and I2c). I also still have yet to find how to simply read in a pin's value. Outputting a value and setting the direction isn't too difficult, but getting a value input is proving irritating.
From reading through the datasheet, I can find the Registers I need and the bits, but getting LPC Expresso to understand that is being tricky.
0 Kudos

279 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Mon Feb 21 06:45:21 MST 2011
There are (at least) two sets of examples provided:
LPCXpresso1343.zip and examples.lpc13xx.new.zip
Which examples did you use?

The LPCXpresso1343.zip examples (written by Code Red) use the CMSIS library and the headers provided by that project. To create a new project, you should:
- ensure the CMSIS project is in your workspace
- use the New Project wizard to create the new project, ensuring that the Use CMSIS option is checked (it is by default)
This will create a project that will make use of CMSIS, and will setup the project to make sure it will pick up the library and headers. CMSIS uses a single header file, so you just need to include "LPC13xx.h"

The examples.lpc13xx.new.zip examples (written by NXP) take a slightly different approach, While this uses the CMSIS library, it provides header files for peripherals in the projects themselves. Thus, you will need to copy/paste the files out of the examples and into your project.

HTH
0 Kudos