LPCOpen Getting Started with New Project

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

LPCOpen Getting Started with New Project

999 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by neilt6 on Tue Apr 23 15:27:05 MST 2013

At the risk of sounding like a complete noob: how does one actually get started on a new project using LPCOpen? I've read through the documentation, and all I can find is a quick start guide for importing examples for the LPC11U14 Xpresso board. Half of these projects don't build due to some linker error, and the USB examples seem to ignore the USE_USB_ROM_STACK flag when I set it. I've got an Embedded Artists LPC11U35 QuickStart board, and I want to start a new project using the core drivers and LPCUSBLib. I've been able to get bare projects up and running by following the LPCXpresso guide and importing CMSIS, and I can also get the older nxpUSBlib working properly complete with ROM driver support, but I want the "platform independence" that LPCOpen offers. Could somebody walk me through the process of actually creating a new workspace and project that leverages these libraries?


Thanks!


Neil Thiessen

Labels (1)
0 Kudos
Reply
7 Replies

829 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by larryvc on Fri Jan 31 12:37:29 MST 2014

Quote: NXP_Paul
We are in the final review process of writing a Project Porting Guide for LPCXpresso which should help in these situations.  Our goal is to have the porting guide ready for release with LPCOpen v1.03 on 5/10/2013, however, the actual release date may slip another week.
We'll get the porting guide posted as soon as the sign off process has been completed.

Paul



I know this is old info, but was this porting guide abandoned?
0 Kudos
Reply

829 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Mon Jun 03 10:10:00 MST 2013

Yes - there should be IAR and Keil guides in the next release (expected, but not promised :)).

0 Kudos
Reply

829 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by andyyau on Wed May 29 21:45:27 MST 2013

Will there be a guide to IAR as well?

0 Kudos
Reply

829 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Paul on Mon May 06 12:18:30 MST 2013

Hello Neilt6
We are sorry for any confusion you are experiencing using LPCOpen with LPCXpresso.  We are in the final review process of writing a Project Porting Guide for LPCXpresso which should help in these situations.  Our goal is to have the porting guide ready for release with LPCOpen v1.03 on 5/10/2013, however, the actual release date may slip another week.
We'll get the porting guide posted as soon as the sign off process has been completed.


Paul

0 Kudos
Reply

829 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by neilt6 on Wed Apr 24 11:11:44 MST 2013

Alright, now I tried to recreate the "periph_blinky" project by doing the following:


<ol>
<li>First, I imported "nxp_xpresso_11u14_board_lib and built it - no errors</li>
<li>Then, I created a new project without linking it to CMSIS (because it isn't there)</li>
<li>Then, I painstaking manually added the following includes:</li>
<ul>
<li>"C:\nxp\LPCOpen\software\CMSIS\CMSIS\Include"</li>
<li>"C:\nxp\LPCOpen\software\lpc_core\lpc_board\board_common"</li>
<li>"C:\nxp\LPCOpen\software\lpc_core\lpc_board\boards_11xx\nxp_xpresso_11u14"</li>
<li>"C:\nxp\LPCOpen\software\lpc_core\lpc_chip\chip_common"</li>
<li>"C:\nxp\LPCOpen\software\lpc_core\lpc_chip\chip_11xx"</li>
<li>"C:\nxp\LPCOpen\software\lpc_core\lpc_ip"</li>
</ul>
<li>...and the following libraries:</li>
<ul>
<li>nxp_xpresso_11u14_board_lib</li>
</ul>
<li>...and the following library search paths:</li>
<ul>
<li>"${workspace_loc:/nxp_xpresso_11u14_board_lib/Debug}"</li>
</ul>
<li>And finally, I copied over the relevant parts of the periph_blinky example into main.c and tried to build it - errors galore!</li>
</ol>
<div>Clearly, I'm failing to see how this platform is supposed to be used... Can somebody who's using it with a non-example project please help me figure this out? All I want to do is start working on a USB project that uses the board libraries, LPCUSBLib, and possibly FreeRTOS. I think half of my problems are that I've never used Eclipse, I'm used to CodeWarrior classic for 9S12, and Atmel Studio 6.0 for AVR. I'm getting so fed up with this I'm about to start hardcoding everything. Here's the latest errors it gave me:</div>
<div>
<div>11:21:00 **** Build of configuration Debug for project Blinky ****</div>
<div>make all </div>
<div>Building file: ../src/cr_startup_lpc11u.c</div>
<div>Invoking: MCU C Compiler</div>
<div>arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -I"C:\nxp\LPCOpen\software\CMSIS\CMSIS\Include" -I"C:\nxp\LPCOpen\software\lpc_core\lpc_board\board_common" -I"C:\nxp\LPCOpen\software\lpc_core\lpc_board\boards_11xx\nxp_xpresso_11u14" -I"C:\nxp\LPCOpen\software\lpc_core\lpc_chip\chip_common" -I"C:\nxp\LPCOpen\software\lpc_core\lpc_chip\chip_11xx" -I"C:\nxp\LPCOpen\software\lpc_core\lpc_ip" -Os -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/cr_startup_lpc11u.d" -MT"src/cr_startup_lpc11u.d" -o "src/cr_startup_lpc11u.o" "../src/cr_startup_lpc11u.c"</div>
<div>Finished building: ../src/cr_startup_lpc11u.c</div>
<div> </div>
<div>Building file: ../src/main.c</div>
<div>Invoking: MCU C Compiler</div>
<div>arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -I"C:\nxp\LPCOpen\software\CMSIS\CMSIS\Include" -I"C:\nxp\LPCOpen\software\lpc_core\lpc_board\board_common" -I"C:\nxp\LPCOpen\software\lpc_core\lpc_board\boards_11xx\nxp_xpresso_11u14" -I"C:\nxp\LPCOpen\software\lpc_core\lpc_chip\chip_common" -I"C:\nxp\LPCOpen\software\lpc_core\lpc_chip\chip_11xx" -I"C:\nxp\LPCOpen\software\lpc_core\lpc_ip" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -MMD -MP -MF"src/main.d" -MT"src/main.d" -o "src/main.o" "../src/main.c"</div>
<div>In file included from C:\nxp\LPCOpen\software\lpc_core\lpc_board\boards_11xx\nxp_xpresso_11u14/board_nxp_xpresso_11u14.h:35:0,</div>
<div>                 from C:\nxp\LPCOpen\software\lpc_core\lpc_board\boards_11xx\nxp_xpresso_11u14/board.h:35,</div>
<div>                 from ../src/main.c:17:</div>
<div>C:\nxp\LPCOpen\software\lpc_core\lpc_chip\chip_11xx/chip.h:41:2: error: #error CORE_M0 is not defined for the LPC11xx architecture</div>
<div>C:\nxp\LPCOpen\software\lpc_core\lpc_chip\chip_11xx/chip.h:42:2: error: #error CORE_M0 should be defined as part of your compiler define list</div>
<div>make: *** [src/main.o] Error 1</div>
<div>11:21:00 Build Finished (took 680ms)</div>
</div>
0 Kudos
Reply

829 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by neilt6 on Wed Apr 24 10:55:27 MST 2013

Sorry, I guess I spoke too soon. I forgot to add the CORE_M0 symbol to the Blinky project - now it compiles and runs... Still though, this seems like a lot of steps to set up a new project, I still think I'm missing something here... And wouldn't all these hardcoded include paths be fragile when LPCOpen is updated? I'm so confused...

0 Kudos
Reply

829 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by neilt6 on Wed Apr 24 08:13:54 MST 2013

Alright, I moved the LPCOpen folder from C:\Worskpace\projects\shared to C:\nxp alongside LPCXpresso, and that solved my linker issues. I can get all of the examples to build now, but I'm still a little bit confused as to how to create a new project and link it to the libraries I want to use. Do I literally just make a new project, and and add all of the folders inder the "Includes" section. Will this continue to work when I replace LPCOpen with a newer version?

0 Kudos
Reply