Contribute
Register

AVR Development on Mac

Joined
Feb 10, 2011
Messages
2,287
Motherboard
Gigabyte GA-H55M-UD2H
CPU
i3-540
Graphics
8800GS
Classic Mac
PowerBook
I have done AVR development using AVR Studio (Windows only) using primarily assembler for the last 5 or 6 years and wish to move future development onto my Mac so I can dump the Windows machine.

I currently use the AVRISP2 programmer and would like to be able to program the fuses as well as flash and the EEPROM.

Any suggestions as to whether Crosspack, MacPorts or another programming environment is the best, easiest to get up and running?

Thanks for any ideas, suggestions, experience pro or con.
 
Joined
Feb 10, 2011
Messages
2,287
Motherboard
Gigabyte GA-H55M-UD2H
CPU
i3-540
Graphics
8800GS
Classic Mac
PowerBook
I am surprised no one is doing AVR development on a Hackintosh....

If you are and missed my earlier post I am still interested in hearing opinions on Crosspack vs MacPorts or running XCode vs Eclipse as an IDE.

Thank you!
 
Joined
Jan 12, 2011
Messages
2
Motherboard
10.6.8
CPU
Core 2 Duo @ 2,6GHz
Graphics
NVidia Geforce GT9600
Mac
MacBook Air
Classic Mac
Mobile Phone
iOS
Sorry, I haven't see your message.

For my avr development i use:
C development:
Crosspack with XCode IDE, work perfectly.
I use a USBASP programmer and i can program flash eeprom and fuse.
I don't know AVRISP2 but if it works with avrdude it should work.
Flash and EEPROM are easy to program from XCode (Built button) just write the good makefile. they are a lot of example on inthernet.
Without JTAG it 's not possible to debug.

ASM development:
I use avra, easy to compile it on OSX.
Chip program with avrdude and USBASP too.
For editor and IDE, I use FRAISE or SMULTRON it's two names for the same program. Because it's in French.
With a special configuration file, it' s possible to colorized the AVR instructions. I could give it to you if you want.

Everything works on a hackintosh.

Sorry for my poor english.
 
Joined
Feb 10, 2011
Messages
2,287
Motherboard
Gigabyte GA-H55M-UD2H
CPU
i3-540
Graphics
8800GS
Classic Mac
PowerBook
jclaude said:
Sorry, I haven't see your message.

For my avr development i use:
C development:
Crosspack with XCode IDE, work perfectly.
I use a USBASP programmer and i can program flash eeprom and fuse.
I don't know AVRISP2 but if it works with avrdude it should work.
Flash and EEPROM are easy to program from XCode (Built button) just write the good makefile. they are a lot of example on inthernet.
Without JTAG it 's not possible to debug.

ASM development:
I use avra, easy to compile it on OSX.
Chip program with avrdude and USBASP too.
For editor and IDE, I use FRAISE or SMULTRON it's two names for the same program. Because it's in French.
With a special configuration file, it' s possible to colorized the AVR instructions. I could give it to you if you want.

Everything works on a hackintosh.

Sorry for my poor english.
Thank you! I was slowly coming to the conclusion that Crosspack was the best (most recently updated and complete) program (Marrin AVR Project is newer but not yet complete and LadyAda suggests EITHER Crosspack OR XCODE + OSX-AVR). I wasn't sure about using XCode with it. Did you install Crosspack and XCode in any specific sequence with any scripts or templates? I didn't find any that stood out as the best choice.

I see that I have a makefile template from psycholgenic, though it is from 2003....

I was considering using avr-as that is built-in to gcc as I read that avra doesn't support avrsm2. Perhaps that referred to the older version? I see that that was referring to an older version of someones code, avra appears to support avrsm2.

Have you tried AVRFuses?

I will check out FRAISE and SMULTRON. Years ago I built a codeless language plug-in for TextWrangler, it still works in the current version. I have attached it in case you want to give it a look. I previously used it to write code on my Mac and transfer it to AVRStudio.

Thank you again, your English is fine!
 

Attachments

Joined
Jan 12, 2011
Messages
2
Motherboard
10.6.8
CPU
Core 2 Duo @ 2,6GHz
Graphics
NVidia Geforce GT9600
Mac
MacBook Air
Classic Mac
Mobile Phone
iOS
Thank you for your plug-in, the only why i use Fraise is the french interface, TextWrangler is more complete but only in english.
I have written some applescripts who permit to compile and load the program from TextWrangler.I certainly get it somewhere. If you are interesting.

I attach a file with templates for the use of Xcode and CrossPack. Try it , read makefile.
Really very easy to use.
I also put a mini c projet for sample.

I use this tools everyday, but when i make a project i use only 1 version of each tools so it's not the last one, but it's works!!!

ASM in GCC is not atmel standard, i don't like to use it, and it's very difficult to use some feature with it, so i use it only if i need some asm lines in a C project.

For small AVR processor (attiny) i prefer to use a pure asm tools.
the difference between AVRASM and AVRASM2 are not so big, and some of the new features are already include in AVRA. AVRA = AVRASM1.5.
And most important thing i use it since 6 years, i know it...

Fuses are very important, i don't like to use tools like AVRFuses, i prefer to spend a lot of time to write the right command line (read my makefile). After that the command is a part of the project.

Now i test a simulation tool, but it's really in early stage of development: MacSimAVR
 

Attachments

Joined
Feb 10, 2011
Messages
2,287
Motherboard
Gigabyte GA-H55M-UD2H
CPU
i3-540
Graphics
8800GS
Classic Mac
PowerBook
Thank you! Where do I put the TemplateProject folder?

I have installed XCode, Crosspack, Make Templates from Psychologic and AVRA....so now I just need to figure out how to take one of my older assembler programs and get it to compile, build and install. Having used AVRStudio for the duration, it will be a bit of adjustment to think command line, makefiles and such.

Good advice on GCC assembler, i had sensed that it was more an afterthought in GCC and not designed for easy full-time use.
 
Joined
Feb 10, 2011
Messages
2,287
Motherboard
Gigabyte GA-H55M-UD2H
CPU
i3-540
Graphics
8800GS
Classic Mac
PowerBook
I have managed to finally get all the pieces working. If anyone else needs help getting an AVR assembler tool chain working, let me know.

Crosspack and XCode will take care of your C programming, but I have always used assembler and the GCC assembler is not really easy to use for a full on assembler program as well as not being compatible with AVRStudio assembler.

Both AVRA and GAVRASM can compile AVRStudio programs with slight modifications to the source code and some simple syntax modifications. Slight, but not necessarily obvious or quick to figure out.

GAVRASM comes a ready to install binary. A bit of terminal work to install it in /usr/bin is all it takes.

AVRA is a bit more work to compile and install. Get the latest GIT version (which fixes some warnings about newline characters) and compile it yourself, but don't use the script they ship without modifying it or it will hose your HDD. If you need an modified script, I can send it to you with instructions....I original works with any OS, the updated only Mac OSX taking into account that downloaded files already unzip in the Download folder. You also use terminal to install it in /usr/bin.

AVRFuses takes care of the rest accessing AVRDude in Crosspack.

You can write/modify your assembler in either XCode or TextWrangler for which I have written a codeless language module. I have an AVRISP ll but other programmers should work.

If enough people are interested I will put together a short guide.
 
Joined
Feb 5, 2016
Messages
2
Motherboard
A1502
CPU
Macbook Pro
Graphics
Iris GRaphics 6100
Mac
Classic Mac
Mobile Phone
Captura de pantalla 2016-02-04 a las 9.23.03.pngCaptura de pantalla 2016-02-04 a las 19.12.54.png
Hello dudes,
I'm new with micro's, I've just bought an atMEGA88pa and an atMEGA328p, and I also bought an USBasp as programmer, but I can't use them, I mean, I have installed CrossPack, and opened the terminal and tried to upload my .hex file (avrdude -c usbasp -p m328p U flash:w:xxx.hex), but the first capture appears, then I made some research and found that I needed to install the usbasp driver (libusb), but don't know how to (second capture); I'm stuck and don't want to install windows to my mac, anyway I'll appreciate any help you could give me, greetings. :confused:
 
Top