cancel
Showing results for 
Search instead for 
Did you mean: 

To many elements in the array - stm32f103

dzbogar
Associate
Posted on July 27, 2012 at 21:29

hello,

I have an issue. I'm using the stm32f103RB. When i want to create an array which has 8192 elements - const uint16_t table[8192] = {458,542...  }; The software successfully build in to the flash, but when i'm starting the debug mode, i get an error - ''cannot access memmory'' - error 57 or somethink. The program do not jump to the main. Than i change the array, which has less elements, aboute quarter of previous and the program normali works. I can not find the problem.. 

#stm32f103-flash-memmory-array
3 REPLIES 3
Posted on July 27, 2012 at 21:43

Is this in Keil? If using the eval version it could be that you've exceeded the code limit.

Make sure you've picked the correct CPU for the project, and the correct flash algorithm for the part.

Also make sure BOOT0 is not pulled high. Perhaps SWD or JTAG connectivity.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
dzbogar
Associate
Posted on August 01, 2012 at 07:50

Yes, this is in keil uvision. I put the array out of the function ''int main (void)'' - and its working well. But, it should work even if the initialization of the array is in the function. Is this a compiler problem? Thank you for helping =) 

Andrew Neil
Chief II
Posted on August 04, 2012 at 21:21

''I put the array out of the function 'int main (void)' - and its working well But, it should work even if the initialization of the array is in the function''

Remember that local variables are allocated on the stack...