nxp-mcuxpresso / mcux-sdk

MCUXpresso SDK
BSD 3-Clause "New" or "Revised" License
339 stars 148 forks source link

kconfig: allow for other toolchains than armgcc #178

Open stefanct opened 8 months ago

stefanct commented 8 months ago

As of now, the kconfig written by cmake via mcux_create_config_cmake effectively enforces the use of the system's native arm-none-eabi-gcc although this is not the default in the Eclipse and VSCode plugins of MCUXpresso and it is also not necessary: I have changed the line above to use set(CONFIG_TOOLCHAIN mcux) and this works fine AFAICT (when using appropriate linker files, setting ARMGCC_DIR to /usr/local/mcuxpressoide/ide/tools/ or equivalent etc).

I'd like to see an option to configure this via cmake on a per project basis just like other toolchain-related options such as CFLAGS. At least some kind of documentation (e.g., a comment above the referenced line in the python code) that clarifies if/which other toolchains are OK to use would be very nice.

Allowing for using other toolchains is not strictly necessary but would allow for building identical binaries in the IDEs and on the command line (which is not possible otherwise since the Eclipse plugin cannot use the system's native toolchain AFAIK). This might also help testing the SDK + redlib/finding regressions due to differences between the official ARM GCC and NXP's build.