I want to link some other files into my project, where should I add the file path ?
I have add the path here ,but it does not work.
I am not definitely sure, but I think it is not possible to add path to file directly in S32DS. You have to edit the .args file in your project. But be careful, .args is automatically generated by S32DS when you compile the project.
So at first, compile the project and then edit the .args file. If you do it in opposite way, S32DS will delete your changes.
My colleague solved very similar problem in the following thread. Please look:
How to change function linking order in S32DS?
If you have any other questions, please feel free to write me back.
Here is another question. I want to compile the code using some other compiler, and then import the elf file into S32 Studio to flash my MCU. Is it supported by S32 Design Studio? How should I do it.
Yes this is possible. Please have a look here:
HOWTO: download separate elf/srec/hex file to microcontroller using S32 Design Studio
We've experienced some limitations with debugging elf built with GHS build tools + GDB .
According to your reply" it is not possible to add path to file directly in S32DS". If there is a file OBCM.c in app folder and main.c in src folder, I can't inlcude the OBCM.c file in main.c such as writing #include "OBCM.c" in the top of main.c ?
Yes, you could be able to include OBCM.c file but you should add the include path in the project properties.
Nevertheless including ".c" files is not a good coding practice and could introduce some hard-to-find problems to your project.
I follow your suggestion and the error message" can't find out the .h" is disappeared when I add the path in the C complier Includessetting . It seems to be able to recognize the .h file. But it shows another error, " undefine reference to my_function() which I have defined in my h file, extern void my_function(void). Do you have any idea for this? Thank you!
Include paths are intended for header files only.
If you have external library you can add the path into linker:
In case of any other file/object:
This is how the settings above influence the .arg file used by makefile:
Regarding the elf question please have a look here:
Hope it helps.
Retrieving data ...