ICBT_002 - Atmel_SAM-BA_tool - # 9Atmel SAM-BA tool References - http://www.atmel.com/tools/atmelsam-bain-systemprogrammer.aspx Installing and patching SAM-BA 2.12 on Windows Retrieve the following three files from the link given in references: 1. sam-ba_2.12.exe 2. sam-ba_2.12_patch5.exe 3. atm6124_cdc_signed.zip Step 1. Run the first file to perform installation of SAM-BA 2.12, then run the second file to patch it to the latest version. Step 2. Extract the contents of the zip file into a temporary location. Connect a PG5 device without SDcard to your Windows workstation. When Windows asks for drivers, point it to the location where you previously extracted the zip file. Step 3. Download the archive which contains binary files for flashing onto the Dataflash from the following location: http://icbtech.rs/Files/ICBT_002/test/pgv-df-boot-samba.zip Extract this archive to a temporary location. Step 4. Start the SAM-BA program, in the dialog choose correct port and board, then click Connect Step 5. In the lower part of the main window, in the Scripts drop-down box choose "Enable Dataflash (SPI0 CS0)" and click on the Execute button 2014-01-21 1/7 In the same drop-down box choose "Send Boot File" and click on the Execute button 2014-01-21 2/7 .Step 6. An open file dialog window comes up.Step 7. 2014-01-21 3/7 . browse to the location where you extracted the pgv-df-boot-samba.bin.zip archive and choose file dataflash_pgavrf_uboot. /sam-ba_2.12 patch5" should appear.4 Otherwise if the boot fails. Step 8. Below the Execute button you can observe the informational messages about the flashing progress.zip $ gunzip sam-ba_2.12_patch5 drwxr-xr-x 6 alex alex 4096 Jun 27 2012 sam-ba_cdc_cdc_linux Enter the sam-ba_cdc_cdc_linux directory and apply the binary patch: $ cd sam-ba_cdc_cdc_linux $ patch -p1 --binary < .12_patch5.12_patch5 Add full path to the samba_cdc_cdc_linux directory to your PATH variable: $ export PATH=${PATH}:/path/to/samba_cdc_cdc_linux That's it. You're done! Connect the PG5 device to a serial debug cable and power it on.12.1 alex alex 21098439 Jan 17 15:10 sam-ba_2. Disconnect the PG5 device from USB. Monitor the output on the debug serial port.12 on Linux Retrieve the following two files: . a GUI window named "SAM-BA CDC 2.rs/Files/ICBT_002/test/pgv-df-boot-samba.12_patch5.Immediately after choosing this file the Dataflash programming will start.sam-ba_2. Retrieve and unzip the following archive: $ wget http://icbtech.12.zip 2014-01-21 4/7 . if the device actually boots from the Dataflash you will see some informational/debug text which contains the following version string: AT91Bootstrap 3.gz You should see a new subdirectory and one additional file: $ ls -l -rw-r--r-.sam-ba_2.gz Unpack both files: $ unzip sam-ba_2. you will see the following output: RomBOOT Installing and patching SAM-BA 2.zip . now try to start the sam-ba executable binary! If everything went fine.zip $ unzip pgv-df-boot-samba.. Programming a PG5 device's Dataflash with SAM-BA Step 1. Step 4.4-exp. A new GUI window shall appear. A select dialog shall appear (picture below).bin uImage-2.4.png Choose file: at91sam9m10g45ek_demo_linux_dataflash.35.png The main window comes up (picture below). Enter the newly created pgv-df-boot-samba directory and list available files: $ ls at91sam9m10g45ek_demo_linux_dataflash.tcl dataflash_at91sam9m10g45ek. From the main menu select "Script File".png Step 6. 2014-01-21 5/7 . Sam-ba_scriptfile.bin Step 3.bin pgavrf-dataflashboot-uboot-3.Step 2. A progress dialog shall appear.bin u-boot-1. Remove SDcard from the PG5 device and connect it to your computer using an USB cable. Run the samba utility from command line within the pgv-df-boot-samba directory: $ pwd ~/pgv-df-boot-samba $ sam-ba Step 5. then "Execute Script File".6.5-at91sam9m10g45ek-dataflash_cs0. select options according to picture below and click Connect! Sam-ba_connect0.7-at91sam9m10g45ek.3. Sam-ba_main.bin ubootEnvtFileDataFlash.tcl Step 7. and in the lower part of the main window you will see status information about the dataflash programming. Monitor the output on the debug serial port.3 KB 2014-01-17 Aleksandar Pejic sam-ba-win-openbootfile.png 70.6 KB 2014-01-21 Aleksandar Pejic 2014-01-21 6/7 .png 65.png 16.4 KB 2014-01-17 Aleksandar Pejic Sam-ba_main. you will see the following output: RomBOOT Files Sam-ba_connect.4 Otherwise if the boot fails.1 KB 2014-01-17 Aleksandar Pejic Sam-ba_copy.png 20.4 KB 2014-01-17 Aleksandar Pejic Sam-ba_scriptfile.3 KB 2014-01-17 Aleksandar Pejic Sam-ba_connect0. Close the SAM-BA CDC tool and disconnect the PG5 device from USB. if the device actually boots from the Dataflash you will see some informational/debug text which contains the following version string: AT91Bootstrap 3.png 16.png 17.Step 8. You're done! Connect the PG5 device to a serial debug cable and power it on. 3 KB 2014-01-21 Aleksandar Pejic sam-ba-win-connect.samba-win-sendboot.png 18.png 4.png 18.14 KB 2014-01-21 Aleksandar Pejic 2014-01-21 7/7 .2 KB 2014-01-21 Aleksandar Pejic sam-ba-win-execute.