Open-CMSIS-Pack / devtools

Open-CMSIS-Pack development tools - C++
Apache License 2.0
73 stars 54 forks source link

Option to Target Host Computers (i.e. Linux) #1706

Open ReinhardKeil opened 3 weeks ago

ReinhardKeil commented 3 weeks ago

The Problem To Be Solved

During testing of high-level software stacks it is useful to test and develop functionality on host computers (i.e. Linux). This allows to verify functionality and once it is tested, the final hardware target (microcontroller) could be used.

While the CMSIS-Toolbox supports the notion of layers, it is currently not possible to target host computers. The effort for this should be investigated as I recommend to target CMSIS-Toolbox 3.0 for this feature.

jdelaney-adi commented 3 weeks ago

Having had specific needs to do such host-based unit testing using and within CMSIS packs, I have been working on a solution that adds support for native toolchain targets to the CMSIS-Toolbox.

For example, we have added support for native toolchain(s) as described here and then used a combination of build and target types to achieve native(host) and hardware-based build targets in csolution and cproject files.

Something that might help would be to standardise compiler/toolchain naming conventions so that even if the tools aren't distributed with support for every compiler available, there is a clear way for vendors to a) provide components that are compatible across compilers (or variants for different toolchains) and b) distribute toolchain support (.cmake) files for the CMSIS-Toolbox that support various toolchains.

Here are are couple of things we've found while trying to implement this approach:

ReinhardKeil commented 3 weeks ago

@jdelaney-adi thanks for your feedback. You may have realized that CMSIS-Toolbox 2.5.0 changed the backend to be more CMake "native". As said above: next step is to make a gap analysis that we will start in Q4'2024.