Split from: Butterfly on Windows 10 problems.

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

I was JUST about to start my education on C for micro controllers with a Windows 10 machine and a Butterfly.  After reading this post and seeing the guy that literally wrote the book on the subject is having trouble, I am apprehensive.  As I already have a Butterfly I would like to use it somehow.

 

If I install the AVR studio 4.18, is there a reason to use WinAVR or should I use the AVR tools? (As6 Toolchain or something else)

 

These questions may not make sense as I don't really understand what I'm talking about.  I have been searching the forum and see that AVR studio 4.19 appears problematic and I should try 4.18. 

 

Is there a comparable device/learning resource to the Butterfly but on the modern tools available?  

 

  

Last Edited: Sun. Mar 5, 2017 - 11:21 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Arduino has taken over as the go-to starter for micro controllers!

We pro's use them all the time as well!

 

Pick up an Arduino Uno or clone and have fun.

 

Jim

 

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

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

Thank you for the quick reply.  I admit I dont understand what makes an Arduino and Arduino.  I'll have to study that.

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

The Arduino has a simple to use USB bootloader, making it easy to upload programs (sketches they call them) and has simplified the user interface, not that your are restricted to using it. Programming language is C/C++ and LOTS of online support for just about any device you can imagine connecting to a micro.

The IDE is supported by the three major OS, (Win, MAC, and Linux) take your pick!

 

Jim

 

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

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

flyingblindonar... wrote:
I have been searching the forum and see that AVR studio 4.19 appears problematic and I should try 4.18.
https://www.avrfreaks.net/forum/studio-419-build-730-windows-10

flyingblindonar... wrote:
Is there a comparable device/learning resource to the Butterfly but on the modern tools available?
Maybe more information in https://www.avrfreaks.net/forum/atmel-and-avr-status

 

"Dare to be naïve." - Buckminster Fuller

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

Note that the Butterfly is still a great little board with several peripherals for experimenting and learning.

 

One could use an inexpensive Arduino-whatever, with its built-in USB interface, as an ISP programmer to program a Butterfly through a 6-Pin header, instead of through its own RS-232 serial interface.

 

JC

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

So I also have a usb-serial adapter and an AVRISP.  I realize this is very old stuff.  Its what I got.  Just trying to figure out how to use it.  What versions of AVR studio would I need to get that running?

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

flyingblindonar... wrote:
So I also have a usb-serial adapter and an AVRISP. ...  What versions of AVR studio would I need to get that running?
An AVR Studio 4 for AVR Studio 5 does not have AVRISP (does have AVRISP2)

http://www.atmel.com/Images/as5installer-stable-5.1.208-readme.pdf

(page 10)

Supported Devices

The following tables lists all supported tools and devices.

...

via

Atmel

Studio Archive

http://www.atmel.com/tools/STUDIOARCHIVE.aspx

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Sat. Mar 4, 2017 - 01:29 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

Going further and further back, WinAVR 20040404 and AVR Studio 4.09, I have gotten very close to a successful compile.  I am going that far back because smiley used those versions with his Butterfly tutorial.

 

I found the thread that provided a new msys-1.0.dll which helped.

 

​I started with Blinky.c and a makefile.  After the compile I have the following in my project directory

 

.dep
Blinky.c
Blinky.eep
Blinky.elf
Blinky.hex
Blinky.lss
Blinky.lst
Blinky.map
Blinky.o
Blinky.sym
makefile

 

I have this output from Programmer notepad 2 after running the make all

 

> "make.exe" all

-------- begin --------
avr-gcc (GCC) 3.3.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: Blinky.c
avr-gcc -c -mmcu=atmega169 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=Blinky.lst  -std=gnu99 -Wp,-M,-MP,-MT,Blinky.o,-MF,.dep/Blinky.o.d Blinky.c -o Blinky.o

Linking: Blinky.elf
avr-gcc -mmcu=atmega169 -I. -g -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -Wall -Wstrict-prototypes -Wa,-adhlns=Blinky.o  -std=gnu99 -Wp,-M,-MP,-MT,Blinky.o,-MF,.dep/Blinky.elf.d Blinky.o   --output Blinky.elf -Wl,-Map=Blinky.map,--cref  -lm

Creating load file for Flash: Blinky.hex
avr-objcopy -O ihex -R .eeprom Blinky.elf Blinky.hex

Creating load file for EEPROM: Blinky.eep
avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
--change-section-lma .eeprom=0 -O ihex Blinky.elf Blinky.eep

Creating Extended Listing: Blinky.lss
avr-objdump -h -S Blinky.elf > Blinky.lss

Creating Symbol Table: Blinky.sym
avr-nm -n Blinky.elf > Blinky.sym
C:\Users\waid7\AppData\Local\Temp\make410020.sh: /c/WinAVR/bin/avr-nm: Invalid argument
make.exe: *** [Blinky.sym] Error 126

> Process Exit Code: 2

 

Any Ideas?

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

"Dare to be naïve." - Buckminster Fuller

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

You're trying to help me and I appreciate that.  The rock layers that surround my little walnut brain are so numerous and thick that it is going to take a while before this information is able to penetrate.  I see now how one could read the error message and attempt to make some sense of it.  From what you've shown me "avr-nm -n ​" does appear to be an option to list symbols numerically.  I admit that I have no idea what this means nor do I understand if its even a real problem. 

 

I don't want to hijack this thread for my own problems which appear to have the beginnings of wondering off topic and getting lost in the wilderness.  I should perhaps request assistance with this in a new post. * Split off so as to avoid another thread. Moderator *

 

Thanks a lot.

Flash Gordon

Last Edited: Sun. Mar 5, 2017 - 11:22 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

As the moderator has been kind enough to split this off, I guess I'm free to continue begging for help?

 

Why does error reference this path?

 

Creating Symbol Table: Blinky.sym
avr-nm -n Blinky.elf > Blinky.sym
C:\Users\waid7\AppData\Local\Temp\make410020.sh: /c/WinAVR/bin/avr-nm: Invalid argument
make.exe: *** [Blinky.sym] Error 126

> Process Exit Code: 2

 

My environment variable for WinAVR is set as a system variable but that path listed in the error is listed in the user variables.  Could my issue be an improper environment variable?

 

Thanks

 

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

I tried screwing around with the user environment variable and it made no difference.  But I do have good news, I just saved a bunch of money on car insurance.

 

I really do have good news I think... I am able to run the blinky program on AVR 4.09 and see the PORTD boxes blink as expected.  Does this mean its working?

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

Wait holy poop! it was an environment variable issue.  Its working now and builds clean.