• AVR Freaks

AnsweredHot!ATSAMA5D27-SOM-EK No Joy

Author
ibbro
Starting Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2015/10/22 07:34:56
  • Location: 0
  • Status: offline
2020/01/24 14:50:27 (permalink)
0

ATSAMA5D27-SOM-EK No Joy

I'm competent at PIC32MZ's and a couple of others but just got the SAMA5D2 board and making zero headway. I successfully created and compiled a simple new project under XC32. When trying to program using the onboard Jlink I get:
 
javax.script.ScriptException: Exception: The global variable(dictionary) 'g_mpu_config' needs to be defined in 'autoload.py' for MPU projects in
C:\Program Files (x86)\Microchip\MPLABX\v5.30\packs\Microchip\SAMA5D2_DFP\1.1.11\scripts\j-link_cortex-a5.py::32
 
The referenced file exists and has in it 'global g_mpu_config' but no def for it. (along with a bunch of other stuff)
 
The file autoload.py exists in the harmony3 directory under device packs for the device I'm using but is just a sample template. I've uncommented the two sample sections individually, although I don't have a clue what they should really be, with no change.
 
I also found a v3 harmony spi loopback project for the SAMA5D2 which builds OK but gives the same error programming. This one even specs XC32 in it's name so should be close. It is for the SAMA5D2 XULT not the SOM EK so I am thinking maybe the debugger is slightly different.
 
Finding nothing online in docs or here. Has anyone had any success with this board without Linux?
 
And a follow up question. There are several sample projects in Harmony 3 for SAMa5D2 in .IAR form. None of the will import into a new project, they give an invalid .ewp file error.
 
I do see that Segger has updates for their dll in mplabx and also an update for the Jlink OB on the EK board, but I'm hesitant to change anything there till I have at least 1 success.
 
I've submitted a ticket to Microchip but hoping someone on the forums has given the board a try.
 
Thanks!
-IB
 
 
#1
thackerp
Moderator
  • Total Posts : 127
  • Reward points : 0
  • Joined: 2012/01/18 12:25:44
  • Location: Chandler, AZ
  • Status: offline
Re: ATSAMA5D27-SOM-EK No Joy 2020/01/27 09:58:51 (permalink)
0
The SAMA5D27 SOM-EK is not yet supported in Harmony or MPLAB. Note that the SOM is populated with the SAMA5D27C-D1G-CU, which is a SiP (System-in-Package). The SiP contains the processor with 1Gbit DDR in the same package. 
 
The SAMA5D27C Xplained board is supported in Harmony and MPLAB. The Xplained board has 4Gbit external DDR3.
 
The boot process for the MPUs is different from an MCU in that there is no flash on the MPUs to program. There is a small ROM bootloader which loads an executable second-stage bootloader from external NVM. The second-stage bootloader is configured for the board and loaded into a small on-chip SRAM. The second-stage bootloader initializes the DDR controller and memory, and loads the application into DDR.
 
The autoload.py file provides for a seamless debug/development experience by loading the second-stage bootloader into SRAM and then loading the Harmony application into DDR and starting the debug session. In this scenario, it is not necessary to write the files into external NVM as you would in a production build.
 
The second-stage bootloader used for the MPUs is at91bootstrap: https://github.com/linux4sam/at91bootstrap
 
We are working on improving the documentation for this now. We are also working on integrating the bootstrap build into MPLAB, but this will take some time.
#2
ibbro
Starting Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2015/10/22 07:34:56
  • Location: 0
  • Status: offline
Re: ATSAMA5D27-SOM-EK No Joy 2020/01/27 12:10:42 (permalink)
0
Thanks for the information. I'll take a look at the link you provided. Do you have a basic estimate on timeframe for the integrated support for the board? I won't hold you to it.
 
#3
thackerp
Moderator
  • Total Posts : 127
  • Reward points : 0
  • Joined: 2012/01/18 12:25:44
  • Location: Chandler, AZ
  • Status: offline
Re: ATSAMA5D27-SOM-EK No Joy 2020/01/27 13:23:50 (permalink)
0
Unfortunately, I do not. I am pushing for it. But we have a lot of competing priorities. PM me if you can help make a business case for this.
#4
Jaeggle
New Member
  • Total Posts : 8
  • Reward points : 0
  • Joined: 2020/02/06 07:24:44
  • Location: 0
  • Status: offline
Re: ATSAMA5D27-SOM-EK No Joy 2020/02/11 01:15:43 (permalink) ☼ Best Answerby thackerp 2020/02/17 08:23:29
5 (1)
Hello,
I do have the same problems even with the supported SAM9X60-EK, it seems the Debug support for all of the MPUs is a work in progress. I have also created a ticket at the official Microchip support to speed up the development process, but a small help on how to use the autoload.py file would be great. There is a help page showing how to create binary files out of the projects and copy them to SD card to boot the firmware, this works, but being unable to debug is a really critical issue as it makes bare metal programming of the newly introduced SAM9X60 and the older SAMA5 MPUs nearly impossible.
#5
thackerp
Moderator
  • Total Posts : 127
  • Reward points : 0
  • Joined: 2012/01/18 12:25:44
  • Location: Chandler, AZ
  • Status: offline
ibbro
Starting Member
  • Total Posts : 87
  • Reward points : 0
  • Joined: 2015/10/22 07:34:56
  • Location: 0
  • Status: offline
Re: ATSAMA5D27-SOM-EK No Joy 2020/02/18 13:47:08 (permalink)
0
Thanks thackerp, that looks like what I need. 
#7
Jump to:
© 2020 APG vNext Commercial Version 4.5