新增SPI命令类型0xC4用于ADC调试反馈,实现在GD32上采集 温度/VDDA/VIN等模拟量数据的反馈功能,并支持主动推送和被动查询模式。 feat(spi): 扩展PING命令响应格式 修改PING命令响应格式,增加APP身份信息16字节载荷,包含版本号、 启动时间、功能开关位图等信息,用于主机获取从设备详细状态。 refactor(can_feedback): 优化CAN反馈推送逻辑 改进CAN反馈推送机制,跳过编译期关闭的通道,只遍历启用的通道, 确保推送效率并避免无效操作。 feat(comm): 添加EXMC总线初始化和诊断功能 添加了EXMC总线的初始化功能,包括GPIO配置、NOR/SRAM区域参数设置, 以及总线探活机制。实现了总线可见性检测,当检测到全0或全1的挂死状态时 会返回false并输出错误信息。同时添加了printf日志输出用于调试。 refactor(esc_lan9252): 重构ESC初始化返回值 将EscLan9252::init()方法的返回类型从void改为bool, 使其能够返回EXMC总线准备状态,便于上层进行状态检查。 docs(app_spi_cmd_ping): 添加代码注释文档 为SPI命令处理相关类和方法添加详细的Doxygen风格注释文档, 提高代码可读性和维护性。
124 lines
4.1 KiB
YAML
124 lines
4.1 KiB
YAML
# A project translates into one executable or library.
|
|
project:
|
|
|
|
groups:
|
|
- group: Source Files
|
|
files:
|
|
- file: ./main.h
|
|
- file: ./main.cpp
|
|
- group: sys
|
|
files:
|
|
- file: ./sys/initial.h
|
|
- file: ./sys/initial.cpp
|
|
- file: ./sys/systick.h
|
|
- file: ./sys/systick.cpp
|
|
- file: ./sys/task_manager.h
|
|
- file: ./sys/task_manager.cpp
|
|
- file: ./sys/task_runner.h
|
|
- file: ./sys/task_runner.cpp
|
|
- file: ./sys/ota_boot_request.h
|
|
- file: ./sys/ota_boot_request.cpp
|
|
- file: ./sys/cpp_stubs.cpp
|
|
- file: ./sys/config.h
|
|
- group: device
|
|
files:
|
|
- file: ./device/adc.h
|
|
- file: ./device/adc.cpp
|
|
- file: ./device/canfd.h
|
|
- file: ./device/canfd.cpp
|
|
- file: ./device/timer.h
|
|
- file: ./device/timer.cpp
|
|
- file: ./device/usart0.h
|
|
- file: ./device/usart0.cpp
|
|
- file: ./device/watchdog.h
|
|
- file: ./device/watchdog.cpp
|
|
# GigaDevice DFP 未把 EXMC 注册为 CMSIS 组件(仅有 FMC=片内 Flash),
|
|
# 但外设源文件存在于 Pack;LAN9252 并行总线需要 EXMC,故本地编入。
|
|
- group: device_exmc
|
|
files:
|
|
- file: ./RTE/Device/GD32E508VE/gd32e50x_exmc.c
|
|
- file: ./RTE/Device/GD32E508VE/gd32e50x_exmc.h
|
|
- group: device/spi
|
|
files:
|
|
- file: ./device/spi/app_spi_command.h
|
|
- file: ./device/spi/app_spi_command.cpp
|
|
- file: ./device/spi/spi_command_handler.h
|
|
- file: ./device/spi/app_spi_command_defs.h
|
|
- file: ./device/spi/app_spi_cmd_boot_request.cpp
|
|
- file: ./device/spi/app_spi_cmd_ota_wait.cpp
|
|
- file: ./device/spi/app_spi_cmd_ping.cpp
|
|
- file: ./device/spi/app_spi_cmd_can_bridge.cpp
|
|
- file: ./device/spi/app_spi_cmd_can_feedback.cpp
|
|
- file: ./device/spi/app_spi_cmd_id_snapshot.cpp
|
|
- file: ./device/spi/app_spi_cmd_adc_feedback.cpp
|
|
- group: spi_link
|
|
files:
|
|
- file: ../../spi_link/spi_link_v2.cpp
|
|
- group: comm
|
|
files:
|
|
- file: ./comm/esc_exmc_bus.h
|
|
- file: ./comm/esc_exmc_bus.cpp
|
|
- file: ./comm/esc_lan9252.h
|
|
- file: ./comm/esc_lan9252.cpp
|
|
- file: ./comm/ethercat_slave.h
|
|
- file: ./comm/ethercat_slave.cpp
|
|
- file: ./comm/ethercat_sync.h
|
|
- file: ./comm/ethercat_sync.cpp
|
|
|
|
# List components to use for your application.
|
|
# A software component is a re-usable unit that may be configurable.
|
|
components:
|
|
- component: ARM::CMSIS:CORE
|
|
- component: Device:Startup
|
|
- component: Device:GD32E50x_StdPeripherals:ADC
|
|
- component: Device:GD32E50x_StdPeripherals:CAN
|
|
- component: Device:GD32E50x_StdPeripherals:CRC
|
|
- component: Device:GD32E50x_StdPeripherals:DBG
|
|
- component: Device:GD32E50x_StdPeripherals:DMA
|
|
- component: Device:GD32E50x_StdPeripherals:EXTI
|
|
- component: Device:GD32E50x_StdPeripherals:FMC
|
|
- component: Device:GD32E50x_StdPeripherals:GPIO
|
|
- component: Device:GD32E50x_StdPeripherals:MISC
|
|
- component: Device:GD32E50x_StdPeripherals:PMU
|
|
- component: Device:GD32E50x_StdPeripherals:RCU
|
|
- component: Device:GD32E50x_StdPeripherals:SPI_I2S
|
|
- component: Device:GD32E50x_StdPeripherals:TIMER
|
|
- component: Device:GD32E50x_StdPeripherals:USART
|
|
- component: Device:GD32E50x_libopt
|
|
- component: Device:GD32E50x_StdPeripherals:FWDGT
|
|
|
|
# List executable file formats to be generated.
|
|
output:
|
|
type:
|
|
- elf
|
|
- hex
|
|
- map
|
|
|
|
misc:
|
|
- for-compiler: AC6
|
|
C-CPP:
|
|
- -DGD32E508
|
|
- -DGD32E50X
|
|
- -DHXTAL_VALUE=8000000U
|
|
- -gdwarf-5
|
|
- -D__MICROLIB
|
|
- -fshort-enums
|
|
- -fshort-wchar
|
|
# EXMC 未作为 CMSIS 组件分发;头文件在 RTE 本地目录
|
|
- -IRTE/Device/GD32E508VE
|
|
- -Wno-register
|
|
- -IG:/Robot_v2/DCU/spi_link
|
|
C:
|
|
- -std=gnu11
|
|
CPP:
|
|
- -std=gnu++17
|
|
ASM:
|
|
- -DGD32E508
|
|
- -DGD32E50X
|
|
- -DHXTAL_VALUE=8000000U
|
|
- -gdwarf-5
|
|
- -D__MICROLIB
|
|
Link:
|
|
- --library_type=microlib
|
|
- --entry=Reset_Handler
|