cancel
Showing results for 
Search instead for 
Did you mean: 

Need guidance on using CubeIDE to reconfigure HAL for STM32H745

rbarris
Associate II

Here is my environment

macOS 10.13

CubeIDE v1.4.2

Nucleo-H745ZI board

Example project: FreeRTOS_AMP_Dual_RTOS - generated by IDE using the info center dialog to import the example

Example builds and runs great, debugger works, this is all good.

OK, now I want to enable the DAC. From grepping the sources in the project, it doesn't look like the HAL code that was built, presumably by CubeMX, has the DAC set up. (If you suspect I am wrong about this, tell me what I should grep for to disprove it).

How do I ask the IDE to regenerate the HAL code with the DAC drivers present ?

Or, was there some step I could have taken during project setup that would have let me do that customization then ?

TLDR: how do I modify HAL for an example project after it is first built and working, to enable more hardware peripherals?

There is a cute blue "MX" button at the upper right of the IDE window and it doesn't do anything.

Observation - everything I read about CubeMX involves .ioc files. But there is no .ioc file in the example directory in the IDE workspace (I checked with 'find'). There are a few in the IDE package that match this board:

./Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.common.mx_6.0.0.202007160824/db/plugins/boardmanager/boards/G71_Nucleo_NUCLEO-H745ZI-Q_STM32H745ZI_Board.ioc
./Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.common.mx_6.0.0.202007160824/db/plugins/boardmanager/boards/G71_Nucleo_NUCLEO-H745ZI-Q_STM32H745ZI_Board_AllConfig.ioc
./Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.common.mx_6.0.1.202008101643/db/plugins/boardmanager/boards/G71_Nucleo_NUCLEO-H745ZI-Q_STM32H745ZI_Board.ioc
./Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.common.mx_6.0.1.202008101643/db/plugins/boardmanager/boards/G71_Nucleo_NUCLEO-H745ZI-Q_STM32H745ZI_Board_AllConfig.ioc

0693W000002ljB1QAI.png

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

If you're in standalone CubeMX, you choose where to save the IOC file with File->Save.

If you're in CubeIDE mode, File -> New -> STM32 Project to get started. "Example Selector" won't produce an IOC file but "MCU/CPU Selector" and "Board Selector" will. I think it saves the IOC the workspace by default. Definitely should be saving somewhere.

You enable FreeRTOS within the configuration.

Once you have the IOC, you can open/edit/regenerate code and it should work as you want.

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

4 REPLIES 4
TDK
Guru

If the example doesn't provide the IOC file, you can't do this with CubeMX.

To add a peripheral, edit the "*_hal_conf.h" file to include the DAC define, and then manually add the HAL DAC files to the project.

If you feel a post has answered your question, please click "Accept as Solution".

OK, let's come at this from the other angle.

What steps do I take to

a) create a project that has FreeRTOS and is properly configured for the part

b) update that configuration over time, if I need to enable additional subsystems

In a separate attempt, creating an example project from scratch, 0693W000002lwFGQAY.pngI thought I went through the steps with the CubeMX tool correctly, but that resulting project folder doesn't have an .ioc in it either.

TDK
Guru

If you're in standalone CubeMX, you choose where to save the IOC file with File->Save.

If you're in CubeIDE mode, File -> New -> STM32 Project to get started. "Example Selector" won't produce an IOC file but "MCU/CPU Selector" and "Board Selector" will. I think it saves the IOC the workspace by default. Definitely should be saving somewhere.

You enable FreeRTOS within the configuration.

Once you have the IOC, you can open/edit/regenerate code and it should work as you want.

If you feel a post has answered your question, please click "Accept as Solution".

OK that gives me a good direction to try. I'd love to be able to do the whole thing from inside CubeIDE; I was only using the "import example" path and that explains why I was getting stuck in this corner.