Installing SDCC on Windows

If you have a USRP, you will need the Small Device C Compiler (SDCC) in order to build the firmware. (If you don't have a USRP, you can skip this step.) The SDCC is available as a self-installing binary package for Windows. To install it:

(1) Download sdcc-2.9.0-setup.exe (2.9.0 under sdcc-win32) from to a directory of your choice.

(2) Run sdcc-2.9.0-setup.exe. You must have administrator privileges; it is easiest if you use the same account you will use to build GNU Radio.

(3) Log into the account you will use to build GNU Radio (if you are already logged into that account, log out and log in again). Enter the command
$ which sdcc

If the path to sdcc is displayed, you are done. Otherwise you need to add the path to sdcc to your PATH environment variable.
You can do this in your ~/.bash_profile (assuming you are using a bash shell) or by adding it to your Windows path. The command you need to add to your ~/.bash_profile
$ PATH="$PATH:/cygdrive/c/Program Files/SDCC/bin" 

if you are using Cygwin and
$ PATH="$PATH:/c/Program Files/SDCC/bin" 

if you are using MSYS (assuming that you installed SDCC in C:\Program Files\SDCC). To add sdcc to your Windows path: * open the Windows control panel: * go to Performance and Maintenance -> System to get the "System Properties" window * click the "Advanced" tab and click "Environment Variables" * select "Path" in the top pane and click "Edit" * add C:/Program Files/SDCC/bin to the end of the variable value; if there is already something there, separate the new text from the old with ";" * click "OK" in the "Edit Variable", "Environment Variables", and "System Properties" windows * log out and log back in again
Whichever way you use to set your PATH, you should start a new command window and repeat the which sdcc command to be sure that SDCC is found.


VPATH builds and make distcheck on Cygwin

Windows SDCC as installed above will not work for VPATH builds (i.e., configure run from another directory) or make distcheck because Cygwin symbolic links are not recognized by the Windows version of SDCC. If you want to do a VPATH build or make distcheck you can do one of the following:
  • Build and install a Cygwin version of SDCC from source; this is straightforward (configure; make; make install); you will need the Cygwin flex and bison packages.
  • Add scripts for the SDCC components to check for symbolic links (e.g., with readlink) and substitute copies of the target files (not tried, but should work).
  • Modify usrp/firmware/src/usrp2/ to change "ln -s" and/or "$(LN_S)" to "cp -p" in the .a51.rel target.

注:Installing SDCC on Windows(原文出处,翻译整理仅供参考!)