RCU2 Software Development Firmware: Difference between revisions

From ift
No edit summary
No edit summary
Line 2: Line 2:
A FlashPro project including a STAPL programming file with firmware and u-boot images can be found [http://tidsreise.com/rcu/rcu2_linux_fw.zip here]<ref>[http://tidsreise.com/rcu/rcu2_linux_fw.zip Firmware]</ref>.
A FlashPro project including a STAPL programming file with firmware and u-boot images can be found [http://tidsreise.com/rcu/rcu2_linux_fw.zip here]<ref>[http://tidsreise.com/rcu/rcu2_linux_fw.zip Firmware]</ref>.
The firmware is compiled for the SmartFusion2 Starter Kit and the device MS2050T_ES.
The firmware is compiled for the SmartFusion2 Starter Kit and the device MS2050T_ES.
The Libero project will be made available on the [https://svnweb.cern.ch/cern/wsvn/TPCRCU2 Subversion] directory ASAP in case you have other devices.
The Libero project will be made available on the [https://svnweb.cern.ch/cern/wsvn/TPCRCU2 Subversion] directory ASAP in case you have other devices (for now, find the project [http://tidsreise.com/rcu/System_w_Linux.tar.gz here]).


Usage:
Usage:

Revision as of 12:26, 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. The Libero project will be made available on the Subversion directory ASAP in case you have other devices (for now, find the project here).

Usage:

  1. Open FlashPro software
  2. Select Open Project and find the file rcu2_linux_fw.pro
  3. Make sure the FlashPro programmer is inserted and that it has been selected by pressing View Programmers. If necessary, hit Refresh/Rescan for Programmers
  4. 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.

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.

  1. Extract linux-M2S-1.11.0.tar.bz2 to a preferred directory
  2. Extract GNU toolchain arm-2010q1-189-arm-uclinuxeabi-i686-pc-linux-gnu.tar.bz2 to directory ./linux-cortexm-1.11.0/tools
  3. Make sure that the information in ACTIVATE.sh is correct and that the file is executable.
  4. 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.



References