atmel device description xml, python and clawson

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

IIRC, earlier this month, clawson posted a link to good information on handling Amel's device description xml files with python.

The post I am thinking of misspelled python.

So far, I have not been able to find it again.

Perhaps someone, e.g. clawson, would be kind enough to help.

"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then." -- John Woods

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

The key-word I know (but there's no reason you should) is "avrrread" which led me to:

 

https://www.avrfreaks.net/forum/b...

 

I have a rather worrying habit of mis-spelling Python (happens almost every time I try to google a question about it). I think it's the way I type it and the key-rollover limit of my keyboard.

 

EDIT: forgot to mention - project sit (and SVN) is here:

 

https://spaces.atmel.com/gf/proj...

Last Edited: Fri. Jul 22, 2016 - 05:15 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Clawson seems to code in a 120 character wide window.  :-(

 

Are argparse and print the Python 3-specific things in the code?

 

 

How do you know if you're a pirate?

"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then." -- John Woods

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

It's probably just print/argparse but to be honest I haven't given it a lot of thought as I only ever write for 3 not 2.

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

skeeve wrote:
Clawson seems to code in a 120 character wide window. 

Seems perfectly reasonable to me - even the good ol' VT100 could cope with that way back in the 1980's !!

 

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The funny thing is that usually I do write to just column 80 and Pycharm, the IDE I use for Python has a default rule that nags you if lines go past 80 but for this particular code I'm afraid I moved it to 120 as there were some fairly complex lines and a lot of indentation. It should probably be refactored to reduce the cyclomatic complexity. It's true these rules exist to make code more readable and maintainable but the whole thing was written as a "quick and dirty" :-) 

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

awneil wrote:
skeeve wrote:
Clawson seems to code in a 120 character wide window. 

Seems perfectly reasonable to me - even the good ol' VT100 could cope with that way back in the 1980's !!

To me, too, until I want to print.

I can, if I work at it, but the result is annoying to read.

 

skeeve wrote:
How do you know if you're a pirate?
You just arrr,

"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then." -- John Woods

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

skeeve wrote:

skeeve wrote:

How do you know if you're a pirate?

You just arrr,

Very grateful I wasn't drinking anything as a read that.

 

I wondered why you'd asked in the first place, then saw Cliff's keyword typo in #2 :)

"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:
skeeve wrote:

skeeve wrote:

How do you know if you're a pirate?

You just arrr,

Very grateful I wasn't drinking anything as a read that.

 

I wondered why you'd asked in the first place, then saw Cliff's keyword typo in #2 :)

'Tain't mine.

Got it from the riddle guy at the Minnesota Renaissance Festival.

"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then." -- John Woods

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

Does one need to install avr-studio to get the atdf files?

I'm running linux.

I've downloaded both binaries and sources for the GNU AVR toolchain.

I've unpacked the latter.

If they are there, I am not finding them.

"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then." -- John Woods

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

Does one need to install avr-studio to get the atdf files?

I believe so, and my previous efforts to use Linux tools to decompress and spelunk the Studio installer have failed.  I haven't tried recently, however.

 

"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]