embOS and STM32 CubeMX

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • embOS and STM32 CubeMX

    Hi,

    I would like to base embOS on a HAL/BSP which is generated by STM32 CubeMX.

    Currently, I am just looking for some hints or links to any documentation I should read.

    The situation is that everything (HAL/BSP and embOS) compiles, links, and loads perfectly.
    I can step through the code stating from the reset-vector.

    As soon as OS calls or timer interrupts occur the CPU is entering OS_Error
    for different reasons, depending on the modifications to the code I make.

    I am using the "Cortex-M, Rowley" port of embOS.

    Thanks for any hint
    Stefan
  • Dear Stefan,

    The latest release of embOS for Cortex-M and Rowley did include the "User & Reference Guide for embOS". Chapter 24.2 of that guide (starting on page 381) displays a table of each possible error code together with a short explanation. If you feel any of these descriptions is unclear or insufficient, please do not hesitate to contact us for further information.

    Best regards,
    Martin
  • Hi,

    a little late maybe, but I am a little step further.
    I created a STM32CubeMX-setup for an Nucleo-64 (STM32L476) -> HAL
    I also copied the default embOS-example for that controller -> embOS

    In OS_StartLEDBlink.c:
    1. include main.h from HAL
    2. include stm32l4xx_hal.h from HAL
    3. copy content of HAL-main() to the beginning of the embOS-main(), before the call of OS_InitKern()
    4. copy all other functions from HAL-main() to the end of the embOS-main().
    5. drop call of BSP-functions from embOS (do't need that file at all) and call HAL_GPIO_TogglePin() instead
    In RTOSInit_STM32L4xx_CMSIS.c:
    1. include stm32l4xx_hal.h instead of stm32l4xx.h (the _hal-File is the only header needed using HAL, as described in ST-document UM1884)
    2. move HAL-functions from HAL-SysTickHandler to embOS-SysTickHandler. I append the functions after the call of OS_LeaveNestableInterrupt()
    In Start_STM32L46.emProject (embOS-Project-File used bei Embedded Studio)

    1. alter the include-path "c_user_include_directories" to contain all .h-files of HAL
    2. include all .c-files in Embedded Studio
    3. exclude all files of CoreSupport
    4. exclude all files of DeviceSupport
    I now have a blinking green LED by using the STM32HAL.
    Best regards

    The post was edited 1 time, last by bkiepke ().