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


Build issue with CRL ARM cmsis sin cos "___IO" not defined

Issues build simulink project with CRL “ARM CMSIS SIN COS” and SW4STM32. Error: unknown type name ‘__IO’
Hello, i have a problem to build in PIL mode PMSM_FOC example. The problem is in the use of CRL: “ARM CMSIS SIN CON”. After has manually add of the arm_math.h directory (C:\MATLAB\STM32-MAT\STM32\CRL\CMSIS_SIN_COS_CRL\FastMathFunctions) in the include paths (-l) the building process returns the following error code for 100 elements.
---------------------------------------------------
Building file: C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/PMSM_FOC_Compute/Src/arm_cos_f32.c
Invoking: MCU GCC Compiler
C:\MATLAB\STM32-MAT\STM32\STM32demos\MotorControl\FOC\PMSM_FOC_Compute_PIL\SW4STM32\PMSM_FOC_Compute\Debug
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DUSE_HAL_DRIVER -DARM_MATH_CM4 ‘-DMemUnit_T=uint8_T’ ‘-DMEM_UNIT_BYTES=1’ ‘-DRTIOSTREAM_TX_BUFFER_BYTE_SIZE=128’ ‘-DRTIOSTREAM_RX_BUFFER_BYTE_SIZE=128’ ‘-DCODER_ASSUMPTIONS_ENABLED=1’ -DCODE_INSTRUMENTATION_ENABLED -DCA_CHECK_FLOATING_POINT_ENABLED -DCA_CHECK_LONG_LONG_ENABLED -DCA_CHECK_DAZ_ENABLED -DSTM32F429xx -I”C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/Inc” -I”C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/Drivers/STM32F4xx_HAL_Driver/Inc” -I”C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/Drivers/STM32F4xx_HAL_Driver/Inc/Legacy” -I”C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/Drivers/CMSIS/Device/ST/STM32F4xx/Include” -I”C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/Drivers/CMSIS/Include” -I”C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/PMSM_FOC_Compute/Inc” -I”C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC” -I”C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/slprj/stm32/PMSM_FOC_Compute” -I”C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/slprj/stm32/PMSM_FOC_Compute/coderassumptions” -I”C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/slprj/stm32/PMSM_FOC_Compute/pil” -I”C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/slprj/stm32/_sharedutils” -I”C:/MATLAB/STM32-MAT/STM32/addSrc/inc” -I”C:/MATLAB/STM32-MAT/STM32/pil/stm32SerialRtiostream” -I”C:/Program Files/MATLAB/R2019b/extern/include” -I”C:/Program Files/MATLAB/R2019b/extern/include/coder/connectivity/CodeInstrTgtAppSvc” -I”C:/Program Files/MATLAB/R2019b/extern/include/coder/connectivity/CoderAssumpTgtAppSvc” -I”C:/Program Files/MATLAB/R2019b/extern/include/coder/connectivity/XILTgtAppSvc” -I”C:/Program Files/MATLAB/R2019b/rtw/c/ert” -I”C:/Program Files/MATLAB/R2019b/rtw/c/src” -I”C:/Program Files/MATLAB/R2019b/rtw/c/src/ext_mode/common” -I”C:/Program Files/MATLAB/R2019b/simulink/include” -I”C:/Program Files/MATLAB/R2019b/toolbox/coder/rtiostream/src” -I”C:/Program Files/MATLAB/R2019b/toolbox/coder/rtiostream/src/utils” -I”C:/Program Files/MATLAB/R2019b/toolbox/rtw/targets/pil/c” -I”C:/MATLAB/STM32-MAT/STM32/CRL/CMSIS_SIN_COS_CRL/FastMathFunctions” -Og -g3 -Wall -fmessage-length=0 -ffunction-sections -c -fmessage-length=0 -MMD -MP -MF”MATLAB/arm_cos_f32.d” -MT”MATLAB/arm_cos_f32.o” -o “MATLAB/arm_cos_f32.o” “C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/PMSM_FOC_Compute/Src/arm_cos_f32.c”
In file included from C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h:141:0,
from C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/PMSM_FOC_Compute/Inc/STM32_Config.h:40,
from C:/MATLAB/STM32-MAT/STM32/CRL/CMSIS_SIN_COS_CRL/FastMathFunctions/arm_math.h:256,
from C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/PMSM_FOC_Compute/Src/arm_cos_f32.c:30:
C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f429xx.h:188:3: error: unknown type name ‘__IO’
__IO uint32_t SR; /*!< ADC status register, Address offset: 0x00 */
^~~~
C:/MATLAB/STM32-MAT/STM32/STM32demos/MotorControl/FOC/PMSM_FOC_Compute_PIL/Drivers/CMSIS/Device/ST/STM32F4xx/Include/stm32f429xx.h:188:17: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘attribute’ before ‘SR’
__IO uint32_t SR; /*!< ADC status register, Address offset: 0x00 */

--------------------------------------------------
Someone can help me? I’ve tried to add arm_cm4.h and stm32f429xx.h ditectories and i have the same error.

 

Newest Forum Posts

  1. reservation car service Seattle by Jamesprede, 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