Loading...
 
Skip to main content

System Workbench for STM32


Importing Demonstration Project - 2 Modes - Only One Works - UBUNTU

Hello Everyone,

One of the many oddities with the SW4STM32 IDE Ac6 created is when importing a demonstration project for an evaluation board.

1. When NOT copying the project into the Workspace it produces no errors. It can be built albeit only in DEBUG mode. It can be uploaded to the evaluation board, here STM32F4-Discovery, without issues. It works.

2. When copying the project into the Workspace we only get failures. No successful built and no upload to the board possible. Problems are found and the Console shows issues with the building process. It does NOT work.

It would be interesting to clarify how comes because as far we can see the accessible files in the project tree are exactly the same and so is the file tree. I'm sure if there is a difference it will be quite straightforward.

Please explain this to the readers. Thanks beforehand.

Screenshots attached in following blocks below.

Regards,
Ben




Hello Ben,

Concerning point 1 : Demonstration projects delivered in the HAL libraries only contain a Debug launch configuration, and I agree that we should consider enhancing them with a Release launch configuration.

Concerning point 2 : If you look at the menu "Documentation" => "System Workbench for STM32" => "Importing a Cube MX project", you will find instructions about how to import a CubeMX project, and in particular that the fact you should not copy projects into the workspace. The reason is that the projects contain linked ressources and that the links are relative to the project. If you import the project in a workspace with a copy, these relative link are copied as is in the workspace and don't work anymore.


Best Regards,

Pascale

Hello Pascale,

The instructions in the "Documentation" => "System Workbench for STM32" => "Importing a Cube MX project" are for importing Cube MX projects, not Demonstration Projects. Although I did an import of a Cube MX project successfully it is not a Demonstration project.

It is indeed so when importing a project while NOT copying it in the Workspace from the Demonstrations folder in the STMCube Repository everything is fine. Obviously this cannot be the intention if we want to change the coding since it affect the original repository.

However when copying the project into the Workspace SW4STM32 instanly points out the linker problem in the Problem tab. And there one can see that SW4STM32 utilises absolute referencing to the linker sources. So how does SW4STM32 know to include my home folder name in this absolute file addressing? How did it get there when the repository is after all from ST who is unaware of my home folder name?

Thx for explaining.

Greets,
Ben

France

Hi Ben,

The reason you should follow the instructions on How to import a CubeMX projec is that the demonstration projects are in fact generated using CubeMX...

I know that using linked files is not so practical when you want to modify them but this is needed as otherwise there would be a lot of duplicated files in the Demonstration folder of the ST firmwares; so, even if CubeMX will, in a future release, no more generate links, the demonstration projects will continue to. We are looking at a way to import demonstration by copying all the files in the workspace (currently links are copied, but as links, keeping the, now invalid, relative path to the linked-to file...) but this will take some time.

Bernard (Ac6)

Hello Bernard,

I can see it will take some time to script the copying to include the files themselves also. I have been carefully following what exactly happens when setting 'copy to workspace' on and when 'copy to workspace' off. When copying is ON indeed only folders are created in the Workspace and they are kept empty. No files are copied to accomodate for the linker.

In the Project tree (SW4STM32 IDE) the files are shown however marked with an exclamation meaning the linker cannot find them in the Workspace project directory.

I see what is going on and why the linker is not satisfied.

Thanks and best regards,
Ben

Tunisia

Hello Bernard,

Just for clarification, for now demonstration projects are not generated using CubeMX.

SW4STM32 projects (generated by CubeMX) will support souce folders and include folders very soon
=> so importing SW4STM32 projects (generated by CubeMX) + enabling the copy option : will be possible

But to avoid duplicating files as you have mentioned, I think that examples will still use the linked files.
=> so importing SW4STM32 example projects + enabling the copy option : will remain impossible due to eclipse limitation
I have reproduced the issue using standard eclipse for C/C++

Glad to hear that Ac6 plans to fix/workarroud this eclipse issue, hope that will be soon 😊

Best Regards,
Tarek BOUCHKATI
STMicroelectronics


Hello Pascale,

Thank you for the prompt answer. Will go over the manual via the "Demonstrations" menubar. I have already seen the instructions. Looks promissing.

It seems logic that linked resources are relatively addressed in a Project thus transportation should not affect the linking. There must be more involved. I would more likely expect issues when linked resources are addressed in an absolute manner and when indiscriminately displaced corrupt references.

Relative addressing: ../directory/directory/filename.extention
Absolute addressing: C:\root/directory/directory/filename.extention

By all means thank for your help. I look forward to the progress once following the Documented instructions via http://www.openstm32.org/Importing+a+STCubeMX+generated+project?structure=Documentation also accessible via the openstm32.org blue bar menu "Documentation" => "System Workbench for STM32" => "Importing a Cube MX project".

Best wishes!
Ben

Hello,

I recently installed AC6 System Workbench in order
to work with the STM32 OSXMotionFX Library
and I'm experiencing some troubles related
to the sample application shipped with this library.

Let me know if this is not the place to post.

It seems that the sample project works with a different
version of the STM32 Cube expansion drivers for the
X-Nucleo-IKS01A1 expansion board of the base
STM32 Nucleo-F401RE board.

In particular the sample project links to driver files
that are missing, some of them seem with different names
compared to the existing ones, that's why I guess
the sample project is referring to an old version of the drivers.

Any one does know hot to get the previous versions of the
STM32CubeExpansion_MEMS1_V1.4.0 software ?
I did already search the ST Microelectronics web site
but to no avail, the X-CUBE-MEM1 software is only shipped at version 2.0.0 and it seems I need the previous version.

Thanks in advance for redirecting me to correct site in case.


It is best to repost your question in the Forum / System Workbench for STM32.

In the title you specify the problem in short. In the block you repeat your question above.

Greets,
Ben


To Pascale
You wrote: I agree that we should consider enhancing them with a Release launch configuration.

When do you think it might be available?