Author Topic: Debugging arduino programs using for instance ATMEL-ICE  (Read 1340 times)

0 Members and 1 Guest are viewing this topic.

Offline cdwijsTopic starter

  • Regular Contributor
  • *
  • Posts: 57
Debugging arduino programs using for instance ATMEL-ICE
« on: August 03, 2018, 08:07:19 am »
Hi All,

I am used to make electronic devices based on an Atmel microcontroller, using Atmel studio and C. I don't use any software libraries, everything is programmed from the ground up. Also the PCB's are hand made by me.

This works, but it has a couple of drawbacks:
1-This means if something goes wrong, I have to figure out all the problems myself.
2-As my code is not prepared to use libraries, it's hard to integrate them into my program. This often means I only use libraries as a reference, while re-coding them. During this process I introduce new bugs, as I do not yet understand the library.
3-The hand-written code is made for one processor. If I want a different processor, I have to re-write a good portion of the program.
4-I can't buy PCB's with the microcontroller on it. It's time consuming to route etch (or order) a PCB, and solder the parts on them.

Enter Arduino. In theory, it solves my problems:
1) Many people know the code, so I can ask questions on the various forums.
2) As many people have made libraries for Arduino, it's easy to integrate them.
3) Many Arduino libraries are made for all the micro controllers that re on the various Arduino boards, so porting is usually no problem.
4) I can buy standard PCB's, so I only have to create daughter boards if I want to do funky stuff.

In practice, Arduino has its own share of problems:
5) The official Arduino IDE does not have the editing facilities that Atmel studio has like code completion, code highlighting and so on.
6) The official Arduino IDE does not support on-chip debugging. With Atmel studio, I can use my hardware debuggers to set breakpoints, inspect and modify the RAM contents, step through the code and so on.
7) To try to solve 6, by importing an Arduino sketch in Atmel studio. This sometimes works, but sometimes, the importer makes mistakes, causing compiler errors. As Atmel studio is a closed source program, nobody except Atmel can fix this.

Therefore I am looking for a way to:
a) Use the Arduino libraries, as it provides functionality without having to code them myself.
b) Use my debugger, as I make mistakes that i would like to be able to observe.

Does anybody know a solution for this?

Cheers,
Cedric
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->