STMicroelectronics / STM32CubeH7

STM32Cube MCU Full Package for the STM32H7 series - (HAL + LL Drivers, CMSIS Core, CMSIS Device, MW libraries plus a set of Projects running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits))
https://www.st.com/en/embedded-software/stm32cubeh7.html
Other
479 stars 299 forks source link

STM32CubeH7 MDK-ARM Code behaves abnormally when MicroLIB is unselected #67

Closed rxa1031 closed 3 years ago

rxa1031 commented 3 years ago

Hello,

STM32CubeH7 Keil Code behaves abnormally when MicroLIB is unselected. Currently using STM32Cube MCU Package for STM32H7 Series version 1.8.0.

Toolchain IDE: MDK-ARM (minimum version 5.27).

I have tried confirming the behavior both with Keil Compiler Version 5 and Keil Compiler Version 6.

This abnormal behavior is NOT OBSERVED when ULINK Pro debugger is used for debugging code. Hence, unable to find the reason for the issue.

Please help.

Regards, Rajeev

RKOUSTM commented 3 years ago

Hi @rxa1031,

Thank you for your contribution. In order to allow a better analysis of this problem, could you please give us more details on how to reproduce it and could you please give us the name of the project that is used to reproduce this issue.

Thank you again for your contribution.

With regards,

rxa1031 commented 3 years ago

Hello @RKOUSTM ,

I am sharing both the IOC files that I use.

STM32CubeMX_Issues.zip

When MicroLIB is not selected and uGnu is 1 (along with uC99 being 1), the code may crash even before it jumps to main function.

I am not in position of share the generated code along with propitiatory code. But these IOC files should help with:

  1. Confirming that MicroLIB setting is not set when code is generated for MDK-ARM (minimum version 5.27)
  2. MicroLIB if already checked in UVPROJX / UVOPTX file (with say Keil Compiler Version 6 selected) then on regenerating the code with help of IOC file the MicroLIB check box get deselected. (Same is the case when Keil Compiler Version 5 is selected).
  3. In generated file UVPROJX, both uC99 and uGnu tags are set to 1. I believe that uGnu should be set to 0.
  4. STM32CubeMX does not allow generating code which can be compiled using Keil Compiler version 6, so one needs to open UVPROJX and UVOPTX files to change folder name RVDS to GCC and then copy the FreeRTOS GCC\ARM_CM4F to appropriate path based on the path name which has the folder GCC name mentioned. The FreeRTOS code then compiles without issues with Keil Compiler Version 6. However on regenerating the code with help of IOC file he GCC folder is deleted and RVDS folder and its paths are added back to project.

You may call me on my mobile number or have a ZOOM call, in case you may want a live demo.

Thanks and regards, @rxa1031

RKOUSTM commented 3 years ago

Hi @rxa1031,

Thank you for this report. However, this is rather a Cube MX related issue and I am afraid we do not address it here. Please submit it to the ST Community, in the dedicated section. There you shall find people who will address your request and whom you will hopefully find a solution with.

Now, as this issue is not directly related to some software component published within this repository (CMSIS, HAL, BSP, etc.) but rather to our ecosystem (namely the Cube MX tool), please allow me to close it.

Thank you for your contribution. We are looking forward to reading from you again.

With regards,