Author Topic: programming on mac.  (Read 5035 times)

0 Members and 1 Guest are viewing this topic.

Offline ishkaTopic starter

  • Jr. Member
  • **
  • Posts: 38
  • Helpful? 0
programming on mac.
« on: April 30, 2008, 02:40:18 AM »
Hi

It's been a long time I'm looking for an intuitive system to program atmel microcontroller on a mac.
I found many things but don't know which actually works, and which i need ( both hardware and software are a bit misleading for a newbie like me)

I work on a powerbook G4 with MacOs10.5, no serial port ofc. Notice i live in Belgium (Europe) which lead to low robotics presence ( means : few help, few components dealer, even fewer place where i can meet someone to ask my questions)

I find this webpage : http://www.eecs.berkeley.edu/~mseeman/resources/macmicro.html
which seems to give me all i need. Problem is : I'm not English native speaker so perhaps don't understand all it says. Second is it seems to be a little bit outdated. Will it work with leopard or not?

Let's check if i have understood all it says :
I need to dl avr-gcc and install it. then i need to install Xcode ( already done as I'm learning the basics of C). Then i have to dl binutils, gcc and avr-libc.
Then i have to compile those files. That's where I'm stuck : i believe i have to do so in the terminal but i don't understand what it does.
Well, when i got all those files, where do i find which does what? I believe i have to write my code in Xcode, but then ??? how to compile them in avr-langage?

Then is the hardware questions : what works the best and the easiest to do/find : serial programmer + usb-serial adapter or an usb programmer. I also read the UART tutorial but i did it quite fast so i didn't catch all. Can this protocol be used to program my micro on a mac directly? think i remember have read that i need to program my micro before being able to use UART.

Well, first ty for all those who have read my pity English so far, and for reading those perhaps newbish questions. And ty for all your responses.
« Last Edit: April 30, 2008, 03:41:57 AM by ishka »
May the Achtuche be with you...

Offline ccarlson

  • Beginner
  • *
  • Posts: 3
  • Helpful? 0
Re: programming on mac.
« Reply #1 on: April 30, 2008, 12:41:11 PM »
I'd recommend reading Lady Ada's AVR Tutorial, including the Mac-specific setup.

I purchased one of her USBTinyISP programmers and have been very pleased with it.

Offline ishkaTopic starter

  • Jr. Member
  • **
  • Posts: 38
  • Helpful? 0
Re: programming on mac.
« Reply #2 on: April 30, 2008, 05:33:01 PM »
Thanx it looks far more clear to me. Gonna try it.
May the Achtuche be with you...

Offline pomprocker

  • Supreme Robot
  • *****
  • Posts: 1,430
  • Helpful? 16
  • Sorry miss, I was giving myself an oil-job.
Re: programming on mac.
« Reply #3 on: May 06, 2008, 11:36:51 AM »
If you setup UART, then you can use the MAC OS X terminal and run the command 'screen' for a hyperterminal type program. Please google for a tutorial on screen.

Then you would just have to upload the hex files.

the way you get a hex file is you need a compiler that is specific to avr products  that goes from what ever language to whatever MCU you have.

a good place to start looking for the right compiler is on the avr website.

Here is someone working on MacAVR http://www.harbaum.org/till/macavr/index.shtml




Offline SixRingz

  • Full Member
  • ***
  • Posts: 76
  • Helpful? 0
  • Bit's and pc's = Robot.
Re: programming on mac.
« Reply #4 on: May 24, 2008, 06:44:40 PM »
Check out Macpack:

http://www.obdev.at/products/avrmacpack/download-de.html

I downloaded it yesterday to my Macbook and it worked like a charm! There's a nifty installer and all so just follow the instructions on the readme page. What you need to change is basically the makefile. Here's an example of how mine look like: (type avrdude help to see all the options for the programmer)

DEVICE     = atmega16
CLOCK      = 8000000
PROGRAMMER = -c stk500v2 -P /dev/tty.usbserial-FT3GHI7VA -v
OBJECTS    = main.o
FUSES      = -U hfuse:r:high.txt -U lfuse:r:low.txt

The fuses textfile makes avrdude look up settings for your device, this can of course be done manually but it worked for me. (Lazy)
I use an AVR STK500v2 board as you might have guessed from above. Programming this through a usb to serial dongle (make sure to download drivers if you have one). Go to /dev and type "ls" command to see all the files=devices to look for the full name (address) of your usb device. Mine is /dev/tty.usbserial-FT3GHI7VA as you might also have guessed.  ::)
Good luck, and let me know if you're having troubles!

/Nicky
Grounding things properly means burying them in the backyard...

Offline Rebelgium

  • Supreme Robot
  • *****
  • Posts: 638
  • Helpful? 0
  • It's called the future ... We like it here
Re: programming on mac.
« Reply #5 on: May 25, 2008, 12:33:07 PM »
I'm from belgium to!
Where do you live? I live near Brugge.
To relax after some hard work on robotics: A very fun free online text based MMORPG
orgcrime.net

Offline ishkaTopic starter

  • Jr. Member
  • **
  • Posts: 38
  • Helpful? 0
Re: programming on mac.
« Reply #6 on: May 29, 2008, 12:19:05 AM »
Hey ;-)
I lived near Huy ( Hoei) but spend most of my time studying medical sciences at the CHUlg

To come back from OT, thx for the UART suggestion but as you know, i first need to load a bootloader on the micro before being able to use it. And to do that, i need to program it. But sure that after that i will probably set up some uart connection ( if i manage to get a bluetooth chip on my bot it would be really great, you know, sending order via my phone or my computer :D)
I'll take a look at MacPack right after my exams, but i already bought usbtiny connector so i might first give a try to the Lady Ada's tutorial.
« Last Edit: May 29, 2008, 12:26:33 AM by ishka »
May the Achtuche be with you...

 


Get Your Ad Here

data_list