Creating a new board support project

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

Creating a new board support project

594 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tvink on Mon Apr 18 13:11:24 MST 2016
Hi,

I'll see if I can figure this out on my own but want to get a head start if anyone can offer some pointers...


I have the whole pile of LPCOpen example projects and can compile/debug the ones that matter to me.
Now I want to create my own board support package consisting of one project containing only the items that I will be using.

What is the best way to do this without reverse engineering all of the examples?

My plan is to go into the main module of each of the examples and pull out the initialization code and put it all into my BSPMain.c module and hopefully include the necessary header files.
I will leave all the example projects in my workspace until l have everything working properly.  Then I will use the Quick Start panel to export with references to a single archive.  Next I will import that archive into a new workspace and hope everything still builds OK.

Any tips?

Thanks




0 Kudos
Reply
3 Replies

583 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos
Reply

583 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tvink on Tue Apr 19 10:52:44 MST 2016
Thanks LTZ

The example I chose to start with does pull in the board and chip libraries.  So in a backward sort of way I am converging on an approach not unlike what you suggested.

Tony
0 Kudos
Reply

583 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LessThanZero on Mon Apr 18 13:58:26 MST 2016

This is not the approach I would use. LPCOpen offers board and chip projects for each LPC part. The board libraries are a porting layer (of sorts), and the chip libraries support the peripheral features found on the part. If you copy the initialization code from each example, you're going to find they all mostly use the same calls found in the board/chip libraries (e.g. SystemCoreClockUpdate, Board_Init, etc.). Board_Init is typically where you setup your GPIO, peripherals, etc.. Calls to specific board/chip initialization could be done from main code, depending on how you want to do it.

Regards,
LessThanZero
0 Kudos
Reply