-
Is there a proper way to build the static library, and a folder for headers, only? Without a main function, the library gets generated and all the modm generated source code (hpp+cpp) is in a subfolder. It stops at 'undefined reference to main' when linking to build the firmware. What about using the library then? If I cd in avr logger example and try to manually build it
results in a huge scroll of errors filling up my terminal history. Looks like all the PORTx PINy definitions missing and more.
and I don't know how to expand those variables. Looks like scons doesn't give a flag for that. Do I have to disable the generation of SConstruct and mod it? |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
You can use For
The generated If you only want to generate the - env.SConscript(dirs=generated_paths, exports="env")
+ libraries = env.SConscript(dirs=generated_paths, exports="env")
+ env.Alias("library", libraries[0]) You can also delete everything below those lines, if you only want to generate the static lib. |
Beta Was this translation helpful? Give feedback.
-
If this solves your issue, I can add |
Beta Was this translation helpful? Give feedback.
-
I also just found a bug, where SCons adds |
Beta Was this translation helpful? Give feedback.
-
That would be awesome! I've been searching for it a couple of days but I couldn't make it. If I use StaticLibrary instead of BuildTarget() or Return() ... I simply get nothing. |
Beta Was this translation helpful? Give feedback.
-
The include path is defined by this section in the env.AppendUnique(CPPPATH=[
abspath(r"ext"),
abspath(r"ext/gcc/libstdc++/include"),
abspath(r"src"),
]) So you can basically copy these folders where you want, and then set the For you that would mean:
I'll fix the format bug and add |
Beta Was this translation helpful? Give feedback.
-
Please remember to use |
Beta Was this translation helpful? Give feedback.
The include path is defined by this section in the
modm/SConscript
(relative to that file):So you can basically copy these folders where you want, and then set the
-Ipath
flags accordingly. You can remove all source files from those paths too (perhaps even with a.gitignore
).For you that would mean:
main.cpp
, only withproject.xml
with all the settings/modules you want (build path is defaulted to.
outside of the modm example folder).lbuild build
and copy the generatedmodm/ext
,modm/ext/gcc/libstdc++/include
,modm/src
folders where you nee…