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


CubeMX F4 projec with freertos will not build cos of asm instruction

Take CubeMX create new project select discoveryF4 CPu/Board
add freertos to project
Generates code for SW4STM32
open project and build it it does not compile cos of inline assembly

Error: selected processor does not support Thumb mode `vstmdbeq r0!,{s16-s31}’


ac6 Fail command
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=soft -DUSE_HAL_DRIVER -DSTM32F407xx -I. etc -g3 -Wall -fmessage-length=0 -ffunction-sections -c -MMD -MP -MF”Middlewares/FreeRTOS/port.d” -MT”Middlewares/FreeRTOS/port.d” -o “Middlewares/FreeRTOS/port.o” “D:/cube_projs/fiscof4/bare/F4Base/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c”
C:\Users\michel\AppData\Local\Temp\ccrvIJps.s: Assembler messages:
C:\Users\michel\AppData\Local\Temp\ccrvIJps.s:633: Error: selected processor does not support Thumb mode `vstmdbeq r0!,{s16-s31}’

almost same source projct with personal cross gcc does work rolleyes
after inevstigation fpu abi must be chaneg from hard to soft and a valid fpu hardware sleted to fix the issue.

Don’t know if your guys can do something or if it’s more on ST side.

Hi ST world,

I have the current issue when compiling freertos port.c file given in STM32F4 cube which seems the same than the previous one:

Compiler command:
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=soft .... Lot of includes .... “../src/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F/port.c”

Output:
Error: selected processor does not support Thumb mode `vstmdbeq r0!,{s16-s31}’
Error: instruction not allowed in IT block — `stmdb r0!,{r4-r11,r14}’


I tried to remove -mthumb from the compiling command for this file only but I couldn’t find the way to do this in eclipse framework.

Any ideas ?
Thanks,
Sylvain

This build error is caused by an incorrect fpu specification in the build options, not by the -mthumb option (you must use -mthumb as the Cortex-M only supports THUMB 2 instructions).

Regards,
Richard (http://www.freertos.org)


Hi all,

try to change these project settings in the MCU Settings section:

  • Floating point hardware : fpv4-sp-d16
  • Floating-point ABI : hard


And make a Clean Project before rebuild.

PrjSettings

STM32F4 has a powerful flaoting point hardwere support ... so why don’t use it?! ;-)

Regards,
Stefano


Thank you very much !!
Issue solved :-)

regards,
Sylvain


With following assembler options
arm-none-eabi-as -g -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard
i am getting the error:
startup/os_cpu_a.s:231: Error: selected processor does not support `vstmdb R0!,{S16-S31}’ in Thumb mode
startup/os_cpu_a.s:252: Error: selected processor does not support `vldmia R0!,{S16-S31}’ in Thumb mode

please help

Experienced a similar thing. In my case it was because a sub folder in the Eclipse workspace was overwridding the build settings - which was something it decided to do itself. Have a look at the command line used for the file that is not building, and you will probably find it doesn’t have the options you list in your post. Do any of the folder icons in the Eclipse browser look different to any other? If so, right click on it, then in the pop up menu select the configurations option and click ‘reset to default’. Then it will just inehrit the compiler options from the project.

Thank you for the reply.
Though it is an Eclipse project, i am using a makefile. So the the file should build with the assembler flags that i am providing.


 

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