Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMSIS RTOS Feature #253

Merged
merged 4 commits into from
Aug 4, 2021
Merged

CMSIS RTOS Feature #253

merged 4 commits into from
Aug 4, 2021

Conversation

robamu
Copy link
Contributor

@robamu robamu commented Aug 1, 2021

Full discussion and review can be found here: #227 . This is the squashed version of the feature for a cleaner history and with a proper git commit for the PR.

This branch has the complete feature set for CMSIS RTOS support.
Builds on #190 and #189 , a lot of work provided by @g-arjones , extended with documentation and an updated freertos example with the same architetecture as #225

Closes #227
Closes #188 . Closes #160 issues
Closes #190 Closes #189 PR

The updated freertos example can now be compiled with CMSIS RTOS by passing -DUSE_CMSIS_RTOS=ON and CMSIS RTOSV2 by passing -DUSE_CMSIS_RTOS_V2=ON . When doing this, it is not necessary to set FREERTOS_PATH anymore, because the build system can use the FreeRTOS and CMSIS RTOS sources inside the Cube repository. See updated README for more details

g-arjones and others added 3 commits August 1, 2021 14:06
Adds the full features set for CMSIS RTOS support, with a lot
work provided by g-arjones. Builds on ObKo#190
and ObKo#189.

It allows to use the CMSIS support provided in the STM32 cube
repository.

Also adds documentation and an updated freertos example with the
same architecture as ObKo#225
@atsju atsju mentioned this pull request Aug 1, 2021
@atsju atsju changed the title CMSIS RTOS Feature - Squashed CMSIS RTOS Feature Aug 1, 2021
Copy link
Collaborator

@atsju atsju left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

than you for the changes. We are almost done. I made some small remarks but I have one main issue in that the example is not working 100% on my side:

Please note the F4 build fails with following options on my computer. Please confirm issue and we can investigate further if you can not reproduce.

option(USE_CMSIS_RTOS "Use CMSIS RTOS provided by Cube repository" OFF)
option(USE_CMSIS_RTOS_V2 "Use CMSIS RTOS_V2 provided by Cube repository" OFF)
option(USE_CUBE_FREERTOS "Use the FreeRTOS kernel provided by the Cube repository" ON)

endif()

# Component is not RTOS component, so check whether it is a family component
string(REGEX MATCH "^STM32([A-Z][0-9])([0-9A-Z][0-9][A-Z][0-9A-Z])?_?(M[47])?.*$" COMP ${COMP})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note to myself for #235 #249
Regex will need update at multiple places (not done by automerge).

@@ -1,122 +1,216 @@
set(FreeRTOS_PORTS ARM_CM0 ARM_CM3 ARM_CM4F ARM_CM7 ARM_CM4_MPU ARM_CM3_MPU ARM_CM7_MPU)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just reminder of #231 (do not fix here)

target_link_libraries(FreeRTOS::Coroutine INTERFACE FreeRTOS)
if(STM32H7 IN_LIST FreeRTOS_FIND_COMPONENTS)
list(REMOVE_ITEM FreeRTOS_FIND_COMPONENTS STM32H7)
list(APPEND FreeRTOS_FIND_COMPONENTS STM32H7_M7 STM32H7_M4)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a note to myself for #235 #249
Same may be needed for other families

cmake/FindFreeRTOS.cmake Outdated Show resolved Hide resolved
examples/freertos/CMakeLists.txt Outdated Show resolved Hide resolved
examples/freertos/CMakeLists.txt Outdated Show resolved Hide resolved
examples/freertos/CMakeLists.txt Outdated Show resolved Hide resolved
1. include for device print function not necessary anymore
2. Improved component convention for H7 example
3. Fixed possible bug in F4 example component logic, is also
   consistent now
4. Some clarifications and form improvements for FreeRTOS section in
   README
@robamu
Copy link
Contributor Author

robamu commented Aug 1, 2021

Changes from code review:

  1. include for device print function not necessary anymore
  2. Improved component convention for H7 example
  3. Fixed possible bug in F4 example component logic, is also consistent now
  4. Some clarifications and form improvements for FreeRTOS section in README
  5. Removed duplicate handling of FREERTOS_PATH

Can you check the F4 example compilation again? I rechecked compiling different configurations for H7 and F4, using the Cube Sources and CMSIS RTOS(V2) support, and using an external kernel as well. F4 worked for me as well with the updates.

@atsju atsju self-requested a review August 2, 2021 06:01
@atsju atsju merged commit 8ef7237 into ObKo:master Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using FreeRTOS from STM32Cube Handle CMSIS-RTOS and CMSIS-RTOS2 as CMSIS components
4 participants