Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Message

Application hangs before main(), seems ram related, but weird...

2005-09-14 by arkeryd

Hi,

After adding several new source files to my application for LPC2129,
it hangs when jumping from startup.s to main(). 

The first thing that came to my mind was that perhaps too much ram
memory was now used.
However, after checking by running startup.s trough the debugger, it
doesn't seem like that.
I use the default startup.s for LPC2129.

The last address used by the .data- and .bss-sections
(variables/arrays) in my application is 0x40001748.

And this should not collide with stack either, as I use the default
stack address and sizes:
Interrupt Mode size: 0x80
User/system mode size: 0x400
And just 4 bytes size in other modes.
Top of stack address: 0x40004000.

The weird thing is even though no memory collision should occur, the
application starts if I comment out the "Clear .bss section code" in
startup.s, so it must somehow be some collision, but I don't
understand why.

# Clear .bss section (Zero init)
                MOV     R0, #0
                LDR     R1, =__bss_start__
                LDR     R2, =__bss_end__
LoopZI:         CMP     R1, R2
                STRLO   R0, [R1], #4
                BLO     LoopZI

Any input to clear my confusion would be much appreciated! :)

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.