Replies: 2 comments 1 reply
-
I can't answer how to get relative paths in makefiles, the answers on StackOverflow you linked to are pretty accurate. You can ask your vendor to provide a patch (MCUXpresso) to fix this. However, I can provide you an alternate solution that I know many people are using to automate their builds. Don't check in the makefiles, instead generate them in the scripted build using the headless builder. See https://gnu-mcu-eclipse.github.io/advanced/headless-builds/ from our related project which has a nice writeup. |
Beta Was this translation helpful? Give feedback.
-
Thanks Jonah for your reply and tips. I don't usually get great support from NXP, so that's why I am reaching out to the opensource community. It seems others are complaining about this on Eclipse platforms which are unrelated to MCUXpresso. Is this the right project? I assumed it is CDT that is responsible for generating the makefiles. Would you please point me to the code that does this? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Some of my source folders are "Linked Resources" with "Variable Relative Location" (i.e. PROJECT_LOC....\src\app). But they still show full path in the generated makefiles on Windows (i.e. C_SRCS += C:/repos/fw/src/app/timer.c) and Linux (i.e. C_SRCS += /home/phatpaul/repos/fw/app/timer.c).
This is causing a headache with my team who use different OS, since we began to commit the makefiles to version control (for a scripted build and eventually CI).
How can I get CDT to write the makefiles with relative path for all files?
FYI, I found some posts asking for this in the past, but no good solution.
https://stackoverflow.com/questions/22064413/linked-resource-absolute-paths-in-generated-makefiles-in-eclipse-cdt
https://stackoverflow.com/questions/33386873/configure-eclipse-cdt-to-generate-makefiles-with-relative-sources-paths
https://stackoverflow.com/questions/3997152/getting-eclipse-cdt-to-use-relative-include-paths-in-generated-makefiles (this one was specifically about "include paths" which is working, but source paths are still not working.)
EDIT: I'm using MCUXpresso IDE v11.7.0 which is based on Eclipse Version: 4.24.0.v20220607-0700 and Eclipse CDT version 10.7.0.202206081808
Beta Was this translation helpful? Give feedback.
All reactions