Hi Alice,
thank you for your help.
You you recommend me to run my project step by step and to look at which command it runs to a hard_fault.
Thats a good idea, but it does not work for me because i do not come till running my project. I get a hard_fault before i can run my project.
But i had another idea. I uncomment all my commands in my function. Then i canceled it again for single commands and debugged my project at every step.
I found the following:
My global variable is called: int Labyrinth[240][320]
In my function i fill my global variable. But if i do that i get a hard_fault
As an example, see the following:
int Labyrinth[240][320];
void fill (void)
{
int i, j;
for(i = 0; i < 240; i++)
for(j = 0; j < 320; j++)
Labyrinth[ i ][ j ] = 1; //At this command i will get a hard_fault (If i comment this command out then i get no hard_fault)
}
Now if i decrease my global variable to (for example) "int Labyrinth[100][100]", then i get no hard_fault.
So i think my global variable is to big.
I thought if i enlarge my 'm_data' then it should not be a problem.
But maybe only enlarging 'm_data' do not help very much.
If i do not enlarge 'm_data' then i get a overflowed-error (because of Labyrinth[240][320]).
If i enlarge 'm_data' then i get no overflowed-error but a hard_fault.
Have you any idea how i can work with such big global variables?
Becaues i need Labyrinth[240][320] to show a randomly generated maze on my LCD-Dispaly (my DIsplay have 240x320 pixel).
Best Regards
Armend