[En-Nut-Discussion] AT91SAM7X-EK debugging

Albert Andras alandras at linetron.ro
Mon Jul 17 10:24:49 CEST 2006


Hi,

Sam7xLowLovelInit being (naked) is running into the data pool placed by the 
c compiler right after it. I already told Harald about it. That literature 
data represent instructions that trigger exception. I solved by placing a
asm volatile ("b __ContSam7xLowLevelInit"); before the end of function.

__ContSam7xLowLevelInit must be defined in crtat91sam7x256_rom.s

/*
 * Section 2: Set stack pointers.
 */
        .section .init2,"ax",%progbits
        .global __ContSam7xLowLevelInit
__ContSam7xLowLevelInit:
        /*
         * Set exception stack pointers and enable interrupts.
         */
        ldr     r0, =__exp_stack
        msr     CPSR_c, #ARM_MODE_FIQ | 0xC0
        mov     r13, r0
        sub     r0, r0, #FIQ_STACK_SIZE

This is little ugly, so maybe a cleaner solution must be found. There are 
also at least 2 bugs in at91sam7x_emac. A new release probably  will follow.





----- Original Message ----- 
From: "Jix Electronics" <jix.electronics at mbnet.fi>
To: <en-nut-discussion at egnite.de>
Sent: Sunday, July 16, 2006 10:26 AM
Subject: [En-Nut-Discussion] AT91SAM7X-EK debugging


> Hi,
>
> I have problem to start Nut/OS debugging with AT91SAM7X-EK using
> Eclipse/OpenOCD/Wiggler(olimex).
>
> First flashed Nut/OS events sample program to the MCU with SAM-BA. Program
> starts ok and UART prints comes to terminal. But when starting to debug 
> with
> jtag it hangs on very early state, somewhere in Sam7xLowLovelInit 
> function.
>
> Has anyone get debugging to work, any ideas what is wrong with my setup?
>
> Are there other tools which work properly?
>
> Regards,
> Jix
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion
>
> !DSPAM:44b9ea226101272217720!
>
> 




More information about the En-Nut-Discussion mailing list