Simple LPC812 test program

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

Simple LPC812 test program

749 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by leon_heller on Sat Mar 16 06:09:12 MST 2013
This simple test program for the LPC812 LPCXpresso might help people who are confused by the example programs:

/* Simple test program for LPC812 LPCXpresso*
 *
 */

#include "LPC8xx.h"

#define LED 7        // red LED

void delay(void);


int main(void) {

    
    LPC_GPIO_PORT->DIR0 |= 1<<LED;    // set pin as output

    while (1)
    {
         LPC_GPIO_PORT->SET0 = 1<<LED;    // LED output high
         delay();
         LPC_GPIO_PORT->CLR0 = 1<<LED;    // LED output low
         delay();
    }
}

void delay(void)
{
    volatile unsigned int i;

    for (i = 0; i < 100000; i++)
        ;
}
It builds and runs OK in debug mode, but gives this error when building in release mode:

cannot find -lCMSIS_CORE_LPC8xx

Is this a bug?
0 Kudos
Reply
2 Replies

685 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by leon_heller on Sat Mar 16 07:39:29 MST 2013
Thanks very much, that fixed the problem. :)
0 Kudos
Reply

685 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat Mar 16 07:07:10 MST 2013
Leon :eek:

Forgotten to make a Release Build of CMSIS_CORE_LPC8xx ;)
0 Kudos
Reply