Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mcconfig assumes Microsoft linker when generating NMake files #100

Closed
simonhaines opened this issue Nov 2, 2018 · 2 comments
Closed

Mcconfig assumes Microsoft linker when generating NMake files #100

simonhaines opened this issue Nov 2, 2018 · 2 comments

Comments

@simonhaines
Copy link

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

@bfriedkin
Copy link
Collaborator

Simon -

We recommend adding a NMakeFile subclass to mcconfig.js to address this issue. As you've noted, we have done the same to address NMAKE file variations specific to target platforms.

Best of luck with your port and feel free to reach out here on GitHub should you have any follow-up questions.

Regards,
Brian

@simonhaines
Copy link
Author

Thanks, will do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants