AVR Programming on MAC

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

Hello,

 

I've been programming on Arduino for sometime, and now I am starting to learn how to program the ATmega328 using AVR-C and an AVR programmer..

unfortunately it seems the process is a bit more complicated on mac (I am currently using OS X El capitan version 10.11.6) since there's no Atmel studio on mac.

I've found some resources online but it seems many of them are outdated.

 

so my question is, is anyone here doing AVR programming on mac? and I'd really appreciate it if anyone can provide me with links for the tools I need (IDE, etc..) so I can start writing C code and upload them to the ATMega through the USB AVR programmer that I have.

 

Thanks,

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

The Arduino installation already has avr-gcc for you. You can simply use native constructs on Arduino.

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

Arduino gets the program into the device but you get NO simulation or debugging. So, with a Mac, you are a second class citizen. Basically same problem with CodeBlocks and other IDEs for gcc.

 

I got a Win laptop, talk to it with TeamViewer & DropBox, and do almost everything "on" my Mac, especially editing with good editor like TextWrangler.

 

Jim

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

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

terminator1 wrote:
I've found some resources online but it seems many of them are outdated.
CrossPack can be built via Xcode 5 :

https://github.com/obdev/CrossPack-AVR (AVR GCC 4.9.2 plus Atmel 3.5.4, AVaRICE 2.13, AVRDUDE 6.3)

via

https://www.obdev.at/products/crosspack/index.html

 

AVR Arduino is supported in embedXcode :

http://embedxcode.weebly.com/supported-boards-and-ides.html

IIRC from an older operator's manual, embedXcode has an AVR GDB command line interface (no Xcode GDB GUI)

Might browse its current manual for debugger capabilities.

 

PlatformIO can run on macOS but AVR GDB was removed :

http://platformio.org/platforms/atmelavr

A recent update added ATmega328PB.

PlatformIO doesn't have an Xcode integration though it may integrate with other macOS compatible IDE :
http://docs.platformio.org/en/latest/ide.html

 


https://github.com/obdev/CrossPack-AVR/blob/master/mkdist.sh

http://embedxcode.weebly.com/download.html

 

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

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

But none of those gives you debugging (or "only" GDB)!

 

Jim

 

Jim Wagner Oregon Research Electronics, Consulting Div. Tangent, OR, USA http://www.orelectronics.net

Last Edited: Sat. Aug 12, 2017 - 08:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

have to wait a bit, until MPLABX fully intergrades AVR  check -> http://www.avrfreaks.net/forum/c...

MPLAbX is cross compiled between WIN/ MAC / LINUX

Last Edited: Sat. Aug 12, 2017 - 08:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

A build of CrossPack appears to have AVR GDB and AVaRICE.

embedXcode has a GDB interface though not integrated into Xcode.

 

https://github.com/obdev/CrossPack-AVR/blob/master/mkdist.sh

embedXcode

Editions

http://embedxcode.weebly.com/editions.html

(embedXcode+, Additional Features, External debugger)

 

Edit : typo

 

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

Last Edited: Sat. Aug 12, 2017 - 08:04 PM