Open-CMSIS-Pack / cbuild

Commandline utility to orchestrate the intermediate build steps of CMSIS Build
Apache License 2.0
4 stars 10 forks source link

cbuild fails with no RTE folder #53

Closed fred-r-perso closed 1 year ago

fred-r-perso commented 1 year ago

Hi,

I am using this project: https://github.com/fred-r-perso/lwfsm/tree/develop/examples/stm32/cmsis_lwfsm_demo

But cbuild fails:

fredr2010@penguin:~/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo$ cbuild lwfsm_demo.csolution.yml --debug --configuration .debug+B-U585I-IOT02A
info cbuild: Build Invocation 1.5.0 (C) 2023 Arm Ltd. and Contributors
debug cbuild: CMSIS_PACK_ROOT: /home/fredr2010/.arm/Packs
debug cbuild: CMSIS_COMPILER_ROOT: /home/fredr2010/.config/Code/User/globalStorage/ms-vscode.vscode-embedded-tools/vcpkg/root/downloads/artifacts/vcpkg-artifacts-cmsis/tools.open.cmsis.pack.ctools/1.5.0/etc
debug cbuild: CMSIS_BUILD_ROOT: /home/fredr2010/.config/Code/User/globalStorage/ms-vscode.vscode-embedded-tools/vcpkg/root/downloads/artifacts/vcpkg-artifacts-cmsis/tools.open.cmsis.pack.ctools/1.5.0/bin
/home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/sw_project/lwfsm_demo.debug+B-U585I-IOT02A.cprj - info csolution: file generated successfully
/home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/sw_project/lwfsm_demo.debug+B-U585I-IOT02A.cbuild.yml - info csolution: file generated successfully
/home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/lwfsm_demo.cbuild-idx.yml - info csolution: file generated successfully
info cbuild: Building context: "lwfsm_demo.debug+B-U585I-IOT02A"
================================================================
debug cbuild: outdir: 
debug cbuild: intdir: 
debug cbuild: dirs.intDir: /home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/sw_project/tmp/lwfsm_demo/debug/B-U585I-IOT02A
debug cbuild: dirs.outDir: /home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/sw_project/out/lwfsm_demo/debug/B-U585I-IOT02A
debug cbuild: vars.binPath: /home/fredr2010/.config/Code/User/globalStorage/ms-vscode.vscode-embedded-tools/vcpkg/root/downloads/artifacts/vcpkg-artifacts-cmsis/tools.open.cmsis.pack.ctools/1.5.0/bin
debug cbuild: vars.etcPath: /home/fredr2010/.config/Code/User/globalStorage/ms-vscode.vscode-embedded-tools/vcpkg/root/downloads/artifacts/vcpkg-artifacts-cmsis/tools.open.cmsis.pack.ctools/1.5.0/etc
debug cbuild: vars.cbuildgenBin: /home/fredr2010/.config/Code/User/globalStorage/ms-vscode.vscode-embedded-tools/vcpkg/root/downloads/artifacts/vcpkg-artifacts-cmsis/tools.open.cmsis.pack.ctools/1.5.0/bin/cbuildgen
debug cbuild: vars.cpackgetBin: /home/fredr2010/.config/Code/User/globalStorage/ms-vscode.vscode-embedded-tools/vcpkg/root/downloads/artifacts/vcpkg-artifacts-cmsis/tools.open.cmsis.pack.ctools/1.5.0/bin/cpackget
debug cbuild: vars.xmllintBin: /usr/bin/xmllint
debug cbuild: vars.cmakeBin: 
debug cbuild: vars.ninjaBin: 
debug cbuild: CMSIS_PACK_ROOT: /home/fredr2010/.arm/Packs
debug cbuild: CMSIS_COMPILER_ROOT: /home/fredr2010/.config/Code/User/globalStorage/ms-vscode.vscode-embedded-tools/vcpkg/root/downloads/artifacts/vcpkg-artifacts-cmsis/tools.open.cmsis.pack.ctools/1.5.0/etc
debug cbuild: CMSIS_BUILD_ROOT: /home/fredr2010/.config/Code/User/globalStorage/ms-vscode.vscode-embedded-tools/vcpkg/root/downloads/artifacts/vcpkg-artifacts-cmsis/tools.open.cmsis.pack.ctools/1.5.0/bin
debug cbuild: vars.packlistFile: /home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/sw_project/tmp/lwfsm_demo/debug/B-U585I-IOT02A/lwfsm_demo.debug+B-U585I-IOT02A.cpinstall

M650: Command completed successfully.

*** ERROR M204:
  Path not found: '/home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/sw_project/RTE/Device/STM32U585AIIxQ/stm32u585xx_flash.ld'!
error cbuild: error executing 'cbuildgen cmake'
error cbuild: error building './sw_project/lwfsm_demo.debug+B-U585I-IOT02A.cprj'

The problem is that no RTE folder is created, so the config files are not found.

fred-r-perso commented 1 year ago

I have to do this:

fredr2010@penguin:~/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo$ csolution convert -s lwfsm_demo.csolution.yml 
/home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/sw_project/lwfsm_demo.debug+B-U585I-IOT02A.cprj - info csolution: file generated successfully
/home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/sw_project/lwfsm_demo.release+B-U585I-IOT02A.cprj - info csolution: file generated successfully
/home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/sw_project/lwfsm_demo.debug+B-U585I-IOT02A.cbuild.yml - info csolution: file generated successfully
/home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/sw_project/lwfsm_demo.release+B-U585I-IOT02A.cbuild.yml - info csolution: file generated successfully
/home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/lwfsm_demo.cbuild-idx.yml - info csolution: file generated successfully
fredr2010@penguin:~/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo$ cbuildgen cmake --update-rte ./sw_project/lwfsm_demo.debug+B-U585I-IOT02A.cprj

M652: Generated file for project build: '/home/fredr2010/gh/lwfsm/examples/stm32/cmsis_lwfsm_demo/tmp/lwfsm_demo/B-U585I-IOT02A/debug/CMakeLists.txt'
jkrech commented 1 year ago

The above is expected behavior. Here some background:

@fred-r-perso, you are touching on the questions:

As the term build implies, this orchestration tool by default expects a "fully configured" solution as input. Which means it requires that the "configuration" is complete and all files in the RTE folder are present, that required generators have been run and there is no unresolved dependencies.

cbuild invokes csolution with the option --no-update-rte and cbuild invokes cbuildgen without the option --update-rte

In case the build of your solution shall include the update of the RTE directory you may invoke cbuild with the option --update-rte

fred-r-perso commented 1 year ago

Hi Joachim, thanks for the explanations, this is clear.

Hoohaha commented 1 year ago

I think it should be added in documentation.