STMicroelectronics / STM32CubeWB

Full Firmware Package for the STM32WB series: HAL+LL drivers, CMSIS, BSP, MW, plus a set of Projects (examples and demos) running on all boards provided by ST (Nucleo, Evaluation and Discovery Kits).
https://www.st.com/en/embedded-software/stm32cubewb.html
Other
229 stars 139 forks source link

User code in SVCCTL_InitService code block erased during code generation #87

Closed TheAlbertDev closed 7 months ago

TheAlbertDev commented 9 months ago

Describe the set-up

Describe the bug User code between /* USER CODE BEGIN SVCCTL_InitService */ and /* USER CODE END SVCCTL_InitService */ is erased after each code generation.

I want to increase manually the max_attr_record of a service to create manually a characteristic (the OTA characteristic following the heart rate OTA example). Code example:

  /* USER CODE BEGIN SVCCTL_InitService */
  /* max_attr_record to be updated if descriptors have been added */
#if (BLE_CFG_OTA_REBOOT_CHAR != 0)
  max_attr_record += 2U;
#endif
  /* USER CODE END SVCCTL_InitService */

How To Reproduce

  1. Configure in STMCubeMX the server app with custom template.

  2. Create one service with one characteristic.

  3. In code, add an additional characteristic to the service being the OTA characteristic (like in the heart rate OTA example provided by the package).

Additional context N/A

Screenshots N/A

RJMSTM commented 9 months ago

Hello @TheAlbertDev,

Thank you for this report, can you try with STM32CubeWB v1.18.0 version. The error may disappear once you will upgrade to this version. If not, I look forward to your reply.

Thank you again for your contribution. With regards,

RJMSTM commented 8 months ago

Hello Any feedback please

RJMSTM commented 7 months ago

Hello @TheAlbertDev,

Please allow me to close this thread as no activity. You may reopen it at any time if you have any details to share with us in order to help you to solve the issue. Thank you for your comprehension.

With regards

TheAlbertDev commented 7 months ago

Hello,

I have tried to upgrade to the new version, but it does not prompt me to upgrade (the typical continue or migrate message). In the .ioc it is not set to not ask .

ProjectManager.AskForMigrate=true

And in the project manager I don't have the option to change package (I can't find the typical use default check).

image

How can I update the project?

Edit:

Latest STM32CubeWB package installed:

image