Loading...
 
Skip to main content

System Workbench for STM32


workspace woes how to add a project

I have a workspace configured.
I have created a couple projects, neither has worked correctly.
I contacted STM FAE and sent him the files, and he created a clean project and sent it to me.
I have unpacked the zip file into the workspace directory.
However, even if I relaunch eclipse the project does not show up in the project explorer.
I cannot find a way to simply open the project (doesn't show up on a open project).
I cannot find a way to add an existing project. Since I have created a project, the last one created opens up.

Eclipse as an IDE is not user friendly. I'm used to the Silabs one. No problem, pops open a window, you navigate to the .wsp file you want and click, and it opens the project. Simple as that. I find no analogous way to do that.
I made the mistake of creating a project for the STM32F411, and specified that I wanted the jpeg and sdio libraries as well. They fail on build. I could find no way to remove them from the project.
I created a new project, did NOT select those files. Yet the build tried to build the ANYWAY. And failed.
Neither project will build, and I can't figure out how to remove the jpeg etc from the project.

So I had the FAE create a clean project and send it to me.
I can't open it.
If I click on the .cproject and run, it opens elipse, with that file open. All xml stuff. Does not open the project.
If I click on .project it asks me for the application (windows 8) to use to open it. I navigated to the AC6 directory and selected eclipse.
It does not open the file.
just shows me the prior two bad projects.

HOW do you force the project explorer to pick up the projects out of the workspace file?

I'm getting extremely frustrated with this whole process. It should not be so hard.

Help.

Hi,

to add an existing project to the workspace you have to Import it. To Import an existing project do the following:

  • Use the File > Import menu command
  • In the import dialog (Select page) select the item General > Existing Project into Workspace and click the Next button

Image

  • In the Import dialog (Import Project page) select
  1. Or the archive file if your existing project is compressed in an archive,
  2. Or the parent folder where the existing project is stored

Image

  • The project should be displayed in the Projects list
  • Select the project and click the Finish button


Let me suggest to check the Copy projects into workspace option in order to create a copy of the project you want to import.

Regards,
Stefano


France

Hello,

For the JPEG and SDIO libraries, these are third party libraries provided by ST. We are working on a way to provide some support but currently you have to manually configure them for correct compilation.

If you look at the project explorer, you'll see that the errors when compiling them are located in a "library" project for your board (should be named something like stm32f411-disco_stdperiph_lib or nucleo-f411_re_hal_lib depending on your board and firmware version). These projects hold the ST firmware with the options you have selected and are referenced by all projects using the same board.

To correct the errors you may either

  1. Delete the JPEG and SDIO sub-directories in the Utilities folder of this project, thus effectively removing these components from your build
  2. Look at the errors and correct them (this is usually not so complicated)

To navigate to an error you can either:

  • notice a red cross on folders and files where there is errors
  • double click error messages in the console output
  • click error messages in the Problems view at screen bottom

As any IDE, Eclipse has its own tricks but, once used to them, you'll see that is is overall quite convenient.

Regards,
Bernard

Thanks. Got the project inported.
I was at that dialog before, but had no idea what to do with it.

To make this simpler for someone, it should give the most common things as click boxes.

Existing project should not be hidden under "general". IT should be in the list above general, or have a checkbox. The other common tasks should be there too.

So now I got it compiled, picked debug and can't figure out how to download.
There should be two buttons that are not there.
1. Connect that would allow you to select the connection and connect to the board, with an indication as to when you are connected, i.e. the software can talk to the debugger.
2. a download to the device button.

The project created an .elf file. Of course the STM32F411 nucleo board is set up for a bin file, using
mbed, but that is not going to have the debug information,

So how do you download the code into the nucleo board so you can open and step at the source level?

Sure these are questions that are being asked by someone new to Eclipse. But they are not in the FAQ.. Just for the record, I'm an ebedded firmware developer with a medical device company. I've been doing this for 30 years. All the way back to 6805, 8031, 6502 days. So I'm not a noob to embedded, but this journey that has been going on for nearly 2 months, just to be able to get a test program to compile and be able to debug it as been a complete nightmare.
CooCox doesn't support it.
Embed doesn't have debugging capability other tha 1980's serial print facility (typically the first thing one does with a new embedded project, but passe today)
Emblocks compiled but produced an empty file
There were a couple more that I tried to no effect.
Then the FAE turned me to openSTM32 and I have been trying to get it to work for several weeks.
AsI related, projects had errors, couldn't find a way to change projects.
Changing projects is still not something that I know how to do yet.

France

Hello,

To download and debug your program, you should just select your project, then using the context menu (right click) select "Debug As >>> Ac6 STM32 C/C++ Application" (also available from the Run menu) and it should automatically download your program, start it (with a breakpoint set at main) and switch to the Debug perspective, where you will be able to single step your code, set or remove breakpoints, look and modify variables...

To come back to the normal C/C++ perspective, just click on the "C/C++" button on top right of the window.

By the way, dit you read the various documentation pages on the web site? If not I advise you to read and practice the Getting started with System Workbench for STM32 guide as well as all the pages under System Workbench for STM32

Thanks for your patience,

Bernard

Dear Bernard,

I have already expressed my concern about some design choice made for the New Project Wizard.
Why the IDE allows me to select a feature (a firmware library) that is not supported by the IDE ?
This is obviously the consequence: the customer is confused. If he is an expert and he knows how to work with the library (JPEG) and the IDE, he doesn't need at all that option. If he is a "new user", that option doesn't help the user, and, in this case, the IDE is not solving a problem, but it is creating a new problem.

Regards,
Stefano


Error in final launch sequence
Failed to execute MI command:
-target-select remote localhost:3333

Error message from debugger back end:
localhost:3333: The system tried to join a drive to a directory on a joined drive.
localhost:3333: The system tried to join a drive to a directory on a joined drive.

When I tried to debug as an AC6 project.
Using a nucleo with STLINK, but I cannot find that option in the debugger.

The same problem here with the STM32F072-Nucleo

Hi

Did you solve it ?

Thanks

France

Hello,

How did you create your project?
Did you follow th eprovided Tutorial?
Without more details we can't help you...

Bernard

Same problem here with the STM3240G-EVAL. With one caveat. All was working find at one point then it just stopped. My memory is not too clear, but I think I tried a clean installed and it worked again briefly. Then busted. I confirmed that the board uses ST-LINKV2.
I have the same problem

I have the same problem.
No solutions?

Also the same Problem with den STM32L152 Nucleo
same problem with a STM32VL, target STM32F100, sound like nobody wants to solve that.
France

Hi,

Could you describe your problem more precisely, giving the version of System Workbench you are using and, if not yet done, update it (Help >> Check for updates).
The original post dates back to more than 6 months ago and a lot of bugs and quirks has been corrected in the meantime.
If you still have problems, please start a new thread, with the above informations. Just saying "I have the same problem" six months after the OP will probably not get any sensible answer on any forum, especially if the OP effectively get an answer to his problem (see the posts following the one on which you complained by reading the full thread, not just an intermediate answer)...

Bernard

I just managed to fix this issue by turning off my board, unplugging the debugger from USB, reconnecting it, powering the board back up, and starting another debug session.
I believe the issue is just that the debug hardware or USB connection is getting into a bad state and not recovering. The procedure I describe just resets all the hardware.


Hi,

I know that Eclipse (SystemWorkbench is an Eclipse based IDE) sometime provide a different way to do a task compared to other IDE. This is because it is much more than an IDE, it is a development platform. Usually you can appreciate teh benefit of Eclipse after the initial "hard" learning period.

B.T.W. coming back to your debugging problem. Check your Debug configuration. Eclipse can be used to develop/debug many different kind of software/firmware. So it introduces the concept of Debug Configuration in order to provide a common UI for different kind of applications.

  • Use the Run > Debug Configuration... menu command to open the Debug Configuration dialog
  • Under the Ac6 STM32 Debugging item in the left three view select the debug configuration you created for your projetc (HelloSTM32F4 Debug in my case)

Image

  • The main tab is easy to understand, but let me know if you need more information
  • In the Debugger tab you should check if the OpenOCD configuration script is the right one for your nucleo board. In my case it is nucleo_f401re.cfg

Image

If your configuration is ok but you still have the problem, could you please look at the OpenOCD console in the Console view? To do so, you can click the button highlighted in the below image in the Console view
Image
That view provides more info about the problem.

Regards,
Stefano

There is no debug configuration under the Ac6 line.
Apparently no configuration has been created.
Can you walk me through the following:
Create a configuration for the STM32F411 nucleo board, using the supplied j-link debugger on a usb port?

And Stefano, the user interface is really obtuse. Items are hidden. I have used many IDE's over the years, and hands down, this is the most difficult one I have ever encountered.

It has been a slogging match to just get to where I am. I was not able to create a project, had to have someone do it.
AND they did NOT generate it using STMCUBE with the file I sent them. So I am now facing the problem of
taking the files created by the stmcude, and somehow copying them into the correct spots in the workspace, and getting the IDE to recognize them.

There seems to be no real way to easily do this.


Hi,

this should be an easy way to create and launch a Debug Configuration:

  • Right click on your project in the Project Explorer view to open the context menu
  • Select the Debug As > 1 Ac6 STM32 C/C++ Application command

The IDE:

  • creates a debug configuration
  • fills it with the all the needed value (you can check it)
  • program the board, and
  • start a debug session

Image

Of course there are other way to do the same task (using the Menu or the button in the Toolbar).

About the IDE learning curve, you are probably right. I'm only an Eclipse enthusiast. But, I can't find a better IDE for embedded application.And I have also used many IDE in my life. 😊
Eclipse, for example, provides a lot of power features to analyze source code, if you organize your project in a proper way (use Source Folder instead of simple Foder to store your source files, aldo for the header; keep all your project files in the project, don't excude the headre, etc.). Moreover I think also to the potentiality of Eclipse. It is possible to extend it with plugins in order to address the need of specific class of embeded application. Maybe in a future version we have CubeMX integrated in SystemWorkbench. What is your favorite IDE?

Regards,
Stefano

over the years of working with IDE's, my favorite is the Silabs IDE hands down.
There are a few wrinkles with it, but otherwise it is great.

The old Motorola 683xx IDE from Orion was a favorite of mine.
Never cared much for the Microsoft IDE.

Of course the intel isis system was a nice one, but you had to have an expensive hardware debugger.

Stefano,
I followed this procedure:
Right click on your project in the Project Explorer view to open the context menu
Select the Debug As > 1 Ac6 STM32 C/C++ Application command

The IDE:

creates a debug configuration
fills it with the all the needed value (you can check it)
>>>>>>>>>>>>>>>>>>>>
start a debug session
Used the run->debug
got an error message.

Says "launching STM32F411_Nucleo_HAL.elf has encountered a problem., error in final launch sequence."

..................
I restarted the ide.
Selected, ,my project. Expanded it.
Left the selection on my project and hit debug.
A debug layout opened, but no registers or anything.
shows an .elf as the executable...
Hit F11
Says "launching STM32F411_Nucleo_HAL.elf has encountered a problem., error in final launch sequence."

Does anyone want a copy of the project to see if you can get it to work?

did not give me a place or prompt to download or upload which ever way you want to say it, the code into the STM32F411 nucleao board.

Does not give me a programming option.

Silabs works as follows:

There is a down arrow button. you click on that, supply the name of the object file to download, click o.k., and it processes the file, then programs the flash, then verifies the flash, then shows you the source etc. If you hit the green go button, it runs. Click the red stop button it stops.
Set a breakpoint, hit go and if the code executes the breakpoint, the program halts, showing the source code line.
At that point you can examine registers, variables, etc, single step the C code or single step a machine code instruction.

I have not been able to even find out how to download the program. The Nucleo has a built in drive that you theoretically drag a .bin file into and it programs it, BUT that file has no debugging information, so you can't debug.

In Eclipse I can't even find a place to *CHECK* whether it can see the target or not.
I have no clue as to whether it can even *SEE* the nucleo board.

+1 for Stephano !!!


The debug option should be made active during project creation.


Hi,

one more thing... about the STM32CubeMX. How to use the file generated by the tool with SystemWorkbench is an interesting topics. IT is what I usually do. Maybe we can open another thread in this forum in order to discuss about it.

Regards,
Stefano

I just created a new thread with a list of specific questions that need to be addressed.

Cheers


I set it up from scratch on a different box and with the new STMCUBE version and the latest workbench, it works.

There are some compile time issues.
redefintions are claimed, but in files I never touched.