Andes Workshop
http://forum.andestech.com/

How to make the code run on SPI flash of AE210P
http://forum.andestech.com/viewtopic.php?f=25&t=974
Page 1 of 1

Author:  TangLei [ Mon Feb 20, 2017 11:42 pm ]
Post subject:  How to make the code run on SPI flash of AE210P

First of all, let’s take a look of the normal boot sequence on AE210P as below:
Attachment:
AE210P-Boot sequence.png
AE210P-Boot sequence.png [ 111.05 KiB | Viewed 15942 times ]

In the above figure, it is important to note that the boot loader is preloaded in the FPGA.
If we want to run a demo in the SPI flash, we should set the IVB register and modify the linker script file since the base address of SPI flash is 0x800000. Besides, the code about IVB settings should be modified to 0x800000 too.
Attachment:
figure 1.png
figure 1.png [ 16.49 KiB | Viewed 15942 times ]

Attachment:
figure 2.png
figure 2.png [ 7.72 KiB | Viewed 15942 times ]

Attached is a demo which has been modified correctly base on demo-int and it runs on AE210P and XIP mode.
We can only use debug as configurationdebug as mcu program to run the code on the SPI flash. First, it is necessary to burn the bin file into the SPI flash before debugging.
Attachment:
figure 3.png
figure 3.png [ 76.17 KiB | Viewed 15942 times ]

Secondly, the “Startup” frame has to be set like below:
Attachment:
figure 4.png
figure 4.png [ 82.95 KiB | Viewed 15942 times ]

And then click “Debug” button, “Flash Programming Wizard” window appeared. Now we should choose the SPI_burn.exe and the exactly flash image.
Attachment:
figure 5.png
figure 5.png [ 34.31 KiB | Viewed 15942 times ]

Last, click the “Burn” button, the image will be burned into the SPI flash and the debugging perspective will be automatically appeared after the burning is complete.
Attachment:
figure 6.png
figure 6.png [ 157.91 KiB | Viewed 15942 times ]

Now,we can click “Resume” button or press “F8” to let the code free run on the SPI flash.

Attachments:
demo-int-spi.tgz [211.74 KiB]
Downloaded 1204 times

Page 1 of 1 All times are UTC + 8 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/