I already managed to setup the files and project wizard, as well as a compiler entry. I simply used the existing XML files as a templated and changed them accordingly.
What I did not figure out yet though is, how to get rid of the common compiler switches which are located in: CB\share\CodeBlocks\compilers\options_common_warnings.xml
Is this somewhere included hardcoded? I haven't seen any file that includes this so I haven't found any way to get rid of this yet. Which means that the switches for the assembler are currently mixed with the generic C switches.
At the moment I don't see how I can override those or get rid of them entirely.
If you have NOT got rid of the C/C++ options post your XML file.
I just tried making a custom compiler with no options and it seems to have worked; but, I did create cpp and h files to do it.
FYI:
The lines below include the file options_common_cmds.xml, options_common_re.xml, and options_common_sort.xml
<Common name="cmds"/>
<Common name="re"/>
<Common name="sort"/>
Tim S.
I was thinking that was needed to get rid of the options; but, it did NOT seem to be true.
Yes, for the options it is not needed. Do you know where the includes are setup? I still have AVR paths in my commandline, where I don't know where they come from. Linker and assembler.
ml.exe /IC:\MASM32\avr\include
LINK.exe /LC:\MASM32\avr\lib
I used the avr-gcc file. I removed all references but I don't see where this comes from.
Compiler
<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_compiler>
<CodeBlocks_compiler name="MASM 32/64"
id="masm"
weight="60">
<Path type="master">
<Search envVar="PATH"
for="ml.exe"/>
<if platform="windows">
<Search path="C:\MASM32"/>
<Fallback path="C:\MASM32"/>
</if>
<if platform="windows">
<Search path="D:\MASM32"/>
<Fallback path="D:\MASM32"/>
</if>
</Path>
<Path type="include">
<Add><master/>\include</Add>
</Path>
<Path type="lib">
<Add><master/>\lib</Add>
</Path>
</CodeBlocks_compiler>
Options
<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_compiler_options>
<CodeBlocks_compiler_options>
<if platform="windows">
<Program name="ASM" value="ml.exe"/>
<Program name="LD" value="LINK.exe"/>
<Program name="DBGconfig" value="gdb_debugger:Default"/>
<Program name="LIB" value="LINK.exe"/>
<Program name="WINDRES" value="windres.exe"/>
<Program name="MAKE" value="mingw32-make.exe"/>
</if>
<Switch name="includeDirs" value="/I"/>
<Switch name="libDirs" value="/L"/>
<Switch name="linkLibs" value="-l"/>
<Switch name="defines" value="/D"/>
<Switch name="genericSwitch" value="/"/>
<Switch name="objectExtension" value="obj"/>
<Switch name="needDependencies" value="true"/>
<Switch name="forceCompilerUseQuotes" value="false"/>
<Switch name="forceLinkerUseQuotes" value="false"/>
<Switch name="logging" value="default"/>
<Switch name="libPrefix" value="lib"/>
<Switch name="libExtension" value="a"/>
<Switch name="linkerNeedsLibPrefix" value="false"/>
<Switch name="linkerNeedsLibExtension" value="false"/>
<Switch name="supportsPCH" value="true"/>
<Switch name="PCHExtension" value="gch"/>
<Switch name="UseFullSourcePaths" value="true"/>
<!-- Summary of MASM options: -->
<Option name="Produce debugging symbols"
option="/MZ"
category="Debugging"
checkAgainst=""
checkMessage="You have optimizations enabled. This is Not A Good Thing(tm) when producing debugging symbols..."
supersedes=""/>
<Option name="Generate COFF format (not available for x64) required for Win32"
option="/coff"
category="Debugging"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Generates line-number information in object file."
option="/Zd"
category="Debugging"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Generates CodeView information in object file."
option="/Zi"
category="Debugging"
checkAgainst=""
checkMessage=""
supersedes=""/>
<!-- warnings -->
<Option name="Warning Level 0 and report an error if warnings exist"
option="/w"
category="Warning level"
checkAgainst=""
checkMessage=""
exclusive="true"
supersedes=""/>
<Option name="Warning Level 0"
option="/W 0"
category="Warning level"
checkAgainst=""
checkMessage=""
exclusive="true"
supersedes=""/>
<Option name="Warning Level 1"
option="/W 1"
category="Warning level"
checkAgainst=""
checkMessage=""
exclusive="true"
supersedes=""/>
<Option name="Warning Level 2"
option="/W 2"
category="Warning level"
checkAgainst=""
checkMessage=""
exclusive="true"
supersedes=""/>
<Option name="Warning Level 3"
option="/W 3"
category="Warning level"
checkAgainst=""
checkMessage=""
exclusive="true"
supersedes=""/>
<Option name="Warning Level 4"
option="/W 4"
category="Warning level"
checkAgainst=""
checkMessage=""
exclusive="true"
supersedes=""/>
<!-- symbols -->
<Option name="Preserves case of all user identifiers."
option="/Cp"
category="Symbols"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Maps all identifiers to upper case (default)."
option="/Cu"
category="Symbols"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Preserves case in public and extern symbols."
option="/Cx"
category="Symbols"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Makes all symbols public."
option="/Zf"
category="Symbols"
checkAgainst=""
checkMessage=""
supersedes=""/>
<!-- Listing -->
<Option name="Turns on listing of all available information."
option="/Sa"
category="Listing"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Adds first-pass listing to listing file."
option="/Sf"
category="Listing"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Turns off symbol table when producing a listing."
option="/Sn"
category="Listing"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Turns on false conditionals in listing."
option="/Sx"
category="Listing"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Generates a preprocessed source listing (sent to STDOUT). See /Sf."
option="/EP"
category="Listing"
checkAgainst=""
checkMessage=""
supersedes=""/>
<!-- Language -->
<Option name="Specifies use of FORTRAN- or Pascal-style function calling and naming conventions. Same as OPTION LANGUAGE:PASCAL."
option="/Gc"
category="Language"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Specifies use of C-style function calling and naming conventions. Same as OPTION LANGUAGE:C."
option="/Gd"
category="Language"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Specifies use of __stdcall function calling and naming conventions. Same as OPTION LANGUAGE:STCALL."
option="/GZ"
category="Language"
checkAgainst=""
checkMessage=""
supersedes=""/>
<!-- Misc -->
<Option name="Generates emulator fix-ups for floating-point arithmetic (mixed language only)."
option="/FPi"
category="Misc"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Marks the object as either containing no exception handlers or containing exception handlers that are all declared with .SAFESEH."
option="/safeseh"
category="Misc"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Ignore INCLUDE environment path."
option="/X"
category="Misc"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Option name="Enables M510 option for maximum compatibility with MASM 5.1."
option="/Zm"
category="Misc"
checkAgainst=""
checkMessage=""
supersedes=""/>
<Command name="CompileObject"
value="$compiler /nologo $options $includes /Fo $object /c $file "/>
<Command name="CompileResource"
value="$rescomp $res_includes -fo$resource_output $file"/>
<Command name="LinkExe"
value="$linker /nologo /subsystem:windows $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options"/>
<Command name="LinkConsoleExe"
value="$linker /nologo $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options"/>
<Command name="LinkDynamic"
value="$linker /dll /nologo $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options"/>
<Command name="LinkStatic"
value="$lib_linker /lib /nologo $libdirs /out:$static_output $libs $link_objects $link_resobjects $link_options"/>
<Command name="LinkNative"
value="$linker /nologo /subsystem:native $libdirs /out:$exe_output $libs $link_objects $link_resobjects $link_options"/>
</CodeBlocks_compiler_options>
Here's the code that likely does it.
</Path>
<Path type="include">
<Add><master/>\include</Add>
</Path>
<Path type="lib">
<Add><master/>\lib</Add>
</Path>