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


Make files wrong

This is the second time this has happened. The last time I abondoned the project and restarted.

After running CUBE the project settings of the sub-projects (Drivers and Middlewares) have the settings change.

Specifically: -mthumb -mfloat-abi=soft
while the project settings are: -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16

You can change these settings on the main project (right-click root project -> Properties -> C/C++ Build -> Settings -> MCU Settings).

But for the sub-projects (right-click Drivers -> Properties -> C/C++ Build -> Settings -> MCU GCC Compiler) it is displayed only, there is no ‘MCU Settings’.

Since the makefiles are generated I may try deleting them and forcing them to be recreated.

It has nothing to do with CUBE - I don’t run CUBE on this project, this project is a copy of the one I run CUBE on. I only copy over the changes. And the changes are only in the .c and .h files.

Anyone else see this?

-Matt

Hello Matt,

Could you describe precisely the steps required to reproduce you problem : how you created the project initially, and what you changed afterwards?

Best regards,

Pascale

Thanks for your interest Pascale - we would really like to see this resolved.

I am developing with AC6 as a pilot project, the results will have a big impact on the purchase of STM32 processors by my company.

I’m not real sure what it is I did, you know, you get in the flow of development and you don’t remember everything you do. Yet this is the second time it’s happened.

We always use FreeRTOS at our company, one of the main concerns is how this tool works with FreeRTOS.

As I recall:

  • I went into Cube to add the I2C and USART2 peripherals. I have two projects with different base directories, I develop in one and I run Cube on the other.
  • I exited Cube and did a KDiff3 on the two directories - synced the changes for main.c and stm32l4xx_it.c
  • Did a refresh on AC6 and tried to build - got the errors that indicate a conflict in floating point instructions.


Deleting the subdir.mk and forcing them to rebuild did not help. Editing subdir.mk showed that they had the wrong options for the compiler.

I created another configuration, copying over my Release config then changing the debug and optimization options.

That had some success, the subdir.mk files were now correct. But the project still would not build, this time the errors came from FreeRTOS’s portmacro.h file, line 173 which is an assembly instruction that is only in ThumbII. Yet the build options for FreeRTOS were correct.

This morning I copied the Cube directory to another folder, started AC6 and imported that new folder then updated all the files with my changes.

That worked.

-Matt

Attached: 1) Build Errors from Debug build
2) Build Errors from Release build (Debug2 started doing the same thing as Debug this morning)


I think I may have found the problem!

While I was syncing the .C and .H files, I was not syncing anything else.

CUBE also modified the .project file, and those modifications are important.

Since I have abandoned the project that had the floating-point problem I don’t know for sure, but in the current project I again ran CUBE to change things and again had problems compiling. That’s when I started looking at every file, I realized that KDiff3 has filters to only look at specific files, not the hidden (well, hidden in Linux) files.

I found the .project and the .mxproject wrong in significant ways. Syncing them fixed my build problems.

I guess what I should do is make a copy of the project before I fire up CUBE, then diff the modified project with the saved project to copy over any deleted changes (I have modified some HAL libraries to help with debugging).

-Matt


Hello Matt,

Good to know you fixed your issues. Indeed, CubeMX may also modify .project and .cproject files :

-The .project file is a general project description file. Every eclipse project has one.

- The .cproject file is where the CDT project specific settings go (build tools settings).

Best Regards,

Pascale


 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 2025-05-01 10:06
  2. Last day: drone bonus by Danielrug, 2025-04-19 16:55
  3. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-25 07:37
  4. SPI on Nucleo_STMH533RE by royjamil, 2025-03-23 11:31
  5. SPI on Nucleo_STMH533RE by higginsa1, 2025-03-23 09:33
  6. Configuring DMA for ADC in SW? by sam.hodgson, 2025-03-04 12:58
  7. Insightful Perspectives on This Subject by davidsycle, 2025-03-04 05:45
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  9. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  10. Build a project in "release" mode by tang, 2025-02-20 10:36

Last-Modified Blogs