Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8082

SDK • Re: How to deal with 2 source files in one project?

$
0
0
Hello,

Thank you very much for the comments, suggestions and additional content!

I completely agree that working correctly with .h and .c files is essential for large projects.
As I am currently trying to get a project from a publication up and running, I don't have all the options available to me. At the very least, I want to avoid the work of refactoring / redesigning it.
In my case, two changes helped:
  • Mention the include file (core1.c) with the supporting functions only once – either in #include or in CMakeList, as part of entry ‘add_executable(....)’
    In my case, the option #include worked best..
  • Add a line

    Code:

    target_compile_options(RDSgeneratorDualCoreV01 PRIVATE -O2)
    to CMakeList to avoid problems with the linker.
I am still confused as to why gcc takes the “inline” attribute into account on the one hand, but creates references to it on the other.
However, when using the compiler options -02 or -03, arm-gcc behaves more smart.

Since it's running and everything looks good, I now have to test the software and validate the results :-)

Thanks again,
Kind regards,

Martin

Statistics: Posted by MartinHill — Wed Feb 18, 2026 10:28 am



Viewing all articles
Browse latest Browse all 8082

Trending Articles