2024-08-21 05:54 AM
TL;DR: is there an "ST approved" method to put have a custom machine's CubeMX project AND generated code under source control?
I am trying to do something similar to OP's goal in this post, which didn't receive a full response, I think.
I have also gone through the "create your own machine" guide and I managed to generate a custom machine, except a couple of snags (e.g. CubeMX 6.12 adds a CA7/ element to the generated device tree path, which the guide seems to ignore, I guess it's out of date?).
Now, this work needs to go to source control somehow, and the guide doesn't provide any guidance on how to do that.
Solved! Go to Solution.
2024-10-02 07:00 AM
Hello @MScor.1,
If you haven't solved your issue yet, I would suggest you to create a new layer at the same level as meta-st-stm32mp-addons by following:
https://wiki.st.com/stm32mpu/wiki/How_to_create_a_new_open_embedded_layer
Next, you can add your custom machine inside the <custom-layer>/conf/machine/
The envsetup.sh script will search for any machine described in /layers/meta-st and will find yours.
Let me know if this answer meets your requirements.
Best Regards,
Arnaud
2024-10-02 07:00 AM
Hello @MScor.1,
If you haven't solved your issue yet, I would suggest you to create a new layer at the same level as meta-st-stm32mp-addons by following:
https://wiki.st.com/stm32mpu/wiki/How_to_create_a_new_open_embedded_layer
Next, you can add your custom machine inside the <custom-layer>/conf/machine/
The envsetup.sh script will search for any machine described in /layers/meta-st and will find yours.
Let me know if this answer meets your requirements.
Best Regards,
Arnaud
2024-10-02 10:51 AM
Hello Arnaud,
Thank you for the suggestion, I didn't realise the script would look into sibling layers, I will try that and get back to you!
2024-10-02 11:36 AM - edited 2024-10-02 11:40 AM
It seems to be working (I am running a full clean build now, but it did recognise my custom machine).
Thank you!
Can I suggest that this is somehow added to the wiki documentation (e.g. here)? The current version of the page assumes that you will put your machine in the addons layer, which is not what most people would want, because it doesn't work with revision control.
2024-10-14 03:02 PM
Small correction: I wrote before that the solution works. It does, unless you create a build from scratch by sourcing meta-st/scripts/envsetup.sh.
If you do that, the layer where your machine is defined will be added to your bblayers.conf instead of meta-st-stm32mp-addons, breaking the build.
Looking at envsetup.sh, it seems that a good workaround is to add meta-st-stm32mp-addons to the #@NEEDED_BSPLAYERS line in the machine conf, like this: