Custom board and LPC open

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

Custom board and LPC open

719 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Mon Apr 14 06:40:41 MST 2014
Hi,
So I Want to make custom board library for my board as is for the lpcxpresso(lpc1549).
So I made a copy of the original project and replaced my pins as appropriate in board_sysinit.c.
But after that i noticed that in my project file which is using the new library its Board_Init function is not doing anything, whatever is put in it. How must be declared  this function  and called in order to work? Am i missing something in the porting process for custom board.
Regards,
Boyko
Labels (1)
0 Kudos
10 Replies

651 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Apr 17 07:38:27 MST 2014

Quote: bobi-one
... none of it content happens.



:quest:

What does that mean?

Setting a breakpoint there and stepping forward is doing what?
0 Kudos

651 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Thu Apr 17 07:08:02 MST 2014
Hi R2,
yes there is but it doesn't execute. when i press F3 it opens the body in board.c but when it is called in main none of it content happens.
Regards,
Boyko
0 Kudos

651 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Thu Apr 17 06:41:39 MST 2014

Quote: bobi-one
Non of the functions from board.c are called, its like the file dont exist.



:quest:

Is there a  Board_Init() in your main? Is it executed?
0 Kudos

651 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Thu Apr 17 06:39:11 MST 2014
As I said in my original email

PLEASE POST A PROJECT SHOWS THE PROBLEM.

Thank you.
0 Kudos

651 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Thu Apr 17 06:21:58 MST 2014
Non of the functions from board.c are called, its like the file dont exist. Is there specific place in my current project settings to say that when i Include board.h the function body is in board.c
also what is the purpose of board_api?
Regards,
Boyko
0 Kudos

651 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Thu Apr 17 06:21:33 MST 2014
Non of the functions from board.c are called, its like the file dont exist. Is there specific place in my current project settings to say that when i Include board.h the function body is in board.c
also what is the purpose of board_api?
Regards,
Boyko
0 Kudos

651 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Apr 16 05:43:01 MST 2014
You don't acutally explain what the problem is - for example, are you getting compile/link errors, or is the function not being called?
Please post a project that exhibits this problem, and we will investigate to see what you have done wrong.
0 Kudos

651 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Wed Apr 16 05:28:50 MST 2014
I cannot find why any function from board.c cannot be accessed from my main.c I double checked  the board library is included  and the include folder. I check that changes in board_sysinit.c work but on board.c ( same location) doesn't.
Regards,
Boyko
0 Kudos

651 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wellsk on Mon Apr 14 09:05:19 MST 2014


Quote:
Board_Init function is not doing anything, whatever is put in it. How must be declared this function and called in order to work?


Your application needs to call Board_Init() and likely SystemCoreClockUpdate() before that. Board_Init() is not called as part of SystemInit().

int main(void)
{
/* initialize the board */
SystemCoreClockUpdate();
Board_Init();
Board_LED_Set(0, false);
0 Kudos

651 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Mon Apr 14 07:28:07 MST 2014
#1 Copy a working board lib.
#2 Change it. Don't forget to change board name.
/* Board name */
#define BOARD_NXP_LPCXPRESSO_1549 

in board.h

#3 Build Debug & Release version
#4 Change Includes/Libraries of your project or use Smart Update

That's all.
0 Kudos