tum-ei-eda / mlonmcu

Tool for the deployment and analysis of TinyML applications on TFLM and MicroTVM backends
Apache License 2.0
29 stars 12 forks source link

Handling of CMake versions #59

Closed PhilippvK closed 1 year ago

PhilippvK commented 2 years ago

The new muriscvnn has a relatively strict requirement on the used CMake version (3.22 or so) which leads to erros on most OSes.

Currently this results in an error during mlonmcu setup which is quite hard to read so we should catch stuff like this earlier.

Two ideas:

@rafzi @fabianpedd what do you think?

rafzi commented 2 years ago

@fabianpedd do we really have to use such a recent cmake version? it would be nice to stick with 3.16 which is available in ubuntu 20

fpedd commented 2 years ago

@rafzi I think I was using some recent feature only available in newer CMake versions. I will have a look and check if it's actually necessary. But the unit tests run just fine on the GH action machines (both on Ubuntu 18 and 20). Do they have newer CMake versions on their machines?

PhilippvK commented 2 years ago

I think there was some strange behavior where CMAKE_OBJCOPY and CMAKE_OBJECTDUMP would not be populated automatically when cross-compiling (by providing a toolchain file which sets CMAKE_C(XX)_COMPILER which was resolved by going to the latest version. However this approach was rather lazy because setting the variables manually in the toolchain file would have also worked out.

i can double check with the version of cmake installed on the chair computers by default and report if the issue still exists.

PhilippvK commented 2 years ago

Unrelated to muriscvnn:

Managing the cmake version used by MLonMCU would still be a good idea as some of the main design aspects of the project have been:

However there are also some disadvantages:

In the end we could go with a hybrid approach as also possible with all the other dependencies (riscv_gcc, tflmc,…)

PhilippvK commented 1 year ago

See #97