This is the mail archive of the
mailing list for the eCos project.
Re: Cortex-M diagnostic exception dumps
I think I missed replying to this...
Simon Kallweit <firstname.lastname@example.org> writes:
> Nick Garnett schrieb:
> > "email@example.com" <firstname.lastname@example.org> writes:
> >> This is a small patch to add diagnostic exception dumps.
> > I'm not really happy with this. Having code in the architecture HAL
> > that calls up into the infra package is a violation of the layering of
> > the system. I am also concerned that the act of calling diag_printf()
> > will provoke another exception, which will put the system into a loop.
> I thought this to be OK as there is such an option in the ARM port.
To be honest, I don't like the fact that those functions are there. I
never use them myself.
> tried to use the GDB stub but didn't have much success yet, so I added
> the dump. My problem is that I have been running a simple test for
> several hours/days, which crashes due to a bus fault. I need to
> investigate in that more, but it seems there is a bug in the port, as
> the application does not do much more than reading from a serial and
> writing to the diagnostic serial.
I have hacked similar stuff into the HALs in the past to track down
odd behaviours. But I have always removed it before checking the code
in or releasing it. My preference for low level code debug is to write
information into memory and then inspect that from debugger.
The problem with having such code in the sources permanently is that
it suggests that it will work under all circumstances when it won't,
and could cause a whole raft of problems of its own.
Nick Garnett eCos Kernel Architect
eCosCentric Limited http://www.eCosCentric.com The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No: 4422071