Dear all,
We have a very complex program and currently we are experiencing problems with MBED crashing. The most likely cause is related to the RAM memory usage of our program.
Anyhow, MBED has 64kB from which for the standard user's program one can only access 32kB. We would like to increase this standard available 32kB by using some of the additional 32kB RAM that MBED has available.
(For the interested among you I have gathered some forum links related to this topic:
http://mbed.org/forum/mbed/topic/579/,
http://mbed.org/forum/mbed/topic/2203/,
https://mbed.org/forum/helloworld/topic/4265/)
So the way of doing so, if you are sure you don't use them for CAN or ethernet, appears to be placing your static or globals variables on the additional memory banks as follows:
static char buf1[0x2000] __attribute__((section("AHBSRAM0")));
However, in our case this solution would be quite cumbersome as we have many smaller globals or static variables (instead of only a few large buffers) for which each instantiation would have to be changed. This proved difficult.
Another way of using some of the additionally available 32kB RAM might be changing the memory layout in LPC1768.sct. /media/uploads/raalst1/lpc1768.sct (or have a look at: http://mbed.org/users/screamer/code/mbed/file/976df7c37ad5/LPC1768/ARM/LPC1768.sct)
Is it possible to change the memory layout by altering this LPC1768.sct file?
RW_IRAM1 0x100000C8 0x7F38 {
.ANY (+RW +ZI)
}
For example increase it to 55kB by just changing the 0x7F38 (32kB) to 0xD6D8 (55kB)? What about the starting addressess?
An example of how this should be correctly done would help. Especially how to cope with the memory starting addresses?
Dear all,
We have a very complex program and currently we are experiencing problems with MBED crashing. The most likely cause is related to the RAM memory usage of our program.
Anyhow, MBED has 64kB from which for the standard user's program one can only access 32kB. We would like to increase this standard available 32kB by using some of the additional 32kB RAM that MBED has available.
(For the interested among you I have gathered some forum links related to this topic: http://mbed.org/forum/mbed/topic/579/, http://mbed.org/forum/mbed/topic/2203/, https://mbed.org/forum/helloworld/topic/4265/)
So the way of doing so, if you are sure you don't use them for CAN or ethernet, appears to be placing your static or globals variables on the additional memory banks as follows:
However, in our case this solution would be quite cumbersome as we have many smaller globals or static variables (instead of only a few large buffers) for which each instantiation would have to be changed. This proved difficult.
Another way of using some of the additionally available 32kB RAM might be changing the memory layout in LPC1768.sct. /media/uploads/raalst1/lpc1768.sct (or have a look at: http://mbed.org/users/screamer/code/mbed/file/976df7c37ad5/LPC1768/ARM/LPC1768.sct)
Is it possible to change the memory layout by altering this LPC1768.sct file?
RW_IRAM1 0x100000C8 0x7F38 { .ANY (+RW +ZI) }
For example increase it to 55kB by just changing the 0x7F38 (32kB) to 0xD6D8 (55kB)? What about the starting addressess?
An example of how this should be correctly done would help. Especially how to cope with the memory starting addresses?