How to run SAM-BA?
(1/3) >>>
LarryBaker:
I am struggling with SAM-BA. What setup works to reflash a GESBC-9G20?
I bricked my GESBC-9G20, and now I must use SAM-BA to recover. I downloaded SAM-BA 1.12 for Linux, which I run on a CentOS 6 (RedHat RHEL 6 equivalent) x86_64 system. The farthest it gets is it hangs at the step to download the low level initialization code into the 9G20. In another thread (http://glomation.net/smf/index.php/topic,11.0.html), power supply was the solution. I'm using the Glomation PWR-5VDC power supply for the GESBC-9G20.
SAM-BA is able to recognize the 9G20 Chip ID over either the USB device port or the RS-232 console port (both are accessed as /dev/ttyUSB0 from my laptop, which has no COM ports). My USB-to-RS-232 adapter has activity LEDs. When I use the RS-232 console port with SAM-BA, the activity LEDs go out precisely when SAM-BA hangs: when the message appears that it is downloading the low level initialization code. Also using either the USB device port or the RS-232 console port, if I use the SAM-BA GUI, as soon as I select Connect, a TCL error occurs in the serial port configuration command.
I think SAM-BA 1.12 for Linux is broken.
What versions of SAM-BA are known to work to reflash a GESBC-9G20? I have yet to try a Windows version. (I can run SAM-BA on Windows XP 32-bit or 64-bit, or Windows 8 64-bit.) I can try running on a 32-bit Linux system, though I don't think that will make any difference. I think it is more likely that SAM-BA works best on a Windows system. What is the recommended version of SAM-BA and O/S? What about using the 9G20's USB device port vs. its RS-232 console port?
Here are the commands I have tried and the output from SAM-BA.
• Run "./sam-ba" with no options to bring up the GUI. After selecting /dev/ttyUSB0 for the port and selecting at91sam9g20-ek for the board, I select Connect, which fails:
Code:
$ ./sam-ba
-I- Waiting ...
-I- TCL platform : Linux
-I- SAM-BA CDC 2.12 on : linux
bad option "-mode": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation
while executing
"fconfigure $fd -mode "115200,n,8,1""
invoked from within
"if { $::argc >= 2 } {
puts "-I- Retrieved arguments from command line :"
puts "-I- argv 0 : [lindex $::argv 0]"
puts "-I- argv 1 : [linde..."
(file "/opt/gesbc-9g20/sam-ba/sam-ba_cdc_cdc_linux/sam-ba/lib/tkcon.tcl" line 4924)
invoked from within
"source [file join $starkit::topdir lib/tkcon.tcl]"
(file "/opt/gesbc-9g20/sam-ba/sam-ba_cdc_cdc_linux/sam-ba/main.tcl" line 7)
• Run "./sam-ba /dev/ttyUSB0". This should also bring up the GUI. After selecting /dev/ttyUSB0 for the port and selecting at91sam9g20-ek for the board, I select Connect, which fails exactly as above:
Code:
$ ./sam-ba /dev/ttyUSB0
-I- Waiting ...
-I- TCL platform : Linux
-I- SAM-BA CDC 2.12 on : linux
bad option "-mode": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation
while executing
"fconfigure $fd -mode "115200,n,8,1""
invoked from within
"if { $::argc >= 2 } {
puts "-I- Retrieved arguments from command line :"
puts "-I- argv 0 : [lindex $::argv 0]"
puts "-I- argv 1 : [linde..."
(file "/opt/gesbc-9g20/sam-ba/sam-ba_cdc_cdc_linux/sam-ba/lib/tkcon.tcl" line 4924)
invoked from within
"source [file join $starkit::topdir lib/tkcon.tcl]"
(file "/opt/gesbc-9g20/sam-ba/sam-ba_cdc_cdc_linux/sam-ba/main.tcl" line 7)
• Run "./sam-ba /dev/ttyUSB0 At91SAM9G20-ek". I don't know if this is supposed to bring up the GUI or not -- I think so. There is no dialog to select the port and board, which makes sense, since they are provided. SAM-BA hangs downloading the low level initialization code:
Code:
$ ./sam-ba /dev/ttyUSB0 At91SAM9G20-ek
-I- Waiting ...
-I- TCL platform : Linux
-I- SAM-BA CDC 2.12 on : linux
-I- Retrieved arguments from command line :
-I- argv 0 : /dev/ttyUSB0
-I- argv 1 : At91SAM9G20-ek
-I- argv 2 :
-I- Connection : /dev/ttyUSB0 (target(comType) = 0)
-I- Board : at91sam9g20-ek
-I- Traces Level : 4
-I- target(handle) : file7
Read device Chip ID at 0xfffff240 --- get 0x019905a1
-I- Found processor : at91sam9g20 (Chip ID : 0x019905a1)
sourcing device file /opt/gesbc-9g20/sam-ba/sam-ba_cdc_cdc_linux/tcl_lib/devices/at91sam9g20.tcl
sourcing board description file /opt/gesbc-9g20/sam-ba/sam-ba_cdc_cdc_linux/tcl_lib/at91sam9g20-ek/at91sam9g20-ek.tcl
-I- Loading applet applet-lowlevelinit-at91sam9g20.bin at address 0x200000
• Run "./sam-ba /dev/ttyUSB0 At91SAM9G20-ek ../../GESBC-9G20_linux_nandflash.tcl", which I believe should be the correct command to restore the GESBC-9G20 flash memory to the factory condition. This should not bring up the GUI, but should run the commands in the Glomation TCL file. SAM-BA hangs exactly as above:
Code:
./sam-ba /dev/ttyUSB1 At91SAM9G20-ek ../../GESBC-9G20_linux_nandflash.tcl
-I- Waiting ...
-I- TCL platform : Linux
-I- SAM-BA CDC 2.12 on : linux
-I- Retrieved arguments from command line :
-I- argv 0 : /dev/ttyUSB1
-I- argv 1 : At91SAM9G20-ek
-I- argv 2 : ../../GESBC-9G20_linux_nandflash.tcl
-I- Connection : /dev/ttyUSB1 (target(comType) = 0)
-I- Board : at91sam9g20-ek
-I- Traces Level : 4
-I- target(handle) : file7
Read device Chip ID at 0xfffff240 --- get 0x019905a1
-I- Found processor : at91sam9g20 (Chip ID : 0x019905a1)
sourcing device file /opt/gesbc-9g20/sam-ba/sam-ba_cdc_cdc_linux/tcl_lib/devices/at91sam9g20.tcl
sourcing board description file /opt/gesbc-9g20/sam-ba/sam-ba_cdc_cdc_linux/tcl_lib/at91sam9g20-ek/at91sam9g20-ek.tcl
-I- Loading applet applet-lowlevelinit-at91sam9g20.bin at address 0x200000
The output is not what I expected to see from reading the Glomation TCL file -- the puts output does not appear. I decided that is because the Glomation TCL file gets executed later in the process.
I get exactly the same results using either the USB device port or the RS-232 console port.
What is the recommended procedure?
Thank you.
LarryBaker:
I just downloaded SAM-BA 2.12 and the patch for Windows and installed it on a 32-bit Windows XP Pro laptop. (2.12 is the correct version; I incorrectly wrote 1.12 earlier.) Using the USB device port, I selected COM4 for the port and at91sam9g20-ek for the board. The SAM-BA GUI comes up as expected.
The Linux version of SAM-BA 2.12 is definitely broken.
LarryBaker:
The patched SAM-BA 2.12 also works fine on Windows 8 64-bit.
That is how I have been flashing updated versions of U-Boot.
LarryBaker:
If there is a way to mark this [SOLVED], that would be great. I could not figure out how to do that myself.
Thank you.
andrzej:
Hi,
I'm also running into trouble trying to run sam-ba under linux.
I would really like to get it to work under linux.
when I try the
sudo ./sam-ba /dev/ttyUSB0 At91SAM9G20-ek ./GESBC-9G20_linux_nandflash.tcl
command I get (not providing the last argument gives the same results) :
Code:
-I- Waiting ...
-I- TCL platform : Linux
-I- SAM-BA CDC 2.12 on : linux
-I- Retrieved arguments from command line :
-I- argv 0 : /dev/ttyUSB0
-I- argv 1 : At91SAM9G20-ek
-I- argv 2 : ./GESBC-9G20_linux_nandflash.tcl
-I- Connection : /dev/ttyUSB0 (target(comType) = 0)
-I- Board : at91sam9g20-ek
-I- Traces Level : 4
-I- target(handle) : file7
Read device Chip ID at 0xfffff240 --- get 0x203a6873
Read device Chip ID at 0xffffee40 --- get 0x203a234e
Read device Chip ID at 0x400e0640 --- get 0x20746f6e
Read device Chip ID at 0x400e0740 --- get 0x6e756f66
Read device Chip ID at 0x400E0940 --- get 0x230a0d64
and then a GUI window shows up saying there's a Communication Error.
So I get even less connection than Larry.
My glomation is currently running the factory set kernel 3.2.6
and I'm running 64 ubuntu on the laptop. (I can connect via /dev/ttyUSB) without problems)
Any ideas?
thanks,
Andrzej
Navigation
[0] Message Index
[#] Next page
Omnet ++ Download and Install for Windows
