openthread/ot-efr32

[build] integrate silabs tool for code generation

lmnotran opened this issue · 2 comments

Hi @jwhui ,

Is it acceptable for me to integrate our SLC-CLI tool into the ot-efr32 repo?

Section 2.1 of UG520: Software Project Generation & Configuration with slc-cli

The SLC-CLI .zip files are available here:
https://www.silabs.com/documents/login/software/slc_cli_windows.zip
https://www.silabs.com/documents/login/software/slc_cli_mac.zip
https://www.silabs.com/documents/login/software/slc_cli_linux.zip

It will allow us to greatly expand board support while also reducing maintenance points. We'll be able to remove all of the pre-generated config headers and linker files in the [src|https://github.com/openthread/ot-efr32/tree/main/src] directory. We'll also be able to simplify the CMake files needed to generate our openthread-efr32 library since I'll be able have the SLC-CLi tool generate a CMake file that defines everything we need for any supported board.

From a user prospective, not much will change. When the user first clones the repo, they'll still run ./script/bootstrap to install all required tools, including SLC-CLI. To build the example applications for the efr32 platform, they'll still run ./script/build. The only breaking change we anticipate right now is that it won't be necessary for users to specify which MGxx platform they're targeting.

For example, building for the EFR32MG12 with board brd4161a would look like:
current command: ./script/build efr32mg12 -DBOARD=brd4161a
new command: ./script/build brd4161a (not finalized)

As for the installation location, this is undecided currently, but I was thinking it could be installed in one of the places below:

  • In the repo at third_party/silabs/slc-cli and added to the .gitignore
  • In /opt/
  • In a user-specified location stored in an environment variable such as SLC_INSTALL_DIR

Best,
Mason

jwhui commented

@lmnotran , thanks for raising this issue. This all sounds fine to me.

I figured as much, but thanks for confirming @jwhui !