User Tools

Site Tools


installing_gputils_and_sdcc_on_osx

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
installing_gputils_and_sdcc_on_osx [2009/01/06 11:16]
mhomscheidt Added the MacPorts installation instruction
installing_gputils_and_sdcc_on_osx [2023/11/26 20:16] (current)
admin
Line 5: Line 5:
 And more than that: you are able to [[how to use xcode2 as ide on a mac|use Apple'​s powerful Xcode as IDE]] and don't leave that except for sending the .syx file! You can even [[MIOS C Simulator - Debugger|debug your MIOS C-Applications]] - although this is in an early development state, please contribute code! //​audiocommander.//​ And more than that: you are able to [[how to use xcode2 as ide on a mac|use Apple'​s powerful Xcode as IDE]] and don't leave that except for sending the .syx file! You can even [[MIOS C Simulator - Debugger|debug your MIOS C-Applications]] - although this is in an early development state, please contribute code! //​audiocommander.//​
  
-The first step in this process is to install SDCC. If you have already SDCC running and calling "sdcc -v" in terminal ​gives you the info you're running 2.5or higher, you have the most complicated step already completed!+The first step in this process is to install SDCC. If you have already SDCC running and calling "sdcc -v" in terminal ​should give you the info you're running 2.8.0. The usage of different versions isn't recommended as the MIOS Wrapper is very sensitive to the compiled code!
  
 \\ \\
Line 17: Line 17:
  
 Now you have to type three commands: Now you have to type three commands:
-  * ./config+  * ./configure
   * make   * make
   * make install   * make install
 sometimes you have to call these with "​sudo",​ esp. "sudo make install"​. sometimes you have to call these with "​sudo",​ esp. "sudo make install"​.
  
-If you have problems compiling and installing SDCC, you might lack a library.+If you have problems compiling and installing SDCC 2.8.0, you might lack a library.
  
 Here is what you should have installed (in this particularly order) Here is what you should have installed (in this particularly order)
  
 \\ \\
 +====== 1. Install GPUTILS ======
 +[[http://​www.1710.co.uk/​picosx/​|Ben]] has released various precompiled GPUTILS and SDCC installers for Intel and PPC Macs. Thanks for that!  Go to [[http://​www.1710.co.uk/​picosx/​|his page]], download them and run the installers.\\
 +(And check out the rest of his site, he has some useful info about Microchip Development on Mac OS X)
  
-====== 1. GPUTILS ====== +==== Compiling for PIC18F4685? ​==== 
-[[http://​www.1710.co.uk/​picosx/​|Ben]] has released various precompiled GPUTILS and SDCC installers for Intel and PPC MacsThanks for that!\\ +If you want to compile for the PIC18F4685, you need a later version of GPUTILS than 0.13.4The usage of 0.13.7 is highly recommended,​ newer versions may fail with SDCC 2.8.0.\\
-Check out the rest of his site, he has some useful infos about MicroChip Dev on OSX+
  
-If you want to compile for the PIC18f4685, you need a later version of GPUTILS than 0.13.4, at the moment you need to compile GPUTILS for yourself then. But it runs smoothly on OS X (tried on 10.5).+**Following ​the instructions from [[http://​gputils.sourceforge.net/|here]] we get:**
  
-\\ +<code bash> 
-====== 2. SDCC ====== +cd ~ 
-SDCC is available here: http://sdcc.sourceforge.net/​index.php#​Download ​+svn co https://gputils.svn.sourceforge.net/​svnroot/​gputils gputils 
 +cd gputils/​trunk/​gputils 
 +./​configure 
 +make 
 +sudo make install 
 +cd ~ 
 +rm -Rf gputils 
 +</​code>​
  
-There are precompiled ​binaries ​for OSX that should work.+I've written these instruction to store a temporary copy of the gputils source code in your home directory, then remove this code after the installation.  
 + 
 + 
 +====== 2. Install SDCC ====== 
 +==== Precompiled ​binaries ​==== 
 +Download and install from [[http://​sdcc.sourceforge.net/​index.php#​Download]] or from [[http://​www.1710.co.uk/​picosx/​|Ben'​s page]] ​
  
 If you can't find an existing working version, I've built a binary installer that worked for me (note that this is not the most up-to-date version!): http://​www.audiocommander.de/​downloads/​midibox/​sdcc254-installer-osx.mpkg.tgz ​ **(MAC OS X PPC only)** If you can't find an existing working version, I've built a binary installer that worked for me (note that this is not the most up-to-date version!): http://​www.audiocommander.de/​downloads/​midibox/​sdcc254-installer-osx.mpkg.tgz ​ **(MAC OS X PPC only)**
  
 +==== via MacPorts and Xcode ====
 +
 +If you have [[http://​www.macports.org/​|Mac Ports]] and Xcode installed then there is another way of installing sdcc from sources. These are then compiled with Xcode automatically.
 +
 +  * Open the '​Terminal.app'​
 +  * There find the actual '​sdcc'​-Release from the MacPorts repository:
 +<code bash>
 +[MyMac:~] > port search sdcc
 +sdcc @2.8.0 (lang)
 +    ANSI C compiler targeting Intel 8051, Maxim 80DS390, Zilog Z80
 +</​code>​
 +
 +  * Then download, compile and configure '​sdcc'​ (you need administrator privileges for this):
 +<code bash>
 +[MyMac:~] > sudo port install sdcc
 +Passwd:
 +</​code>​
 + --- //​[[Michael.Homscheidt@web.de|mhomscheidt]] 2009/01/06 11:14//
 +
 +
 +Update 2023-11-26: usage of SDCC 2.8.0 still mandatory, don't use newer versions which come with "​port"​ or "​brew"​! - confirmed that the tool can also be compiled for Apple Silicon. Link to source code: https://​sourceforge.net/​projects/​sdcc/​files/​sdcc/​2.8.0/​
 +
 +
 +==== Test for correct installation ====
 A test in the terminal with "sdcc -v" should now show the proper version (you need 2.5 or higher): A test in the terminal with "sdcc -v" should now show the proper version (you need 2.5 or higher):
 <code bash> <code bash>
Line 68: Line 106:
  
 ----- -----
-via MacPorts and Xcode: 
- 
-If you have [[http://​www.macports.org/​|Mac Ports]] and Xcode installed then there is another way of installing sdcc from sources. These are then compiled with Xcode automatically. 
- 
-  - Open the '​Terminal.app'​ 
-  - There find the actual '​sdcc'​-Release from the MacPorts repository: 
-<code bash> 
-[MyMac:~] > port search sdcc 
-sdcc @2.8.0 (lang) 
-    ANSI C compiler targeting Intel 8051, Maxim 80DS390, Zilog Z80 
-</​code>​ 
-  - Then download, compile and configure '​sdcc'​ (you need administrator privileges for this): 
-<code bash> 
-[MyMac:~] > sudo port install sdcc 
- --- //​[[Michael.Homscheidt@web.de|mhomscheidt]] 2009/01/06 11:14// 
  
 ====== 3. If there are errors ====== ====== 3. If there are errors ======
-You might need additional libraries. +Please check first if you have the latest working stable versions, fitting to your platform.
-Go and load [[http://​fink.sourceforge.net/​|Fink]] and [[http://​finkcommander.sourceforge.net/​|FinkCommander]]!+
  
-Then open FinkCommander and install these libraries: +If you have trouble installing SDCC on your mac, post your questions/​problems here[[http://​www.midibox.org/​forum/​index.php?​topic=6527.0]]
--> gettext-0.14.5, gputils-0.13.2, libiconv-1.9.2_1,​ libtool-1.5.22_1 +
-And don't blame me or anyone else if this breaks up something. It's your own responsibility!+
  
-If you have trouble installing SDCC on your mac, post your questions/​problems here: http://​www.midibox.org/​forum/​index.php?​topic=6527.0 
installing_gputils_and_sdcc_on_osx.1231240598.txt.gz · Last modified: 2009/01/06 11:16 by mhomscheidt