cancel
Showing results for 
Search instead for 
Did you mean: 

X-CUBE-SPN7 Wrong paths in SW4STM32 example project

Posted on June 19, 2017 at 12:46

Hello, I am trying to compile the example project provided by ST for the X-CUBE-SPN7 motor control kit. The kit includes a Nucleo-F302R8, X-NUCLEO-IHM07M1, a brushless motor and an ACDC power supply. I proceeded to download the example code from ST website:

https://my.st.com/content/my_st_com/en/products/embedded-software/mcus-embedded-software/stm32-embedded-software/stm32cube-expansion-software/x-cube-spn7.html

To import the project in SW4STM32 in Windows (I will call it Eclipse from now on)

1. Extract the contents of en.X-CUBE-SPN7.zip into a destination folder with a short path to avoid Windows long path issues. All files of the package are located under this directory:

C:\Workspaces\MotorControl_WP\STM32CubeExpansion_SPN7_V1.0.0

2. In Eclipse, go to: File -> Switch Workspace -> Other and paste C:\Workspaces\MotorControl_WP\. Click OK and Eclipse will restart.

3. In Eclipse, go to: File -> Import -> Existing projects into workspace -> Select Root Directory: C:\Workspaces\MotorControl_WP\. Press Enter.

4. From the four projects eclipse will found, select only the one for STM32F302R8 and click Finish.

The project seems to be imported correctly, but it fails immediatly when I hit compile, because it cannot find the files referenced in the project. After digging around in .project file, I found that all the files are referenced using an absolute path, apparently from the computer where the project was created. For example:

C:/Users/giuseppe scuderi-sl/Desktop/MOTOR CONTROL/Peppe/trunk/Firmware/X-CUBE-SPN7-MC-6STEP/Projects/Multi/Examples/MotorControl/Src/main_F302.c

I solved the problem opening .project file with a text editor, replacing all occurrences of 'C:/Users/giuseppe scuderi-sl/Desktop/MOTOR CONTROL/Peppe/trunk/Firmware/X-CUBE-SPN7-MC-6STEP' to 'C:\Workspaces\MotorControl_WP\STM32CubeExpansion_SPN7_V1.0.0'. It's still an absolute path, but now it works on my computer and at least I can compile the project. Still, it is not the ideal solution, because the project will fail when I copy it into another location. In my opinion, it should use relative paths.

Few questions to ST on my side:

a. Is my procedure to import the example project correct? I could not find any explicit documentation on how to import this project in SW4STM32, so I followed this procedure based on my experience with other projects.

b. Is it possible that ST updates ALL the example projects from the official website to use relative paths? It is not the first time I face this issue.

c. Is SW4STM32 supported by ST at all?

d. In my job I am promoting ST evaluation boards to the maker and DIY community. I think ST puts a lot of effort to help introduce their line of STM32 microcontrollers to the non-expert users, and I think they did a good job with the STM32 Cube MX. However, I think that SW4STM32, and in general any IDE based on Eclipse is tremendously complicated to understand, its working internals are obscure and, in general, never does what you want it to do. People want an IDE that 'Just Works'. Compare it to Arduino for example. Is there any plan to do a 'Simple' IDE for STM32 Nucleo platform?

Thanks,

Víctor 

2 REPLIES 2
Posted on June 20, 2017 at 19:45

Aren't path issues inherent in the Eclipse Workspace implementation?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Khouloud GARSI
Lead II
Posted on June 21, 2017 at 13:08

Hola

P.Victor

‌,

a) You are importing the project correctly.

b) Regarding this example,please use relative paths. The issue is already highlighted internally and will be corrected on the coming version of the package.

Sorry for any inconvenience this may have caused.

Is it possible that ST updates

ALL the example projects

from the official website to use relative paths?

It is not the first time I face this issue.

-> Could you please give a reference where this issue occurs.

c) The SW4STM32 is supported by ST.

Khouloud.