Closed WasabiFan closed 5 years ago
lbuild is at fault, ie. there should not be two files generated. I thought I fixed that tho, in fact, the .c file is specifically excluded from being copied.
But your example repo doesn't even include any modm:cmsis:dsp
modules, so why would it even generate those files?
To confirm -- You aren't asking for an answer to that from me, are you? I don't have good insight into what would be different in my test setup to cause this error so I probably can't provide much guidance.
Sorry, I forgot about this!
This happens because the SConstruct file searches recursively for all application sources inside its parent folder and so it's trying to build all the source files inside modm-lib
too.
The quickfix is to place your application inside a folder. The real fix is to add the modm-lib folder to the SCons ignore list and I'm preparing a PR for that right now.
The real fix is to add the modm-lib folder to the SCons ignore list and I'm preparing a PR for that right now.
Nah, it's not possible to make this reliable, since the build script generator doesn't have enough information (in general). You need to place your application into a folder and I need to update the docs to make this clear.
Thanks for the investigation!
What is your suggested project structure? The docs didn't seem to provide any examples that weren't in-tree examples within the modm repo.
In my case I'd like my project repo to contain a submodule pointing to the version of modm I'm using, so that everyone is working from the same library version. Does this mean I need the actual code to be 3 levels deep rather than 2?
Actually, after reading the docs PR I think I get it; the problem wasn't about my submodule but about the project files being at the same level as the place I was putting modm. Sounds good to me.
I'm trying to follow the installation and getting started guides. I have a folder in which I've pasted the example
project.xml
andmain.cpp
from the getting started guide, and have also cloned the modm repo undermodm-lib/
. When I runscons
, I get the following:I pushed my simple demo repo here, and have included a transcript demonstrating the issue below.
I can see that the CMSIS repo includes both an assembly file and a C file with the same name, but don't know which component of this build system is at fault for failing to handle it properly.