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

Buildsystem does not allow a c and assembly source with the same name #755

Closed
perigoso opened this issue Mar 27, 2021 · 2 comments · Fixed by #760
Closed

Buildsystem does not allow a c and assembly source with the same name #755

perigoso opened this issue Mar 27, 2021 · 2 comments · Fixed by #760
Labels

Comments

@perigoso
Copy link
Collaborator

Buildsystem does not allow a c and assembly source with the same name, where only one is supposed to be compiled.

I found this issue while trying to implement an example for the efm32 family in #749.

The Cmsis provided by silabs as both a c implementation and an assembly implementation for the startup, only one should be compiled, but the buildsystem right now tries to compile both, regardless of which is included.

I have followed up the issue and think it is in rules.MK where both c and s files are compiled into a single object list, then when the objects are called for compilation, it resolves to both a c file and a s file.

I will be working on a fix soon.

@hathach
Copy link
Owner

hathach commented Mar 29, 2021

this is indeed tricky, maybe we could auto add suffix _asm or _s into the object file of .S file in the rule.
https://github.com/hathach/tinyusb/blob/master/examples/rules.mk#L55 . I will also try to make an PR to fix this as well

@perigoso
Copy link
Collaborator Author

perigoso commented Mar 30, 2021

You PR looks good! I just tested it and got a successful build.

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

Successfully merging a pull request may close this issue.

2 participants