DEBUGOUT() HardFault

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by LTamas on Thu Aug 07 07:35:20 MST 2014
Hello everyone!

I'm a Bsc student, and totally new to LPCXpresso. We recently bought a 1549 devboard (v2), and I'm taking baby steps to find out how to use LPCOpen. I'm using Win 8.1, and had a hard time to get everything working. I can now build and debug all the examples with one big problem: I can't get the DEBUGOUT function to work.

I've created a totally naked HelloWorld project with a single DEBUGOUT("xy") call, and also tried building several original example projects as well, the problem happens everywhere.

While I've managed to use UART and DEBUGSTR() to output raw strings, DEBUGOUT failed miserably with a HardFault right after uploading the code, not even stopping at the breakpoint set to main().

In addition, as soon as i try to use any standard C functions, (namely sprintf to workaround the problem), I encounter a similar HardFault again.

I tried using the projects in semihosting mode as well (commented out DEBUG_UART LPC_USART0, and enabled DEBUG_SEMIHOSTING and set library to Redlib (semihost)), to no avail. If a DEBUGOUT() is present, the system ends up in a HardFault right after starting the debug session (no faults during build/make however).

I start everything without any changes in the original code, DEBUG_ENABLE is active, etc.

If there's anything (logs or whatever) that could help you find my problem, please tell me how to find them first :D I'm using the latest version of LPCXpresso and LPCOpen.

Any help would be greatly appreciated.