2021-08-11 19:35:51 索炜达电子 1310
项目编号:E18
文件大小:6.17M
源码说明:带中文注释
开发环境:Keil5
简要概述:
一个简单的滑轨机器人程序, 适合初学者, 只是给出了大致的架构, 只包括上位机与机器人通信(WinForm->LwIP栈->步进电机),板子用的stm32F4
// 文件架构:
// CORE 存储官网固件库中CMSIS文件夹的内容,其实就是一些内核汇编文件 -- Device 包含微控制器的启动代码以及专用系统文件 -- Device\ST\STM32F4xx\Source\Templates\arm\startup_stm32f407xx.s 该芯片对应的启动文件 -- DSP 数字信号处理库,官网提供一些源代码 -- Include Cortex_M 内核汇编文件以及设备文件
// STM32F4xx_HAL_Driver HAL接口函数库文件 -- Inc HAL库头文件 -- Src HAL库源文件 -- stm32f4xx_hal_msp_template.c 一般不会添加到工程里,都是些空函数,没卵用 -- stm32f4xx_hal_timebase_rtc_alarm_template.c 不添加,会冲突 -- stm32f4xx_hal_timebase_rtc_wakeup_template.c 不添加,会冲突 -- stm32f4xx_hal_timebase_tim_template.c 不添加,会冲突
// SYSTEM 存放自己写的关于系统时钟,操作系统的一些配置源文件 -- sys/system_stm32f4xx.c 定义了系统初始化函数SystemInit以及系统时钟更新函数等
// USER 包含工程文件、主函数、一些比较重要的*.c和*.h文件,例如,stm32f4xx_it.h
// OBJ 存放编译过程中的中间文件与可执行文件,之前这些文件默认存储在Listing和Objects文件夹
// HARDWARE 存放自己写的外设相关的头文件与源文件
// C/C++选项卡中,定义预处理符号:USE_HAL_DRIVER,STM32F407xx -- ..\CORE\Include -- ..\STM32F4xx_HAL_Driver\Inc -- ..\CORE\Device\ST\STM32F4xx\Include 这是三个关于系统的头文件文件夹
// HGRobotApp 上位机程序(WinForm, C#)
运行界面:
文件列表:
目录│文件列表:
└ 4StepperMotorsDriveBySTM32F103x-HGRobotSimpleDemo
│ HGRobotApp.png
│ 说明.txt
├ CORE
│ ├ Device
│ │ └ ST
│ │ └ STM32F4xx
│ │ │ Release_Notes.html
│ │ ├ Include
│ │ │ │ stm32f401xc.h
│ │ │ │ stm32f401xe.h
│ │ │ │ stm32f405xx.h
│ │ │ │ stm32f407xx.h
│ │ │ │ stm32f410cx.h
│ │ │ arm_rfft_q15.c
│ │ └ arm_rfft_q31.c
│ └ Include
│ │ cmsis_armcc.h
│ │ cmsis_armclang.h
│ │ cmsis_compiler.h
│ │ cmsis_gcc.h
│ │ cmsis_iccarm.h
│ │ cmsis_version.h
│ │ core_armv8mbl.h
│ │ core_armv8mml.h
│ │ core_cm0.h
│ │ core_cm0plus.h
│ │ core_cm1.h
│ │ core_cm23.h
│ │ core_cm3.h
│ │ core_cm33.h
│ │ core_cm4.h
│ │ core_cm7.h
│ │ core_sc000.h
│ │ core_sc300.h
│ │ mpu_armv7.h
│ │ mpu_armv8.h
│ └ tz_context.h
├ HARDWARE
│ ├ ETH
│ │ │ app_ethernet.c
│ │ │ app_ethernet.h
│ │ │ ethernetif.c
│ │ │ ethernetif.h
│ │ │ lwipopts.h
│ │ │ tcp_echoserver.c
│ │ └ tcp_echoserver.h
│ └ MOTOR
│ │ motor.c
│ │ motor.h
│ │ motor_ctrl.c
│ │ motor_ctrl.h
│ │ motor_ioinit.c
│ └ motor_ioinit.h
├ HGRobotApp
│ │ App.config
│ │ CHCNetSDK.cs
│ │ HDApp.cs
│ │ HDApp.Designer.cs
│ │ HDApp.resx
│ │ HGRobotApp.csproj
│ │ HGRobotApp.sln
│ │ Program.cs
│ └ Properties
│ │ AssemblyInfo.cs
│ │ Resources.Designer.cs
│ │ Resources.resx
│ │ Settings.Designer.cs
│ └ Settings.settings
├ STM32F4xx_HAL_Driver
│ ├ Inc
│ │ │ stm32f4xx_hal.h
│ │ │ stm32f4xx_hal_adc.h
│ │ └ Legacy
│ │ │ stm32f4xx_hal_can_legacy.h
│ │ └ stm32_hal_legacy.h
│ └ Src
│ │ stm32f4xx_ll_utils.c
│ └ Legacy
│ └ stm32f4xx_hal_can.c
├ SYSTEM
│ ├ Middlewares
│ │ └ LwIP
│ │ ├ src
│ │ │ ├ api
│ │ │ │ │ api_lib.c
│ │ │ │ │ api_msg.c
│ │ │ │ │ err.c
│ │ │ │ │ netbuf.c
│ │ │ │ │ netdb.c
│ │ │ │ │ netifapi.c
│ │ │ │ │ sockets.c
│ │ │ │ └ tcpip.c
│ │ │ ├ core
│ │ │ │ │ def.c
│ │ └ system
│ │ └ arch
│ │ │ bpstruct.h
│ │ │ cc.h
│ │ │ cpu.h
│ │ │ epstruct.h
│ │ │ init.h
│ │ │ lib.h
│ │ │ perf.h
│ │ └ sys_arch.h
│ ├ sys
│ │ └ system_stm32f4xx.c
│ └ usart
│ │ bsp_debug_usart.c
│ └ bsp_debug_usart.h
└ USER
│ HGRobot.uvguix.Seven
│ HGRobot.uvoptx
│ HGRobot.uvprojx
│ main.c
│ main.h
│ stm32f4xx_assert.c
│ stm32f4xx_hal_conf.h
│ stm32f4xx_hal_conf.h~RF6dc7b2.TMP
│ stm32f4xx_hal_msp.c
│ stm32f4xx_it.c
│ stm32f4xx_it.h
└ DebugConfig
└ Target_1_STM32F407IGTx.dbgconf