Sysprogs forums › Forums › VisualGDB › OpenOCD and LPC1549 issues › Reply To: OpenOCD and LPC1549 issues
I’m working with basic LED blink example:
#include <chip.h>
volatile unsigned long SysTickCnt;
#ifdef __cplusplus
extern “C”
#endif
void SysTick_Handler(void) {
SysTickCnt++;
}
void Delay(unsigned long tick) {
unsigned long systickcnt;
systickcnt = SysTickCnt;
while ((SysTickCnt – systickcnt) < tick)
;
}
const uint32_t ExtRateIn = 0;
const uint32_t OscRateIn = 12000000;
const uint32_t RTCOscRateIn = 32768;
#ifndef LPC_GPIO
#define LPC_GPIO LPC_GPIO_PORT
#endif
int main() {
SystemCoreClockUpdate();
Chip_GPIO_Init(LPC_GPIO);
SysTick_Config(SystemCoreClock / 1000);
Chip_GPIO_SetPortDIROutput(LPC_GPIO, 1, 1 << 2);
for (;;) {
Chip_GPIO_WritePortBit(LPC_GPIO, 1, 2, 1);
Delay(50);
Chip_GPIO_WritePortBit(LPC_GPIO, 1, 2, 0);
Delay(50);
}
return 0;
}
I could send you whole project and OpenOCD configuration files if you are willing to look at those.