- Using Interfaces (GPIO, UART, SPI, ...)
- Building an initial ramdisk without root permission
- Creating a JFFS2 image from a directory structure
- SAM-BA : Flashing taskit's ARM-based boards
- Flashing new u-boot on Portux920T / Portux Panel-PC
- Implementing an own boot-logo for Panel-Card
- Nano-X with tslib support
- Using Watchdog on Stamp9G20 or PortuxG20
- Development with Eclipse
- Installing Debian/GNU Linux on Stamp9G20 and PortuxG20
- Using Xenomai on PortuxG20/Stamp9G20
- Installing a rootfs on SD card
- Using Power Management Features
- Using the NAND flash on NanosG20
- Using the buzzer on PortuxG20 rev. 2 and NanosG20
SAM-BA : Flashing taskit's ARM-based boards
Last edited by mlanger on Wed, 11/16/2011 - 12:17
Introduction
In order to avoid the need of a JTAG programmer for Panel-Card and Stamp9261 taskit built an extension to Atmel's SAM-BA programming tool. It provides flashing via USB at much higher speed compared to a JTAG programmer. This article describes how to install and use this extension.
This article also contains an update for new products and SAM-BA versions 2.9 and 2.10. Latest board support is for version 2.10 at the end of this article.
Note: On Linux and Windows 7 SAM-BA 2.10 is needed to flash any boards. Version 2.9 will not function under Windows 7.
Requirements
- SAM-BA version 2.6
- USB connection
Installation
The extension consists of various scripts and ARM binaries in one ZIP archive, which has to be extracted to SAM-BA's lib directory.
At last both boards are added to "Boards.tcl" by appending the following lines:
"taskit Panel-Card 16F/32R" "taskit/taskit_boards.tcl" "taskit Panel-Card 64F/64R" "taskit/taskit_boards.tcl" "taskit Stamp9261 16F/32R" "taskit/taskit_boards.tcl" "taskit Stamp9261 64F/64R" "taskit/taskit_boards.tcl"
Usage
SAM-BA connects to a loader located in an internal ROM to interact with the device. The BMS jumper at Panel-Card Base selects whether the device boots from Flash (BMS open) or internal ROM (BMS closed) and has to be set up before powerup. Note that Panel-Card and Stamp9261 can be powered over USB.
This routine shows how the flash is programmed using SAM-BA:
- Set BMS jumper on Panel-Card Base
- Connect board via USB
- Launch SAM-BA, choose your board and use USB
- Execute Script "Enable FLASH" (this will also initialize SDRAM)
- Choose file and position in card "Flash", use "Send File" button
Consider to reboot the board with BMS open after programming flash is finished.
Download
Use this link to download the extension.
Update SAM-BA version 2.9
Requirements:
- SAM-BA version 2.9
- USB connection
Description:
This extension is provided as ZIP archive that has to be extracted to your SAM-BA directory. It contains support for all AT91SAM9261, AT91SAM9G10 and AT91SAM9G20 products offered by taskit.
Usage:
After connecting your board via USB launch SAM-BA and choose taskit-9261 for Panel-Card and Stamp9261, taskit-9g10 for Stamp9g10, taskit-9g20 for Stamp9G20 and Portux9G20.
taskit-9261 and taskit-9g10 behave as the plugin for SAM-BA version 2.6 does - since the AT91SAM9G20 based boards have NAND flash instead of NOR flash they behave different. On Stamp9g20 and Portux9g20 you can use Atmel's support for NAND flash to program the board.
Download
taskit_SAM-BA2.9_boards-090923.zip
Programming Stamp9G20 or PortuxG20
Requirements:
- Installed SAM-BA version 2.9
- USB connection
Description:
The AT91SAM9G20 boards run from NAND-Flash. The boot from NAND-Flash is executed before starting the internal ROM. That means, as long there is executable code at offset 0x0 on your NAND chip, the internal ROM-Bootloader will not start. To avoid this scenario, the chipselect of the NAND-Flash (NCS3) needs to be disabled:
Stamp9G20: Connect Pin 38 with Pin 1 with a suitable cable on Stamp-Adaptor2 to tie NCS3 permanently to VCC. After the connect, the cable needs to be removed, as we want to program the NAND.
Portux9G20: Set jumper J3, after connect remove.
Now connect the USB-cable, and then start SAM-BA. Choose taskit-9g20 and USB. Now choose tab SDRAM and execute the script Enable SDRAM. Next choose tab NandFlash and execute the script Enable NandFlash (cable / Jumper needs to be removed by now). If you have executable code at address 0x0, the NAND needs to be erased, use script erase ALL. This will erase the complete NAND, so you have to flash all images again.
0x00000 bootstrap 0x20000 u-boot 0xa0000 linux
This are the addresses to flash your images to. You won't be able to flash bootstrap without SAM-BA. If you just want to update bootstrap and your system is still running, it is advisable to delete the first sector under u-boot, saving the erase of the complete chip (and the need to manipulate the chipselect).
As an alternative, SAM-BA provides access to internal flash scripts via built-in TCL shell.
NANDFLASH::EraseBlocks [start] [end]
NANDFLASH::EraseBlocks will erase all blocks between [start] and [end]. Note that adresses in NANDFLASH start at 0 and that [end] means the highest address of the last block to be erased.
Flash bootstrap (tab is still NandFlash) with the script Send Boot File and choose the bootstrap image. Flash u-boot by choosing your image and write 0x20000 to the Address field and then press Send File. Use the same procedure for Linux at address 0xa0000.
Update SAM-BA version 2.10
Requirements:
- SAM-BA version 2.10
- USB connection
Description:
Since the way how board description scripts are handled inside SAM-BA has changed slighly, it is necessary to use the new scripts supporting taskit's boards with version 2.10.
The content of the ZIP archive needs to be extracted into the SAM-BA installation directory. Furthermore the file "boards.tcl" requires some update. In order to do so, just add the following lines.
"at91sam9261-taskit" "at91sam9261-taskit/taskit-9261.tcl" "at91sam9g10-taskit" "at91sam9g10-taskit/taskit-9g10.tcl" "at91sam9g20-taskit-64m" "at91sam9g20-taskit-64m/at91sam9g20-ek.tcl" "at91sam9g20-taskit-128m" "at91sam9g20-taskit-128m/at91sam9g20-ek.tcl" "at91sam9g45-taskit" "at91sam9g45-taskit/at91sam9g45-ek.tcl"
Usage:
Choose at91sam9261-taskit for Panel-Card and Stamp9261, at91sam9g10-taskit for Stamp9g10, at91sam9g20-taskit-64m for Portux9g20 and Stamp9g20 with 64 MB SD-RAM. AT91SAM9G20 based products with 128 MB work with at91sam9g20-taskit-128m. For Stamp9G45 choose at91sam9g45-taskit
All procedures to connect the various boards described above remain sufficient. Take a look at Programming Stamp9G20 or PortuxG20 for our AT91SAM9G20 based products.
Download:
SAM_BA2.10-taskit-20111020.zip
new: Stamp9G45 support
| Attachment | Size |
|---|---|
| taskit-SAM-BA_ext-08-04-16.zip | 90.35 KB |
| taskit_SAM-BA2.9_boards-090923.zip | 372.88 KB |
| SAM_BA2.10-taskit-20111020.zip | 440.41 KB |
