Jump to content


Photo
- - - - -

MIOS programming with Xcode 2 on a Mac (OSX)


  • Please log in to reply
58 replies to this topic

#1 Rowan

Rowan

    MIDIbox Tweaker

  • Members
  • PipPipPip
  • 333 posts
  • LocationScotland

Posted 13 April 2006 - 19:52

Audiocommander has been kind enough to write a entry on the wiki about how to use Xcode 2 to program and compile on a mac running OSX here:

http://www.midibox.o...as_ide_on_a_mac

Can all Xcode related posts please be kept in this thread as it will make it much easier to for the few mac users on this forum to find and discuss the information relating to our beloved OS, Xcode 2 and Midiboxes.

Rowan


#2 Rowan

Rowan

    MIDIbox Tweaker

  • Members
  • PipPipPip
  • 333 posts
  • LocationScotland

Posted 15 April 2006 - 13:04

Audiocommander,

I'm having trouble finding a 2.5 snapshot for OSX, when I follow the link that you have posted on the wiki I end up in a section with more links. Do I go here: http://sdcc.sourcefo...e.net/snap.php  ?

The newest snapshot I can find is 17/11/05.

Or should I download the source and compile that?

Thanks

Rowan

#3 audiocommander

audiocommander

    MIDIbox Guru

  • Frequent Writer
  • PipPipPipPip
  • 1,358 posts
  • LocationNuremberg, Germany

Posted 15 April 2006 - 14:18

I'm sorry; I remember now, that this was the big problem I had.
The snapshots are only sources. You might try to compile and install, but I had lots of trouble with it.
I searched my HD and found the version I installed. I packed it together and uploaded it on my server:

http://www.audiocomm...ler-osx.pkg.tgz (1.3 MB)
http://www.audiocomm....2005.11.15.tbz (2.4 MB)

The SDCC package contains binaries. Copy them to /usr/local/bin
(You know you can get there within Finder: APPL+SHIFT+G ?)

Open the terminal and test by typing: sdcc -v

If you are successful with it, I'll update the HowTo!
Keep me updated!
;)


Edit: The stroked SDCC version is not working. See below...
Take this one instead: http://www.audiocomm...er-osx.mpkg.tgz (4.6 MB)

#4 Rowan

Rowan

    MIDIbox Tweaker

  • Members
  • PipPipPip
  • 333 posts
  • LocationScotland

Posted 15 April 2006 - 17:26

I'll let you know how I get on, Thank for that ;D

I won't be able to sort it out until next weekend as my internal drive has died on my PowerBook and I booting of a firewire drive. the gputils Installer hangs because it can't mount my internal drive......bugger!

Regards

Rowan

#5 Rowan

Rowan

    MIDIbox Tweaker

  • Members
  • PipPipPip
  • 333 posts
  • LocationScotland

Posted 18 April 2006 - 20:41

Hi audiocommander,

The HDD is sorted so I can install again (Thank God!!!!)

I have installed "gputils" that I downloded from you, I have moved the contents of the "bin" (the sdcc download form your server) folder to "/usr/local/bin" and asked terminal for the verison.

No luck so far

Rowan

#6 audiocommander

audiocommander

    MIDIbox Guru

  • Frequent Writer
  • PipPipPipPip
  • 1,358 posts
  • LocationNuremberg, Germany

Posted 18 April 2006 - 20:46

hi rowan,

1. what does sdcc tell you, when you type "sdcc -v" in terminal?

2. if you type this: "cd /usr/local/bin"
and then this: "ls"
do you see sdcc listed?

#7 audiocommander

audiocommander

    MIDIbox Guru

  • Frequent Writer
  • PipPipPipPip
  • 1,358 posts
  • LocationNuremberg, Germany

Posted 18 April 2006 - 20:55

Rowan,

I just peeked again in the SDCC binary I uploaded on my server.
There is a file called "INSTALL.txt" that describes the installation process for Linux.

Please try to proceed this way:
SDCC Binary Kit Install Help
----------------------------
$Id: INSTALL.txt,v 1.4 2004/02/23 20:54:07 bernhardheld Exp $

For Linux users:
Even if the default search paths look into /usr/local, sdcc is fully
relocatable. Try `sdcc --print-search-dirs` if you've problems with header or
library files. See sdccman.[txt|pdf|html] for more detailed information.

To install:

* Extract the binary kit to a temporary directory. This will create a
new directory called 'sdcc' in the temporary directory.
    cd ~
    mkdir tmp
    cd tmp
    tar xzf path/to/binary/kit/sdcc.tar.gz

* Change to the sdcc directory and copy all files to /usr/local
    cd sdcc
    cp -r * /usr/local

This will install sdcc into /usr/local/bin/sdcc, support files into
/usr/local/share/sdcc, and documentation into
/usr/local/share/sdcc/doc.

You can test the install by entering:
    /usr/local/bin/sdcc -v

This should return sdcc's version number.

Keep me updated, so I can add instructions to the wiki page :)
Michael

#8 Rowan

Rowan

    MIDIbox Tweaker

  • Members
  • PipPipPip
  • 333 posts
  • LocationScotland

Posted 18 April 2006 - 21:16

Here is the List that teminal is giving:


as-gbz80        gpdasm          link-gbz80      savr            sdcpp
as-hc08         gplib           link-hc08       sdcc            serialview
as-z80          gplink          link-z80        sdcclib         shc08
aslink          gpstrip         makebin         sdcdb
asx8051         gpvc            packihx         sdcdb.el
gpasm           gpvo            s51             sdcdbsrc.el

#9 Rowan

Rowan

    MIDIbox Tweaker

  • Members
  • PipPipPip
  • 333 posts
  • LocationScotland

Posted 18 April 2006 - 21:18

Give me a chance to read the INSTALL.TXT

That will probably sort my issues

#10 Rowan

Rowan

    MIDIbox Tweaker

  • Members
  • PipPipPip
  • 333 posts
  • LocationScotland

Posted 20 April 2006 - 07:34

Hi,

I've followed all the instructions in the install.txt, installed the librarys with fin commander. Every time I try the scdd -v command I get: cannot execute binary

any more ideas?

rowan

#11 audiocommander

audiocommander

    MIDIbox Guru

  • Frequent Writer
  • PipPipPipPip
  • 1,358 posts
  • LocationNuremberg, Germany

Posted 20 April 2006 - 11:41

Hi Rowan,

I'm not sure about this.  :-[

If it had wrong permissions set it would return "permission denied."
(If you ever have to set execute-permission, it goes like this):
$ chmod +x /usr/local/bin/or/whatever/directory/the/files/are/in

Anyway, I checked my binaries and compared them to the binaries I uploaded.
I noticed that mine were 1 month newer.

So could you please download this package:
http://www.audiocomm...iocommander.tgz
(4,6 MB)


and try it again?

The "share/sdcc" dir-content should be the same; I just exchanged the binaries, however it doesn't hurt to exchange both the share/sdcc and put the bin/ content to /usr/local/bin. I have it in /usr/local/bin although the docs say it could also be in /usr/local/bin/sdcc. However I haven't tried that.
So, now I confused everyone, here's what to do:

bin/                 =copy to=>      /usr/local/bin  (maybe set execution rights then)
share/sdcc/      =copy the "sdcc"-folder into=>     /usr/local/share/


I hope it really works now!!!  ::)

If you are successfull, I may set up an installer for others...

Michael


Edit: This version might work, but I've built an installer (see below...)

#12 audiocommander

audiocommander

    MIDIbox Guru

  • Frequent Writer
  • PipPipPipPip
  • 1,358 posts
  • LocationNuremberg, Germany

Posted 20 April 2006 - 11:49

btw, a little off-topic, but useful tips for working with the terminal:

1. if you drag a folder or a file into the terminal window, it's path is set in. This is a real time-saver

2. you can browse these directories within finder. just press CMD+SHIFT+G (or menu: Go To > Go To Folder..) and type /usr/local/ and you're in that directory. Be careful in there!

3. Try pressing the TAB key inside the terminal. It has an autocomplete feature for paths and available commands ("double TAB"  ;D)

4. Try pressing the up and down arrows. You can browse through the bash command history

Have a nice type  ;)
Michael

#13 audiocommander

audiocommander

    MIDIbox Guru

  • Frequent Writer
  • PipPipPipPip
  • 1,358 posts
  • LocationNuremberg, Germany

Posted 20 April 2006 - 14:43

OK, Rowan, I got it.  8)
I've built an pkg installer and tested it on my mac mini where no SDCC has been. It's running!

load it here:
http://www.audiocomm...er-osx.mpkg.tgz (4.6 MB)

If you type sdcc and get a return "command not found", you have to add usr/local/bin to your path environment:
$ echo $PATH
// now you should see this line
/bin:/sbin:/usr/bin:/usr/sbin
// copy the whole line. now type
$ PATH=:<paste here>:/usr/local/bin

done.

please, if anyone is trying this, give feedback.

Michael

#14 Rowan

Rowan

    MIDIbox Tweaker

  • Members
  • PipPipPip
  • 333 posts
  • LocationScotland

Posted 20 April 2006 - 21:17

You F*!N'K Star  ;D ;D ;D ;D ;D ;D ;D

It Seem's to work. I Had to follow the Terminal commands but it worked ;D ;D ;D

Now I can get on and code ;D ;D ;D

You really deserve to be in the MIOS hall of fame (There isn't one yet but I will suggest it on the fourm)

Michael, I Thank you from the bottom of my heart for the effor you have gone to.

Once again...............your a MIOS Star

The Best Regards

Rowan

#15 audiocommander

audiocommander

    MIDIbox Guru

  • Frequent Writer
  • PipPipPipPip
  • 1,358 posts
  • LocationNuremberg, Germany

Posted 20 April 2006 - 21:56

8) 8) Thank you, thank you, thank you  8) 8)

I'm glad I could help with this issue.
I whish I'd have had such an installer, I remember it took a loooooooong time to get SDCC running on my mac.

Setting up Xcode should be quite easy now!
:D

#16 Rowan

Rowan

    MIDIbox Tweaker

  • Members
  • PipPipPip
  • 333 posts
  • LocationScotland

Posted 20 April 2006 - 22:22

I'll Start setting up xcode in the weekend...........my girlfriend just does not get me spendind all this time in terminal ;)

Thanks again

Rowan

#17 Rowan

Rowan

    MIDIbox Tweaker

  • Members
  • PipPipPip
  • 333 posts
  • LocationScotland

Posted 28 May 2006 - 12:46

Hi,

audiocommander:

I've started messing around with the Xcode template that you sent me, and I have some questions.

When I build the project without any modifications I get two files in the m5_controlStation folder:

Script-1374BB82096603050096D7CD.sh


#!/bin/sh
# shell script goes here

PATH=/usr/local/bin:$PATH

cd $SRCROOT
make

exit 0


And:

m5_controlStation.dep

0000000044798a3700000000000012f0 10017f5b20c00b6cebecacba9e2bfb09 ffffffffffffffffffffffffffffffff 0 /m5.syx

Is the contents of the m5_controlStation.dep the SysEx file that I upload?

I don't have a core here yet to try uploading with.

Rowan

#18 audiocommander

audiocommander

    MIDIbox Guru

  • Frequent Writer
  • PipPipPipPip
  • 1,358 posts
  • LocationNuremberg, Germany

Posted 28 May 2006 - 13:30

Hi Rowan,

to be honest, I can't remember clearly what I've sent you, but I'm pretty sure it hasn't been a template, but rather a quick un-cleaned-up working model.

It's usually a lot more work to change a project in Xcode, than to set up a new one.
So it might be best to start from the scratch. It's really just setting up two or three targets and pasting this script. ;)

Best,
ac

#19 audiocommander

audiocommander

    MIDIbox Guru

  • Frequent Writer
  • PipPipPipPip
  • 1,358 posts
  • LocationNuremberg, Germany

Posted 22 June 2006 - 23:01

Hey Rowan, I've been curious and read your last question again. Because my last answer is still valid, I want to add for the record:

When I build the project without any modifications I get two files in the m5_controlStation folder:


- the .syx file is in the root directory
- if you don't change anything, nothing will be compiled (look into the target settings to add and remove files that will be traced upon recent change). a new syx file will only be created if necessary.
- the m5_controlStation folder is inside the build-directory, which just contains the debug-application and a folder with the extension .build (just temporary files). Both can be deleted without risk.

But I really recommend setting up a new target, it's way easier to type your project-name once and get an overview of how things work, than changing ahundretandfive names in widespreaded locations and getting totally confused ;)

let me know how you proceed...

#20 fluxivity

fluxivity

    MIDIbox Newbie

  • Members
  • Pip
  • 2 posts

Posted 14 March 2007 - 02:59

Hello,
I've got the sdcc running and returning the correct information at the prompt, but when I try to build my makefile I get errors:
Tool:0: line 6: ./mkmk.pl: No such file or directory
Tool:0: /Users/paul/Desktop/MIOSStudio_beta7_5.jar Folder/midibox_cv_v1_1/midi_cv/build/midi_cv.build/Debug/Makefile.build/Script-DA07194C0BA788D100F5811F.sh: line 6: ./mkmk.pl: No such file or directory
Tool:0: line 5: cd: /Users/paul/Desktop/MIOSStudio_beta7_5.jar: No such file or directory
Tool:0: /Users/paul/Desktop/MIOSStudio_beta7_5.jar Folder/midibox_cv_v1_1/midi_cv/build/midi_cv.build/Debug/Makefile.build/Script-DA07194C0BA788D100F5811F.sh: line 5: cd: /Users/paul/Desktop/MIOSStudio_beta7_5.jar: No such file or directory


anybody around that could help?
Thanks
Paul




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users