DEBUGOUT() HardFault

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

DEBUGOUT() HardFault

786 次查看
lpcware
NXP Employee
NXP Employee
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.
标签 (1)
0 项奖励
回复
2 回复数

737 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LTamas on Fri Aug 08 07:44:26 MST 2014
Hello!

I've already read that, and unfortunately it wasn't much of a help. However, I've managed to fix the problem. Firstly, I'm using UART now, as originally intended (nohost). Printf (and DEBUGOUT) was still unoperational, until I recreated the project setting printf to the version thats not handling floats, and to work char-by-char. This way, everything works fine.

Thanks for your quick reply anyways :)
0 项奖励
回复

737 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Fri Aug 08 01:52:11 MST 2014
In the first place, make sure you read…

http://www.lpcware.com/content/faq/lpcopen-debug-inputoutput-support

Regards,
LPCXpresso Support
0 项奖励
回复