Replies: 18 comments
-
Nice to see Protobuf/NanoPB used with modm!
Sounds good!
I think the best thing to do is look at @salkinium|s repo https://github.com/modm-io/Invensense-eMD (if you haven't already) and adopt the structure. Maybe @salkinium has more/better advice? |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Wouldn't this mean, that the generated protocol headers/sources are just available after running scons build or do I miss the point? Because this would impede intellisense (or similar) capabilities. |
Beta Was this translation helpful? Give feedback.
-
Yes, that's true. In that case would also add an explicit The nanopb build system integrations look pretty useful at first glance, perhaps we can copy them over and call them from our existing build systems? Edit: I guess |
Beta Was this translation helpful? Give feedback.
-
Yeah I thought that too, I will try to reuse them and see how far I get with these :D |
Beta Was this translation helpful? Give feedback.
-
Why? I consider the separation of code generation and compilation, as well as the build system independence to be very advantageous. |
Beta Was this translation helpful? Give feedback.
-
I tried to get a little bit more familiar with lbuild and scons. As far as I can tell, additional build targets that are running certain scripts instead of standard c/cpp compiling need to be specified via "Command" in the SContruct file, which would require to modify the SContruct generation within the modm scons module (correct me, if there is an easier solution). Additionally we cannot use "nanopb" as build target command, since this is already a build target (via the static library). Right now I tend to support the oppinion of @rleh since this is the much simpler solution with the only downside that the lbuild "build" have to be triggered everytime the .proto definition is changed. |
Beta Was this translation helpful? Give feedback.
-
Ok, then let's do it this way. Even though I don't like to add more responsibilities to lbuild, it's better than not having nanobp at all and we can add build system support later. I've created a modm-ext/partial-nanopb repo and added you as maintainer. Copy an update script and the GitHub Actions ci from another repo to create a minimal nanobp git submodule that you can add to |
Beta Was this translation helpful? Give feedback.
-
Are you sure I'm added as maintainer, because it seems like I'm not allowed to push branches right now. |
Beta Was this translation helpful? Give feedback.
-
I've resent your invite. I accidentally created a |
Beta Was this translation helpful? Give feedback.
-
There seems to be |
Beta Was this translation helpful? Give feedback.
-
I checked the output from the github api call and it seems that the 0.x.x Tags are somehow only present in the ui, the api taglist contains only the nanopb-0.x.x tags. |
Beta Was this translation helpful? Give feedback.
-
I renamed the repo again to |
Beta Was this translation helpful? Give feedback.
-
Did you make progress with adding the nanopb module into modm/ext? |
Beta Was this translation helpful? Give feedback.
-
I was pretty occupied by work the last weeks, so I couldnt find the time to progress with my private projects including the nanopb integration. I'll try to make the small PR for nanopb this week. |
Beta Was this translation helpful? Give feedback.
-
Small update: I prepared everything so far for a pull-request to modm. Problem right now is that I cannot get protoc running with the current release tags of nanopv (cannot find correct python parser), so I guess their master (which is working) has some crucial bugfix. I keep digging into the problem. Update2: Yeah, its a hotfix for Windows from 13.04.2021 which fixed the problem, hopefully this gets into a new releasetag soon. |
Beta Was this translation helpful? Give feedback.
-
Do you want to open a Draft PR regardless? I would like to see the nanopb failure integrated into the (Windows) CI for future refactorings. |
Beta Was this translation helpful? Give feedback.
-
Sorry for the long wait - the PR is now online (#657) |
Beta Was this translation helpful? Give feedback.
-
For a project of mine I wrote a very crude (due to my limited experience) external lbuild-repository to integrate protocol buffers via nanopb into modm:
https://github.com/lmoesch/modm-nanopb
The reason to wrap it into a seperate repo, instead of direct modm-integration, is that this needs an additional python package installed (protobuf, suprise suprise).
Since I plan on refining the code for general public use, I wonder whats "best pratice" in this case, to provide it to all interested modm users.
Beta Was this translation helpful? Give feedback.
All reactions