Loading...
 

Zephyr project on STM32

   Zephyr Workbench, a VSCode extension to manage Zephyr on STM32.
It enables users to easily create, develop, and debug Zephyr applications.
Main features:
  • Install host dependencies.
  • Import toolchain and SDK.
  • Create, configure, build and manage apps.
  • Debug STM32.
You can directly download it from the VSCode marketplace
For more details, visit the Zephyr Workbench

System Workbench for STM32


STM32 products are nothing but problems ... ;(

Hello,
recently I moved from 8 bit AVRs to STM32 mainly for 32 bits MCU. STM32 official tools seemingly looks nice and solid at first but as it turns out they are cripples. CubeMX idea is great but this tool doesn’t work well. I opened CubeMX, selected correct MCU and generated code - it was simple and took less than a minute, so far so good. Then I opened SW4STM32, imported that Cube project (as shown here: http://www.openstm32.org/Importing+a+STCubeMX+generated+project)Question, built project, and... 25 Errors! Example errors:
Description Resource Path Location Type
Type ‘__HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE3)’ could not be resolved main.c

Description Resource Path Location Type
Type ‘__PWR_CLK_ENABLE()’ could not be resolved main.c /lol/Application/User line 101 Semantic Error
Description Resource Path Location Type
Type ‘RCC_SYSCLK_DIV1’ could not be resolved main.c /lol/Application/User line 114 Semantic Error

all of them are “Something could not be resolved”.

Well, what is wrong ? I haven’t mention many other problems with these tool because they are secondary in comoarsion to “could not be resolved” problems.

You need sometime to be familar with it. It took me for a couple of weeks to use CubeMX and AC6 comfortablely. It would be helpful if you used Eclipse IDE before.
Of course this is not a child’s toy. You have to follow up a learning curve.
It has nothing to do with learning, I load example code and it fails to build, so what conclusion we can come up with ? To me it looks like perfect example of bad software....I don’t know whether it’s CubeMX or SW4STM32 or both fault....
Example code is supposed to run. Better luck next time.

You wrote: “It has nothing to do with learning, I load example code and it fails to build, so what conclusion we can come up with ? To me it looks like perfect example of bad software....I don’t know whether it’s CubeMX or SW4STM32 or both fault....”

Exactly true. This is basic! I experience the same annoyance when importing a project designed for SW4STM32 Eclipse - and we know importing is a simple process in Eclipse. It shoudl work out of the box but it doesn’t. We talk Projects from the CubeMX Repository.


Well you are probably right that past knowladge of Eclipse would be usefull but, the question which still remains is, why code generated by CubeMX and imported without any changes to SW4STM32 doesn’t work and could not resolve many symbols ?!

Try right-clicking on the Project in the Project Explorer and select Index->Rebuild. Sometimes there’s nothig wrong with the code, but Eclipse says there is because its Index is messed up.
Thanks for suggestion but it didn’t help ;/

It seems some header files in your project are missing, say stm32f4xx_hal_pwr_ex.h, stm32f4xx_hal_rcc.h for example. you may read CubeMX user guide (UM1718 User manual) before using it. There is no shorcut to use CubeMX properly without reading CubeMX user guide.
I read it, but look, I have Nucleo-F4446 board, with CubeMX all you have to do is select correct board and generate code - literally 3/4 mouse clicks.Than Import that generated code to SW by File->Import->Existing project intro workspace->.....it should end up successfully....but it doesn’t and complains about “something could not be resolved”...clearly bad tools and shity piece of software although the idea behind it was good ;/
Hard talk, I like that. It should go straight into the ears of the people who designed the CubeMX Repository SW4STM32 Project files who were definitely working in conjuntion with Ac6 since a definite folder named ‘SW4STM32’ was created. Hopefully they didn’t just stash the TrueSTUDIO versions in it. Now that would be shoddy.

I had a similar issue, fresh install of SW4STM32 and latest version of CubeMX, and was seeing errors like yours when I imported the project with the instructions on the page you linked.

I was able to get around the issue by making sure the project was not in my workspace directory. Import from another path where CubeMX generated the files, don’t copy files into the workspace, and the same code now builds, downloads and debugs with no issues. (STM32F429I-DISCO board.)

Hope this helps!


France

Hi,

This is a known problem, coming from the fact that the Eclipse indexer (that analyses all files in your new project) runs in background; if you open a file before it has finished indexing all files it may not yet have indexed the files where these symbols are defined, so it signals errors...

To solve that you just have to force rebuilding the index, by right-clicking on any file in your project in the Project Explorer view then selecting “Index >> Rebuild”; the errors should then disapear after some seconds. If they don’t, just delete them from the “Problems” view and they should no more appear.

Hope this helps,

Bernard (Ac6)


Magic happens. Today I launched SW4STM32 opened that project that did not work yesterday and...no problems at all, no “could not be resolved” errors, not even single warning. Everything builds nicely o.0

Maybe as @dautrevaux said, sometimes indexer is behing and therefor project exporer can’t find right files so in turn complains about unknown references. Ehh anyway, that’s why people tends not to like Eclipse...

Thanks you all for contribution in this subject and help ;)



I just started to learn the tool. I had trouble loading an example code (using File->Open projects from File System). I needed to bring the folder close to top of the directory (e.g. C:\ or D:\), otherwise, some files may have names too long in the path and they do not exist. I also needed to select the right folder (named project) as the “project”. When compiling, sometimes, I had to click “Project -> Build All” twice to get rid of errors.

It is certainly not straight forward. All of the above was through trial and error. I looks like it will take me sometime to learn how to walk.