cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE modify HAL code

JKut
Associate II

We have to make minimal changes to parts of the HAL code, which would be overwritten by code generation.

Is there a recommended way to implement such changes, such that they don't get reverted by generation?

The two ways I can think of both have their problems:

  1. patch the firmware pack files (i.e. in our case the extracted stm32cube_fw_g0_v151.zip files). This way, the changes would be part of the generated code. This would have to be part of the workspace setup for each developer, and would have to be repeated when the pack is updated.
  2. patch the generated code after generation. This would be an additional manual step after code generation. Lacking a "post-generation" hook (see my other post), this is easily forgotten by developers.

Is there anything obvious that I'm missing to achieve modifying the HAL code?

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

No, you are not missing anything. Either this way, or that way.

View solution in original post

1 REPLY 1
Pavel A.
Evangelist III

No, you are not missing anything. Either this way, or that way.