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


Error log/ console view

Dear All,


Dear All,

I am using STM32 device with Ac6 STM32, that works by Ac6 STM MCU GCC compailer.


I have been spend a lot of time on solving my project properties build problem.
Now, solved some issues regarding including files.
Right now the problem is,


In file included from ..\startup\Src\stm32f0xx_hal_dac_ex.c:56:0:
C:\Users\swend95_하산\Desktop\Design\notun_pj\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal.h:528:29: error: unknown type name ‘__IO’
void HAL_Delay(__IO uint32_t Delay);


Error log says,

Orphaned CDT build configuration fr.ac6.managedbuild.config.gnu.cross.exe.debug.2142458825: parent extension cfg fr.ac6.managedbuild.config.gnu.cross.exe.debug.2142458825 not found


Help me please.

Hi, usually the __IO is defined in the core_cm0.h file located in the
...\STM32Cube_FW_L0_VX.X.X\Drivers\CMSIS\Include folder.
Are you using this file/path?

Dear Sir Vetch,

Thank you for your response.

I have copied folder to my toolchain in C.
I am using this path!

In my case its, C:\STM32_toolchain\common\Drivers\CMSIS\Include;

Including the CMSIS files,

It shows, C:\STM32_toolchain\common\Drivers\CMSIS\Include/arm_math.h:6970:24: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘arm_bilinear_interp_q7’
static __INLINE q7_t arm_bilinear_interp_q7(


Could you kindly expilain this issue ?

Regards
Hasan


Dear Hasan,
Unfortunately, I never got such error.
Please, may you give me :
- your versions of the STM32 FW F0 package and SW4STM32?
- Which project are you compiling?


Dear Sir,

Thank you .
My version is STM32Cube_FW_F0_V1.6.0 downloaded from STM website.

My IDE platform is Ac6 STM32 in Ecilipse Mars.2.

We have a custom board with centered MCU STM32F070RBTx.

This is not an example code, my company made it before, I need to mordarate it.

Regards
Hasan


Dear Sir Hasan,

Having a look to the error you got, it seems that __INLINE is not defined.
The STM32F0xx is based on an ARM Cortex-M0 CPU, so may you check that :
- the core_cm0.h file is included in your project?
- the ARM_MATH_CM0 symbol is defined?;
I made a simple test : I included the arm_math.h file in an example project, I added the ARM_MATH_CM0 symbol, my code is calling the arm_bilinear_interp_q7 function from the main and I compiled without error.

Regards,
Vetch

Dear Sir Vetch,

As far as I remember, I did study this issue in here, https://www.keil.com/pack/doc/CMSIS/DSP/html/group_bilinear_interpolate.htmlQuestion, its nothing but linear interpolation applied to a two dimensional grid.

Are you talking about adding this CMSIS library , Project Explorer


Not only this error, I am having different error after adding/removing files path, project setting etc.
APIs, Headers,state machine files are exists in Project branch, but why the compiler showing errors in H files of driver ?

Looking at C code structure related reason, yes I found some style of C coding in CMSIS h files is different.

what should I do now?

1. CDT does not showing errors of my main files, there was a return type problem, I solved it.

3. I think compiler is compiling all files listed in project branch , do you want me to remove some of the files from project folder, is it repeating again as I include paths from C driver?

4. Is there any setting for which only compile my c file?

5. Do you believe, updated version of Java/gcc/Eclipse is needed ?

I am using this HAL driver STM32Cube_FW_F0_V1.6.0 downloaded from STM website.


Hope you will give me some good suggestions.

Regards
HASAN


Dear Hasan,
As you are facing weird behavior, please check :
- The System Workbench version you are using : Help menu >> About Eclipse >> Ac6 button (= blue butterfly), the version should be 1.11.0..... If not, then check the network settings in :
Window menu >> Preferences >> General >> Network Connections >> for Windows, select “Active Provider” = Native else Manual
then Help menu >> Check for Updates

- The Java version : From a Windows terminal (=Command Prompt window), type java -version. SW4 STM32 64bits only works with JavaRE 7(and upper) 64 bits.

Answers to your questions :
1. Yes I refered to CMSIS. The core_cm0.h file is belonging to CMSIS;
2. Solved;
3. No need to remove some of the files from project folder for the moment;
4. To compile only one file : Window menu >> Preferences >> General >> Workspace >> Remove “Build Automatically”, then right-click on the file to be compiled >> Build Selected File(s)
5. Let’s see the Java & SW4STM32 versions you are using …

Dear Sir,
I was waiting for your replay. Thank you.

According to your suggestion, fearures looks like Report 2

Regarding the Java issue, I have installed Java 8 update 101 (64-bit) and java SE development kit 8 update 101 (64-bit).

Yes, your rest of the suggesion works well.

Right now project build time gets more longer,( importated from coIDE)

Take a look console window at the bottom,

C:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx.h:4630:0: warning: “TIM_CR2_OIS4” redefined
#define TIM_CR2_OIS4 ((uint16_t)0x4000) /*!


Dear Sir,
Take a look the rest of the errors.

In file included from C:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal_def.h:48:0,
from C:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal_flash_ex.h:47,
from C:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Inc/flash_conf.h:25,
from ..\states\main_state.c:28:
C:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx.h:4630:0: warning: “TIM_CR2_OIS4” redefined
#define TIM_CR2_OIS4 ((uint16_t)0x4000) /*!


Dear Sir,

May be posting is limited here for space.

I didnt show you full errors here, this is

Build Finished (took 10s.809ms)


But the other same project (using cubemx),in this case shows a short lasting build report as


Info: Internal Builder is used for build
arm-none-eabi-gcc -mthumb -mfloat-abi=soft -E “-IC:\STM32_toolchain\bin” “-IC:\STM32_toolchain\arm-none-eabi\bin” “-IC:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Inc” “-IC:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Src” “-IC:\STM32_toolchain\lib\gcc” -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -o “flash\flash_conf.o” “..\flash\flash_conf.c”
In file included from ..\flash\flash_conf.c:33:0:
..\flash\flash_conf.h:24:25: fatal error: stm32f070xb.h: No such file or directory
compilation terminated.

09:44:42 Build Finished (took 171ms)




Kindly, help me.
Regards
Hasan


Dear Sir Hasan,

Perfect! The SW4STM32 and Java versions are good.

The compilation time increased because there are more files to be compiled,
but this time is not relevant for the moment as there are still compilation errors.

The following error is not due to SW4STM32. This error is coming from your application code.
The following error message means that the constant TIM_CR2_OIS4 is defined twice.
“C:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx.h:4630:0: warning: “TIM_CR2_OIS4” redefined ”
It seems to be defined once in the stm32f0xx.h. Did you modified this file?
... and this constant was already defined in the following header files belonging to the CMSIS lib :
stm32f030xc.h
stm32f031x6.h
stm32f038xx.h
stm32f042x6.h
stm32f048xx.h
stm32f051x8.h
stm32f058xx.h
stm32f070x6.h
stm32f070xb.h
stm32f071xb.h
stm32f072xb.h
stm32f078xx.h
stm32f091xx.h
stm32f098xx.h

To solve this kind of errors, remove the redundant constant definition from stm32f0xx.h

Dear Sir ,

Thank you once again.
Yes, you picked up very key point here.

I did see this thing before, but problem is compiler shows different errors in different time you compile.

As far as I remember I have #include header file in main c.
To be honest, my huge project has 2 main files, 1 from cubemx, other is little modified with user code in cubemx.

Its true many times I have added constants in c like #define contant.

For this time being lets talk about the project which has less compile time.
In this case I think, include paths and CMSIS header files are well linked in system.

Take a look now,

Info: Internal Builder is used for build
arm-none-eabi-gcc -mthumb -mfloat-abi=soft -E “-IC:\STM32_toolchain\bin” “-IC:\STM32_toolchain\arm-none-eabi\bin” “-IC:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Inc” “-IC:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Src” “-IC:\STM32_toolchain\lib\gcc” -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -o “startup\Src\stm32f0xx_hal_pcd.o” “..\startup\Src\stm32f0xx_hal_pcd.c”
arm-none-eabi-gcc -mthumb -mfloat-abi=soft -E “-IC:\STM32_toolchain\bin” “-IC:\STM32_toolchain\arm-none-eabi\bin” “-IC:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Inc” “-IC:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Src” “-IC:\STM32_toolchain\lib\gcc” -O0 -g3 -Wall -fmessage-length=0 -ffunction-sections -c -o “inc\Src\stm32f0xx_ll_utils.o” “..\inc\Src\stm32f0xx_ll_utils.c”
..\inc\Src\stm32f0xx_ll_utils.c:38:30: fatal error: stm32f0xx_ll_rcc.h: No such file or directory
compilation terminated.

13:40:20 Build Finished (took 803ms)


We can think number of question ...

1.If the HAL header file is already exsists in project tree folder, does it make trouble?
2. How about staying Debug folder in project tree, does it make sence ?
3. Is there anything with pre=prossesor setting?...I did tick on project properties>C/C++ build>setting>preprocessor>Preprocess only(-E)

Take a look on some setting in this attacment.

Regards
Hasan


Dear Sir,
1 - No it makes no trouble but it seems it is not detected as you get an error about the stm32f0xx_ll_rcc.h file. May you check the include paths in :
Right-click on the project >> Properties >> C/C++ Build >> Settings >> Tool Settings tab >> MCU GCC Compiler >> Includes (see mine in the snapshot)
2 - May you check the syntax of your include paths. I can see your traces : “-IC:\STM32_toolchain\common\Drivers\STM32F0xx_HAL_Driver\Inc” Why are there \? It does not happen in my paths: -I”C:/Project/STM32/HAL/en.stm32cubef0/STM32Cube_FW_F0_V1.6.0/Drivers/STM32F0xx_HAL_Driver/Inc”
3 - Please, un-tick the properties>C/C++ build>setting>preprocessor>Preprocess only(-E). It prevents a full compilation and link.

Dear Sir Vetch,

Thank you to come back in this post!
My board is not a eval type ST board, its custom board for my particular circuit.

Regarding stm32f0xx_ll_rcc.h file, come across in build errors, one ST expart says “This “Low Level” lib is part of CubeMX, or a sub-set thereof, and are labelled with this “_ll_” part in their name.
However, in some cases (especially for the STM32F7 I checked), this Low Level lib is nothing but a sorry stub (i.e. unusable fragments).”

I heard from other forum, Right-click on the project >> Properties >> C/C++ Build >> Settings >> Tool Settings tab >> MCU GCC Compiler >> Includes need just adding path by ‘....’ take a look my include path setting.(attached)

“Please, un-tick the properties>C/C++ build>setting>preprocessor>Preprocess only(-E). It prevents a full compilation and link.”
It makes more errors.


Hope you will help me.

Regards
Hasan


Sorry, I didn’t answer the question about the Debug folder in project tree. It is the expected behaviour. No issue. It is Eclipse specific.

Dear Sir Hasan,
There are special characters in all the paths. I assume it is the root cause of the issue you are facing, unfortunately I don’t know how to fix it.


Dear Sir Vetch,

These are not special characters.
I am working in country where they use windows OS with their language.
This W means .

If you open in your PC, it will show .


Stil l, I have build output error,

..\startup\Src\stm32f0xx_ll_utils.c:39:32: fatal error: stm32f0xx_ll_utils.h: No such file or directory
compilation terminated.

What other cause you can imagine ?


 

Newest Forum Posts

  1. Монтаж камина с грилем в Москве - установка и барбекю by KpddomErorb, 2025-05-10 18:28
  2. SPI on Nucleo_STMH533RE by royjamil, 2025-05-04 20:13
  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. Build a project in "release" mode by info@creosrl.it, 2025-02-20 18:12
  8. Build a project in "release" mode by info@creosrl.it, 2025-02-20 17:05
  9. Build a project in "release" mode by tang, 2025-02-20 10:36
  10. Build a project in "release" mode by info@creosrl.it, 2025-02-19 17:35

Last-Modified Blogs