Sauraen Posted April 9, 2016 Report Share Posted April 9, 2016 (edited) So I noticed that despite the STM32F4 having 192k of RAM, I could only have application code (plus MIOS32 of course) allocate up to about 128k. I found this by increasing the heap size until the app wouldn't link, and then checked the size of the larger arrays used in MIOS32 and my application. Since my application uses dynamic memory allocation, having the heap be as big as possible is critical. I found that the stack position is defined in STM32F407VG.ld, explicitly as _estack = 0x20020000, with a comment saying this is the end of the 128k RAM on the AHB bus. What does this mean? Why can't we use the remaining 64k of RAM? I tried changing this to 0x20030000, and (predictably) the application refused to start. So how would it be possible to get access to the remaining RAM? Edit: I found the other 64k of RAM, evidently it's in a separate section at 0x10000000, and I think it can't be accessed by DMA (which significantly limits its usefulness for many applications). I thought switching from LPC17 to STM32F4 would get rid of the memory segmentation issues, but I guess not. In any case, how do I get static/global variables allocated in that segment? Edited April 9, 2016 by Sauraen Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.