debugger for attiny 6pin

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi - Is there a way to debug attiny 6pin? ( ATtiny4, ATtiny5, ATtiny9, ATtiny10 )

I saw the datasheet ( ATtiny4/5/9/10 ) - it only supports "TPI" ( And "TPI" is for programming only and not for debugging )

This topic has a solution.

mahdi damirchilu, my blog : dmf313

Last Edited: Fri. Jun 28, 2019 - 05:00 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For a part that small, just look at your listing & figure out your error---you couldn't have more than a 100 lines of code.

 

What's the error?

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I checked out all 8-bit avrs ( tiny / mega / xmega ).
And all micro have at least one debugging method.
Except this 4 micro ( ATtiny4/5/9/10 - with 6 pins ) that have no debugging methods ( I did not find, This is a better statement )

mahdi damirchilu, my blog : dmf313

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

md3848 wrote:
hi - Is there a way to debug attiny 6pin? ( ATtiny4, ATtiny5, ATtiny9, ATtiny10 )
Nope.  Those don't have any OCD (on-chip debugger).  You'll have to debug in the simulator.

 

avrcandies wrote:
you couldn't have more than a 100 lines of code.
In C, maybe.  Much less in fact.

 

In assembler, the 512-byte t4/5 have 256 instruction words.

 

But I agree.  Can be done in your head.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks to all the friends.

mahdi damirchilu, my blog : dmf313

Last Edited: Fri. Jun 28, 2019 - 05:15 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For a part that small, just look at your listing & figure out your error

The other commonly used alternative is to debug using a larger chip that DOES have some sort of on-chip debug.

The tiny tinys do have some unique limitations, so there's a certain amount of care you'll have to take not to use non-tinytiny features, and if you're using interrupts you may have to fiddle with the vector table...

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

ATmega8, ATmega8515, ATmega8535 have no on-chip-debug.
The ATmega8 is still commonly used.
.
I suggest that you develop on a better device. Then rebuild for the cheapest suitable target that is available in your country.
.
David.

Last Edited: Fri. Jun 28, 2019 - 06:49 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

david.prentice wrote:
ATmega8, ATmega8515, ATmega8535 have no on-chip-debug. The ATmega8 is still commonly used. . I suggest that you develop on a better device. Then rebuild for the cheapest suitable target that is available in your country. . David.

The full list is as follows : 

ATtiny4
ATtiny5
ATtiny9
ATtiny10
ATmega8/A/L
ATmega8515/L
ATmega8535/L

laugh

 

I suggest that you develop on a better device. Then rebuild for the cheapest suitable target that is available in your country.

this is good idea yes

mahdi damirchilu, my blog : dmf313

Last Edited: Fri. Jun 28, 2019 - 07:41 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

md3848 wrote:
The full list is as follows
Err no. There are far more AVRs that do not have a debug interface. All the AT90S ones for a start.

 

If you are starting out with AVRs perhaps consider the 40 pin DIP packaged 164/324/644/1284P series. They all have JTAG which is probably the easiest to use debug interface. The chips also generally have at least "one of everything" that you can find in most mainstream AVRs so they make a good place to learn.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I meant only series tiny, mega, and xmega - Not all avr with cpu 8-bit

mahdi damirchilu, my blog : dmf313

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So did I. 

 

For one thing I can't think of any "Tiny" that has a debug interface (this is part of what makes them "tiny"/cheap!). But there are "mega"s besides the ones you listed that don't have debug either as I say anything with a model name that starts AT90S is so old as to predate debug interfaces.

 

I forget how many 8bit "AVR" there are these days - perhaps around 350? There's at least 50..100 of them that don't offer a debug interface.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

joeymorin wrote:

 

 

avrcandies wrote:

you couldn't have more than a 100 lines of code.

In C, maybe.  Much less in fact.

While I agree that the address space at 250 or 500 words is quite limited, can you give me any basis for this "much less than 100 lines of C"?  How do you count?  Are you doing Obfuscated C contest with everything on one line?

 

I suspect the statement could be more accurately states something like this:  "The toolchain that I know and love, with infinite value, does not play well with brain-dead AVR models, and couldn't fit anything useful into the Tiny10 family -- much less Tiny4/5."  That doesn't mean anything about "C".  Sure, any competent or guru ASM programmer would find a way with enough time and effort to pack a bit more into the code space.  But that doesn't necessarily mean that a C implementation of the same app wouldn't be feasible.  BTW, how many lines of code will your ASM implementation take?

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

Last Edited: Fri. Jun 28, 2019 - 01:38 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
how many lines of code will your ASM implementation take?
I have an ATtiny4 app with almost 600 NCLOC, including macros, directives, labels, etc. 248 instruction words, 16 bytes of LUT. 100% flash use.
clawson wrote:
I can't think of any "Tiny" that has a debug interface
ATtiny25/45/85 have DW.

"Experience is what enables you to recognise a mistake the second time you make it."

"Good judgement comes from experience.  Experience comes from bad judgement."

"Wisdom is always wont to arrive late, and to be a little approximate on first possession."

"When you hear hoofbeats, think horses, not unicorns."

"Fast.  Cheap.  Good.  Pick two."

"We see a lot of arses on handlebars around here." - [J Ekdahl]

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

joeymorin wrote:

I have an ATtiny4 app with almost 600 NCLOC, including macros, directives, labels, etc. 248 instruction words, 16 bytes of LUT. 100% flash use.

So you guys are saying that a C implementation would take how many lines of C?  Or is the implicit claim that it can't be done?

 

In the below fragment, the ASM action code has twice as many lines as the C implementation.  Is that good or bad?  I could spread it out with a token on each line.

int accumulator;
int increment;
...
    accumulator += increment;
...
                 ;0000 000B     accumulator += increment;
                +
000022 0f24     +ADD R18 , R20
000023 1f35     +ADC R19 , R21
 

 

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I don’t think we’re dealing with absolutes here as a LOC is nebulous at best. Nevertheless, as a guestimation, the likelihood of the avg 100 lines of C fitting into a small memory device is not looking good but not impossible.