Author Topic: debugging and AVR  (Read 12207 times)

0 Members and 1 Guest are viewing this topic.

Offline Kostas

  • Regular Contributor
  • *
  • Posts: 71
  • Country: gr
Re: debugging and AVR
« Reply #25 on: September 09, 2014, 10:19:20 am »
Atmel Studio might be bloatware, but you have the option to uninstall many of its components, therefore getting back quite a lot of disk space, if its important to you. For instance, you can uninstall any of the AVR32, AVR8 and ARM toolchains independently. You can also uninstall the Atmel Software Foundation (ASF) stuff completely if you're not interested, which will not only reduce disk usage, but also somewhat shorten startup time.
 

Offline Bukurat

  • Regular Contributor
  • *
  • Posts: 65
  • Country: au
Re: debugging and AVR
« Reply #26 on: September 09, 2014, 11:47:30 am »


By the way - AFAIK you cannot debug arduino, with or without debugger.

AFAIK Arduino isn't an MCU or a programming language. It's a platform.

If you move away away from the Ardrino IDE to either Atmel Studio or Visual Studio and add the visual micro addon  and pay the man a few dollars you can debug code running on any of the Atmel MCUs.

 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17838
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: debugging and AVR
« Reply #27 on: September 09, 2014, 11:49:50 am »
The thing is if you want to debug an arduino it's probably time you moved to atmel studio and C as most of your debug points of the data you get will be form arduino platform code and libraries and not your own.
 

Offline Kostas

  • Regular Contributor
  • *
  • Posts: 71
  • Country: gr
Re: debugging and AVR
« Reply #28 on: September 09, 2014, 12:07:54 pm »


By the way - AFAIK you cannot debug arduino, with or without debugger.

AFAIK Arduino isn't an MCU or a programming language. It's a platform.

If you move away away from the Ardrino IDE to either Atmel Studio or Visual Studio and add the visual micro addon  and pay the man a few dollars you can debug code running on any of the Atmel MCUs.

It's not the ic on an arduino that can't be debugged; the ATMega328 supports debugwire. It is the way the arduino is designed that it has to be modified in order to be used with a debugger like the AVR Dragon. IIRC you need to remove a capacitor, or cut a trace, or whatever it might be (I never had an arduino).
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1289
  • Country: fi
Re: debugging and AVR
« Reply #29 on: September 09, 2014, 12:43:54 pm »
There are many different Arduinos but at least the Uno should support bog standard Atmel debugwire without modification. It has the standard 6 pin header with all the signals in place. There is a connection from the reset line to the auxiliary USB processor but that should not cause any issues as far as i can see.
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline Bukurat

  • Regular Contributor
  • *
  • Posts: 65
  • Country: au
Re: debugging and AVR
« Reply #30 on: September 10, 2014, 06:50:07 am »
There are many different Arduinos but at least the Uno should support bog standard Atmel debugwire without modification. It has the standard 6 pin header with all the signals in place. There is a connection from the reset line to the auxiliary USB processor but that should not cause any issues as far as i can see.

Looks like the mod is simple. Cut a track between two specially prepared  pads and optionally install a jumper.
http://www.hilltop-cottage.info/blogs/adam/debugging-arduino-using-debugwire-atmel-studio-and-an-avr-dragon/
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1289
  • Country: fi
Re: debugging and AVR
« Reply #31 on: September 10, 2014, 09:18:03 am »
Actually you (and the link) are correct, of course. I failed to consider that the other end of the cap is not floating but tied to something - probably logic high. So it will potentially affect the reset signal from the debugger...
Nothing sings like a kilovolt.
Dr W. Bishop
 

Offline Bukurat

  • Regular Contributor
  • *
  • Posts: 65
  • Country: au
Re: debugging and AVR
« Reply #32 on: September 11, 2014, 01:09:41 am »
Actually you (and the link) are correct, of course. I failed to consider that the other end of the cap is not floating but tied to something - probably logic high. So it will potentially affect the reset signal from the debugger...

From I've read in places, the cap is there to provide a reset pulse when a new program is being loaded. It saves having to press the reset button on the board.
 

Offline Kremmen

  • Super Contributor
  • ***
  • Posts: 1289
  • Country: fi
Re: debugging and AVR
« Reply #33 on: September 11, 2014, 06:34:06 am »
Exactly. The pulse is generated by the auxiliary USB processor upon progam load and that's where i made my careless mistake. The cap of course isolates the processor signal lines so there is no impact in the DC domain, but the reset pulse from the debugger will see the cap since there is the output impedance of the aux processor I/O line on the other side of the cap. Thus it can/will distort the reset pulse unless the cap is defeated somehow.
Nothing sings like a kilovolt.
Dr W. Bishop
 

Online SimonTopic starter

  • Global Moderator
  • *****
  • Posts: 17838
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: debugging and AVR
« Reply #34 on: September 11, 2014, 06:48:36 am »
When i read about debug wire in the atmega168 datasheet they were clear that there couldnot be a capacitor and stated that at least 10K should be the value of the reset pin pullup.

I have blown an AVRISP MK2 before trying to program lines that had too little resistance on them, I don't know if the ICE is equally "fragile"
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf