How do I reflash a bricked SAMA5D2 Xplained

For SAMA5D2 Xplained, SAMA5D3 Xplained and SAMA5D4 Xplained

Moderator: nferre

krgalloway
Posts: 2
Joined: Thu Mar 30, 2017 4:15 pm

How do I reflash a bricked SAMA5D2 Xplained

Thu Mar 30, 2017 4:56 pm

I have recently purchased two SAMA5D2 Xplained Ultra Evaluation Kits and will be modifying the AT91Bootstrap / U-Boot / Linux. The boards come with a running Linux system already loaded. I want to know where I can get the files that are currently on the boards and the procedure to reload them if I "brick" the evaluation boards. I believe the AT91Bootstrap and U-Boot or in SPI flash and I would like to know how to reload them over JTAG using a J-Link adapter.

Where can I get the AT91Bootstrap and U-Boot files I need?
What are the commands for SAM-BA (V3.14)?

Where can I get the Linux file I need?
I assume the Linux bin needs to be loaded to the eMMC card, what is the best way to achieve this?
blue_z
Location: USA
Posts: 1560
Joined: Thu Apr 19, 2007 10:15 pm

Re: How do I reflash a bricked SAMA5D2 Xplained

Fri Mar 31, 2017 10:50 pm

krgalloway wrote:I want to know where I can get the files that are currently on the boards and the procedure to reload them if I "brick" the evaluation boards.
AFAIK they are not available online.
I've copied the original flash contents of eval boards using U-Boot and/or Linux commands, and put them on a SDcard so I can still boot that original firmware version.
You could always restore flash with one of the updated versions of the demo firmware.
Interestingly tarballs of the source code used are not available per the GPL, but you could try to pull it out of the github.
krgalloway wrote:Where can I get the AT91Bootstrap and U-Boot files I need?
Where can I get the Linux file I need?
Linux4SAM github
krgalloway wrote:What are the commands for SAM-BA (V3.14)?
Study the supplied (HTML) documentation that comes with the SAM-BA application (i.e. the doc/ directory).
Also look at SAMA5D2 Xplained Main Page

Regards
krgalloway
Posts: 2
Joined: Thu Mar 30, 2017 4:15 pm

Re: How do I reflash a bricked SAMA5D2 Xplained

Mon Apr 03, 2017 3:53 pm

I tried to read the flash using jlink and a modified script file (.qml) that I listed below. I get an "unsupported device family" error. The message seems to be reported by the samba_conn_jlink.dll.

import SAMBA 3.1
import SAMBA.Connection.JLink 3.1
import SAMBA.Device.SAMA5D2 3.1

AppletLoader {
connection: JLinkConnection {
//port: "99999999"
}

device: SAMA5D2 {
board: "sama5d2-xplained"
// to use a custom config, remove the board property and uncomment
// the following lines:
//config {
// spiInstance: 0
// spiIoset: 1
// spiChipSelect: 0
// spiFreq: 66
//}
}

onConnectionOpened: {
// initialize serial flash applet
appletInitialize("serialflash")

appletRead(0x00000, 0x400000, "flash.bin")
}
}


I also tried using the command line "sam-ba -p jlink -b sama5d2-xplianed -a serialflash -c read:flash.bin:0:1000" but I get the same error.

What does this error mean?
blue_z
Location: USA
Posts: 1560
Joined: Thu Apr 19, 2007 10:15 pm

Re: How do I reflash a bricked SAMA5D2 Xplained

Wed Apr 05, 2017 8:25 pm

krgalloway wrote:I get an "unsupported device family" error.
...
What does this error mean?
According to the SAM-BA source code, it looks like your JTAG device has not detected the correct/supported processor.

Code: Select all

   m_devFamily = JLINKARM_GetDeviceFamily();
	if ((m_devFamily == JLINKARM_DEV_FAMILY_CORTEX_A5) ||
	    (m_devFamily == JLINKARM_DEV_FAMILY_ARM9))
	{
      ...
   }
	else
	{
		JLINKARM_Close();
		emit connectionFailed("Unsupported device family");
	}
}
Regards
nferre
Site Admin
Posts: 167
Joined: Wed Feb 14, 2007 11:17 am

Re: How do I reflash a bricked SAMA5D2 Xplained

Tue Jul 04, 2017 11:23 am

Hi,

All our factory images for our SAMA5D2 Xplained are built from identified tags of all the components and source code are available in github.com/linux4sam git repositories.

For instance, the latest batch of SAMA5D2 Xplained boards are factory flashed with tags "linux4sam_5.3" for all components and AT91Bootstrap "v3.8.5".

Check each component revision (first log line of each component), and you can surely find them as source code in github.com/linux4sam).

We pay the greatest attention to be GPL compliant as we are developers of the Open Source community ourselves.

Regards,
nferre
Site Admin
Posts: 167
Joined: Wed Feb 14, 2007 11:17 am

Re: How do I reflash a bricked SAMA5D2 Xplained

Tue Jul 04, 2017 11:26 am

Hi (again),

For recovering a "bricked" Atmel/Microchip board, simply go to http://linux4sam.org , choose your board in the left hand menu, download the archive and flash it with SAM-BA tool.

You cannot "brick" completely an Atmel/Microchip board! SAM-BA will still have access to it.

Regards,

Return to “SAMA5 Xplained”

Who is online

Users browsing this forum: No registered users and 1 guest