Developing on example (i.e. X-CUBE-AWS) with STM32CubeIDE
Hello,
I am on my first steps in the STM32 world, using STM32CubeIDE on Linux. I have a 32F413HDISCOVERY board to play with.
I have no problems developing simple applications from scratch in the IDE. My problems start when I want to integrate external code provided as examples by ST.
In particular, I want to develop a AWS IoT application. I have downloaded the X-CUBE-AWS example and managed to import it, build it and make it work on the board. Now I would like to modify the example to add more functionalities (for example, control a motor).
I cannot understand how to integrate the code generated during the micro configuration step and the example. Main questions:
- the structure of the files and folders in the example project and a new generated project is quite different. For example, the main in the example is completely different, with no "safe" sections for user code. Do I miss something or it is because STM32CubeIDE is different from Workbench for STM32? Would it be easier if I change software?
- in the examples the pins configuration is mixed up in different files (wifi, LEDs, serial and so on). This is quite different from what I get from the configurator. Should I work with a new project with no assigned pins and simply import the header files of the example to get the right pin assignment? What about when I need to add other pins/functionalities?
- Not sure if I am importing the driver/middleware/header files of the example correctly. I have included the respective folders in the Project-Properties-C/C++ Build-Settings-MCU GCC Linker-Libraries-Library search path and selected the folders in the filesystem. However, I don't see the files in the project explorer and I am worried that some files are duplicate of the one coming from the configurator.
In general, as you see, I am quite confused. Any help, even from another example, would be most welcomed.
Thanks in advance
Davide