RCU2 Software Development Firmware: Difference between revisions
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
For more information on FlashPro, check the user guide<ref>[http://www.microsemi.com/document-portal/doc_download/130809-flashpro-for-software-v11-0-user FlashPro User Guide]</ref>. | For more information on FlashPro, check the user guide<ref>[http://www.microsemi.com/document-portal/doc_download/130809-flashpro-for-software-v11-0-user FlashPro User Guide]</ref>. | ||
== | == Setup of the SmartFusion2 Target == | ||
=== Boot Linux Image === | === Boot Linux Image === |
Revision as of 10:22, 28 November 2013
Programming
A FlashPro project including a STAPL programming file with firmware and u-boot images can be found here[1]. The firmware is compiled for the SmartFusion2 Starter Kit and the device MS2050T_ES.
Usage:
- Open FlashPro software
- Select Open Project and find the file rcu2_linux_fw.pro
- Make sure the FlashPro programmer is inserted and that it has been selected by pressing View Programmers. If necessary, hit Refresh/Rescan for Programmers
- Now hit PROGRAM, wait for it to finish and then power cycle the board.
For more information on FlashPro, check the user guide[2].
Setup of the SmartFusion2 Target
Boot Linux Image
The Linux image is fetched from a network and can be booted directly from the network as well as loaded into the external Flash memory on the board. This requires a TFTP server to host the Linux image, for help on setting up a server, check the TFTP page. If you would like to quickly test the boot process, a Linux image can be fetched from Github.
Setup U-Boot enviroment
For now, the U-Boot enviroment has to be set manually.
- Log in to the board through serial, baud rate 115200, 1 stop bit, no parity
- Reset board and hit a key to stop boot sequence
- Define the IP addresses for the target board and the TFTP server, as well as the name for the boot image.
setenv ipaddr 123.234.345.29 setenv serverip 123.234.345.12 setenv image rcu2linux.uImage saveenv
To run the image over the network, reset the board and stop the autoboot sequence, then type
run netboot
To load the image into the Flash, type
run update
Development
Download the Linux BSP and software development environment as well as the GNU tool-chain from EmcraftEmcraft SF2 Starter kit downloads.
- Extract linux-M2S-1.11.0.tar.bz2 to a preferred directory
- Extract GNU toolchain arm-2010q1-189-arm-uclinuxeabi-i686-pc-linux-gnu.tar.bz2 to directory ./linux-cortexm-1.11.0/tools
- Make sure that the information in ACTIVATE.sh is correct and that the file is executable.
- Source ACTIVATE.sh: . ACTIVATE.sh
You are now ready for doing development.
To create a new project, you can clone the developer project:
lars@borg-2:~/work/linux-cortexm-1.11.0/projects/developer$ make clone new=test New project created in /home/lars/work/linux-cortexm-1.11.0/projects/test lars@borg-2:~/work/linux-cortexm-1.11.0/projects/developer$ cd ../test/
Or you can clone this project from Github and copy it to the projects folder in your development enviroment.
Network and development
The startup script of the SF2 should be updated such that you can mount a directory from the development host onto the target board. This way you can compile any software you are working on, and run it straight away from the mount on the board. Add something along the following lines to local/rc in your project directory:
mount -o nolock,rsize=1024 172.17.1.20:/home/lars/work/linux-cortexm-1.11.0/projects /mnt
The mount directory needs to be added to the ramfs table, so add to test.initramfs:
dir /mnt 755 0 0
After this is done, the image has to be recompiled and loaded to the board.