This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SVC and fault handling not passed to application

First step of trying to integrate S132 to a small OS is failing completely.

When I use SVC the system ends up in hanging in hard fault.

The SoD handler ends up trying to read branch address from location 0xa891be2c - which causes the hardfault. (The hardfault handler itself has the same problem)

The SoD it not enabled - for now I have just moved the OS to 0x1f000/0x20002128.

Am I supposed to do any initialization for this?

The invalid memory location comes from the SVC handler reading @0x20000000 - why? I would have expected that passing handler is done to fixed vector table address at 0x1f000?

Parents
  • Location 0x20000000 is initialized in MBR reset handler and 0x20000004 is initialized by softdevice reset handler. So they should have been initialized before your OS gets to execute its first instruction in reset handler. Instead of running upto main, can you put a breakpoint in your OS reset handler and see if they are corrupt already there? If so, then i would really really like to reproduce this here.

Reply
  • Location 0x20000000 is initialized in MBR reset handler and 0x20000004 is initialized by softdevice reset handler. So they should have been initialized before your OS gets to execute its first instruction in reset handler. Instead of running upto main, can you put a breakpoint in your OS reset handler and see if they are corrupt already there? If so, then i would really really like to reproduce this here.

Children
No Data
Related