Blackfin instruction bank swapping
Hi all,
The application I´m developing for my BF592 has reached the size of 32 KBytes. That is the size of the instruction SRAM of the processor. Lucky for me, I have an external 2 MBytes SPI Flash ready for use.
I´m trying to understand if it would be possible to store more application code in SPI Flash and somehow swap the pages (in real-time) to the SRAM instruction Banks. As far as I know, Blackfins have no MMU, but they do have a Memory Protection Unit. Would it be possible to implement this page swapping to be done automatically by the MPU?
Probably another option would be to use a RTOS. I found out about the VDK (kernel) but I am still not sure if the page swapping feature is available and if it would be possible to have an application bigger than 32 KBytes. Is there any other RTOS for Blackfin that allows to have applications bigger than the internal SRAM?
Thanks in advance.
We would first recommend ensuring two Linker Optimization options are enabled
The first is to enable Linker Elimination via Project->Properties->C/C++ Build->Settings->CrossCore Blackfin Linker->Elimination->Eliminate Unused Objects. When elimination is enabled, the Linker discards any objects (*.doj) within the library that do not contain any relevant code or data (i.e. the application makes no reference to any of the data or code symbols within that object). The linker can then examine the objects that are required for the link, and extract only those symbols required to resolve references from the application code, further stripping out unused data.
Another option is enabling 'Individually map functions and data items' via 'General' tab of the CrossCore SHARC Linker options. When enabled, directs the linker to fill in fragmented memory with individual data objects that fit. When this option is selected, the default behavior of the linker (to place data blocks in consecutive memory addresses) is overridden.
Should you eventually exhaust the available internal memory, you would need to look at making use of SDRAM - if your target has external memory.
You can use the section pragma with some basic LDF modifications, e.g;
In your code you have something like:
#pragma section("sdram_bank1")
int vector[22050];
This question has been assumed as answered either offline via email or with a multi-part answer. This question has now been closed out. If you have an inquiry related to this topic please post a new question in the applicable product forum.
Thank you,
EZ Admin
Please log in to reply.