cancel
Showing results for 
Search instead for 
Did you mean: 

May I know what is the best practice for ST cubeMX AWS IoT expansion project integrate to an existing ST cubeMX project?

jiangpen
Associate II

I have a STM32H755 board, and it works with cube AWS expansion.

https://www.st.com/en/embedded-software/x-cube-aws.html

Now I want port all the AWS related code to my customize board which based on STM32H7B3 (I only need the CM7 parts). But I found the cubeMx expansion code is very different with the code generated for CubeMX.

May I know what is the best way to get the AWS IoT working on a different EVK board rather than STM32H755?

Thanks

Ivan

1 REPLY 1
grd
ST Employee

The X-CUBE-AWS application examples are composed of 3 parts, in addition to the FreeRTOS code which does not depend on the target:

  1. The secure bootlader (SBSFU)
  2. The user application initialization code
  3. The FreeRTOS porting layer (mostly the PALs)

Each of those parts must be adapted to run on a new target.

  1. X-CUBE-SBSFU provides a 2-image bootloader example for STM32H7B3I-DK, which should be a suitable reference for your target. Still, a careful review of the differences with the STM32H755 customized version included in X-CUBE-AWS is important if you plan to support the FreeRTOS OTA update feature.
  2. The user application init can be generated by STM32CubeMX for a new target and diffed/merged with the NUCLEO-H755ZI user application example of X-CUBE-AWS. The code structure is reused from a CubeMX generation, so it should be almost compatible. Note that the software components which are part of the FreeRTOS distribution (kernel, LwIP, mbedTLS amongst others) cannot be managed by STM32CubeMX because their version and their location in the source tree differ from the standard STM32Cube components. So better keep the CubeMX-generated code in a sandbox (dedicated folder), and merge the init code manually into your development project.
  3. The FreeRTOS porting layer can roughly be reused from the NUCLEO-H755ZI examples of X-CUBE-AWS.

Regarding the user application project file, I would start from a CubeMX-generated project for your target, and proceed by manual comparison and copy/paste from the X-CUBE-AWS application example, with a specific attention to the post-build commands.