SAMA5D3 explained - Bare metal programming

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have successfully produced and run my bare-metal program for 'SAMA5D3 explained' board using  IAR embedded workbench and a J-Link debug adaptor. The program runs fine until the board is powered down and restarted. It then, of course, loads Linux. Can anyone tell me what I have to do to get my program to load at start up instead of the linux OS?

Please do not respond by asking me why I need to work in this way:)

Thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have no experience with this board, but I'd expect there is a bootloader - something like uboot. I'd suggest getting acquainted with the bootloader. If it is something like uboot, there should be means of loading your binary, storing it to flash and telling the bootloader where to load it and how to execute it.

[edit] just did a quick google and found this:

http://www.atmel.com/Images/Atmel-11243-32-bit-Cortex-A5-Microntroller-U-Boot%20-Design-SAMA5D3-SAMA5D4-Board_Application-Note.pdf

If you really want to go commando, then the SAMA5 has an internal bootloader that is really cheap n cheerful. In the above doc there should be some reference to it and what needs to be done to install code for it to load (which is what is being done with uboot - uboot becomes the second bootloader). Basically all the internal bootloader knows how to do is load binary from a flash source into memory and execute. There's most likely a utility that talks via the jtag that allows you to write data to the boot flash device.

[edit][edit] that utility is most likely sam-ba

Last Edited: Tue. Oct 3, 2017 - 10:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'm new to ARM processors and wonder what resources did you find for bare metal programming for the SAMA5D3???

 

I have Eclipse and ARM GCC installed (on Mac OS) but that's all so far.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 using sam-ba install the boot strap then download binary to processor using sam-ba to a offset that the bootloader requires

Last Edited: Tue. Jun 25, 2019 - 10:03 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thank you but also where did you get the header files?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Microchip should have a software framework on github