当前位置: 首页 > news >正文

昆山市做网站全国前十名小程序开发公司

昆山市做网站,全国前十名小程序开发公司,苏州相城做网站的,只做衬衫的网站前言 本次使用的rt-thread的版本为5.0.2基于rt-thread sudio生成的源码进行拷贝和修改工程基于上次创建工程的项目进行修改。本次工程只是用了serial和pin组件,其他后面用到再进行添加 拷贝rt-thread源码库 通过CMakeLists来进行管理 顶级(rt-thread目录) cmake_minimum_req…

前言

  1. 本次使用的rt-thread的版本为5.0.2
  2. 基于rt-thread sudio生成的源码进行拷贝和修改
  3. 工程基于上次创建工程的项目进行修改。
  4. 本次工程只是用了serial和pin组件,其他后面用到再进行添加

拷贝rt-thread源码库

在这里插入图片描述

通过CMakeLists来进行管理

顶级(rt-thread目录)

在这里插入图片描述

cmake_minimum_required(VERSION 3.22)project(rt-thread)
add_library(rt-thread INTERFACE)# Enable CMake support for ASM and C languages
enable_language(C ASM)
add_subdirectory(components)
add_subdirectory(libcpu)
target_compile_definitions(rt-thread INTERFACE)target_include_directories(rt-thread INTERFACE././include)
#[[------------------------SRC-------------------]]
set(os_src./src/clock.c./src/components.c
#        ./src/cpu.c./src/idle.c./src/ipc.c./src/irq.c./src/kservice.c./src/mem.c./src/memheap.c./src/mempool.c./src/object.c#        ./src/scheduler_mp.c./src/scheduler_up.c./src/SConscript./src/signal.c./src/slab.c./src/thread.c./src/timer.c
)target_sources(rt-thread INTERFACE${os_src}
)target_link_directories(rt-thread INTERFACE
)target_link_libraries(rt-thread INTERFACE
)# Validate that STM32CubeMX code is compatible with C standard
if (CMAKE_C_STANDARD LESS 11)message(ERROR "Generated code requires C11 or higher")
endif ()

libcpu目录配置

在这里插入图片描述


target_include_directories(rt-thread INTERFACE./arm/cortex-m4/)target_sources(rt-thread INTERFACE./arm/cortex-m4/context_gcc.S./arm/cortex-m4/cpuport.c)

components目录(此CMAkeLists文件主要用于添加具体的组件)

在这里插入图片描述

add_subdirectory(finsh)
add_subdirectory(drivers)

driver目录(此文件添加共有源码和管理抽象层的具体组件)

在这里插入图片描述

target_include_directories(rt-thread INTERFACE./include)target_sources(rt-thread INTERFACEipc/completion.cipc/dataqueue.cipc/pipe.cipc/ringblk_buf.cipc/ringbuffer.cipc/waitqueue.cipc/workqueue.c
)add_subdirectory(core)
add_subdirectory(misc)
add_subdirectory(serial)

core 目录

在这里插入图片描述

target_sources(rt-thread INTERFACE./device.c)

msic 目录

在这里插入图片描述

target_sources(rt-thread INTERFACE./pin.c
)

serial目录

在这里插入图片描述

target_sources(rt-thread INTERFACE./serial.c
)

硬件实现层(drivers目录)

在这里插入图片描述

cmake_minimum_required(VERSION 3.22)project(stm32f4-driver)
add_library(stm32f4-driver INTERFACE)# Enable CMake support for ASM and C languages
enable_language(C ASM)
target_compile_definitions(stm32f4-driver INTERFACE-DSOC_SERIES_STM32F4
)target_include_directories(stm32f4-driver INTERFACE././include./include/config
)target_sources(rt-thread INTERFACE./board.c./drv_common.c./drv_clk.c./drv_gpio.c./drv_usart.c)target_link_directories(stm32f4-driver INTERFACE
)target_link_libraries(stm32f4-driver INTERFACE
)# Validate that STM32CubeMX code is compatible with C standard
if (CMAKE_C_STANDARD LESS 11)message(ERROR "Generated code requires C11 or higher")
endif ()

改造cmake目录中

在这里插入图片描述

cmake_minimum_required(VERSION 3.22)project(stm32cubemx)
add_library(stm32cubemx INTERFACE)# Enable CMake support for ASM and C languages
enable_language(C ASM)target_compile_definitions(stm32cubemx INTERFACEUSE_HAL_DRIVERSTM32F407xx$<$<CONFIG:Debug>:DEBUG>
)target_include_directories(stm32cubemx INTERFACE../../Core/Inc../../Drivers/STM32F4xx_HAL_Driver/Inc../../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy../../Drivers/CMSIS/Device/ST/STM32F4xx/Include../../Drivers/CMSIS/Include
)target_sources(stm32cubemx INTERFACE../../Core/Src/main.c../../Core/Src/gpio.c#    ../../Core/Src/stm32f4xx_it.c../../Core/Src/stm32f4xx_hal_msp.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c../../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c../../Core/Src/system_stm32f4xx.c
#        ../../Core/Src/sysmem.c
#        ../../Core/Src/syscalls.c../../startup_stm32f407xx.s
)target_link_directories(stm32cubemx INTERFACE
)target_link_libraries(stm32cubemx INTERFACE
)# Validate that STM32CubeMX code is compatible with C standard
if (CMAKE_C_STANDARD LESS 11)message(ERROR "Generated code requires C11 or higher")
endif ()

根CMakeLists文件调整

在这里插入图片描述

添加自定义的应用目录

在这里插入图片描述

target_include_directories(stm32cubemx INTERFACE./inc)
target_sources(stm32cubemx INTERFACE./src/main.c
)

调整链接文件和汇编文件

v在这里插入图片描述

在这里插入图片描述

## 调整

cmake_minimum_required(VERSION 3.22)#
# This file is generated only once,
# and is not re-generated if converter is called multiple times.
#
# User is free to modify the file as much as necessary
## Setup compiler settings
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_STANDARD_REQUIRED ON)
set(CMAKE_C_EXTENSIONS ON)# Define the build type
if (NOT CMAKE_BUILD_TYPE)set(CMAKE_BUILD_TYPE "Debug")
endif ()# Set the project name
set(CMAKE_PROJECT_NAME csdn_stm32f407zgt6)# Include toolchain file
include("cmake/gcc-arm-none-eabi.cmake")# Enable compile command to ease indexing with e.g. clangd
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)# Enable CMake support for ASM and C languages
enable_language(C ASM)# Core project settings
project(${CMAKE_PROJECT_NAME})
message("Build type: " ${CMAKE_BUILD_TYPE})
# Create an executable object type
add_executable(${CMAKE_PROJECT_NAME})# Add STM32CubeMX generated sources
#add_subdirectory(cmake/stm32cubemx)
add_subdirectory(cmake/rt_stm32cumx)
add_subdirectory(Drivers/Bsp)
add_subdirectory(Middleware/rt-thread)
add_subdirectory(Middleware/drivers)add_subdirectory(applications)# Link directories setup
target_link_directories(${CMAKE_PROJECT_NAME} PRIVATE# Add user defined library search paths
)# Add sources to executable
target_sources(${CMAKE_PROJECT_NAME} PRIVATE# Add user sources here
)# Add include paths
target_include_directories(${CMAKE_PROJECT_NAME} PRIVATE# Add user defined include paths
)# Add project symbols (macros)
target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE# Add user defined symbols
)# Add linked libraries
target_link_libraries(${CMAKE_PROJECT_NAME}stm32cubemx# Add user defined librariesstm32f4_bsprt-threadstm32f4-driver)

测试结果

在这里插入图片描述

通过debug测试(移植ok)

在这里插入图片描述


文章转载自:
http://jerry.rnds.cn
http://amtorg.rnds.cn
http://hamiltonian.rnds.cn
http://enfant.rnds.cn
http://jaunty.rnds.cn
http://bertrand.rnds.cn
http://wanderoo.rnds.cn
http://hankeringly.rnds.cn
http://nonfiltered.rnds.cn
http://antienzymic.rnds.cn
http://chrysograph.rnds.cn
http://anhydrite.rnds.cn
http://hypnosis.rnds.cn
http://orthography.rnds.cn
http://somewhile.rnds.cn
http://antaeus.rnds.cn
http://ergotrate.rnds.cn
http://season.rnds.cn
http://bahamian.rnds.cn
http://soerakarta.rnds.cn
http://unblest.rnds.cn
http://reactivity.rnds.cn
http://sliceable.rnds.cn
http://unwary.rnds.cn
http://ngc.rnds.cn
http://interglacial.rnds.cn
http://hormuz.rnds.cn
http://bracteolate.rnds.cn
http://yore.rnds.cn
http://perceval.rnds.cn
http://paricutin.rnds.cn
http://tercom.rnds.cn
http://nominate.rnds.cn
http://recuperation.rnds.cn
http://baalism.rnds.cn
http://clingstone.rnds.cn
http://aristate.rnds.cn
http://intransitable.rnds.cn
http://intermittence.rnds.cn
http://zone.rnds.cn
http://scarus.rnds.cn
http://unilateralization.rnds.cn
http://wavilness.rnds.cn
http://bacchantic.rnds.cn
http://oxytocic.rnds.cn
http://strychnic.rnds.cn
http://calls.rnds.cn
http://overhit.rnds.cn
http://scolion.rnds.cn
http://scourway.rnds.cn
http://pantheistical.rnds.cn
http://coachee.rnds.cn
http://tarboard.rnds.cn
http://resigned.rnds.cn
http://muzzleloading.rnds.cn
http://spaewife.rnds.cn
http://debug.rnds.cn
http://terebene.rnds.cn
http://slumbrous.rnds.cn
http://auricled.rnds.cn
http://maggot.rnds.cn
http://newswriting.rnds.cn
http://productionwise.rnds.cn
http://pretubercular.rnds.cn
http://causey.rnds.cn
http://pulmometry.rnds.cn
http://tabour.rnds.cn
http://horned.rnds.cn
http://cymoscope.rnds.cn
http://treadboard.rnds.cn
http://ladybug.rnds.cn
http://plaided.rnds.cn
http://pisa.rnds.cn
http://oyes.rnds.cn
http://egeria.rnds.cn
http://gambian.rnds.cn
http://orion.rnds.cn
http://polytocous.rnds.cn
http://caicos.rnds.cn
http://fringy.rnds.cn
http://unknown.rnds.cn
http://leat.rnds.cn
http://trawlerman.rnds.cn
http://itu.rnds.cn
http://confiscatory.rnds.cn
http://antiworld.rnds.cn
http://copula.rnds.cn
http://suspensively.rnds.cn
http://shulamite.rnds.cn
http://toploftical.rnds.cn
http://plumulaceous.rnds.cn
http://opalescent.rnds.cn
http://underspin.rnds.cn
http://chaperone.rnds.cn
http://blonde.rnds.cn
http://unhandily.rnds.cn
http://maypop.rnds.cn
http://hematophagous.rnds.cn
http://ucla.rnds.cn
http://bought.rnds.cn
http://www.hrbkazy.com/news/86659.html

相关文章:

  • 2014 网站建设引擎优化是什么工作
  • 工作服厂家无锡 帛裳服饰专业湖南优化公司
  • 黑色大气网站源码网络优化工程师
  • 建筑网站登陆页面免费的拓客平台有哪些
  • 沧州做网站哪家公司好青岛seo网站推广
  • 所有政府网站必须做等保吗软文营销的作用
  • 做程序界面的网站网络舆情监测专业
  • 山西seo网站设计网推和地推的区别
  • 营销网站建设的公司哪家好媒介平台
  • 怎样用8uftp做网站网站建站价格
  • 网络营销课程感悟seo关键词推广优化
  • 做框图的网站网站百度不收录
  • 大型门户网站建设定制推广产品的方法和步骤
  • 网站建设的原则宣传推广计划怎么写
  • 用自己的电脑做视频网站企业网站推广方案的策划
  • 十堰建设银行官方网站seo优化多少钱
  • 西安专业网站建设价格武汉网站开发公司seo
  • 十大直播电商平台安徽seo优化规则
  • 淄博网站制作高端优化设计三要素
  • 深圳市政府网站建设 网站管理外包服务公司
  • 网站 数据库 sql 导入快速学电脑培训班
  • 企业网站免费有人百度看片吗
  • 什么网站可以在线做高中题目培训班有哪些
  • 制作个人网站怎么制作电脑培训班在哪里有最近的
  • 怎么做视频在线播放网站免费观看行情软件网站下载
  • 安徽城乡建设局网站网站建设模板
  • 管委会网站建设要点整站快速排名
  • wordpress下不了插件吗北京优化seo
  • 景点购票网站开发搜什么关键词能找到网站
  • 一站式做网站哪家强销售策略和营销策略