Closed saperlot closed 1 month ago
@saperlot do you apply execute:
in the .cproject.yml file or in the .csolution.yml file?
Forget the request, the information is there.
I've just tried it again within cproject.yml. But here it will fail when the batch file does not return Status OK.
So then, i've included EXIT /B 0
at the end of the batch, and it does execute on both buildtypes with correct files.
But it still only execute without --contex builds.
As documented here please note for-context
and not-for-context
are only supported when the execute
node is in *.cproject.yml
, in such case the execute
is iterated and runs for each context:
https://github.com/Open-CMSIS-Pack/cmsis-toolbox/blob/2.5.0/docs/YML-Input-Format.md#executes
The execute
nodes in *.csolution.yml
are considered at solution level and for this reason they run just once, they are not iterated over multiple contexts.
@saperlot I have removed the critical label for now. Given Daniel's link to the documentation, do you still believe the behavior of the tools is different from what has been documented?
@jkrech I do not have a for-context directive in the executes config. What i mean with "But it still only execute without --contex builds." is that when i issue a build command from vsocode cmsis extensions build button, then it only builds the current active context with cbuild *** --context-set --context ***.Debug***
in this scenario, the execute command wont be executed.
Thank for raising this issues. We improved the description https://github.com/ReinhardKeil/cmsis-toolbox/blob/main/docs/YML-Input-Format.md#executes. The executes:
node are only processed on full application builds. Using --context
triggers only project builds. Using --context-set
works fine.
We will work on better messaging for the user to indicate when execute: commands are performed.
Can this issue be closed?
This issue https://github.com/Open-CMSIS-Pack/cbuild2cmake/issues/185 will probably address your concern.
Is there an existing issue for this?
Unusable feature
Post Build scripts are not executed corretly.
Current Behavior
For example:
Included in csolution.yml:
cbuild *** --context-set --context ***.Debug***
is issued, the script wont execute.Now if we remove the for-context in executes: config:
Now if we set the for-context to - .Release in executes: config:
--context ***-Release+***
, error appears: error csolution: context ".Debug+" referenced by access sequence 'hex' does not exist or is not selectedwhen building without context set, it executes with hex files in the Debug output folder.
--> So executes is not usable, which is a neccessary feature, therefore i've set it as a blocker
Another issue is, that build script execution direction is tmp/ I would assume that base directory to be on root.
Expected Behavior
Executes handled correctly.
Steps To Reproduce
--> see current behavior
Affected tools
Affected operating systems
Environment
Windows 11 cmsis-toolbox: 2.5.0