[RTOS移植]--STM32F767移植RTThread

2023-12-16 20:40:35

通过STM32cube创建一个工程

在这里插入图片描述

选择要移植的RTOS源

在这里插入图片描述

下载到本地

在这里插入图片描述

如果没有重启软件

在这里插入图片描述

选择对应配置

Build started: Project: STM32F767
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'D:\myapp\00-live\03stm32\00 keil5\ARM\ARM506\Bin'
Build target 'STM32F767'
compiling cpu_cache.c...
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(21): warning:  #223-D: function "SCB_EnableICache" declared implicitly
      SCB_EnableICache();
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(26): warning:  #223-D: function "SCB_DisableICache" declared implicitly
      SCB_DisableICache();
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(41): warning:  #223-D: function "__DSB" declared implicitly
          __DSB();
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(44): error:  #20: identifier "SCB" is undefined
              SCB->ICIMVAU = address;
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(49): warning:  #223-D: function "__ISB" declared implicitly
          __ISB();
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(55): warning:  #223-D: function "SCB_EnableDCache" declared implicitly
      SCB_EnableDCache();
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(60): warning:  #223-D: function "SCB_DisableDCache" declared implicitly
      SCB_DisableDCache();
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(75): warning:  #223-D: function "SCB_CleanInvalidateDCache_by_Addr" declared implicitly
          SCB_CleanInvalidateDCache_by_Addr((uint32_t *)startAddr, size_byte);
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(75): error:  #20: identifier "uint32_t" is undefined
          SCB_CleanInvalidateDCache_by_Addr((uint32_t *)startAddr, size_byte);
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(75): error:  #29: expected an expression
          SCB_CleanInvalidateDCache_by_Addr((uint32_t *)startAddr, size_byte);
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(75): error:  #18: expected a ")"
          SCB_CleanInvalidateDCache_by_Addr((uint32_t *)startAddr, size_byte);
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(79): warning:  #223-D: function "SCB_CleanDCache_by_Addr" declared implicitly
          SCB_CleanDCache_by_Addr((uint32_t *)startAddr, size_byte);
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(79): error:  #20: identifier "uint32_t" is undefined
          SCB_CleanDCache_by_Addr((uint32_t *)startAddr, size_byte);
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(79): error:  #29: expected an expression
          SCB_CleanDCache_by_Addr((uint32_t *)startAddr, size_byte);
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(79): error:  #18: expected a ")"
          SCB_CleanDCache_by_Addr((uint32_t *)startAddr, size_byte);
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(83): warning:  #223-D: function "SCB_InvalidateDCache_by_Addr" declared implicitly
          SCB_InvalidateDCache_by_Addr((uint32_t *)startAddr, size_byte);
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(83): error:  #20: identifier "uint32_t" is undefined
          SCB_InvalidateDCache_by_Addr((uint32_t *)startAddr, size_byte);
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(83): error:  #29: expected an expression
          SCB_InvalidateDCache_by_Addr((uint32_t *)startAddr, size_byte);
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(83): error:  #18: expected a ")"
          SCB_InvalidateDCache_by_Addr((uint32_t *)startAddr, size_byte);
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c(71): warning:  #177-D: variable "size_byte"  was declared but never referenced
      rt_uint32_t size_byte = size + (rt_uint32_t)addr - startAddr;
D:/myapp/00-live/03stm32/00 keil5/RealThread/RT-Thread/3.1.5/libcpu/arm/cortex-m7/cpu_cache.c: 10 warnings, 10 errors
"STM32F767\STM32F767.axf" - 10 Error(s), 10 Warning(s).
Target not created.
Build Time Elapsed:  00:00:00

失败报错一大堆
这种方法放弃

采用cube 创建裸机工程,移植rt_thread nano 3.03工程,可以运行

后续补充

通过UI 配置移植

文章来源:https://blog.csdn.net/qq_44704780/article/details/128422925
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。