compiling on a Mac - PC compatibility

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

Hi,

I'm looking for a solution to compile code for AVR's (specifically, at this point, a Mega16), which we're working with at school. We're all set up with STK500's and learning to code C for the AVR.

Now, my "problem" is that i use a Mac, and would prefer to be able to use this as my coding platform, instead of always booting a virtual machine, wondering where certain symbols are in the VM (and often not being able to type them in the VM at all, which is a bit of a problem), so I'd love to get it all set up to code in OS X.
I got the flashing bit up and running - i can flash .hex files compiled on the VM no problem using avr-dude and a little interface i found online.
I can of course also find a lot of solutions on compiling with avr-gcc, which is fine. I'm not scare of terminal, but i would prefer to have a somewhat automated solution - XCode springs to mind. I've found some templates i can use with XCode, but i can't figure out if it's at all possible to compile code with avr-gcc that also compiles in the CodeVision tool on Windows, which it needs to in order for me to be able to work with the people at school.

Is it possible for me to use a different tool, on a different platform, or should i just keep using the trusty VM?

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

Quote:
but i can't figure out if it's at all possible to compile code with avr-gcc that also compiles in the CodeVision tool on Windows

There are several things that are handled differently between Codevision and avr-gcc, so you won't be able to compile without changes.

Regards,
Steve A.

The Board helps those that help themselves.

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

As i expected. Well, that pretty much sucks.
Maybe i should try to convince the teacher to move to a "freer" platform for the next groups of students - but i guess I'll have to stick to that trusty VM then :)

Thanks for the help, anyway.

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

I use Smultron to write code and I compile in command line. Running make in command line is nothing scary, really. I tried to tune XCode to use avr-gcc, but failed miserably. Maybe you could try setting up wine and run CodeVision compiler through wine? Just a wild idea, I've no idea how hard it would be to implement it.

The Dark Boxes are coming.

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

Yeah, i've contemplated that idea as well - i already run a wine solution through CrossOver, but i haven't attempted to install CodeVision. I'll try though, i have no idea how well it'll work.

And as i stated, i'm not really scared of command lines, i've almost grown up with them, but i still find it nicer to have a little gui with checkboxes instead of typing out all the commands. Anyway, for this class it's not really an issue at all - i NEED to be able to use CodeVision.

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

I installed CodeVision in Crossover yesterday. It worked alright as such. I still prefer editing in textwrangler, and i haven't even attempted to flash through codevision, I'm fairly sure that ill be pointless. And the interface is somewhat broken. But in the end, i can compile without starting that VM, so it's better than nothing :)

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

@Mathias

This might work.

You could build or download this toolchain (avr-gcc for Mac)
http://www.obdev.at/products/cro...

That should give a complete toolchain for avr-devel (including the avrdude programmer (i think))

Then create/compile the source with CV , and download the hex with avrdude for mac.

/Bingo

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

Hej Bingo ;)

that's actually exactly what i'm doing now, i was just looking to cut anything windows-based out entirely. Anyway, it's as good as it gets now, i think, even though it is pretty far from perfect :)