Hi all,
I am trying and failing to program the SAMA5D2 MPU on the SAMA5D2 Xplained Ultra board with the bare-metal "getting_started" example (provided in the SAMA5D2 Software Package). I have the following setup:
- SAMA5D2 Xplained Ultra (Rev. B) Board (powered via a Micro-USB cable connected to J23)
- Atmel-ICE (connected to my PC and with its 10-pin IDC cable connected from its SAM port to J11 on the board)
- FTDI TTL-232R-3V3 Cable (connected from my PC to J1 on the board)
I have successfully built the "getting_started" code using GNU Make with the command
make TARGET="sama5d2-xplained"
to produce the binary "getting-started_sama5d2-xplained_sram.bin", but I now don't know how to program this into the SAMA5D2 on the board.
I have tried using SAM-BA (first disabling EDBG and external boot by shorting JP1 and JP9 on the board to see "RomBOOT" appear on the terminal after reset) but I cannot connect to the board via J-Link. I have tried the command:
sam-ba -p j-link -b sama5d2-xplained -a bootconfig -c readcfg:bscr
This gives the error:
Error: No J-Link devices found
However, I can connect to the board using a serial link with:
sam-ba -p serial -b sama5d2-xplained -a bootconfig -c readcfg:bscr
This gives the output:
Opening serial port 'COM6' Connection opened. Executing command 'readcfg:bscr' BSCR=0x00000000 / BUREG0 Connection closed.
For my purposes, I need to be able to program the device using JTAG, so continuing further with a serial link is not an option. I have also tried building the same code using IAR (thinking it might be easier to use their Embedded Workbench to program the binary) but the code size exceeds the link-limit for the evaluation version!
If anyone can help me do the following I would be very grateful:
- Connect to the SAMA5D2 on the board using JTAG;
- Program the "getting_started" binary into the SAMA5D2;
- Debug the binary.
Thank you in advance,
Ed King