I’ve tried to defined my own toolchain based on the Gcc (Keil Arm).
`
model {
toolChains {
ArmCc(Gcc) {
path "${System.env.TOOLDISK}\\Keil_v5\\ARM\\ARMCC\\bin"
eachPlatform {
cCompiler.executable = 'armcc'
cppCompiler.executable = 'armcc'
staticLibArchiver.executable = 'armar'
linker.executable = 'armlink'
assembler.executable = 'armasm'
}
}
}
components {
main(NativeExecutableSpec) {
}
}
}
`
Unfortunately it doesn’t work, since armcc.exe doesn’t support version read in the same way as gcc, so I have following error:
- executable 'main:executable': No tool chain is available to build for platform 'windows_x86':
- Tool chain 'ArmCc' (GNU GCC): Could not determine GCC version: failed to execute armcc.exe -m32 -dM -E -.
It would work, if function GccVersionResult from org.gradle.nativeplatform.toolchain.internal.gcc.version would support in a better way version reading. I mean GccVersionResult should not brake if compiler cannot handle “-dM -E” parameters.
It’s not even possible to implement custom GccVersionResult, since it’s a private function.
The funny thing is that GccVersion is used only to validate if it has a support for ‘CanUseCommandFile’, which is true for the Keil ARM compiler.