Closed Xinyu-Sheng closed 1 year ago
This looks as if somehow the framework files are used twice, which is strange. Which version of the STM32CubeIDE and PlatformIO are you using? Does your code compile in the STM32CubeIDE? And could you maybe attach the part of your project that produces this problem (please strip it down to the absolute minimum that produces the problem)?
I generated the entire project using CubeMX, and added platformio.ini and setup_cubemx_env_auto.py in the project folder. After compilation, the project structure is as follows:
I believe that during the build process, similar target files were generated in the pio/build folder for FrameworkHALDriver and src, one from the driver generated by CubeMX and the other from PlatformIO. I am using Win11 environment with PIO version 6.1.6 and CubeMX version 6.7.0.
I think I found the issue. If I want to use the libraries from cubemx, I should use automatic_cubemx instead of automatic_pio!
Excellent. Can I close the issue then?
Yes, and thank you for your work!
I am a beginner with PlatformIO. Following your script, I encountered an error of redefinition during linking. Is it due to my personal reason? What are the possible solutions?