Hi, I currently got some problems using a library compiled with the RealView compiler. I took the pio/usart/dbgu ... files from the AT91SAM9260 software package and compiled them into one library. In my application I now call PIO_Configure and after configuring a pin used as PIO_OUTPUT_1 (active low) the controllers goes into the undef_Handler.
I got no idea why, so any help would be appreciated.
Thanks a lot, Stefan
I dont got warnings from the linker.
I noticed, that in some cases after entering a subfunction the stack frames are getting overwritten -> so the controller can not jump back to where the function was called from. But why is the stack overwritten?
Check your startup file, make sure every single detail is under datasheet's spec.
If you are executing code from SDRAM make sure is being configured correctly. Any pointer or any PDC transfer to memory that gets configured in a bad way will trash SDRAM. Your pointers will more likely to generate Data Aborts and PDC may trash SDRAM that is being used to execute code, that's when UNDEF will be generated.
If you didn't do that already, you may use Blink Project as a template to put your code on the top of that. Note that the Blink example doesn't define all SDRAM available on the board and it also uses a very conservative PCLK and MCLK values.
Make sure you are not doing anything strange on the BUS Matrix setting. You will see all kinds of weirdness when you start changing it's configuration without much criteria.
My debugging experience on this system is very problematic too maybe that's the price for moving to a more sophisticated ARM core implementation and having your boss putting a little pressure on you to have a functional prototype right about now. No way to skip the learning curve on those systems.