Developing on example (i.e. X-CUBE-AWS) with STM32CubeIDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-29 9:28 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-29 11:22 PM
See my answers here: Converting Examples from SW4STM32 to CubeIDE and HELP - CMWX1ZZABZ-078 project on STM32CubeIDE
I guess you're facing mix of both.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-30 1:33 AM
Thanks Cartu38, it helps a bit but not much (I did find your first link before posting).
From what I understand, the best (and long) way is to generate a new project and then importing the single files and bits of code that I will need. But what about pin assignment? Some of them are already defined somewhere in random header files. Should I use the latter's and not assign anything via CubeMX or I should painstakingly "back engineer" the used pins, configure them on CubeMX and remove them from the header files? I hope my concern is clear.
Davide
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-11-30 4:42 AM
I'm fully sharing your pain but yes if expecting to rely on STM32CubeMX automation I guess no choice only suitable path is reverse engineering.
Or rely on STM32CubeMX on a side project then extract from it valuable material to reinject it within AWS example.
