Hi,
We have a version under development that allows toolchains and build processes to be registered.
However you might be able to use some of what is already there
1)
You can set a different avr toolchain in Tools>options however the program names such as avr-gcc need to remain the same
2)
The boards.txt def supports specifying different toolchain exe names which is how we build teensy 3.0 for ARM. To cut a long story short, you specify the exe names and vm passes all the standard arguments as if it was using avr. This sounds like it will do as you describe.
Here is an example of the boards properties you can set:-
teensy3.upload.avrdude_wrapper=teensy_reboot
teensy3.build.mcu=mk20dx128
teensy3.build.cpu=cortex-m4
teensy3.build.option1=-mthumb
teensy3.build.option2=-nostdlib
teensy3.build.option3=-D__MK20DX128__
teensy3.build.cppoption1=-fno-rtti
teensy3.build.linkoption1=-mthumb
teensy3.build.linkscript=mk20dx128.ld
teensy3.build.architecture=arm-none-eabi
teensy3.build.command.gcc=arm-none-eabi-gcc
teensy3.build.command.g++=arm-none-eabi-g++
teensy3.build.command.ar=arm-none-eabi-ar
teensy3.build.command.objcopy=arm-none-eabi-objcopy
teensy3.build.command.objdump=arm-none-eabi-objdump
teensy3.build.command.size=arm-none-eabi-size
teensy3.build.core=teensy3
teensy3.build.noarchive=true
teensy3.build.elide_constructors=true
teensy3.build.gnu0x=true
teensy3.build.dependency=true
teensy3.build.time_t=true
#teensy3.build.linker_relaxation=true
teensy3.build.post_compile_script=teensy_post_compile
Note that the "build.architecture" property specified the name of a folder that exists below the "ArduinoIDE\Hardware\Tools" folder.
Normally an Arduino Ide would simply use the exe programs from "ArduinoIDE\Hardware\Tools\Avr", however Teensy3 has its own toolchain architecture specified in
"build.architecture=arm-none-eabi". This forces the compiler to use the core from "ArduinoIDE\Hardware\Tools\arm-none-eabi" instead of "ArduinoIDE\Hardware\Tools\avr" After you have set the architecture of a board to a different toolchain all you then need to do is to specify the names of the programs that are run at various compile/upload stages as follows:-.
apm2halARM.build.architecture=arm-none-eabi
apm2halARM.build.command.gcc=arm-none-eabi-gcc
apm2halARM.build.command.g++=arm-none-eabi-g++
apm2halARM.build.command.ar=arm-none-eabi-ar
apm2halARM.build.command.objcopy=arm-none-eabi-objcopy
apm2halARM.build.command.objdump=arm-none-eabi-objdump
apm2halARM.build.command.size=arm-none-eabi-size
The uploader can also be mapped to a different exe name:-
apm2halARM.upload.avrdude_wrapper=
Finally you have additional properties that enable you to include .ld scripts and other stuff if required.
So in summary, hopefully you just need to add a "Tools>myArmXyz" to the ide/hardware folder and make a new boards.txt entry in "sketchbook\hardware\myHalCore"
Does all this make sense?