Skip to content

Mcconfig assumes Microsoft linker when generating NMake files #100

Description

@simonhaines

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').

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions