-
Notifications
You must be signed in to change notification settings - Fork 247
Description
I'm porting Moddable to NXP's Kinetis microcontrollers, which use the arm-none-eabi toolchain. When using mcconfig to generate a NMake file on Windows, the NMakeFile class hard-codes the use of 'cl' when creating rules for auto-generated files, instead of the required 'arm-none-eabi-gcc'.
I think this issue has occurred before, as the SynergyNMakeFile class has the workaround for this case too. Possible fixes include: adding another subclass for this specific case, using recipes to override build rules for auto-generated targets, or allowing the platform's .mk file determine how to build the targets. In this last case, mcconfig does not need to add rules for these targets, but instead nominate the auto-generated files in a variable (much like the existing OBJECTS variable) and have each platform's makefile include generic rules to build them. Unless there is some other preferred way. Simply replacing 'cl' for '$(LD)' or '$(CC)' is not enough as Microsoft's linker has a different format for specifying the output file ('/Fo' instead of '-o').