2021-04-25 10:51 AM
Can I load my 192kb program file into multiple smaller FLASH sectors (i.e. Sector 1 (32kb) + Sector 2 (32k) + Sector 3 (32k) + Sector 4 (128k). Can it run from these smaller segments?
Guidance appreciated....
2021-04-25 12:10 PM
I suppose, but seems like an awkward approach.
You can subdivide contiguous space within the linker script or scatter file. Then direct functions and objects into specific sections, either by naming in the script or an attribute directive in the source.
The processor doesn't much care how you arrange things. The Vector Table generally needs to be on a 512-byte boundary, and points to absolute addresses.
You can put multiple free-standing applications in memory. The linker can either create images with fixed addresses, or you can have a loader which takes object files and does the address finalization based on load address.
2021-04-25 12:23 PM
Yes, it is awkward to say the least. But when there are no 2MB FLASH chips on the market for another ~year, I have to find ways to fit my program into what is available (1MB FLASH in several unused 32kB sectors).
Thanks for the feedback.
2021-04-25 04:00 PM
Sector 1..4 seems continious. Where is the problem?
2021-04-26 05:49 AM
The problem is that I have never tried operating a program over multiple adjacent sectors and I am not familiar with any potential problems. In the past I have been able to fit the entire program into a single sector. But with the chip shortages I am looking for ways to cram program and RAM into smaller, previously unused spaces.
So, theoretically, no issues?
Thanks,
2021-04-26 12:07 PM
The F756 parts split their 1 or 2MB across multiple sectors and/or banks
The MCU doesn't see any discontinuities as everything decodes cleanly.
Where you're memories have discontinuities, you describe the available regions to the linker, and have it manage the placement and binding.
2021-04-26 12:16 PM
Thanks Clive.