Board Support Packages and LPCOpen Questions

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

Board Support Packages and LPCOpen Questions

624 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by avr458 on Fri Feb 22 03:41:40 MST 2013
Hey folks I spent the past 11 hours working with LPCXpresso and LPCOpen compiling and testing various things with my LPC4330-Xplorer and attempting to get my PCB to program. I have the following questions

1. Does one need to write a boards support package for custom implementations? If so how does one go about doing that? I am using the LPC4337JBD144


2. How does one build the LPCOpen package in LPCXpresso from scratch, the tutorials I found only tell you how to set things up after is is built, its seems all the project metadata included is for Keil uVision which I have but the engineers I am working with on this project only have access to LPCXpresso. The copy of Keil I have is meant for dual core debugging if/when we get to that point. I was able to make a new driver library for the LPC4337JBD144 from what I found in the LPCOpen zip I downloaded. I built my library from the source files for the LPC43xx series chips and the LPCUSBLib included in LPCOpen, after a lot of compiling and error correcting I was able to find everything I needed from the LPCOpen package to get things compiling, the last step I had to do was add a flag to the GCC command to take into account C99 specifications. I want to get this library I just built to generate a binary that I can download onto either my LPC4330-Xplorer evaluation board or my custom designed LPC4337JBD144 PCB. Below is a link to the library project I built in LPCXpresso:

http://www.mediafire.com/?445yb1vjyg4t5bw

3. Further more I would like to make adjustments to this library project so that it can be compiled for the M0 core as well as the M4 core simply by going into properties and changing the MCU to the M0 version. I have included the ARMCM0 sources since when i made the M4 version of the library one of the last pieces I needed was the ARMCM4 sources, but when trying to compile the library for M0 by switching the MCU in properties it won't compile without errors.

Much help appreciated!
Labels (1)
0 Kudos
6 Replies

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Tue Mar 05 20:54:00 MST 2013
It's here...

http://www.lpcware.com/content/nxpfile/lpcopen-platform
0 Kudos

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by avr458 on Tue Mar 05 19:52:45 MST 2013
How come the new LPCOpen isn't out? You said on the 28th but I can't find it anywhere.
0 Kudos

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by avr458 on Sun Feb 24 22:14:16 MST 2013
I wrote the sys_config header and I have all the chip congfig headers from LPCOpen. It appears to me that those files and startup functions they contain run based on what is in the sys_config header.

I compiled the LPCOpen sources for the LPC43xx M4 core; when I go to write a simple main that toggles GPIO pins the compiler says that I am implicitly declaring the functions despite having the correct path to the includes set under paths and symbols and have the header for the GPIO library included in the main. What am I doing wrong? My project is setup exactly like the one I uploaded earlier.
0 Kudos

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Fri Feb 22 14:23:00 MST 2013
The expected release date is 02/28/2013
0 Kudos

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by avr458 on Fri Feb 22 12:29:23 MST 2013
Thanks for the lengthy response. This is all for my senior capstone project for my robotics engineering degree and its very time sensitive when can I expect v1.01 to be released?
0 Kudos

550 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Fri Feb 22 10:29:00 MST 2013
Hi,

I'll try to answer these in brief here, but soon you should see some better articles on customizing LPCOpen to your specific end-product.

>
>1. Does one need to write a boards support package for custom implementations? If so how does one go about doing that? I am using the LPC4337JBD144
For the most part, all you need to do is write the board layer code. (This is somewhat over-simplifying it).
The board layer consists of 3 parts: sys_config.h, the early startup code, and board setup code.
>

The sys_config.h file defines the 'system such as the crystal/oscillator rate for the board, external clock in frequency, the CHIP your board is using, etc. It also enables the DEBUG* functions and default DEBUG UART if DEBUG_ENABLE is defined.

The early startup code is the SystemInit() call. SystemInit() is called from the startup code *prior* to the run-time environment being setup. Because of this, the RW data and BSS (zero-cleared) data sections aren't yet initialized. The SystemInit() code setups up the board's default clocking (ie, the LPC812 board is setup for 36MHz), sets up default pin muxing for the board, and any external memory setup (ie, DRAM and static memory setup on parts with an external memory controller). The SystemInit() code is well commented and you might be should be easily convertible to a new board. The only caveat with the SystemInit() code is that none of the leaf functions used by SystemInit() should use pee-initialized or BSS data.

Note: Most low-level drivers such as clock, IOCON, etc. don't use any data (except for stack data).

The board file/code provides the Board_Init() function, which is the first called function from any application. Board_Init() sets up the DEBUG UART (if DEBUG_ENABLE is defined in sys_config.h), sets up the SystemCoreClock value, and may do some other board specific functions. This file also provides the functions that map to the DEBUG* functions, as well as some Board_<peripheral>_Init functions that help setup board specific interfaces for the examples.

If you want to start at the minimum, provide a stubbed/empty SystemInit() function, a SystemCoreClock variable, and a Board_Init() function that only sets up your SystemCoreClock variable and slowly add startup and board capability a step at a time.

>
>2. How does one build the LPCOpen package in LPCXpresso from scratch, the tutorials I found only tell you how to set things up after is is built
>
The upcoming v1.01 release restores Xpresso projects for the 18xx/43xx and the dual-core examples. There will also be an up to date quickstart guide with this release for Xpresso and 18xx/43xx.
http://www.lpcware.com/content/project/lpcopen-platform-nxp-lpc-microcontrollers/lpcopen-upcoming-re...

>
>3. Further more I would like to make adjustments to this library project so that it can be compiled for the M0 core as well as the M4 core simply by going into properties and changing the MCU to the M0 version
>
In v1.01, the M0 and M4 Xpresso projects for the LPC43xx series are now unique and not shared, so you only need to use the projects now (and the dependencies should now work correctly) without the need to change the core value. Basically, things just work now without the odd workarounds.
0 Kudos