EmbDev.net

Forum: ARM programming with GCC/GNU tools lpc2368 stops running if the code grows


von Filipe (Guest)


Rate this post
useful
not useful
Anyone experienced a problem when the code are growing?
In my project i have some libraries included to use LCD and i'm trying 
to comunnicate with the SD card.
I'm using the LCD to debug and see where the code is getting error.
When i add LCD_write funcion to see the message in some part of the 
program the program stop to run, compile but not run anyomre in lpc2368. 
Seems to be a compiler problem.
Anyone knows how can i fix that?
I can send the code for analise.
I'm using yagarto with eclipse.

von Martin T. (mthomas) (Moderator)


Rate this post
useful
not useful
Filipe wrote:
> Anyone experienced a problem when the code are growing?
> In my project i have some libraries included to use LCD and i'm trying
> to comunnicate with the SD card.
> I'm using the LCD to debug and see where the code is getting error.
> When i add LCD_write funcion to see the message in some part of the
> program the program stop to run, compile but not run anyomre in lpc2368.
> Seems to be a compiler problem.
> Anyone knows how can i fix that?
> I can send the code for analise.
> I'm using yagarto with eclipse.

I don't think it's a compiler-problem.

- Check if the program is transfered completly into the controller's 
memory (depends on the used tool, try with flashmagic/LPC bootloader 
first). If you are using OpenOCD, check if the needed pages are erased 
before flashing. OpenOCD also offers a verify command (or use gbd's 
compare-sections freature).

- Check the stack-settings: If the stack-size is configureable (stack 
starts somewhere in RAM but not at the top) inclease the execution stack 
size (size value is usually used in the instruction of the stack-inits 
sequence). Also check the stack-settings used in IRQ-Mode.

- If you are using dynamic memory (malloc et al). Check for 
heap-stack-collisions. Try to test without dynamic memory first

- Check the interrupt-setup and ISRs. Try to test without activating any 
interrupts if possible.

- Create a minimal example to reproduce the issue. I see that the 
"minimal" might be still large if you only see the problem when the code 
growth. But please try to minimize as much as possible.

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.