0

Getting errors when trying to debug samd boards
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Getting errors when trying to debug samd boards

by dgube1 on Mon Feb 11, 2019 2:16 am

Hi, so I followed the guide for debugging SAMD boards in Atmel Studio and when I go to build the solution i get something like 600+ errors and the build fails. I'm using the Metro M0 Express board with the J-Link EDU Mini and I have followed the instructions to update the file paths. The version of Atmel Studio I am using is the most current version as of this post.

I am familiar with debugging but am new to the EDU Mini and Atmel Studio and am not sure what could be causing the issue or where to begin looking for a solution. Could anyone kindly shed some light on this if they have experienced anything similar?

dgube1
 
Posts: 7
Joined: Sat Jan 21, 2017 6:46 pm

Re: Getting errors when trying to debug samd boards

by franklin97355 on Mon Feb 11, 2019 3:10 am

Can you post a link to the guide you are following?

franklin97355
 
Posts: 20637
Joined: Mon Apr 21, 2008 2:33 pm
Location: Lacomb, OR.

Re: Getting errors when trying to debug samd boards

by dgube1 on Mon Feb 11, 2019 10:09 pm


dgube1
 
Posts: 7
Joined: Sat Jan 21, 2017 6:46 pm

Re: Getting errors when trying to debug samd boards

by dgube1 on Tue Feb 19, 2019 12:06 am

As an update to keep this thread alive, I sat down with the issue again and it seems to be primarily with the Arduino Core portion of the build and specifically with the arm_math.h header file. I'm not sure if it is incompatible or if there are naming conflicts but every line of the header file throws an error when I go to build the solution.

dgube1
 
Posts: 7
Joined: Sat Jan 21, 2017 6:46 pm

Re: Getting errors when trying to debug samd boards

by adafruit_support_mike on Tue Feb 19, 2019 12:44 am

What code are you trying to compile? The tutorial mentions the Blink sketch as an example of something you can debug, but that isn't a requirement.

adafruit_support_mike
 
Posts: 57354
Joined: Thu Feb 11, 2010 2:51 pm

Re: Getting errors when trying to debug samd boards

by dgube1 on Wed Feb 27, 2019 2:01 am

I followed the example exactly so I have been using the Blink example, admittedly I haven't tried with other sketches yet.

dgube1
 
Posts: 7
Joined: Sat Jan 21, 2017 6:46 pm

Re: Getting errors when trying to debug samd boards

by adafruit_support_mike on Wed Feb 27, 2019 2:51 am

Thank you. It sounds like the Atmel Studio settings are out of sync with the Arduino settings. I'll check to see if anyone else has run into that problem.

adafruit_support_mike
 
Posts: 57354
Joined: Thu Feb 11, 2010 2:51 pm

Re: Getting errors when trying to debug samd boards

by dgube1 on Wed Feb 27, 2019 4:39 pm

So I have an update. I have since been able to get it working, the solution came from removing the math_helper header and source files from the solution manager for the Arduino Core project. I'm not sure exactly why this corrected the issue I believe it references back to the part where the errors were coming from the arm_math header file, I think that header is called within the math_helper. I think what was happening is in the arm_math header it checks to see which header file to include for math operations or something of that nature and no value is begin defined so it would throw an error for every definition that followed which resulted in the 600+ I had been getting.

Thanks for all the help along the way, if anyone is ever able to pinpoint exactly why this was I would love to hear about it.

dgube1
 
Posts: 7
Joined: Sat Jan 21, 2017 6:46 pm

Re: Getting errors when trying to debug samd boards

by adafruit_support_carter on Wed Feb 27, 2019 5:07 pm

That sounds like something changed in the latest Atmel Studio with the Arduino Core. Can you provide more info on exactly what you did in terms of removing the header and source from the solution manager? Was that a manual delete, or just a check mark option in a dialog? or something else?

We'd like to update the guide with that info. Thanks!

adafruit_support_carter
 
Posts: 11467
Joined: Tue Nov 29, 2016 2:45 pm

Re: Getting errors when trying to debug samd boards

by dgube1 on Wed Feb 27, 2019 6:17 pm

Sure thing, my terminology was a bit off earlier. In the Solution Explorer in the dropdown file system shown I went into ArduinoCore/include/core and did a right click and remove of the "math_helper.h" header file. Similarly I went into ArduinoCore/src/core and did a right click and remove of the "math_helper.c" source file. After this the solution built fine and I was able to completely debug the arduino sketch.

I will note also that this was done after the steps for updating paths and optimization detailed in the instructional guide linked to a few posts back. Just wanted to be clear that those steps were taken prior to removal of the troublesome files.

dgube1
 
Posts: 7
Joined: Sat Jan 21, 2017 6:46 pm

Re: Getting errors when trying to debug samd boards

by adafruit_support_carter on Wed Feb 27, 2019 8:37 pm

Awesome, thanks. If you could screen cap this:
In the Solution Explorer in the dropdown file system shown I went into ArduinoCore/include/core and did a right click and remove of the "math_helper.h" header file

We'll add that as well.

Sounds like adding it to the bottom of this page is where this new info should go:
https://learn.adafruit.com/proper-step- ... imizations

adafruit_support_carter
 
Posts: 11467
Joined: Tue Nov 29, 2016 2:45 pm

Re: Getting errors when trying to debug samd boards

by dgube1 on Wed Feb 27, 2019 10:53 pm

Sure thing thanks again and glad to help!
Attachments
remove_math_helper_header.png
remove_math_helper_header.png (103.88 KiB) Viewed 106 times

dgube1
 
Posts: 7
Joined: Sat Jan 21, 2017 6:46 pm

Re: Getting errors when trying to debug samd boards

by adafruit2 on Thu Feb 28, 2019 12:57 pm

awesome, thank you its in the guide for others!

adafruit2
Site Admin
 
Posts: 18396
Joined: Fri Mar 11, 2005 7:36 pm

Re: Getting errors when trying to debug samd boards

by Nortont on Tue Mar 05, 2019 5:14 am

Thank you for finding the solution to this.
I only just started to test my Segger J-Link and was pulling my hair out.

Can I suggest you ad a note on this page
https://learn.adafruit.com/proper-step- ... m0/lets-go
to let people know if they get this error to follow the process on this page.
https://learn.adafruit.com/proper-step- ... imizations

That would have saved me about 90 minutes or messing around.

Nortont
 
Posts: 19
Joined: Mon Jan 02, 2017 9:36 am

Re: Getting errors when trying to debug samd boards

by adafruit_support_carter on Tue Mar 05, 2019 1:20 pm

Sure - we should put that info wherever it makes the most sense. I put it here:
https://learn.adafruit.com/proper-step- ... rrors-4-22
based on:
I will note also that this was done after the steps for updating paths and optimization detailed in the instructional guide linked to a few posts back.

But it sounds like maybe that entire section should get moved?
@Nortont - Would it be better to locate that entire section at the bottom of the Let's go! page? Instead of just a note to look on the other page?

adafruit_support_carter
 
Posts: 11467
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.