cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to understand workspaces and projects

Dave Jones
Associate III
Posted on March 04, 2017 at 19:17

I've used various microprocessor dev systems for several decades, but am new to Eclipse and STM32.

I bought a STM32L476G-EVAL board, installed the SW4STM32 toolchain, downloaded the STM32L4 firmware package and placed it in a folder on my hard drive.

For my first example project I set the workspace to the outer folder holding the entire STM32L4 package and then imported the project that was inside the SW4STM32/STM32L476G_EVAL folder within the specific example that I was trying out. It compiled, loaded and ran fine.

I then went to try another example and when I went to import the next project it wouldn't let me, saying that the project was already within the workspace. And I couldn't figure out a way to open that project.

So I figured I was using the workspace wrong, so I created a new workspace which I set as the SW4STM32 folder just outside the project folder and then imported the project in the STM32L476G_EVAL folder inside of it. That worked, and I was able to build and run the project. I did that for a few more examples, each time creating a new workspace with one project in it.

But I can't open multiple projects at the same time because they are each in separate workspaces and it seems Eclipse/SW4STM32 can't have multiple workspaces open at once. I am used to being able to work on several projects at the same time, so I can copy/paste between them or read code from one while writing code in another.

So what is the trick to having multiple projects within one workspace? I gather that if I were to start from a blank workspace and to create blank projects from scratch that I could do that. But is there a method that I can use to work on multiple projects from the STM32L4 firmware examples and have those projects all be within one workspace? So I could, for example, cut pieces out of one example and paste them into another example? Or should I make clones of the example projects into a new workspace somewhere, and then end up with multiple projects (each a clone of something from the firmware set) in my own workspace so that I can then work on those multiple projects at the same time?

5 REPLIES 5
S.Ma
Principal
Dave Jones
Associate III
Posted on March 05, 2017 at 08:28

Is the problem perhaps because all of the example projects in the STM32L4 firmware package for a specific board (in my case the STM32L476G-EVAL board) have the same project name? I'm wondering if maybe when I set the workspace to a higher level folder, like the parent folder for the whole package, and then try to add more than one example project, it fails because the next project has the same name as the project that was already added to the workspace and SW4STM32 can't add another project to the workspace that has the same name.

If that's the case, why did ST give all of the projects the same name??? In my case all of the example projects are called STM32L476G_EVAL. Why couldn't they have added a unique name to the front or back of the name? Like 'GPIO_EXTI_STM32L476G_EVAL'. Then every project would have a unique name. Or just give it the name that the earlier folder is given. In this example, 'GPIO_EXTI'.

Posted on March 05, 2017 at 12:04

Usually a compiler toolchain has settings and in particular the searching paths, where to find the .h and .c files which maybe scattered in various places. They are usually localized relatively from the project file location (../../src etc...). It would be better to move or copy folders with same folder depth level than moving them up/down in the folder tree? In the project settings there would also be the compile options and defines which may affect the resulting compiled code. 

Dave Jones
Associate III
Posted on March 06, 2017 at 20:51

It looks like the original problem I was having is because all of the example projects in the STM32L4 firmware package for a given demo/eval board have the same project name. If I try to add more than one of them as a project within the same workspace I can't do it, and I assume it's because they all have the same name. If I select an example project for a different demo board, I can add it since the examples for a different board all have the name of that board. But of course I could only add one of those. (and I don't want to add one of those, since they're not for my demo board).

So again I ask, why did ST do something so stupid as to name every project with the same name? They should have named each project with the name of the example. That way each project would have a unique name and I could add several projects to the same workspace. As it is I can only add one project to the workspace.

Posted on March 08, 2017 at 11:22

Hi

Jones.Dave.002

,

I understand the 'issue' you are facing and confirm that you may apply as workaround the edit of directory name as well as files .project & .cproject to put same name.

I'll share your feedback internally to know what can be done as enhancement on this regard.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.