EmbeddedRelated.com
Forums

Anybody using custom error handler

Started by "ger...@petrobox.net [rabbit-semi]" October 4, 2015
In some situations i suffer runtime errors and can't find the source (well the source is bad code for sure hehe).

According this page theres a way to log that errors on the internal memory of the rabbit to check later.

ftp://ftp1.digi.com/support/documentation/html/DynCUsersManual/7rte.htm

Anybody using this?

I just need to save source and line code + the error code. And get a way to get from memory under the reset (that always end on a reset of my rabbit)

If somebody have some source code doing this or can do that job please contact me.

Best regards.
Have you reviewed the files in Samples/ErrorHandling? Based on the URL you provided, I assume you’re using Dynamic C 9. That page of documentation points you to the samples Generate_runtime_errors (which I suppose logs errors) and Display_errorlog (which should dump entries from the error log on the board).

You can’t log the source file and line number of the error, you can only log the address that threw the exception. You need to save the .MAP file, and possibly the .LST file generated from program compilation, so you can look up addresses from the runtime error to determine where you code failed. With a stack dump, you might find a chain of function calls that ultimately resulted in your program trying to execute code at some random address.

Are you considering this for a deployed device, or just for use during development when you don’t have a debug connection to Dynamic C?

-Tom

From: r... [mailto:r...]
Sent: Sunday, October 04, 2015 10:20 AM
To: r...
Subject: [rabbit-semi] Anybody using custom error handler

In some situations i suffer runtime errors and can't find the source (well the source is bad code for sure hehe).

According this page theres a way to log that errors on the internal memory of the rabbit to check later.

ftp://ftp1.digi.com/support/documentation/html/DynCUsersManual/7rte.htm

Anybody using this?

I just need to save source and line code + the error code. And get a way to get from memory under the reset (that always end on a reset of my rabbit)

If somebody have some source code doing this or can do that job please contact me.

Best regards.

__