Jump to content

MIOS programming with Xcode 2 on a Mac (OSX)


Rowan
 Share

Recommended Posts

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.org/dokuwiki/doku.php?id=how_to_use_xcode2_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

Link to comment
Share on other sites

  • Replies 58
  • Created
  • Last Reply

Top Posters In This Topic

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.audiocommander.de/downloads/midibox/gputils-installer-osx.pkg.tgz (1.3 MB)

http://www.audiocommander.de/downloads/midibox/sdcc-2.5.4.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.audiocommander.de/downloads/midibox/sdcc254-installer-osx.mpkg.tgz (4.6 MB)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.audiocommander.de/downloads/midibox/sdcc-2.5.4.2005.11.15.audiocommander.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...)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.audiocommander.de/downloads/midibox/sdcc254-installer-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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 4 weeks later...

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...

Link to comment
Share on other sites

  • 8 months later...

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

Link to comment
Share on other sites

Hi Paul,

welcome to the forums :)

maybe it's simple and you just have to add

[tt]PATH=/usr/local/bin:$PATH[/tt]

just on top of the shell script that calls the makefile.

You'll find this in the info-panel of your target.

maybe it's not that simple, then:

have you generated a makefile with the mkmk.pl script?

You need to do this, because it looks like you want to run the makefile for windows (I noticed last time on win, that the make.bat command actually involves this script (./mkmk.pl)

I am also very unsure where the calls to MIOSStudio should come from. Normally this has nothing to do with the compile process ???

Anyway, to get the new makefile you have to:

- open MAKEFILE.SPEC and change the project name and add additional source files you may use to MK_ADD_OBJ.

- then open the terminal and type:

[tt]cd [/tt](drag the folder of the subdir "tools" and hit enter)

[tt]./mkmk.pl MAKEFILE.SPEC[/tt]

A new makefile should have been generated for you now. Make sure it's in the root directory.

A variant of this is described here under "Setting up the Make Target":

http://www.midibox.org/dokuwiki/doku.php?id=how_to_use_xcode2_as_ide_on_a_mac

After that, you should follow the next step: "Setting up the primary application target". It's simply a new target that does nothing else than calling your new makefile.

Did this help?

Best regards,

Michael

Link to comment
Share on other sites

  • 5 months later...

hi

from today i jump on this bandwagon... ;)

AC thanks for the SDCC and the wiki, very usefull.. it saved me a few hours for sure

so i set up everything very easily, no debugging stuff iwill try that later, i want to start coding..

my question is very basic and simple: when i build i should get a new project.hex and project.syx files, right?

where is Xcode IDE putting those files?

txx

simone

EDIT: hold on there are errors given out by the compiler when i try to build the Makefile, same as for fluxivity, i am downloading the addictional packages and then we ll see.

Link to comment
Share on other sites

so before going on with Xcode i checked if the necessary packages were installed:

when i first installed sdcc it worked and i got an answer to sdcc -v but now i get this

Last login: Wed Jul  4 17:44:15 on ttyp1
Welcome to Darwin!
simone-marins-powerbook-g4-12:~ simonemarin$ sdcc -v
-bash: sdcc: command not found
simone-marins-powerbook-g4-12:~ simonemarin$ echo $PATH
/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin
simone-marins-powerbook-g4-12:~ simonemarin$ PATH=:</sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin>:/usr/local/bin
-bash: /sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin: No such file or directory
simone-marins-powerbook-g4-12:~ simonemarin$ 
simone-marins-powerbook-g4-12:~ simonemarin$ echo $PATH
:
simone-marins-powerbook-g4-12:~ simonemarin$ 

any idea?

simone

Link to comment
Share on other sites

hi cimo,

[tt]PATH=:</sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin>:/usr/local/bin[/tt]

you must not add the "<" and ">" to your path! The ":" separates the paths from each other, you're just adding "/usr/local/bin" to your $PATH

this line has to look like this:

[tt]PATH=:/sw/bin:/sw/sbin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin[/tt]

best,

Michael

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share


×
×
  • Create New...