Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CubeMX #125

Open
FerdinandEn opened this issue May 8, 2024 · 9 comments
Open

CubeMX #125

FerdinandEn opened this issue May 8, 2024 · 9 comments
Labels
question Further information is requested

Comments

@FerdinandEn
Copy link

I have tried to create a CubeMX project (STM32F756) directly in VSCode. When I call the customized line in VSCode I only get the information that the exit code is 1.

csolution CubeMX.csolution.yml run --generator CubeMX --context CubeMX.Debug+MyBoard

Do I need a new version of the F7 pack to be able to reproduce the procedure?

I can't reproduce the example either, as I don't have the U585I packs with the required version.

@jkrech
Copy link
Member

jkrech commented May 8, 2024

@FerdinandEn , did you follow the steps in this ReadMe
Make sure you are using CMSIS-Toolbox 2.3.0 and you need to clone the pack-examples and register the pdsc files as local repositories, as described. This gives you access to STM32U585 DFP and BSP. The STM32F7xx_DFP does not support the global generator yet.

@FerdinandEn
Copy link
Author

FerdinandEn commented May 8, 2024

CMSIS Toolbox is 2.3.0

For the CubeMX-Example:
I did not install the packs with cpackget. I have now done that. I was able to execute the cpackget instructions successfully. The Packs are also entered as local repositories.

STM32U5xx_DFP::3,0,0-dev0
B_U585_IOTA2A_BSP::2.0.0-dev1

csolution CubeMX.csolution.yml run --generator CubeMX --context CubeMX.Debug+MyBoard

now leads to the error

error csolution: required pack: Keil::[email protected] not installed

After change of CubeMX.cbuild-pack.yml to dev1 CubeMX opens. I was then able to carry out all further steps successfully.

@jkrech
Copy link
Member

jkrech commented May 8, 2024

Thanks a lot for your feedback and the hint that the cbuild-pack.yml is locking the BSP to 2.0.0-dev0.
An alternative to "overriding" the cbuild-pack.yml is to add the option --load latest which will ensure that the latest installed packs will get used.

As you can see here: https://github.com/Open-CMSIS-Pack/pack-examples we do not currently have the STM32F7 pack in the works yet.

@FerdinandEn
Copy link
Author

After successfully completing the steps for using CubeMX, I wanted to gain some more experience. When opening Software Components, I received the following error message:

image

I am trying to set up a new project with the board. At first I was able to enter all the settings in Software Components. However, I noticed that the dev packs were not used. After switching to the dev packs, I could no longer use Software Components

image


I have another question:

If I convert a STM32 project with uVision and then to VS Code. Can I then open CubeMX directly and adjust the settings?

The following templates are used for CubeMX in uVision

FrameworkCubeMX_gpdsc.ftl
MX_Device_h.ftl

The templates are missing when opening CubeMX directly.

@jkrech
Copy link
Member

jkrech commented May 14, 2024

The first problem you report, looks like an extension specific issue that should be reported here:
https://github.com/ARM-software/vscode-cmsis-csolution/issues
It looks like the pre-release pack versions are not considered by the component window.

On the second topic, we are in the process of moving away from gpdsc, replacing this with the global generator. In MDK uVision 5.40 we will start supporting the global generator. We will no longer rely on the above mentioned ftl file shipped as part of the STM32*_DFP packs. Instead the cbridge is handling the data/file conversion.
https://github.com/Open-CMSIS-Pack/generator-bridge.
At that point uvprojx projects converted to csolution shall be compatible.

@jkrech jkrech added the question Further information is requested label May 14, 2024
@FerdinandEn
Copy link
Author

Thanks for the information.
I have now found the problem with the display in Software Components. If you include the packages in the uVision Pack Installer (File->Manage Local Repositories) the error occurs. If you use cpackget add the problem does not occur.

@FerdinandEn
Copy link
Author

I have now succeeded in creating a new project for the STM32U585AIIx. To do this, however, I had to make some changes in various yml files. If you are interested I can describe my approach.

@jkrech
Copy link
Member

jkrech commented May 16, 2024

Yes, please I would be interested in your approach.

@FerdinandEn
Copy link
Author

FerdinandEn commented May 16, 2024

Packs for STM32U5xx included with cpackget add

New Solution Project with (create a new solution)

Target Device: STM32U585AIIx
Project Name: CubeMX (to be able to use the entry of the commands directly from the example)
Solution Name: CubeMX

CubeMX.csolution.yml

CubeMX.cbuild-pack.yml

  • delete resolved-pack -> Keil::STM32U5xx_DFP@>=2.2.1

CubeMX.cproject.yml

  • Delete Files, file: ./main.c (other main.c is added by CubeMX)
  • Add an new c-file e.g dummy.c to keep Group entry
    Remark: if I use an extra folder (e.g. SRC), the entry is added as ..\SRC\dummy.c. I has to change it to ../SRC/dummy.c
  • Delete component Device:Startup
  • Add component: Device:CubeMX

Use csolution CubeMX.csolution.yml list generators --verbose to get registered Generators

CubeMX (Global Registered Generator)
base-dir: STM32CubeMX/STM32U585AIIx
context: CubeMX.Debug+STM32U585AIIx
context: CubeMX.Release+STM32U585AIIx

Use csolution CubeMX.csolution.yml run --generator CubeMX --context CubeMX.Debug+STM32U585AIIx

-> CubeMX is started -> make settings -> generate code

Use cbuild CubeMX.csolution.yml --update-rte

info cbuild: build finished successfully!

Now new pack components can be selected, e.g. RTOS2 e.g. Keil RTX5

  • do not include startup, this is done be CubeMX -> ignore validation warning
  • do not forget to change NVIC-setting in CubeMX
    csolution CubeMX.csolution.yml run --generator CubeMX --context CubeMX.Debug+STM32U585AIIx
    • Disable code generation for Systick, SVC and PendSV

Use cbuild CubeMX.csolution.yml --update-rte

info cbuild: build finished successfully!

Unfortunately, I don't have a board to test the program

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants