|
#1
| |||
| |||
| Is there a way to change what compiler Xcode uses (other than between GCC 3.1 or 3.3)? I work with writing code for the motorola 68HC1x, and would like to be able to write and assemble/compile the code using Xcode. Currently I write the code in Xcode (since it has nice code formating features, such as automatic tabing), but then have to exit Xcode and use a command line tool to assemble the code. I would like to be able to simply click the build button and have it call said command, although obviously it would not be able to run the assembled code. Thanks.
__________________ iMac 17" FP 800MHZ/1024MB/75GB/SuperDrive/OS X 10.4.x PowerMac G4 450 DP/256MB/30GB/OS X 10.4.x Olympus C-5500 5.0 MP/5x Optical zoom Digital Camera |
|
#2
| ||||
| ||||
| You have to do a bit of custom work to do this, but it can be done. In fact, I did something very much like this for TIGCC, which is a custom GCC compiler aimed at producing software for the 68k TI calculators (89, 92+, Voyage). The trick is that you have to create an external target and write up a script which does the actual compile through your command-line tools. If you don't, then the linking will go through the native ld, and mess things up good. If you like, I can send you the script I use along with the target template, or you can download TIGCC from www.ticalc.org and look through it yourself. The script I install is located at /usr/local/tigcc/bin/tixcode, while the templates are in the normal /Library/Application Support/Apple/Developer Tools/ directory after the install. Be warned that my script isn't complete, as it doesn't handle cleaning of targets yet, and doesn't grab listings of files from XCode (which never passes them, so I just compile all the files in the directory into the object file, a bad practice, but I am looking into alternatives).
__________________ iMac G5 2.0Ghz (10.4.x, Main System) MacBook 1.83Ghz (...Feburary) "Sometimes I drive to run from all my demons \ Sometimes I drive so I can be alone \ Sometimes I drive to see the world in different light \ Sometimes I drive for no reason at all" - Assemblage 23, Drive |
|
#3
| |||
| |||
| Thanks for you response. I would be very interested in seeing your script and target template. Although I have used Xcode a fair amount, I have done very little work with targets, and most of that was pre-Xcode developer tools.
__________________ iMac 17" FP 800MHZ/1024MB/75GB/SuperDrive/OS X 10.4.x PowerMac G4 450 DP/256MB/30GB/OS X 10.4.x Olympus C-5500 5.0 MP/5x Optical zoom Digital Camera |
|
#4
| ||||
| ||||
| Well, I packaged the XCode targets, and the build script into a zip file and posted it onto my webspace. http://home.comcast.net/~krevnik/fil..._Mac_XCode.zip There isn't much in the way of comments, so gather a list of questions and ask, and I will respond as quickly as I can with my busy schedule. Sorry for the delay.
__________________ iMac G5 2.0Ghz (10.4.x, Main System) MacBook 1.83Ghz (...Feburary) "Sometimes I drive to run from all my demons \ Sometimes I drive so I can be alone \ Sometimes I drive to see the world in different light \ Sometimes I drive for no reason at all" - Assemblage 23, Drive |
|
#5
| |||
| |||
| Thanks. I've downloaded the files, but it might be a little while before I get a chance to really look at them. All depends on what my class schedule ends up like over the next few weeks.
__________________ iMac 17" FP 800MHZ/1024MB/75GB/SuperDrive/OS X 10.4.x PowerMac G4 450 DP/256MB/30GB/OS X 10.4.x Olympus C-5500 5.0 MP/5x Optical zoom Digital Camera |
![]() |
| Thread Tools | |
|
|