Author Topic: C programming on Mac OS X 10!?!?  (Read 4810 times)

0 Members and 1 Guest are viewing this topic.

Offline nihaddadTopic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
C programming on Mac OS X 10!?!?
« on: June 14, 2010, 12:11:49 PM »
I want to write my robot's C programs on my MacBook Pro that runs Mac OS X 10. Should I be concerned with any compatibility issues down the line? Any issues with Compilation? And are their any recommended programs I should be using (like Text/Edit application which seems like Note Pad app on Windows)?


Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
    • CircuitGizmos
Re: C programming on Mac OS X 10!?!?
« Reply #1 on: June 14, 2010, 12:44:54 PM »
The default OSX text editor is OK for plain text. Or you can try TextWrangler.

Are you writing OSX C code? Developing in Xcode?

Or are you cross compiling? For something like the AVR?

Offline nihaddadTopic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: C programming on Mac OS X 10!?!?
« Reply #2 on: June 14, 2010, 12:56:52 PM »
Is one better than the other?

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
    • CircuitGizmos
Re: C programming on Mac OS X 10!?!?
« Reply #3 on: June 14, 2010, 01:00:20 PM »
Is one better than the other?

It certainly is.


Are you asking if TextWrangler is better than the editor that comes with OSX? My opinion would be yes.

Offline nihaddadTopic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: C programming on Mac OS X 10!?!?
« Reply #4 on: June 14, 2010, 01:02:11 PM »
No is writiing osx c code developing in xcode better (easier, more efficient) than cross compiling for VAR?

Offline GearMotion

  • Supreme Robot
  • *****
  • Posts: 489
  • Helpful? 24
  • Two decades+ of Embedded Design
    • CircuitGizmos
Re: C programming on Mac OS X 10!?!?
« Reply #5 on: June 14, 2010, 01:08:29 PM »
Writing code in xcode gets you an app/application that runs on the MacBook. You can write c code that compiles to be an app that does things ON your MacBook, within OSX.

Cross-compiling gets you code that runs on something else. A development board or similar is what runs the cross-compiled code. A PIC microcontroller or an AVR microcontroller are examples of the target device for which you cross compile. The PIC or AVR runs that compiled c code. You control things attached to that microcontroller, such as LEDs, motors, etc.

Offline nihaddadTopic starter

  • Jr. Member
  • **
  • Posts: 7
  • Helpful? 0
Re: C programming on Mac OS X 10!?!?
« Reply #6 on: June 14, 2010, 01:11:59 PM »
Ah ic simple enough. I didn't know the term, but that's what I am interested in doing- cross-compiling a PIC microcontroller. Thanks.

Offline guncha

  • Jr. Member
  • **
  • Posts: 40
  • Helpful? 0
Re: C programming on Mac OS X 10!?!?
« Reply #7 on: June 18, 2010, 02:27:30 AM »
I haven't had any first hand experience with PICs, but from what I gather, it's not a very open platform (correct me if I'm wrong). And as such, you might run into problems like proprietary compilers not working/being buggy on OSX. I haven't had any trouble with AVRs though.

As for XCode, it's a very powerful tool with loads of features, but you don't need most of it for MCU code. Also setting up the build environment can be a bit of a pain in the ass. Any text editor with syntax highlighting will do just fine. TextWrangler is a good candidate.

 

SMF spam blocked by CleanTalk