Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Board Availability in Atmel Studio 7
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Board Availability in Atmel Studio 7

by hughbee on Fri Jun 26, 2020 12:56 pm

I wanted to start using the Segger J-link EDU with the metro M4 to get familiar with the debugger but I do not see any boards that offer the M4 device. I tried the Proper Debugging of ATSAMD21 Processors article and I cannot select the board in the article. Is there libraries that need loaded into Atmel Studio to allow other processors? I have the latest Atmel Studio7 loaded and I am using Arduino IDE 1.8.12 Portable

hughbee
 
Posts: 6
Joined: Mon Jun 29, 2015 2:49 pm

Re: Board Availability in Atmel Studio 7

by hughbee on Sat Jun 27, 2020 7:55 pm

I installed Arduino IDE 1.8.13 directly on the computer and installed the j-link software and AtmelStudio 7 on the computer. I am now able to reproduce "Proper Debugging of ATSAMD21 Processors" with the Arduino Zero. I do not have an Arduino Zero to try it on. I wanted to try it on the Metro M4 Express but AtmelStudio 7 will not accept the Metro M4. Although the device and processor is available for selection, AtmelStudio 7 does not support the board/device combination. Has anybody debugged a M4 with AtmelStudio 7 using an Arduino IDE project?

hughbee
 
Posts: 6
Joined: Mon Jun 29, 2015 2:49 pm

Re: Board Availability in Atmel Studio 7

by westfw on Sun Jun 28, 2020 5:36 am

Are you trying to "New project (Create from Arduino Sketch)" or "New Project (GCC C ASF Board project)"?

Since the Adafruit boards do not use ASF, it's not surprising that they don't show up as a choice for ASF Board.

In my AS7, the "Create from Arduino Sketch" does show the Adafruit M4 boards, but they fail to actually import them, apparently deciding that the "device" is "Cortex-M4" rather than the chip type (SAMD51G19A or whatever) that it would actually need to use.

I don't know why. the AS7 process to import an Arduino sketch is ... opaque. I can't tell what it is doing, or why, or why it's able to pick out a SAMD21G18A from somewhere, but not the SAMD51s.
Also, while SAMD21 boards seem to import OK, I can't get them to actually build (it can't find arm_math.h) So perhaps it is copying the wrong core as well, or a different version of CMSIS, or something else weird...

westfw
 
Posts: 1720
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Re: Board Availability in Atmel Studio 7

by RCohenQubiq on Mon Jul 27, 2020 10:59 am

Hello westfw,

I installed Atmel Studio 7 today as well, and I am seeing the same issue with the Grand Central M4.

In the message box "Create C++ Project from Arduino Sketch", the device shows up as "cortex-m4". Pressing OK brings up the message box: "The device architecture is not valid. Atmel Studio doesn't support this board/device combination." I guess I am saying "Me Too" for the problems noted by everybody else on this thread.

Has anybody found a method which allows debugging these boards with the J-Link EDU?

Previously I was testing PlatformIO but running into some problems. I wanted to eliminate some variables, so I decided to follow the recipe in "Proper Debugging of ATSAMD21 Processors". I assumed that this was what everybody is using to create C++ programs for this family of products.

https://learn.adafruit.com/proper-step-debugging-atsamd21-arduino-zero-m0

Thanks.

RCohenQubiq
 
Posts: 9
Joined: Wed Jul 15, 2020 1:38 pm

Re: Board Availability in Atmel Studio 7

by RCohenQubiq on Mon Jul 27, 2020 1:02 pm

Following up...

I found this post:

"Debugging CircuitPython On SAMD w/Atmel Studio 7"

https://learn.adafruit.com/circuitpython-samd-debugging-w-atmel-studio-7/overview

In here, there are details on taking the ELF output file from the Arduino toolchain, and loading that into Atmel Studio 7, for debugging. The ELF file format contains debugging information.

Here's instructions on finding the Elf file from your Arduino IDE build:

https://forum.arduino.cc/index.php?topic=406953.msg2799768#msg2799768

I tried this, and I was able to debug the "blink" program on the Grand Central M4.

Any other comments or suggestions?

RCohenQubiq
 
Posts: 9
Joined: Wed Jul 15, 2020 1:38 pm

Re: Board Availability in Atmel Studio 7

by westfw on Mon Jul 27, 2020 5:18 pm

Grr. I feel like Atmels "Import from Arduino" was poorly timed. If they were to implement it now, with the "third party hardware specification" and similar being well defined and well used, it would have been a lot easier for them, and a lot more likely to work on arbitrary boards. A simple .bat file could get closer than their current implementation :-(

westfw
 
Posts: 1720
Joined: Fri Apr 27, 2007 1:01 pm
Location: SF Bay area

Please be positive and constructive with your questions and comments.