Zynq exception handler
Chris Johns
chrisj at rtems.org
Thu Sep 29 04:22:07 UTC 2016
On 29/09/2016 13:38, xuelin.tian at qkmtech.com wrote:
> I check the arm4-exception-default.S to see that, there are a few
> default handlers for ARM exceptions. But the default handlers are just
> to store the CPSR and return address. I may want to add some more to
> these. Because when I define some functions, error (multiple definition)
> comes up. Any hints about this? Thank you.
Have a look in my debug server code which I am developing. You can find
it here
https://ftp.rtems.org/pub/rtems/people/chrisj/dbserver/dbserver-1.0-20160915.tar.bz2
There are a couple of levels you can use to manage the error. The first
is via the RTEMS interfaces. Look in init.c at the line:
#define CONFIGURE_INITIAL_EXTENSIONS { .fatal = fatal_extension }
Any of the error traps will end up here for you with a suitable frame to
decode the issue. This is preferred.
If you need to get down to the hardware have a look in
rtems-dbserver-arm.c and the rtems_dbserver_target_enable call. It
updates the CP15 directly to have control pass directly to local
exception handlers. This code also shows how to use naked handlers. You
need to know how to handle the exception when at this level.
Chris
More information about the users
mailing list