Page 1 of 1

How to enble both Flash0 and Flash1 together in AT91SAM3U

Posted: Tue Mar 30, 2010 11:02 am
by shweta
Hello everyone

I am facing problem in storing the firmware binary file (> 128KB) in flash.
What modification in linker script file (flash.lds) are required to distribute the firmware file data in flash0 and flash1?
Since Flash0 and Flash1 are not at consecutive memory addresses, so how can i store a firmware binary file (size of file is more than 128KB) in flash.

Please Reply, If anyone faced such type of problem...

Re: How to enble both Flash0 and Flash1 together in AT91SAM3U

Posted: Fri Apr 02, 2010 3:03 pm
by dfridley
One way would be to make sure the Flash1 area is defined in the linker file...

Then in your code locate some of your functions to this segment.

e.g. with Crossworks I would place funtions with the following syntax, your compiler should have a "section" keyword to do this.

Source code (assumes "flash1" is defined for Flash1 area):

void foobar1(void) __attribute__ ((section(".flash1")));
void foobar2(void) __attribute__ ((section(".flash1")));
...etc...