cancel
Showing results for 
Search instead for 
Did you mean: 

Can I load & run my 192kb program into multiple smaller FLASH sectors?

Mike Hooper
Senior

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....

6 REPLIES 6

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Mike Hooper
Senior

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.

Uwe Bonnes
Principal III

Sector 1..4 seems continious. Where is the problem?

Mike Hooper
Senior

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,

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Mike Hooper
Senior

Thanks Clive.