foxsi / foxsi-4matter

Code for FOXSI-4 formatter.
https://foxsi.umn.edu/
1 stars 3 forks source link

Faster build #29

Closed KriSun95 closed 10 months ago

KriSun95 commented 1 year ago

It takes a lot of minutes to build the executables on Raspberry Pi. For a lot of development, we need to write a little code, then rebuild, then try it out, then write more…. So the long build time slows this sort of prototyping down. The goal of this task is just to speed up the build process on Raspberry Pi.

We could refactor the project structure similar to this, so that instead of all the sources getting built into one library we have multiple that get built separately. Each library would have its own CMakeLists.txt. I would suggest grouping the current source files like this (because these clumps are often modified together):

I don’t actually know how much this would improve build speed though

From Thanasi's Google Doc

KriSun95 commented 1 year ago

This has been started and partially addressed in #28

thanasipantazides commented 1 year ago

Another option: cross-compile the whole software for the Raspberry Pi architecture. Build done on a faster laptop/desktop machine, then just send the binary over to the Pi to run. There is a guide on doing this in CMake here.

thanasipantazides commented 1 year ago

BTW, I edited the starting description to have a different source grouping for the libraries. These are organized by dependency now and may help build faster?

thanasipantazides commented 10 months ago

Yixian completed! Thanks!