by Andrew.v2 » Fri Feb 08, 2008 6:34 am
Hello,
I've been using UEStudio to work with Microchip's C30 compiler. Below is the configuration I put together (modified from the C18 settings that come standard). There's a space to specify the processor but I have just hard coded it all in for the moment. (I'm compiling for a PIC24FJGA004.)
I will likely post a new file without the hard coding and with more of the configuration handled in the compiler options dialog but for the time being this should get you going.
Hope this helps. If anyone finds this useful and makes more progress on tightening the whole thing up before I get a chance please post your changes & improvements. Thanks!
|Andrew|
-------------------------------------------
# ----------- Microchip C30 configuration ------------
# --- general --------------------------------------
# $P - project name
# $Pp - path to project directory
# $Pn - project name
# --- compile --------------------------------------
# $I - input full name
# $Ip - input path
# $In - input name
# $Ie - input extension
# $O - output file
# $Op - path to output file
# $On - output filename (without path)
# $Oe - output extension
# $R - release/debug setting for compiler
# --- build ----------------------------------------
# $T - target full name
# $Tp - target path
# $Tn - target name
# $O - output file
# $Op - path to output file
# $On - output filename (without path)
# $Oe - output extension
# $R - release/debug setting for linker
[Settings]
Target =
Category&01 = DEFAULT RUN CONFIGURATION
Working Directory =$Pp
Category&02 = COMPILER OPTIONS
Memory Model = s|l
Linker Script = p24FJ64GA004.gld
Processor =
Compiler = pic30-gcc
Linker = pic30-ld
Excluded Files = Excludes
Compiler Options = -Opa-
Linker Options =
Debugger=
[SettingsInfo]
Target = Provides a space for you to specify an output file and location of the program that the linker creates.
Working Directory = Provides a space for you to specify the directory in which executing occurs. If you do not specify a directory, executing occurs in the directory where the executable is located.
Excluded Files = This will exclude the file(s) included in this UE project group from the build.
Compiler Options = Provides a space for you to specify an additional compiler options.
Linker Options = Provides a space for you to specify an additional linker options.
Memory Model = s-small, l-large.
Debugger=Provides a space for you to set the debugger you want to use to debug application.
[Variables]
CPATH =C:\Program Files\Microchip\MPLAB C30
MCC = $(CPATH)\bin\$(Compiler)
MCL = $(CPATH)\bin\$(Linker)
LINKSCRIPT = $(CPATH)\support\gld\$(Linker Script)
UPLOADER = Z16080Upload.exe
[Environment]
[General]
TargetExt = .cof
ReleaseOut = Release
DebugOut = Debug
UseFullPaths =1
UseDosNames = 0
Excludes = $(Excluded Files)
[MakeCommands]
upload = Upload Application
debug=Start Debugger
makef=Show Makefile
[Upload Application]
Title = Upload $T
Cmd0 = $(UPLOADER) $T
Depends = $T
ShowWindow = 1
DisplayConsole = 1
[InsertFiles]
[FileGroups]
FGO = .o;
[GroupFormats]
FGO = %s
[Build]
Out = $T
Depends = $FGO
Cmd0 = ""$(CPATH)\bin\$(Compiler).exe" -mcpu=24FJ64GA004 $FGO "$(CPATH)\lib\libpPIC24Fxxx-coff.a" -o"$T" -Wl,-L"$(CPATH)\lib",-Tp24FJ64GA004.gld,-Map="$Tn.map",--report-mem
Cmd1 = ""$(CPATH)\bin\pic30-bin2hex.exe" "$T""
[.C]
Out = $In.o
ReleaseFlag = -O
Cmd0 = ""$(CPATH)\bin\$(Compiler).exe" -mcpu=24FJ64GA004 -x c -c "$I" -I"$Ip" -o"$(Out)" -g -Wall
[.s]
Out = $In.o
ReleaseFlag = -O
Cmd0 = ""$(CPATH)\bin\$(Compiler).exe" -mcpu=24FJ64GA004 -c "$I" -I"$Ip" -o"$(Out)" -g -Wall
[Start Debugger]
Title=Debug $T
Cmd0=$(Debugger) $T
Depends=$T
ShowWindow=1
[Show Makefile]
Title=Show makefile
Cmd0=uestudio makefile
ShowWindow=1
DisplayConsole=0