cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO-C031C6: Error when updating via MX

CKlib
Associate II

Good day,

There seems to be an error in the implementation of the NUCLEO-C031C6 when generating code for the project after updating the peripherals. After loading an example project and compiling and testing all is well but once you update the project by adding a peripheral or changing the peripheral parameters the contents of the Driver\STM32C0xx_HAL_Driver are removed. See attached screenshots.

Regards,

Charles

7 REPLIES 7
Foued_KH
ST Employee

Hello @CKlib​ ,

I couldn't reproduce your issue.

I've already configure the I2C and generate the code


_legacyfs_online_stmicro_images_0693W00000bjbZGQAY.pngAfter that I re-configure by removing I2C and I've good results :


_legacyfs_online_stmicro_images_0693W00000bjbZQQAY.png 

Foued

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

CKlib
Associate II

Hello Foued,

Please try using the UART as I have tried two examples and both failed.

USART_Communication_TxRx_DMA_Init

UART_Printf

Regards,

Charles

CKlib
Associate II

PS: I'm using the latest version of CubeIDE:

Version: 1.12.1

Build: 16088_20230420_1057 (UTC)

Pavel A.
Evangelist III

In your CubeIDE project view, the HAL file are shortcuts.

Have you selected in CubeMX "Add files... as reference", or was the option different and you changed it to "copy..." later? What is the resolved location of missing HAL files?

CKlib
Associate II

Hi Pavel,

Started a new workspace, loaded the example "USART_Communication_TxRx_DMA_Init" for NUCLEO-C031CS. Compiled the project and all ok.


_legacyfs_online_stmicro_images_0693W00000bjev5QAA.pngOpend the "USART_Communication_TxRx_DMA_Init.ioc", changed the Parity to Even and then back to None and saved, when asked to generate code responded "Yes".

As soon as the project is reconfigured the driver files are deleted. Confirmed by checking the directory "D:\Projects\STM_Workspace\USART_Communication_TxRx_DMA_Init\Drivers\STM32C0xx_HAL_Driver\Src\", both the Src and Inc files have been deleted.

No other changes made to the setup.


_legacyfs_online_stmicro_images_0693W00000bjevPQAQ.png

CKlib
Associate II

To confirm I loaded the same example for the P-NUCLEO-WB55-NUCLEO eval and it works as expected. So I can only assume there is an issue with the C031 implementation.

Before:


_legacyfs_online_stmicro_images_0693W00000bjfDnQAI.pngAfter:


_legacyfs_online_stmicro_images_0693W00000bjfE2QAI.png

CKlib
Associate II

PS: I tried the STM32G071 and it also works correctly and I can use it as a substitute for the STM32C031 as they have the same pinout.