2021-04-23 05:33 PM
I need to add a specific version of FreeRTOS to my STM32F103 CubeIDE project, I cannot use the Middleware package in CubeMX.
I have tried several times to get the FreeRTOS files into CubeIDE, both using "Import" from Filesystem and drag and drop of files into the Project Explorer. Each time the files appear in the Project Explorer but they do not get built.
What am I missing here?
Thanks.
Solved! Go to Solution.
2021-04-26 12:37 PM
I guess still fully doable but have to consider required setup.
If FreeRTOS MW added to configuration:
If FreeRTOS MW is no part of configuration:
So if disabling FreeRTOS from adding it by yourself you have to untick some of generated IQ handlers ...
Such is about interrupts only ... maybe some other related setups but according to me Device Tool Configuraion should allow you to reach your goal ... just have to find proper settings ...
2021-04-26 08:29 AM
No a STM32CubeIDE issue but common Eclipse CDT usage.
At a point you have to explicitly add files / folders you want to include to compile process. Such are so called source(s) entry(ies)
1) Right click on resource(s) to add
2) Include whatever build configuration
3) Notice some small green "C" as resource(s) icon overlay <=> here you are !
Please note can be added and/or checked thru project's properties
2021-04-26 09:14 AM
Basically you want to use linked files (Eclipse feature) to point to your FreeRTOS source.
If unsure which files to take, generate a simple Cube project with FreeRTOS and copy the file list from there into your project.
(that's boring in the IDE, but the .project file can be edited/merged manually when you're used to it).
--pa
2021-04-26 10:14 AM
@Community member is writing "Each time the files appear in the Project Explorer but they do not get built." so I guess source entry lack is the point.
@Pavel A. what you are sharing is a valid way to add file to a project (as addon to copy like @Community member is doing) but adding file whatever the way to a project do not imply to get them taken into account a compile time. Bare minimal setup is to get such resources as child of a source entry. Of course if adding resources to a folder which is already declared a source entry (some are per default like Drivers folder or ... ) is doing job silently for you
2021-04-26 10:44 AM
Thanks for the input, I have now added the FreeRTOS files and they are being compiled.
However, I face a new issue, so, I am wondering if anyone has already added FreeRTOS manually to a CubeIDE project?
The issue is that three of the exception handlers have multiple definitions. For example "SVC_Handler" is defined in both "stm32f0xx_it.c" and also in the FreeRTOS "port.c" files. Looking at the source of "stm32f1xx_it.c", it does not appear that one can remove those definitions without CubeIDE over-writing the file when the project is regenerated.
If I create a CubeIDE project and select FreeRTOS, the "stm32f1xx_it.c" file does NOT have definitions for these three exceptions, and so it compiles just file.
Seems to me that manually adding freeRTOS to a CubeIDE project and being able to regenerate it in the future is just not possible without lots of work.
Anyone have any comments?
2021-04-26 12:37 PM
I guess still fully doable but have to consider required setup.
If FreeRTOS MW added to configuration:
If FreeRTOS MW is no part of configuration:
So if disabling FreeRTOS from adding it by yourself you have to untick some of generated IQ handlers ...
Such is about interrupts only ... maybe some other related setups but according to me Device Tool Configuraion should allow you to reach your goal ... just have to find proper settings ...
2021-04-26 12:59 PM
This is an excellent piece of help and I am going to try it on my project.
However, it appears there is a bug in STM32CubeIDE: I am using Git to switch between branches of my project. One branch has the CubeMx enabled FreeRTOS and the other has my attempts to manually add FreeRTOS. What I see is if the ".ioc" file is open in STM32CubeIDE and I change branches, the "Refresh" option does NOT reload the ".ioc" file. I am sure this has been adding to my issues!
I will report back on your suggestion once I have tested it.
2021-04-26 01:08 PM
Definitively if .ioc editor is open such is not synced on primary file update if update done out of editor. Such .ioc editor is not a common one ... no text here but graphical editor ... update sounds much more complex.
2021-04-26 01:19 PM
Thank you so very much, the NVIC options resolved my issue and I am able to use my manually installed FreeRTOS in the CubeIDE project. Excellent help!