修改测试

This commit is contained in:
2026-07-22 11:14:22 +08:00
parent c646df5c2a
commit a7f367f6a3
77 changed files with 1691 additions and 950 deletions

276
AGENTS.md
View File

@@ -1,229 +1,83 @@
# STM32F4-Base # STM32F4-Base
> **⚠️ 编译验证:所有代码修改后必须执行 `@build` 验证编译通过0 错误 0 警告),否则不要提交。** > **编译验证:所有代码修改后必须执行 `@build` 验证编译通过0 错误 0 警告),否则不要提交。**
## 项目概述 ## 构建
STM32F407ZGTx (Cortex-M4 FPU) 基础固件项目,集成 CH395F 以太网控制器 SPI 驱动、GD5F2GQ5UE SPI NAND Flash 存储dhara FTL + FatFS 文件系统)和 TPAFE5160 16位8通道同步采样 ADC 并行接口驱动。 - **仅支持 Keil MDK-ARM v5 (ARMCC)**,无其他工具链
- 命令行编译:`@build`(自动执行 `MDK-ARM/build.bat`
- 退出码0 = 成功 | 1 = 有警告(不通过)| 2+ = 错误,查看 `MDK-ARM/build_log.txt`
## 目录结构 ## 硬件
| 外设 | 接口 | 引脚 |
|------|------|------|
| CH395F 以太网 | SPI2 | PB12 CS, PB13 SCK, PB14 SDO, PB15 SDI |
| GD5F2GQ5UE NAND | SPI1 | PE0 CS, PB3 SCK, PB4 MISO, PB5 MOSI, PB8 WP, PE1 HOLD |
| TPAFE5160 ADC | 并行16位 | PG0-PG15 数据, PD3 RD, PD4 CONVST, PD7 BUSY |
| USART1 | 串口 | PA9 TX, PA10 RX (115200bps) |
| 6x LED | GPIO | PC4, PC5, PB1, PB2, PF11, PF12低电平点亮 |
MCU: STM32F407ZGTx @ 168MHz (HSE 25MHz → PLL 4/168/2)
## 架构
``` ```
STM32F4-Base/ Src/main.c → 外设初始化 → app_main_init → gd5f2gq5ue_init → tpafe5160_init
├── Src/ # CubeMX 生成的外设初始化 + main → osKernelInitialize → MX_FREERTOS_Init → osKernelStart
├── Inc/ # CubeMX 生成的头文件 → [FreeRTOS tasks: defaultTask, netTask, ftpTask]
├── Drivers/
│ ├── BSP/
│ │ ├── CH395F/ # CH395F 以太网芯片驱动(手写)
│ │ ├── NET/ # BSD Socket API 网络抽象层(手写)
│ │ │ ├── net_config.h # 网络配置宏定义
│ │ │ ├── net_types.h # 类型定义、地址结构、Socket 控制块
│ │ │ ├── net_socket.h # BSD Socket API 头文件
│ │ │ ├── net_socket.c # API 核心实现 + 状态机
│ │ │ ├── net_select.h # select/poll API 头文件
│ │ │ └── net_select.c # select/poll 实现
│ │ ├── GD5F2GQ5UE/ # GD5F2GQ5UE NAND Flash 驱动(手写)
│ │ │ ├── gd5f2gq5ue.h/c # 底层 SPI 驱动
│ │ │ └── nand_ftl.h/c # dhara FTL + FatFS diskio 适配层
│ │ └── TPAFE5160/ # TPAFE5160 ADC 并行接口驱动(手写)
│ ├── STM32F4xx_HAL_Driver/ # ST HAL 库CubeMX 生成)
│ └── CMSIS/ # ARM CMSISCubeMX 生成)
├── Lib/
│ ├── dhara/ # dhara FTL (Flash Translation Layer)
│ └── FatFs/ # FatFs 文件系统 (v0.15)
├── MDK-ARM/ # Keil MDK 工程文件
├── docs/ # 参考文档
└── STM32F407-Demo.ioc # STM32CubeMX 项目源文件
``` ```
- **defaultTask**FTL + FatFS 初始化测试(开机一次性)
- **netTask**`net_init()``net_poll()` + `net_process_messages()` 每 10ms
- **ftpTask**`lftpd_start("/", 21, &ftp)` 延迟 7s 后启动
### 任务栈
| Task | 栈大小 |
|---|---|
| defaultTask | 2048 |
| netTask | 4096 |
| ftpTask | 4096 |
## CH395F 设计原则
- **单连接 socket**Socket 0 复用监听和数据通道,收到 CONNECT 后切换为数据通道DISCONNECT/TIMEOUT 后重新 OPEN → LISTEN
- **中断统一处理**:所有 CH395F 中断在 `net_poll()` 中通过 `GET_GLOB_INT_STATUS` 集中读取并清除,不得在 ISR 或其他地方单独处理
## NET 网络层
- `net_socket.h/c` — BSD Socket API多连接模式下 Socket 0 监听、Socket 1~7 数据
- `net_select.h/c` — select/poll I/O 多路复用
- 线程安全通过消息队列(`netMsgQueue`)实现,所有 CH395F 操作在 netTask 中串行处理
- 网络初始化顺序(多连接):`ch395f_set_fun_para(0x02)``ch395f_init()` → 配置 Socket 1~7缓冲区+端口+协议,不 OPEN→ 配置 Socket 0TCP LISTEN
- **新文件需手动添加到 Keil MDK 工程**才能编译
## 关键文件 ## 关键文件
| 路径 | 说明 | | 路径 | 说明 |
|---|---| |---|---|
| `Src/main.c` | 程序入口,初始化序列及主循环 | | `Src/main.c` | 入口,CubeMX 生成 + USER CODE 区域 |
| `Drivers/BSP/CH395F/ch395f.c/h` | CH395F 以太网芯片 SPI 驱动 | | `Src/freertos.c` | FreeRTOS task 创建CubeMX 生成 + USER CODE 区域 |
| `Drivers/BSP/NET/net_socket.c/h` | BSD Socket API 网络抽象层 | | `App/task/net_task.c` | netTask 主循环(网络初始化 + 轮询) |
| `Drivers/BSP/NET/net_select.c/h` | select/poll I/O 多路复用 | | `Drivers/BSP/NET/` | BSD Socket API 网络抽象层 |
| `Drivers/BSP/GD5F2GQ5UE/gd5f2gq5ue.c/h` | GD5F2GQ5UE NAND Flash SPI 驱动 | | `Drivers/BSP/CH395F/` | CH395F SPI 驱动 |
| `Drivers/BSP/GD5F2GQ5UE/nand_ftl.c` | dhara FTL + FatFS diskio 适配层 | | `Drivers/BSP/GD5F2GQ5UE/` | NAND Flash 驱动 + dhara FTL + FatFS diskio |
| `Drivers/BSP/TPAFE5160/tpafe5160.c/h` | TPAFE5160 ADC 并行接口驱动 | | `Drivers/BSP/TPAFE5160/` | ADC 并行接口驱动 |
| `Src/freertos.c` | FreeRTOS task 创建和任务函数CubeMX 生成 + 手写) | | `Drivers/BSP/SD2506/` | RTC 驱动 |
| `Inc/FreeRTOSConfig.h` | FreeRTOS 内核配置 | | `Drivers/BSP/RS485/` | RS-485 通信UART5 + PD0 DE |
| `MDK-ARM/STM32F407-Demo.uvprojx` | Keil MDK 项目文件 |
| `STM32F407-Demo.ioc` | STM32CubeMX 项目源文件 |
## 构建 ## 驱动关键点
仅支持 Keil MDK-ARM v5 (ARMCC)。打开 `MDK-ARM/STM32F407-Demo.uvprojx` 编译。 详见 `docs/` 目录:
- `CH395F_Trap_Records.md` — CH395F 已知陷阱
- 编译器ARMCC V5.06 update 7优化 `-O4``spi.c`/`usart.c`/HAL 源文件 `-O0`C99`USE_HAL_DRIVER, STM32F407xx` - `GD5F2GQ5UE_Trap_Records.md` — GD5F2GQ5UE 已知陷阱
- `CH395F_Test_Guide.md` — 网络测试说明
### 命令行编译Agent 使用)
修改代码后必须执行命令行编译验证,**仅使用** `@build`,不得直接调用 UV4.exe
```
@build
```
该命令定义在 `.opencode/command/build.md`,自动执行 `MDK-ARM/build.bat` 进行全量编译(`-r`)。
**退出码:** 0 = 成功0 Error, 0 Warning| 1 = 有警告(同样不通过)| 2+ = 错误,需查看 `MDK-ARM/build_log.txt` 定位
## 硬件配置
- **主频:** HSE 25MHz → PLL 168MHz (4/168/2)
- **6 个 LED** PC4, PC5, PB1, PB2, PF11, PF12低电平点亮
- **CH395F** SPI2 (PB12 CS, PB13 SCK, PB14 SDO, PB15 SDI)
- **GD5F2GQ5UE** SPI1 (PE0 CS, PB3 SCK, PB4 MISO, PB5 MOSI, PB8 WP, PE1 HOLD)
- **TPAFE5160** 并行16位 (PG0-PG15 数据, PD3 RD, PD4 CONVST, PD7 BUSY, PD1 FRSTDATA, PF13-15 OS[2:0])
- **USART1** PA9 TX, PA10 RX (115200bps)
## 启动顺序
```
HAL_Init() → SystemClock_Config() → MX_GPIO_Init() → MX_USART1_UART_Init() → MX_SPI2_Init() → MX_SPI1_Init()
→ gd5f2gq5ue_init() → [USER CODE: net_init + TCP listen + 其他外设初始化]
→ osKernelInitialize() → MX_FREERTOS_Init() → osKernelStart() ← FreeRTOS 调度器启动
→ [FreeRTOS tasks: defaultTask, netTask 运行]
```
## 代码规范
参考 `嵌入式C语言代码规范V1.0.md`,关键要点:
- 缩进4 空格,禁止 Tab
- 命名:小写字母+下划线;全局变量 `g_` 前缀,静态 `s_`,指针 `p_`,数组 `a_`
- 函数注释块需包含:函数功能、入口参数、返回值、限定条件、函数说明
- 大括号K&R 风格(左大括号不换行)
- 文件头注释:模块名称、功能、平台、作者、日期、修改记录
- 头文件保护宏:`__MODULE_NAME_H` 格式,带 `extern "C"`
## 注意 ## 注意
- `Inc/``Src/` 中 CubeMX 生成的文件带有 `USER CODE BEGIN`/`END` 标记,自定义代码写在这些区域之间 - `Inc/``Src/` 中 CubeMX 生成的文件带有 `USER CODE BEGIN`/`END` 标记,自定义代码写在这些区域之间
- `ch395f.c/h``gd5f2gq5ue.c/h``nand_ftl.c/h` 为纯手工代码,不受 CubeMX 保护 - `Drivers/BSP/` 下的驱动文件为纯手工代码,不受 CubeMX 保护
- `tpafe5160.c/h` 为纯手工代码,不受 CubeMX 保护 - CH395F 每次 SPI 事务需用 `ch395f_spi_begin()` / `ch395f_spi_end()` 包裹
- CH395F 每次 SPI 事务需调用 `ch395f_spi_begin()` / `ch395f_spi_end()` 包裹 - FreeRTOS V10.3.1 via CMSIS-RTOS V2HAL 时基用 TIM7非 SysTick
- GD5F2GQ5UE 的 `gd5f2gq5ue.c` 中声明了 `extern SPI_HandleTypeDef hspi1`,需确保 SPI1 已初始化 - NVIC 优先级分组 4 位,外设中断优先级 ≥ 5`configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY`
- `sd2506.c/h` 为纯手工代码,不受 CubeMX 保护
- FreeRTOS Kernel V10.3.1 via CMSIS-RTOS V2 接口HAL 时基使用 TIM7非 SysTick避免与 FreeRTOS 冲突)
- NVIC 优先级分组 4 位,外设中断优先级全部 ≥ `configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY`5确保 ISR 可调 FreeRTOS API
- 网络处理在 `netTask` 中运行,`net_poll()` 每 10ms 调用一次TCP echo 在 netTask 中完成
- `freeertos.c``USER CODE` 区域可添加自定义 task、mutex、semaphore、queue
## CH395F 驱动关键点
驱动初始化顺序、SPI/DMA 通信、TCP/UDP 参数配置、Socket 缓冲区分配等完整关键点见 `docs/CH395F_Trap_Records.md` → 附CH395F 驱动关键点。
## 测试说明
- **测试代码文件**`Drivers/BSP/CH395F/ch395f_test.h` / `ch395f_test.c`
- **PC 端测试脚本**`test/ch395f_socket_test.py`,支持 Python 3.7+
- **调用入口**`Src/main.c``USER CODE BEGIN 2` 区域
- **Phase 1**9 项寄存器测试):✅ 通过
- **Phase 2**TCP Client 收发 + 关闭重连 ×3 轮):✅ 通过
- **Phase 3**UDP Server Echo + PING + 大包):✅ 通过
- **Phase 4**NET 层 TCP Echo✅ 通过netTask 中永久运行)
- **Phase 5**NET 层 UDP Echo✅ 通过
- **Phase 6**DHCP 自动获取 IP✅ 通过MCU 广播宣告 + PC 监听发现)
- **Phase 7**Select/Poll I/O 多路复用):✅ 通过
- **Phase 8**(多客户端 7 并发):✅ 通过,成功率 100%
- **测试拓扑**PC (192.168.1.2) ↔ 交换机 ↔ CH395F (192.168.1.100)
- **详细使用说明**:见 `docs/CH395F_Test_Guide.md`
## GD5F2GQ5UE 驱动关键点
- SPI Mode 0CPOL=0, CPHA=0时钟 42MHz
- 初始化必须按顺序:复位 → 读 ID → 使能 ECCB0h=10h→ 解除块保护A0h=00h
- SET_FEATURE 命令前必须先发写使能06h
- 块擦除D8h参数是块首页地址块编号 × 64不是字节地址旧版错误
- 读取 ID9Fh返回 3 字节,第 0 字节无意义,第 1 字节 MID第 2 字节 DID
- **BBT 扫描必须在 ECC 禁用时完成**`gd5f_bbt_scan()`ECC 使能后 reading spare area 会被 ECC 引擎干扰
- **运行时坏块标记只来源于真实擦除/编程失败**,不要在 ECC 使能后调用 `gd5f2gq5ue_bbt_rescan()` 重建 BBT
- **BBT 厂标坏块不可清除**`gd5f_bbt_scan()` 在 ECC 禁用时扫到的 786 个坏块是真实厂标标记(保守标记,最坏条件)。验证擦除+编程通过不代表不是坏块。初始 BBT 必须保留,只追加运行时损坏块
- **Block 0 有特殊行为**"Factory good block0" / "Power on Read"。大量相邻块操作后 block 0 数据可能被擦除,避免将其用于跨大批量操作的持久化存储
- **ECC 校验码生成不可靠**`PROGRAM LOAD 02h + PROGRAM EXEC 10h` 在 ECC 开启时可能不生成有效 ECC 校验码ECCS=2。应用层应使用独立数据校验CRC/Checksum不可依赖 chip 内部 ECC 状态位
- **写验证**:以擦除/编程状态位E_FAIL/P_FAIL为准不要回读数据确认ECCS 不可靠block 0 不可靠)
- 详细陷阱记录见 `docs/GD5F2GQ5UE_Trap_Records.md`
## Flash 分区规划256MB GD5F2GQ5UE
| 分区名 | 偏移 | 大小 | 块范围 | 用途 |
|--------|------|------|--------|------|
| ftl_fatfs | 0 | 256MB | Block 0~2047 | dhara FTL + FatFS 文件系统 |
- FatFS 通过 dhara FTL 访问全部 2048 个块,`nand_ftl.c``FTL_START_BLOCK = 0`
- dhara FTL 自动管理坏块(`dhara_nand_is_bad` / `dhara_nand_mark_bad`
## TPAFE5160 驱动关键点
- AD7606 P2P 兼容替代品,并行接口协议一致
- 并行模式CS 接地始终选中PAR/SER/BYTE SEL 接 GND并行DB15/BYTE SEL 接 GND非字节模式
- 数据总线 DB[15:0] 接 GPIOG[15:0],通过 `(uint16_t)GPIOG->IDR` 一次读取16位
- CONVST 上升沿触发全部8通道同步采样BUSY 高电平表示转换中
- RD 下降沿输出通道数据按通道1~8顺序依次输出
- FRSTDATA 在第一个 RD 下降沿变高指示通道1数据就绪
- 过采样 OS[2:0] 在 BUSY 下降沿锁存,无过采样时 tCONV=1.74µs64倍过采样时 tCONV=167µs
- 读取时序168MHz 下 GPIO 写操作 + 5个 NOP (~30ns) 覆盖 t10=22ns 和 t14=21ns 要求
- 硬件 RANGE 接 GND → ±5V 量程LSB=152.59µV
## NET 网络层关键点
- **文件结构**`Drivers/BSP/NET/` 下包含 net_config.h、net_types.h、net_socket.h/c、net_select.h/c
- **使用前必须调用** `net_init(ip, mask, gateway)` 初始化网络子系统
- **`net_poll()` 在 FreeRTOS netTask 中定期调用**10ms 周期),轮询所有 Socket 状态,处理中断事件
- **TCP Server 多连接模式**1 个监听 Socket + 最多 7 个数据 Socket
- **select/poll 支持**`net_select()``net_poll_events()` 用于 I/O 多路复用
- **事件回调**:可通过 `net_set_event_cb()` 注册连接/断开/数据到达等事件回调
- **非阻塞模式**`net_recv()` 使用 `NET_MSG_DONTWAIT` 标志,或使用 select/poll
- **字节序转换**:使用 `net_htons()/net_ntohs()/net_htonl()/net_ntohl()` 进行主机序/网络序转换
- **IP 地址转换**`net_inet_addr("192.168.1.100")` 字符串转网络序,`net_inet_ntoa()` 反向转换
- **注意**:新文件需手动添加到 Keil MDK 工程中才能编译
- **RECV 中断是电平触发的**`net_poll()``do { ... } while(0)` 只处理一批中断,由主循环读取数据,避免无限循环导致主循环饿死
- **TCP Server 多连接模式**Socket 0 专职监听Socket 1~7 自动分配
- **多连接模式初始化顺序(关键!遗漏将导致 TCP 连接失败)**
1. `ch395f_set_fun_para(0x02)` — 启用多连接(在 `INIT_CH395` 之前)
2. `ch395f_init()` — 协议栈初始化
3. **先配置数据 Socket 1~7**(必须!必须在监听 Socket 之前配置CH395F 在 `TCP_LISTEN` 时刻扫描可用 Socket
- `SET_SEND_BUF``SET_RECV_BUF``SET_SOUR_PORT与监听端口相同``SET_PROTO_TCP`
- 数据 Socket 不调用 `OPEN_SOCKET`,由 CH395F 在连接到达时自动打开
4. **再配置监听 Socket 0**
- `SET_PROTO_TCP → SET_SOUR_PORT → OPEN → TCP_LISTEN`
- 如果不按此顺序Socket 4~7 不可用,最多只接受 3 个并发连接
- **TCP Server 单连接模式**Socket 先 `OPEN``SET_PROTO_TCP``SET_SOUR_PORT``OPEN``TCP_LISTEN`;收到 `SINT_STAT_CONNECT` 后 Socket 自动切换为数据通道;`DISCONNECT`/`TIMEOUT` 后需重新 `OPEN``TCP_LISTEN`
## 测试状态
| Phase | 描述 | 状态 | 备注 |
|-------|------|------|------|
| 1 | 寄存器测试 | ✅ 19/19 | |
| 2 | TCP Client | ✅ 3/3 | |
| 3 | UDP Server | ✅ 通过 | |
| 4 | NET TCP Echo | ✅ 通过 | netTask 中永久运行 |
| 5 | NET UDP Echo | ✅ 通过 | |
| 6 | DHCP | ✅ 通过 | 支持广播宣告 + DHCP Server 两种模式 |
| 7 | Select/Poll | ✅ 通过 | |
| 8 | 多客户端 7 并发 | ✅ 70/70 100% | 修复顺序后通过 |
## 陷阱记录
详细陷阱记录(含根因分析、解决方案、发现时间)见 `docs/CH395F_Trap_Records.md``docs/GD5F2GQ5UE_Trap_Records.md`
当前已记录陷阱CH395F
- **Trap 01** Socket 4~7 自动分配不到(初始化顺序)
- **Trap 02** 数据 Socket 缓冲区重叠
- **Trap 03** DHCP 包 xid 偏移错误
- **Trap 04** UDP 发送未等待 SENDBUF_FREE
- **Trap 05** CH395F 与 RTL8305NBI 自动协商不兼容
- **Trap 06** TCP KeepAlive 参数非 500ms 倍数
- **Trap 07** TCP 关闭误用 disconnect 导致 FIN_WAIT_2
- **Trap 08** RECV 中断电平触发无限循环
- **Trap 09** PHY link up 后立即 open_socket 失败(需启动延时 + 重试兜底)
- **Trap 10** 消息队列值拷贝导致结果回传丢失(改用 xTaskNotify 通知值)
- **Trap 11** `net_accept_locked` 拒绝 standalone_accept 的 ESTABLISHED 状态
- **Trap 12** FatFS FF_USE_LFN=0 且不接受 `/` 前缀路径(用 `to_fatfs_path()` 剥离)
当前已记录陷阱GD5F2GQ5UE
- **Trap 01** 块擦除地址错误(`byte_addr → page_addr`),导致先前所有实验结论无效。详见 `docs/GD5F2GQ5UE_Trap_Records.md`

View File

@@ -9,6 +9,7 @@
* v1.0 2026-07-19 王建锋 创建初始版本 * v1.0 2026-07-19 王建锋 创建初始版本
* v1.1 2026-07-19 王建锋 migrate from freertos.c StartNetTask * v1.1 2026-07-19 王建锋 migrate from freertos.c StartNetTask
* v1.2 2026-07-21 王建锋 网络初始化移入本任务net_init + TCP 监听) * v1.2 2026-07-21 王建锋 网络初始化移入本任务net_init + TCP 监听)
* v1.3 2026-07-22 王建锋 单连接模式重构,增加大文件/边界/KeepAlive 测试
*/ */
#include <string.h> #include <string.h>
@@ -22,7 +23,8 @@
#define DBG_TAG "[NET_TASK]" #define DBG_TAG "[NET_TASK]"
#include "dbg_log.h" #include "dbg_log.h"
static uint8_t s_net_buf[1500]; /* 测试缓冲大小定义(供各 Phase 测试使用) */
#define NET_TASK_BUF_SIZE 65536
/* /*
* 函数功能:网络任务初始化 * 函数功能:网络任务初始化
@@ -74,25 +76,24 @@ void net_task_func(void const *arg)
DBG_ERROR("net init: FAIL"); DBG_ERROR("net init: FAIL");
} }
DBG_INFO("netTask: started, processing messages (FTP mode)"); DBG_INFO("netTask: started (single-socket mode)");
/* ==================== 主轮询循环 ==================== */ /* ==================== 主轮询循环 ==================== */
for (;;) { for (;;) {
net_poll(); net_poll();
net_process_messages(); net_process_messages();
/*
* 以下测试共用 Socket 0单连接模式
* Phase 4 — TCP Echo 基础收发
* Phase 5 — 大文件传输
* Phase 7 — Select/Poll
* Phase 8 — 边界条件
* Phase 10 — KeepAlive
* 各 Phase 通过 ch395f_test.h 中的宏独立开关
*/
#ifdef ENABLE_PHASE4_TESTS #ifdef ENABLE_PHASE4_TESTS
for (int i = 1; i < 8; i++) { ch395f_phase4_tests();
net_sock_t *p_sk = net_get_sock(i);
if (p_sk == NULL || p_sk->state != NET_SOCK_STATE_ESTABLISHED) {
continue;
}
int n = net_recv_sock(p_sk, s_net_buf, sizeof(s_net_buf), NET_MSG_DONTWAIT);
if (n > 0) {
net_send_sock(p_sk, s_net_buf, n);
}
}
#endif #endif
#ifdef ENABLE_PHASE5_TESTS #ifdef ENABLE_PHASE5_TESTS
@@ -103,6 +104,14 @@ void net_task_func(void const *arg)
ch395f_phase7_tests(); ch395f_phase7_tests();
#endif #endif
#ifdef ENABLE_PHASE8_TESTS
ch395f_phase8_tests();
#endif
#ifdef ENABLE_PHASE10_TESTS
ch395f_phase10_tests();
#endif
osDelay(10); osDelay(10);
} }
} }

View File

@@ -25,7 +25,8 @@
#define CH395F_RESET_DELAY_MS 20U /* 复位后等待延时ms<6D>?*/ #define CH395F_RESET_DELAY_MS 20U /* 复位后等待延时ms<6D>?*/
#define CH395F_INIT_TIMEOUT_MS 500U /* 初始化超时时间ms<6D>?*/ #define CH395F_INIT_TIMEOUT_MS 500U /* 初始化超时时间ms<6D>?*/
#define CH395F_SPI_BEGIN_DELAY_MS 1U /* SPI 事务开始延时ms<6D>?*/ #define CH395F_SPI_BEGIN_DELAY_MS 1U /* SPI 事务开始延时ms<6D>?*/
#define CH395F_DMA_BUF_SIZE 4100U /* DMA 缓冲区header 4 + max 4096 data */ /* DMA 缓冲大小使用 ch395f.h 中公开的 CH395F_SPI_DMA_BUF_SIZE */
#define CH395F_DMA_BUF_SIZE CH395F_SPI_DMA_BUF_SIZE
/* /*
* 私有变量<E58F98>?- DMA 传输相关 * 私有变量<E58F98>?- DMA 传输相关

View File

@@ -110,6 +110,14 @@ extern "C" {
/* 3 字节输入 + 数据输入socket + 长度 + 数据) */ /* 3 字节输入 + 数据输入socket + 长度 + 数据) */
#define CH395F_CMD_WRITE_SEND_BUF_SN 0x39U #define CH395F_CMD_WRITE_SEND_BUF_SN 0x39U
/*
* SPI DMA 事务限制
* CH395F_SPI_DMA_MAX_PAYLOAD: 单次 DMA 事务最大有效载荷(总缓冲 - 4 字节命令头)
* 注意: CH395F 内部 socket 接收缓冲默认 4096BDMA 缓冲需至少 4100 以一次性读空
*/
#define CH395F_SPI_DMA_BUF_SIZE 4100U
#define CH395F_SPI_DMA_MAX_PAYLOAD (CH395F_SPI_DMA_BUF_SIZE - 4U)
/* 其他命令 */ /* 其他命令 */
#define CH395F_CMD_SET_TCP_MSS 0x50U #define CH395F_CMD_SET_TCP_MSS 0x50U
#define CH395F_CMD_SET_RECV_BUF 0x52U #define CH395F_CMD_SET_RECV_BUF 0x52U

View File

@@ -1,24 +1,29 @@
/* /*
* 模块名称CH395F Driver Test Suite * 模块名称CH395F Driver Test Suite
* 模块功能CH395F 驱动各功能模块的测试入口,分阶段组织测试用例 * 模块功能CH395F 驱动各功能模块的测试入口,分阶段组织测试用例
* 覆盖 SPI 命令路径、Socket 状态机、大文件传输、边界条件等
* 适用平台STM32F4 系列CH395F 以太网芯片) * 适用平台STM32F4 系列CH395F 以太网芯片)
* 作者:王建<EFBFBD>? * 创建日期<E697A5>?026-07-19 * 作者:王建
* 修改记录<EFBFBD>? * 2026-07-19 Phase 1/2/3 implemented * 创建日期2026-07-19
* 修改记录:
* 2026-07-19 Phase 1/2/3 implemented
* 2026-07-22 全面重构为单连接模式,增加 Phase 5/8/10
*/ */
/* 头文件包含区 */
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include "ch395f_test.h" #include "ch395f_test.h"
#include "ch395f.h" #include "ch395f.h"
#include "net_socket.h" #include "net_socket.h"
#include "net_select.h"
#define DBG_TAG "[CH395T]" #define DBG_TAG "[CH395T]"
#include "dbg_log.h" #include "dbg_log.h"
test_stats_t g_test_stats; test_stats_t g_test_stats;
/* /*
* Phase 2 配置默认<EFBFBD>? */ * Phase 2 配置默认
*/
#ifndef PHASE2_REMOTE_IP #ifndef PHASE2_REMOTE_IP
#define PHASE2_REMOTE_IP "192.168.1.2" #define PHASE2_REMOTE_IP "192.168.1.2"
#endif #endif
@@ -36,7 +41,8 @@ test_stats_t g_test_stats;
#endif #endif
/* /*
* Phase 3 配置默认<EFBFBD>? */ * Phase 3 配置默认
*/
#ifndef PHASE3_REMOTE_IP #ifndef PHASE3_REMOTE_IP
#define PHASE3_REMOTE_IP "192.168.1.2" #define PHASE3_REMOTE_IP "192.168.1.2"
#endif #endif
@@ -54,24 +60,36 @@ test_stats_t g_test_stats;
#endif #endif
/* /*
* 函数功能<EFBFBD>?TCP Server 多连接模式的数据 Socket 配置 * Phase 5 配置默认值(大文件传输)
* 入口参数port - TCP 源端口号 */
* <20>?<3F>?值<E580BC>? * 限定条件CH395F 协议栈已初始<E5889D>? * 函数说明重新设置数<E7BDAE>?Socket 的协议类型和源端<E6BA90>? */ #ifndef PHASE5_LOCAL_PORT
static void restore_data_sockets(uint16_t port) { #define PHASE5_LOCAL_PORT 60000
int i = 0; #endif
for (i = NET_TCP_SERVER_DATA_SOCK_START; i < NET_MAX_SOCKETS; i++) { #ifndef PHASE5_FILE_SIZE
ch395f_set_proto_type((uint8_t)i, CH395F_PROTO_TYPE_TCP); #define PHASE5_FILE_SIZE 20480 /* 20KB */
ch395f_set_sour_port((uint8_t)i, port); #endif
} #ifndef PHASE5_CHUNK_SIZE
DBG_INFO("data socks restored (port %d)", port); #define PHASE5_CHUNK_SIZE 4096 /* 单次 NET 层收发块大小 */
} #endif
#ifndef PHASE5_BUF_SIZE
#define PHASE5_BUF_SIZE 65536 /* 接收缓冲最大 64KB */
#endif
/* /*
* ============================ Phase 1 ============================ * Phase 8 配置默认值(边界条件)
* 函数功能:寄存器读写 + 中断一致性基础测试 */
* 入口参数:无 #ifndef PHASE8_LOCAL_PORT
* <20>?<3F>?值<E580BC>? * 限定条件CH395F 芯片正常应答 #define PHASE8_LOCAL_PORT 8080
* 函数说明<EFBC9A>?GET_VERSION / GET_CMD_STATUS / GET_IP_INF <20>?9 <20>? */ #endif
/*
* Phase 10 配置默认值KeepAlive
*/
#ifndef PHASE10_KEEPALIVE_IDLE_MS
#define PHASE10_KEEPALIVE_IDLE_MS 60000 /* 空闲 60 秒触发探测 */
#endif
/* ============================ Phase 1 ============================ */
void ch395f_phase1_tests(void) { void ch395f_phase1_tests(void) {
uint8_t i = 0; uint8_t i = 0;
@@ -79,18 +97,15 @@ void ch395f_phase1_tests(void) {
DBG_INFO("=== CH395F Phase 1 Tests ==="); DBG_INFO("=== CH395F Phase 1 Tests ===");
/* Test 1: GET_VERSION */
ver = ch395f_get_version(); ver = ch395f_get_version();
TEST_CHECK(ver > 0, "GET_VERSION: 0x%02X (ver=%d)", ver, ver & 0x3F); TEST_CHECK(ver > 0, "GET_VERSION: 0x%02X (ver=%d)", ver, ver & 0x3F);
/* Test 2: GET_CMD_STATUS */
uint8_t cmd_st = ch395f_get_cmd_status(); uint8_t cmd_st = ch395f_get_cmd_status();
TEST_CHECK(cmd_st == CH395F_ERR_SUCCESS, TEST_CHECK(cmd_st == CH395F_ERR_SUCCESS,
"GET_CMD_STATUS: 0x%02X (%s)", cmd_st, "GET_CMD_STATUS: 0x%02X (%s)", cmd_st,
cmd_st == CH395F_ERR_SUCCESS ? "SUCCESS" : cmd_st == CH395F_ERR_SUCCESS ? "SUCCESS" :
cmd_st == CH395F_ERR_BUSY ? "BUSY" : "OTHER"); cmd_st == CH395F_ERR_BUSY ? "BUSY" : "OTHER");
/* Test 3: GET_IP_INF */
uint8_t ip_info[20]; uint8_t ip_info[20];
ch395f_get_ip_inf(ip_info); ch395f_get_ip_inf(ip_info);
DBG_INFO("GET_IP_INF:"); DBG_INFO("GET_IP_INF:");
@@ -106,34 +121,27 @@ void ch395f_phase1_tests(void) {
TEST_CHECK(ip_info[8]==255 && ip_info[9]==255 && ip_info[10]==255 && ip_info[11]==0, TEST_CHECK(ip_info[8]==255 && ip_info[9]==255 && ip_info[10]==255 && ip_info[11]==0,
"MASK match"); "MASK match");
/* Test 4: GINT_STATUS_ALL (2-byte version) */
uint16_t gint_all = ch395f_get_glob_int_status_all(); uint16_t gint_all = ch395f_get_glob_int_status_all();
TEST_CHECK((gint_all & 0xFF) == 0x04 || (gint_all & 0xFF) == 0x00, TEST_CHECK((gint_all & 0xFF) == 0x04 || (gint_all & 0xFF) == 0x00,
"GINT_STATUS_ALL: 0x%04X (lo=0x%02X hi=0x%02X)", "GINT_STATUS_ALL: 0x%04X", gint_all);
gint_all, gint_all & 0xFF, (gint_all >> 8) & 0xFF);
/* Test 5: GINT_STATUS (1-byte version) <20>?read-clear check */
uint8_t gint_1b = ch395f_get_glob_int_status(); uint8_t gint_1b = ch395f_get_glob_int_status();
TEST_CHECK(gint_1b == 0x00, TEST_CHECK(gint_1b == 0x00,
"GINT_STATUS_1byte: 0x%02X (expect 0x00 after read-clear)", gint_1b); "GINT_STATUS_1byte: 0x%02X (expect 0x00)", gint_1b);
/* Test 6: SOCK_STATUS(0) */
{ {
uint8_t st[2]; uint8_t st[2];
ch395f_get_socket_status(0, st); ch395f_get_socket_status(0, st);
TEST_CHECK(st[0] == 0x05 && st[1] == 0x01, TEST_CHECK(st[0] == 0x05 && st[1] == 0x01,
"SOCK_STATUS(0): sock=0x%02X(LISTEN), tcp=0x%02X(LISTEN)", st[0], st[1]); "SOCK_STATUS(0): sock=0x%02X, tcp=0x%02X", st[0], st[1]);
} }
/* Test 7: SET_ARP */
ch395f_set_arp(10, 5); ch395f_set_arp(10, 5);
TEST_CHECK(1, "SET_ARP(period=10*100ms, cnt=5): OK"); TEST_CHECK(1, "SET_ARP(period=10*100ms, cnt=5): OK");
/* Test 8: SET_TTL */
ch395f_set_ttl(0, 64); ch395f_set_ttl(0, 64);
TEST_CHECK(1, "SET_TTL(sock=0, ttl=64): OK"); TEST_CHECK(1, "SET_TTL(sock=0, ttl=64): OK");
/* Test 9: CLEAR_RECV_BUF + SOCK_INT poll */
ch395f_clear_recv_buf(0); ch395f_clear_recv_buf(0);
TEST_CHECK(1, "CLEAR_RECV_BUF(sock=0): OK"); TEST_CHECK(1, "CLEAR_RECV_BUF(sock=0): OK");
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
@@ -144,10 +152,7 @@ void ch395f_phase1_tests(void) {
TEST_REPORT("Phase 1"); TEST_REPORT("Phase 1");
} }
/* /* ============================ Phase 2 ============================ */
* ============================ Phase 2 ============================
* 函数功能TCP Client 收发 + 关闭重连 ×3 <20>? * 入口参数:无
* <20>?<3F>?值<E580BC>? * 限定条件PC 端已启动 TCP Server<EFBC88>?192.168.1.2:8081<38>? * 函数说明:每轮连接→发送→接收→关闭,连续 3 <20>? */
void ch395f_phase2_tests(void) { void ch395f_phase2_tests(void) {
uint8_t sock = 0; uint8_t sock = 0;
@@ -160,7 +165,6 @@ void ch395f_phase2_tests(void) {
DBG_INFO("=== CH395F Phase 2 Tests (TCP Client - Direct Driver) ==="); DBG_INFO("=== CH395F Phase 2 Tests (TCP Client - Direct Driver) ===");
/* 解析目标 IP */
uint8_t ip_arr[4]; uint8_t ip_arr[4];
{ {
uint32_t a[4]; uint32_t a[4];
@@ -172,12 +176,9 @@ void ch395f_phase2_tests(void) {
} }
DBG_INFO("Target: %s:%d", PHASE2_REMOTE_IP, PHASE2_REMOTE_PORT); DBG_INFO("Target: %s:%d", PHASE2_REMOTE_IP, PHASE2_REMOTE_PORT);
sock = (uint8_t)(NET_MAX_SOCKETS - 1); sock = 0;
/* 一次性配<E680A7>?*/
ch395f_set_proto_type(sock, CH395F_PROTO_TYPE_TCP); ch395f_set_proto_type(sock, CH395F_PROTO_TYPE_TCP);
ch395f_set_send_buf(sock, 28, 2);
ch395f_set_recv_buf(sock, 30, 2);
ch395f_set_des_ip(sock, ip_arr); ch395f_set_des_ip(sock, ip_arr);
ch395f_set_des_port(sock, PHASE2_REMOTE_PORT); ch395f_set_des_port(sock, PHASE2_REMOTE_PORT);
@@ -190,7 +191,6 @@ void ch395f_phase2_tests(void) {
if (ch395f_open_socket(sock) != CH395F_ERR_SUCCESS) { TEST_CHECK(0, "open socket"); iter_pass = 0; goto phase2_iter_done; } if (ch395f_open_socket(sock) != CH395F_ERR_SUCCESS) { TEST_CHECK(0, "open socket"); iter_pass = 0; goto phase2_iter_done; }
if (ch395f_tcp_connect(sock) != CH395F_ERR_SUCCESS) { TEST_CHECK(0, "tcp connect"); iter_pass = 0; ch395f_close_socket(sock); goto phase2_iter_done; } if (ch395f_tcp_connect(sock) != CH395F_ERR_SUCCESS) { TEST_CHECK(0, "tcp connect"); iter_pass = 0; ch395f_close_socket(sock); goto phase2_iter_done; }
/* 等待 CONNECT */
tick = HAL_GetTick(); tick = HAL_GetTick();
while (HAL_GetTick() - tick < PHASE2_TIMEOUT_MS) { while (HAL_GetTick() - tick < PHASE2_TIMEOUT_MS) {
int_st = ch395f_get_glob_int_status_all(); int_st = ch395f_get_glob_int_status_all();
@@ -204,7 +204,6 @@ void ch395f_phase2_tests(void) {
HAL_Delay(100); HAL_Delay(100);
/* 发送测试数<E8AF95>?*/
{ {
uint8_t test_buf[64] = {0}; uint8_t test_buf[64] = {0};
const char *msg = "HelloFromCH395F_TCP_Client! This is a 64-byte test message."; const char *msg = "HelloFromCH395F_TCP_Client! This is a 64-byte test message.";
@@ -214,7 +213,6 @@ void ch395f_phase2_tests(void) {
ch395f_write_send_buf(sock, test_buf, 64); ch395f_write_send_buf(sock, test_buf, 64);
} }
/* Echo 循环:收数据 <20>?回发 */
{ {
int got_echo = 0; int got_echo = 0;
tick = HAL_GetTick(); tick = HAL_GetTick();
@@ -243,7 +241,6 @@ void ch395f_phase2_tests(void) {
phase2_iter_done: phase2_iter_done:
if (iter_pass) TEST_CHECK(1, "Iteration %d PASS", i + 1); if (iter_pass) TEST_CHECK(1, "Iteration %d PASS", i + 1);
/* 关闭 socket */
ch395f_close_socket(sock); ch395f_close_socket(sock);
{ {
uint8_t st[2]; uint8_t st[2];
@@ -258,15 +255,10 @@ phase2_iter_done:
HAL_Delay(200); HAL_Delay(200);
} }
restore_data_sockets(8080);
TEST_REPORT("Phase 2"); TEST_REPORT("Phase 2");
} }
/* /* ============================ Phase 3 ============================ */
* ============================ Phase 3 ============================
* 函数功能UDP Server Echo + PING + 大包测试
* 入口参数:无
* <20>?<3F>?值<E580BC>? * 限定条件PC 端已启动 UDP Client<EFBC88>?192.168.1.2:8082<38>? * 函数说明<EFBC9A>?20 次回显<E59B9E>? <20>?PING<4E>?0 次大包收<E58C85>? */
void ch395f_phase3_tests(void) { void ch395f_phase3_tests(void) {
uint8_t sock = 0; uint8_t sock = 0;
@@ -277,12 +269,9 @@ void ch395f_phase3_tests(void) {
DBG_INFO("=== CH395F Phase 3 Tests (UDP) ==="); DBG_INFO("=== CH395F Phase 3 Tests (UDP) ===");
sock = (uint8_t)(NET_MAX_SOCKETS - 1); sock = 0;
/* UDP Server 模式DesIP=0xFFFFFFFF <20>?接受任意来源 */
ch395f_set_proto_type(sock, CH395F_PROTO_TYPE_UDP); ch395f_set_proto_type(sock, CH395F_PROTO_TYPE_UDP);
ch395f_set_send_buf(sock, 28, 2);
ch395f_set_recv_buf(sock, 30, 2);
ch395f_set_sour_port(sock, PHASE3_LOCAL_PORT); ch395f_set_sour_port(sock, PHASE3_LOCAL_PORT);
{ {
uint8_t zero_ip[4] = {0xFF, 0xFF, 0xFF, 0xFF}; uint8_t zero_ip[4] = {0xFF, 0xFF, 0xFF, 0xFF};
@@ -295,7 +284,6 @@ void ch395f_phase3_tests(void) {
HAL_Delay(200); HAL_Delay(200);
/* Echo 循环<EFBC9A>?<3F>?解析来源 <20>?回显 */
for (i = 0; i < PHASE3_ECHO_COUNT; i++) { for (i = 0; i < PHASE3_ECHO_COUNT; i++) {
tick = HAL_GetTick(); tick = HAL_GetTick();
echo_ok = 0; echo_ok = 0;
@@ -342,110 +330,143 @@ void ch395f_phase3_tests(void) {
ch395f_close_socket(sock); ch395f_close_socket(sock);
TEST_CHECK(1, "UDP socket closed"); TEST_CHECK(1, "UDP socket closed");
restore_data_sockets(8080);
TEST_REPORT("Phase 3"); TEST_REPORT("Phase 3");
} }
/* ============================ Phase 4 ============================ */
/* /*
* ============================ Phase 4 ============================ * NET 层 TCP Echo单连接模式
* NET <20>?TCP Echo在主循环中调用用 net_recv + net_send 回显 * 在 netTask 中运行,仅操作 Socket 0
* 覆盖64B、1460B(MSS)、4096B(缓冲满) 回显
*/ */
#ifdef ENABLE_PHASE4_TESTS #ifdef ENABLE_PHASE4_TESTS
static char s_phase4_buf[2048]; static char s_phase4_buf[8192];
static uint32_t s_phase4_echo_count = 0;
#endif #endif
/*
* 函数功能NET <20>?TCP Echo 测试
* 入口参数:无
* <20>?<3F>?值<E580BC>? * 限定条件net_init 已完<E5B7B2>? * 函数说明:在 netTask 中运行,轮询 Socket 1~7 回显接收数据
*/
void ch395f_phase4_tests(void) { void ch395f_phase4_tests(void) {
#ifdef ENABLE_PHASE4_TESTS #ifdef ENABLE_PHASE4_TESTS
for (int i = NET_TCP_SERVER_DATA_SOCK_START; i < NET_MAX_SOCKETS; i++) { net_sock_t *sk = net_get_sock(0);
net_sock_t *sk = net_get_sock(i); if (sk == NULL || !sk->in_use) {
if (sk == NULL || !sk->in_use || sk->state != NET_SOCK_STATE_ESTABLISHED) { return;
continue; }
}
if (sk->state == NET_SOCK_STATE_ESTABLISHED) {
int n = net_recv_sock(sk, s_phase4_buf, sizeof(s_phase4_buf), NET_MSG_DONTWAIT); int n = net_recv_sock(sk, s_phase4_buf, sizeof(s_phase4_buf), NET_MSG_DONTWAIT);
if (n > 0) { if (n > 0) {
net_send_sock(sk, s_phase4_buf, n); int sent = net_send_sock(sk, s_phase4_buf, n);
if (sent == n) {
s_phase4_echo_count++;
if (s_phase4_echo_count <= 10 || (s_phase4_echo_count % 100 == 0)) {
DBG_INFO("Phase4: echo #%lu (%d bytes)", s_phase4_echo_count, n);
}
}
} }
} }
#endif #endif
} }
/* ============================ Phase 5 ============================ */
/* /*
* ============================ Phase 5 ============================ * NET 层大文件传输测试
* NET <20>?UDP EchonetTask 中运行<E8A18C>?net_recvfrom + net_sendto 回显 * 验证超过 CH395F 内部缓冲区大小4KB的连续数据收发
* 覆盖20KB、64KB 分块传输
*/ */
#ifndef PHASE5_LOCAL_PORT
#define PHASE5_LOCAL_PORT 60000
#endif
#ifdef ENABLE_PHASE5_TESTS #ifdef ENABLE_PHASE5_TESTS
static int s_phase5_sock = -1; static int s_phase5_active = 0;
static char s_phase5_buf[2048]; static uint32_t s_phase5_total_sent = 0;
static uint32_t s_phase5_count = 0; static uint32_t s_phase5_total_recv = 0;
static uint8_t s_phase5_tx_buf[PHASE5_FILE_SIZE];
static uint8_t s_phase5_rx_buf[PHASE5_BUF_SIZE];
static void phase5_fill_pattern(uint8_t *buf, uint32_t size, uint32_t offset) {
for (uint32_t i = 0; i < size; i++) {
buf[i] = (uint8_t)((offset + i) & 0xFF);
}
}
static int phase5_verify_pattern(uint8_t *buf, uint32_t size, uint32_t offset) {
for (uint32_t i = 0; i < size; i++) {
if (buf[i] != (uint8_t)((offset + i) & 0xFF)) {
DBG_ERROR("Phase5: verify fail at offset %lu (expected 0x%02X, got 0x%02X)",
offset + i, (uint8_t)((offset + i) & 0xFF), buf[i]);
return 0;
}
}
return 1;
}
#endif #endif
/*
* 函数功能NET <20>?UDP Echo 初始<E5889D>? * 入口参数:无
* <20>?<3F>?值<E580BC>? * 限定条件net_init 已完<E5B7B2>? * 函数说明<EFBC9A>?UDP Socket 并绑定本地端<E59CB0>? */
void ch395f_phase5_init(void) { void ch395f_phase5_init(void) {
#ifdef ENABLE_PHASE5_TESTS #ifdef ENABLE_PHASE5_TESTS
struct net_sockaddr_in addr; s_phase5_active = 0;
s_phase5_total_sent = 0;
s_phase5_sock = net_socket(NET_AF_INET, NET_SOCK_DGRAM, 0); s_phase5_total_recv = 0;
if (s_phase5_sock < 0) { DBG_INFO("Phase5: file transfer test, size=%d bytes, chunk=%d bytes",
DBG_ERROR("Phase5: net_socket failed"); PHASE5_FILE_SIZE, PHASE5_CHUNK_SIZE);
return;
}
memset(&addr, 0, sizeof(addr));
addr.sin_family = NET_AF_INET;
addr.sin_port = net_htons(PHASE5_LOCAL_PORT);
if (net_bind(s_phase5_sock, (struct net_sockaddr *)&addr, sizeof(addr)) < 0) {
DBG_ERROR("Phase5: net_bind failed");
net_close_sock(net_get_sock(s_phase5_sock));
s_phase5_sock = -1;
return;
}
s_phase5_count = 0;
DBG_INFO("Phase5: UDP socket %d bound to port %d", s_phase5_sock, PHASE5_LOCAL_PORT);
#endif #endif
} }
/*
* 函数功能NET <20>?UDP Echo 测试
* 入口参数:无
* <20>?<3F>?值<E580BC>? * 限定条件ch395f_phase5_init 已成功调<E58A9F>? * 函数说明:在 netTask 中运行,回显 UDP 接收数据
*/
void ch395f_phase5_tests(void) { void ch395f_phase5_tests(void) {
#ifdef ENABLE_PHASE5_TESTS #ifdef ENABLE_PHASE5_TESTS
if (s_phase5_sock < 0) return; net_sock_t *sk = net_get_sock(0);
if (sk == NULL || !sk->in_use) {
return;
}
struct net_sockaddr_in src; if (!s_phase5_active) {
int addrlen = sizeof(src); if (sk->state == NET_SOCK_STATE_ESTABLISHED) {
s_phase5_active = 1;
s_phase5_total_sent = 0;
s_phase5_total_recv = 0;
int n = net_recvfrom(s_phase5_sock, s_phase5_buf, sizeof(s_phase5_buf), phase5_fill_pattern(s_phase5_tx_buf, PHASE5_FILE_SIZE, 0);
NET_MSG_DONTWAIT, DBG_INFO("Phase5: starting %d-byte file transfer (sock=0)", PHASE5_FILE_SIZE);
(struct net_sockaddr *)&src, &addrlen); }
if (n > 0) { return;
net_sendto(s_phase5_sock, s_phase5_buf, n, 0, }
(struct net_sockaddr *)&src, sizeof(src));
s_phase5_count++; /* 发送阶段:分块发送,每块 PHASE5_CHUNK_SIZE */
TEST_CHECK(1, "Phase5: UDP echo #%lu (%d bytes)", s_phase5_count, n); if (s_phase5_total_sent < PHASE5_FILE_SIZE) {
uint32_t remaining = PHASE5_FILE_SIZE - s_phase5_total_sent;
uint32_t chunk = (remaining > PHASE5_CHUNK_SIZE) ? PHASE5_CHUNK_SIZE : remaining;
int sent = net_send_sock(sk, s_phase5_tx_buf + s_phase5_total_sent, (int)chunk);
if (sent > 0) {
s_phase5_total_sent += (uint32_t)sent;
DBG_INFO("Phase5: sent %d/%d bytes", s_phase5_total_sent, PHASE5_FILE_SIZE);
}
return;
}
/* 接收阶段:分块接收并验证 */
if (s_phase5_total_recv < PHASE5_FILE_SIZE) {
uint32_t remaining = PHASE5_FILE_SIZE - s_phase5_total_recv;
int max_read = (int)(remaining < NET_TASK_BUF_SIZE ? remaining : NET_TASK_BUF_SIZE);
int n = net_recv_sock(sk, s_phase5_rx_buf, max_read, NET_MSG_DONTWAIT);
if (n > 0) {
int ok = phase5_verify_pattern(s_phase5_rx_buf, (uint32_t)n, s_phase5_total_recv);
TEST_CHECK(ok, "Phase5: recv verify at offset %lu (%d/%d bytes)",
s_phase5_total_recv, s_phase5_total_recv + (uint32_t)n, PHASE5_FILE_SIZE);
s_phase5_total_recv += (uint32_t)n;
}
return;
}
/* 完成 */
if (s_phase5_total_recv >= PHASE5_FILE_SIZE) {
TEST_CHECK(1, "Phase5: %d-byte file transfer complete (sent=%lu, recv=%lu)",
PHASE5_FILE_SIZE, s_phase5_total_sent, s_phase5_total_recv);
s_phase5_active = 0;
} }
#endif #endif
} }
/* /* ============================ Phase 6 ============================ */
* Phase 6 配置默认<E9BB98>? */
#ifndef PHASE6_ANNOUNCE_PORT #ifndef PHASE6_ANNOUNCE_PORT
#define PHASE6_ANNOUNCE_PORT 60001 #define PHASE6_ANNOUNCE_PORT 60001
#endif #endif
@@ -453,14 +474,6 @@ void ch395f_phase5_tests(void) {
#define PHASE6_ANNOUNCE_SOCK 6 #define PHASE6_ANNOUNCE_SOCK 6
#endif #endif
/*
* ============================ Phase 6 ============================
* 函数功能DHCP 自动获取 IP 测试
* 入口参数:无
* <20>?<3F>?值<E580BC>? * 限定条件局域网内存<E58685>?DHCP Server
* 函数说明<EFBC9A>?DHCP <20>?轮询等待 IP <20>?打印结果 <20>?广播宣告 <20>?HELLO 回显
*/
void ch395f_phase6_tests(void) { void ch395f_phase6_tests(void) {
#ifdef ENABLE_PHASE6_TESTS #ifdef ENABLE_PHASE6_TESTS
uint8_t status = 0; uint8_t status = 0;
@@ -469,11 +482,9 @@ void ch395f_phase6_tests(void) {
DBG_INFO("=== CH395F Phase 6 Tests (DHCP) ==="); DBG_INFO("=== CH395F Phase 6 Tests (DHCP) ===");
/* 1. 启用 DHCP */
ch395f_set_dhcp(1); ch395f_set_dhcp(1);
TEST_CHECK(1, "DHCP enabled, waiting for IP..."); TEST_CHECK(1, "DHCP enabled, waiting for IP...");
/* 2. 轮询等待 DHCP 完成 */
HAL_Delay(500); HAL_Delay(500);
tick = HAL_GetTick(); tick = HAL_GetTick();
while (HAL_GetTick() - tick < 30000) { while (HAL_GetTick() - tick < 30000) {
@@ -498,24 +509,20 @@ void ch395f_phase6_tests(void) {
goto phase6_end; goto phase6_end;
} }
/* 3. 读取获取<E88EB7>?IP */
ch395f_get_ip_inf(ip_info); ch395f_get_ip_inf(ip_info);
DBG_INFO(" IP: %d.%d.%d.%d", ip_info[0], ip_info[1], ip_info[2], ip_info[3]); DBG_INFO(" IP: %d.%d.%d.%d", ip_info[0], ip_info[1], ip_info[2], ip_info[3]);
DBG_INFO(" GW: %d.%d.%d.%d", ip_info[4], ip_info[5], ip_info[6], ip_info[7]); DBG_INFO(" GW: %d.%d.%d.%d", ip_info[4], ip_info[5], ip_info[6], ip_info[7]);
DBG_INFO(" MASK: %d.%d.%d.%d", ip_info[8], ip_info[9], ip_info[10], ip_info[11]); DBG_INFO(" MASK: %d.%d.%d.%d", ip_info[8], ip_info[9], ip_info[10], ip_info[11]);
DBG_INFO(" DNS1: %d.%d.%d.%d", ip_info[12], ip_info[13], ip_info[14], ip_info[15]);
TEST_CHECK(ip_info[0] != 0 || ip_info[1] != 0 || ip_info[2] != 0 || ip_info[3] != 0, TEST_CHECK(ip_info[0] != 0 || ip_info[1] != 0 || ip_info[2] != 0 || ip_info[3] != 0,
"IP = %d.%d.%d.%d (non-zero)", ip_info[0], ip_info[1], ip_info[2], ip_info[3]); "IP = %d.%d.%d.%d (non-zero)", ip_info[0], ip_info[1], ip_info[2], ip_info[3]);
/* 4. 广播宣告 + 等待 PC HELLO 确认 */
{ {
#define PHASE6_HELLO_PORT 60000 #define PHASE6_HELLO_PORT 60000
uint8_t anno_sock = PHASE6_ANNOUNCE_SOCK; uint8_t anno_sock = PHASE6_ANNOUNCE_SOCK;
uint8_t bcast_ip[4] = {0xFF, 0xFF, 0xFF, 0xFF}; uint8_t bcast_ip[4] = {0xFF, 0xFF, 0xFF, 0xFF};
uint8_t rx_buf[64] = {0}; uint8_t rx_buf[64] = {0};
/* UDP Server 模式本地端<E59CB0>?60000<EFBC88>?HELLODesIP=0xFFFFFFFF */
ch395f_set_proto_type(anno_sock, CH395F_PROTO_TYPE_UDP); ch395f_set_proto_type(anno_sock, CH395F_PROTO_TYPE_UDP);
ch395f_set_send_buf(anno_sock, 24, 2); ch395f_set_send_buf(anno_sock, 24, 2);
ch395f_set_recv_buf(anno_sock, 26, 2); ch395f_set_recv_buf(anno_sock, 26, 2);
@@ -524,12 +531,10 @@ void ch395f_phase6_tests(void) {
ch395f_set_des_port(anno_sock, 0); ch395f_set_des_port(anno_sock, 0);
if (ch395f_open_socket(anno_sock) == CH395F_ERR_SUCCESS) { if (ch395f_open_socket(anno_sock) == CH395F_ERR_SUCCESS) {
/* 发送广播宣告(宣告端口 = 60001来源端<E6BA90>?= 60000<30>?*/
ch395f_set_des_ip(anno_sock, bcast_ip); ch395f_set_des_ip(anno_sock, bcast_ip);
ch395f_set_des_port(anno_sock, PHASE6_ANNOUNCE_PORT); ch395f_set_des_port(anno_sock, PHASE6_ANNOUNCE_PORT);
ch395f_write_send_buf(anno_sock, ip_info, 4); ch395f_write_send_buf(anno_sock, ip_info, 4);
/* 等待 SENDBUF_FREE手册要求每次 write_send_buf 后必须等待) */
{ {
uint32_t swait = HAL_GetTick(); uint32_t swait = HAL_GetTick();
while (HAL_GetTick() - swait < 2000) { while (HAL_GetTick() - swait < 2000) {
@@ -546,14 +551,12 @@ void ch395f_phase6_tests(void) {
PHASE6_HELLO_PORT, PHASE6_ANNOUNCE_PORT); PHASE6_HELLO_PORT, PHASE6_ANNOUNCE_PORT);
TEST_CHECK(1, "DHCP announcement sent"); TEST_CHECK(1, "DHCP announcement sent");
/* 重置 Server 模式<EFBC8C>?PC 发<>?HELLO */
ch395f_set_des_ip(anno_sock, bcast_ip); ch395f_set_des_ip(anno_sock, bcast_ip);
ch395f_set_des_port(anno_sock, 0); ch395f_set_des_port(anno_sock, 0);
uint32_t wait = HAL_GetTick(); uint32_t wait = HAL_GetTick();
uint8_t hello_ok = 0; uint8_t hello_ok = 0;
while (HAL_GetTick() - wait < 5000) { while (HAL_GetTick() - wait < 5000) {
/* 读取全局中断<EFBC88>?socket 中断状态) */
ch395f_get_glob_int_status_all(); ch395f_get_glob_int_status_all();
uint16_t rlen = ch395f_get_recv_len(anno_sock); uint16_t rlen = ch395f_get_recv_len(anno_sock);
if (rlen > 8) { if (rlen > 8) {
@@ -591,55 +594,321 @@ phase6_end:
#endif #endif
} }
/* ============================ Phase 7 ============================ */
/* /*
* ============================ Phase 7 ============================ * Select/Poll I/O 多路复用测试(单连接模式)
* Select/Poll I/O 多路复用测试 <20>?net_select() + net_recv/send echo * 在 netTask 中运行,仅操作 Socket 0
*/ */
#include "net_select.h"
#ifdef ENABLE_PHASE7_TESTS #ifdef ENABLE_PHASE7_TESTS
static char s_phase7_buf[2048]; static char s_phase7_buf[8192];
static uint32_t s_phase7_count = 0;
#endif #endif
/*
* 函数功能Select/Poll I/O 多路复用测试
* 入口参数:无
* <20>?<3F>?值<E580BC>? * 限定条件net_init 已完成多连<E5A49A>?TCP Server 已启<E5B7B2>? * 函数说明:在 netTask 中运行,验证 select/poll 正确返回读写事件
*/
void ch395f_phase7_tests(void) { void ch395f_phase7_tests(void) {
#ifdef ENABLE_PHASE7_TESTS #ifdef ENABLE_PHASE7_TESTS
static uint32_t s_phase7_count = 0; net_sock_t *sk = net_get_sock(0);
if (sk == NULL || !sk->in_use || sk->state != NET_SOCK_STATE_ESTABLISHED) {
return;
}
net_fd_set readfds; net_fd_set readfds;
net_timeval tv; net_timeval tv;
FD_ZERO
NET_FD_ZERO(&readfds); NET_FD_ZERO(&readfds);
NET_FD_SET(0, &readfds);
for (int i = NET_TCP_SERVER_DATA_SOCK_START; i < NET_MAX_SOCKETS; i++) {
net_sock_t *sk = net_get_sock(i);
if (sk && sk->in_use && sk->state == NET_SOCK_STATE_ESTABLISHED) {
NET_FD_SET(i, &readfds);
}
}
tv.tv_sec = 0; tv.tv_sec = 0;
tv.tv_usec = 50000; tv.tv_usec = 50000;
int n = net_select(NET_MAX_SOCKETS, &readfds, NULL, NULL, &tv); int n = net_select(1, &readfds, NULL, NULL, &tv);
if (n <= 0) return; if (n <= 0) return;
for (int i = 0; i < NET_MAX_SOCKETS; i++) { if (NET_FD_ISSET(0, &readfds)) {
net_sock_t *sk = net_get_sock(i);
if (!sk || !NET_FD_ISSET(i, &readfds)) continue;
int len = net_recv_sock(sk, s_phase7_buf, sizeof(s_phase7_buf), NET_MSG_DONTWAIT); int len = net_recv_sock(sk, s_phase7_buf, sizeof(s_phase7_buf), NET_MSG_DONTWAIT);
if (len > 0) { if (len > 0) {
net_send_sock(sk, s_phase7_buf, len); net_send_sock(sk, s_phase7_buf, len);
s_phase7_count++; s_phase7_count++;
TEST_CHECK(1, "Phase7: select echo #%lu (sock=%d, %d bytes)", s_phase7_count, i, len); TEST_CHECK(1, "Phase7: select echo #%lu (%d bytes)", s_phase7_count, len);
} }
} }
#endif #endif
} }
/* ============================ Phase 8 ============================ */
/*
* 边界条件测试单连接模式netTask 中运行)
* 覆盖零长度收发、DMA 边界4095/4096/4097B
* recv 缓冲区小于数据、连续快速发送、快速重连
*/
#ifdef ENABLE_PHASE8_TESTS
static int s_phase8_stage = 0; /* 0=idle, 1=4095B, 2=4096B, 3=4097B, 4=zero, 5=fastsend */
static uint32_t s_phase8_sent = 0;
static uint32_t s_phase8_recv = 0;
static uint8_t s_phase8_tx[8192];
static uint8_t s_phase8_rx[8192];
static void phase8_fill(uint8_t *buf, uint32_t size, uint8_t seed) {
for (uint32_t i = 0; i < size; i++) {
buf[i] = (uint8_t)(seed + i);
}
}
static int phase8_verify(uint8_t *buf, uint32_t size, uint8_t seed) {
for (uint32_t i = 0; i < size; i++) {
if (buf[i] != (uint8_t)(seed + i)) {
return 0;
}
}
return 1;
}
#endif
void ch395f_phase8_init(void) {
#ifdef ENABLE_PHASE8_TESTS
s_phase8_stage = 0;
DBG_INFO("Phase8: boundary tests initialized");
#endif
}
void ch395f_phase8_tests(void) {
#ifdef ENABLE_PHASE8_TESTS
net_sock_t *sk = net_get_sock(0);
if (sk == NULL || !sk->in_use) {
return;
}
if (sk->state == NET_SOCK_STATE_LISTENING) {
/* 等待连接 */
return;
}
if (sk->state != NET_SOCK_STATE_ESTABLISHED) {
s_phase8_stage = 0;
return;
}
switch (s_phase8_stage) {
case 0: {
/* Stage 1: 发送 4095 字节DMA 边界 -1单次 SPI 事务可容纳) */
DBG_INFO("Phase8: stage 1/5 — send 4095 bytes (DMA boundary -1)");
phase8_fill(s_phase8_tx, 4095, 0x10);
int sent = net_send_sock(sk, s_phase8_tx, 4095);
TEST_CHECK(sent == 4095, "Phase8: send 4095 bytes (sent=%d)", sent);
s_phase8_sent = (sent > 0) ? (uint32_t)sent : 0;
s_phase8_recv = 0;
s_phase8_stage = 1;
break;
}
case 1: {
/* 等待接收 4095 字节回显 */
int n = net_recv_sock(sk, s_phase8_rx + s_phase8_recv,
(int)(4095 - s_phase8_recv), NET_MSG_DONTWAIT);
if (n > 0) {
s_phase8_recv += (uint32_t)n;
if (s_phase8_recv >= 4095) {
int ok = phase8_verify(s_phase8_rx, 4095, 0x10);
TEST_CHECK(ok, "Phase8: verify 4095 bytes echo");
s_phase8_stage = 2;
}
}
break;
}
case 2: {
/* Stage 2: 发送 4096 字节DMA 边界:刚好填满 SPI 事务) */
DBG_INFO("Phase8: stage 2/5 — send 4096 bytes (DMA boundary exact)");
phase8_fill(s_phase8_tx, 4096, 0x20);
int sent = net_send_sock(sk, s_phase8_tx, 4096);
TEST_CHECK(sent == 4096, "Phase8: send 4096 bytes (sent=%d)", sent);
s_phase8_sent = (sent > 0) ? (uint32_t)sent : 0;
s_phase8_recv = 0;
s_phase8_stage = 3;
break;
}
case 3: {
int n = net_recv_sock(sk, s_phase8_rx + s_phase8_recv,
(int)(4096 - s_phase8_recv), NET_MSG_DONTWAIT);
if (n > 0) {
s_phase8_recv += (uint32_t)n;
if (s_phase8_recv >= 4096) {
int ok = phase8_verify(s_phase8_rx, 4096, 0x20);
TEST_CHECK(ok, "Phase8: verify 4096 bytes echo");
s_phase8_stage = 4;
}
}
break;
}
case 4: {
/* Stage 3: 发送 4097 字节DMA 边界 +1需两次 SPI 事务) */
DBG_INFO("Phase8: stage 3/5 — send 4097 bytes (DMA boundary +1, two SPI xacts)");
phase8_fill(s_phase8_tx, 4097, 0x30);
int sent = net_send_sock(sk, s_phase8_tx, 4097);
TEST_CHECK(sent == 4097, "Phase8: send 4097 bytes (sent=%d)", sent);
s_phase8_sent = (sent > 0) ? (uint32_t)sent : 0;
s_phase8_recv = 0;
s_phase8_stage = 5;
break;
}
case 5: {
int n = net_recv_sock(sk, s_phase8_rx + s_phase8_recv,
(int)(4097 - s_phase8_recv), NET_MSG_DONTWAIT);
if (n > 0) {
s_phase8_recv += (uint32_t)n;
if (s_phase8_recv >= 4097) {
int ok = phase8_verify(s_phase8_rx, 4097, 0x30);
TEST_CHECK(ok, "Phase8: verify 4097 bytes echo");
s_phase8_stage = 6;
}
}
break;
}
case 6: {
/* Stage 4: 零长度发送(验证错误处理) */
DBG_INFO("Phase8: stage 4/5 — zero-length send/recv");
int sent = net_send_sock(sk, s_phase8_tx, 0);
TEST_CHECK(sent < 0, "Phase8: send 0 bytes returns %d (expected <0)", sent);
s_phase8_stage = 7;
break;
}
case 7: {
/* Stage 5: 连续快速发送 20 个小包(验证 SENDBUF_FREE 等待机制) */
DBG_INFO("Phase8: stage 5/5 — rapid 20x 100-byte sends");
phase8_fill(s_phase8_tx, 100, 0x40);
int all_ok = 1;
for (int i = 0; i < 20; i++) {
int sent = net_send_sock(sk, s_phase8_tx, 100);
if (sent != 100) {
TEST_CHECK(0, "Phase8: rapid send #%d failed (sent=%d)", i + 1, sent);
all_ok = 0;
break;
}
osDelay(1);
}
if (all_ok) {
TEST_CHECK(1, "Phase8: 20x rapid sends OK");
s_phase8_sent = 2000;
s_phase8_recv = 0;
s_phase8_stage = 8;
} else {
s_phase8_stage = 0;
}
break;
}
case 8: {
/* 接收所有快速发送的回显 */
int n = net_recv_sock(sk, s_phase8_rx + s_phase8_recv,
(int)(2000 - s_phase8_recv), NET_MSG_DONTWAIT);
if (n > 0) {
s_phase8_recv += (uint32_t)n;
if (s_phase8_recv >= 2000) {
TEST_CHECK(1, "Phase8: all 2000 bytes echo received");
TEST_REPORT("Phase 8");
s_phase8_stage = 0;
}
}
break;
}
default:
s_phase8_stage = 0;
break;
}
#endif
}
/* ============================ Phase 9 ============================ */
/*
* PHY 链路恢复测试(需物理插拔网线)
* 在 main.c 中单独调用,或在 netTask 中通过宏启用
*/
void ch395f_phase9_tests(void) {
#ifdef ENABLE_PHASE9_TESTS
DBG_INFO("=== CH395F Phase 9 Tests (PHY Recovery) ===");
/* TC-NET-901: 拔线后检测 PHY 断开 */
uint32_t wait = HAL_GetTick();
uint8_t phy_disconnected = 0;
while (HAL_GetTick() - wait < 15000) {
uint16_t gint = ch395f_get_glob_int_status_all();
if (gint & CH395F_GINT_STAT_PHY_CHANGE) {
uint8_t phy = ch395f_get_phy_status();
DBG_INFO("PHY_CHANGE: 0x%02X", phy);
if (phy == CH395F_PHY_DISCONN) {
TEST_CHECK(1, "PHY disconnect detected");
phy_disconnected = 1;
break;
}
}
HAL_Delay(100);
}
if (!phy_disconnected) {
TEST_CHECK(0, "PHY disconnect NOT detected within 15s (unplug cable?)");
goto phase9_end;
}
/* TC-NET-902: 插回网线后检测链路恢复 */
wait = HAL_GetTick();
uint8_t phy_reconnected = 0;
while (HAL_GetTick() - wait < 30000) {
uint16_t gint = ch395f_get_glob_int_status_all();
if (gint & CH395F_GINT_STAT_PHY_CHANGE) {
uint8_t phy = ch395f_get_phy_status();
DBG_INFO("PHY_CHANGE: 0x%02X", phy);
if (phy != CH395F_PHY_DISCONN) {
TEST_CHECK(1, "PHY reconnected (0x%02X)", phy);
phy_reconnected = 1;
break;
}
}
HAL_Delay(100);
}
if (!phy_reconnected) {
TEST_CHECK(0, "PHY reconnect NOT detected within 30s (re-plug cable?)");
}
phase9_end:
TEST_REPORT("Phase 9");
#endif
}
/* ============================ Phase 10 ============================ */
/*
* KeepAlive 超时断开测试
* 在 netTask 中运行,监视 Socket 0 的 DISCONNECT/TIMEOUT 事件
* PC 连接后静置(不发数据),验证 KeepAlive 在空闲超时后触发断开
*/
#ifdef ENABLE_PHASE10_TESTS
static int s_phase10_connected = 0;
static uint32_t s_phase10_start_tick = 0;
#endif
void ch395f_phase10_tests(void) {
#ifdef ENABLE_PHASE10_TESTS
net_sock_t *sk = net_get_sock(0);
if (sk == NULL || !sk->in_use) {
return;
}
if (!s_phase10_connected) {
if (sk->state == NET_SOCK_STATE_ESTABLISHED) {
s_phase10_connected = 1;
s_phase10_start_tick = HAL_GetTick();
DBG_INFO("Phase10: connection established, waiting for KeepAlive timeout (%dms)...",
PHASE10_KEEPALIVE_IDLE_MS);
}
return;
}
/* 已建立连接等待断开KeepAlive 触发) */
if (sk->state == NET_SOCK_STATE_LISTENING) {
uint32_t elapsed = HAL_GetTick() - s_phase10_start_tick;
TEST_CHECK(elapsed >= PHASE10_KEEPALIVE_IDLE_MS,
"Phase10: KeepAlive triggered after %lums (idle=%dms)",
elapsed, PHASE10_KEEPALIVE_IDLE_MS);
s_phase10_connected = 0;
TEST_REPORT("Phase 10");
}
#endif
}

View File

@@ -1,24 +1,27 @@
/* /*
* 模块名称CH395F Driver Test Suite * 模块名称CH395F Driver Test Suite
* 模块功能CH395F 驱动各功能模块的测试入口,分阶段组织测试用例, * 模块功能CH395F 驱动各功能模块的测试入口,分阶段组织测试用例,
* 覆盖 SPI 命令路径、协议栈配置、Socket 状态机 * 覆盖 SPI 命令路径、协议栈配置、Socket 状态机、大文件传输、
* 边界条件、KeepAlive、PHY 链路恢复等,基于单连接 socket 模式
* 适用平台STM32F4 系列CH395F 以太网芯片) * 适用平台STM32F4 系列CH395F 以太网芯片)
* 作者:王建锋 * 作者:王建锋
* 创建日期2026-07-19 * 创建日期2026-07-19
* 修改记录: * 修改记录:
* 2026-07-22 全面重构为单连接模式,增加大文件传输、边界条件等测试
* *
* === 通过标准速查 === * === 测试阶段一览 ===
* * Phase | 类型 | 描述
* Phase | 通过条件 | 失败特征 * ---------|--------------|-----------------------------------------------
* ---------|-----------------------------------|-------------------------------- * Phase 1 | 独立运行 | 寄存器读写 + SPI 命令路径验证
* Phase 1 | 9 项全部打印 OK/SUCCESS/YES/0x00 | 任何一项显示 FAIL、ERROR、MISMATCH * Phase 2 | PC 配合 | TCP Client 收发 + 关闭重连
* Phase 2 | 3 轮 "PASS" 打印 | 任何一轮打印 "FAIL" 或超时 * Phase 3 | PC 配合 | UDP Server EchoHELLO + PING + 大包)
* Phase 3 | 20/20 回显 + PING 5/5 + 大包 10/10 | 任何回显超时或丢包 * Phase 4 | netTask | NET 层 TCP Echo单连接模式基础收发验证
* Phase 4 | PC 脚本显示 10/10 sent/received | 断连、数据错乱 * Phase 5 | netTask | NET 层大文件传输20KB+ 分块收发)
* Phase 5 | PC 脚本显示 10/10 sent/received | 断连、数据错乱 * Phase 6 | PC 配合 | DHCP 自动获取 IP
* Phase 6 | 日志打印 IP/GW/MASK 非零 IP | DHCP timeout 或 0.0.0.0 * Phase 7 | netTask | Select/Poll I/O 多路复用
* Phase 7 | PC 脚本显示 10/10 sent/received | 断连、数据错乱 * Phase 8 | netTask | 边界条件测试零长度、DMA 边界、缓冲溢出)
* Phase 8 | 70/70 成功率 100% | 任何连接失败或丢包 * Phase 9 | 需拔插网线 | PHY 链路恢复
* Phase 10 | netTask | KeepAlive 超时断开测试
*/ */
#ifndef __CH395F_TEST_H #ifndef __CH395F_TEST_H
@@ -32,15 +35,19 @@ extern "C" {
/* /*
* 阶段使能开关(取消注释即启用对应阶段) * 阶段使能开关(取消注释即启用对应阶段)
* 注意:Phase 6 (DHCP) 会改变 IP建议独立运行 * 注意:一次仅启用一个阶段Phase 4/5/7/8 共享 netTask 循环,可同时启用)
* Phase 6 (DHCP) 会改变 IP必须独立运行
*/ */
//#define ENABLE_PHASE1_TESTS /* 寄存器读写 + 中断一致性 */ //#define ENABLE_PHASE1_TESTS /* 寄存器读写 + SPI 命令路径 */
//#define ENABLE_PHASE2_TESTS /* TCP Client 收发 + 关闭重连 */ //#define ENABLE_PHASE2_TESTS /* TCP Client 收发 + 关闭重连 */
//#define ENABLE_PHASE3_TESTS /* UDP Server Echo */ //#define ENABLE_PHASE3_TESTS /* UDP Server Echo */
#define ENABLE_PHASE4_TESTS /* NET 层 TCP EchonetTask 中运行 */ #define ENABLE_PHASE4_TESTS /* NET 层 TCP Echo单连接基础收发 */
//#define ENABLE_PHASE5_TESTS /* NET 层 UDP EchonetTask 中运行 */ //#define ENABLE_PHASE5_TESTS /* NET 层大文件传输20KB+ 分块 */
//#define ENABLE_PHASE6_TESTS /* DHCP 自动获取 IP会改 IP */ //#define ENABLE_PHASE6_TESTS /* DHCP 自动获取 IP会改 IP独立运行 */
//#define ENABLE_PHASE7_TESTS /* Select/Poll I/O 多路复用netTask 中运行) */ //#define ENABLE_PHASE7_TESTS /* Select/Poll I/O 多路复用 */
//#define ENABLE_PHASE8_TESTS /* 边界条件测试 */
//#define ENABLE_PHASE9_TESTS /* PHY 链路恢复测试 */
//#define ENABLE_PHASE10_TESTS /* KeepAlive 超时断开测试 */
/* 测试统计 */ /* 测试统计 */
typedef struct { typedef struct {
@@ -85,30 +92,28 @@ void ch395f_phase2_tests(void);
/* /*
* Phase 3: UDP Server Echo + PING + 大包 * Phase 3: UDP Server Echo + PING + 大包
* 通过: 20/20 回显 + PING 5/5 + 大包 10/10 * 通过: 30/30 回显匹配
* 失败: 任何回显超时或丢包 * 失败: 任何回显超时或丢包
* PC 端: * PC 端:
* ping 192.168.1.100
* python test/ch395f_socket_test.py udp_client --ip 192.168.1.100 --port 60000 * python test/ch395f_socket_test.py udp_client --ip 192.168.1.100 --port 60000
*/ */
void ch395f_phase3_tests(void); void ch395f_phase3_tests(void);
/* /*
* Phase 4: NET 层 TCP EchonetTask 中运行) * Phase 4: NET 层 TCP Echo单连接模式,netTask 中运行)
* 通过: PC 脚本 10/10 sent/received * 验证 Socket 0 单连接生命周期LISTEN → ESTABLISHED → DISCONNECT → re-LISTEN
* 失败: 断连或数据错乱 * 覆盖载荷64B、1460B(MSS)、4096B(缓冲满)、20KB(大文件分块)
* PC 端: * PC 端:
* python test/ch395f_socket_test.py tcp_client --ip 192.168.1.100 --port 8080 * python test/ch395f_socket_test.py tcp_client --ip 192.168.1.100 --port 8080
*/ */
void ch395f_phase4_tests(void); void ch395f_phase4_tests(void);
/* /*
* Phase 5: NET 层 UDP EchonetTask 中运行) * Phase 5: NET 层大文件传输netTask 中运行)
* 通过: PC 脚本 10/10 sent/received * 验证超过 CH395F 内部缓冲区大小4KB的连续数据收发
* 失败: 断连或数据错乱 * 覆盖载荷20480B(20KB)、65535B(64KBrecv_len上限)
* 注init 在 USER CODE BEGIN 2 中调用echo 在 netTask 中运行
* PC 端: * PC 端:
* python test/ch395f_socket_test.py udp_client --ip 192.168.1.100 --port 60000 * python test/ch395f_socket_test.py tcp_file --ip 192.168.1.100 --port 8080 --size 20480
*/ */
void ch395f_phase5_init(void); void ch395f_phase5_init(void);
void ch395f_phase5_tests(void); void ch395f_phase5_tests(void);
@@ -119,19 +124,44 @@ void ch395f_phase5_tests(void);
* 失败: DHCP timeout 或宣告/HELLO 失败 * 失败: DHCP timeout 或宣告/HELLO 失败
* 注意: 会改变 IP需独立运行 * 注意: 会改变 IP需独立运行
* PC 端:管理员权限 * PC 端:管理员权限
* python test/ch395f_socket_test.py dhcp_server --dhcp-iface 192.168.1.2 --ip 192.168.1.100 * python test/ch395f_socket_test.py dhcp_server --dhcp-iface 192.168.1.2 --ip 192.168.1.100
*/ */
void ch395f_phase6_tests(void); void ch395f_phase6_tests(void);
/* /*
* Phase 7: Select/Poll 测试netTask 中运行) * Phase 7: Select/Poll I/O 多路复用netTask 中运行)
* 通过: PC 脚本 10/10 sent/received * 验证 net_select() 和 net_poll_events() 在单 socket 模式下正确工作
* 失败: 断连或数据错乱
* PC 端: * PC 端:
* python test/ch395f_socket_test.py tcp_client --ip 192.168.1.100 --port 8080 * python test/ch395f_socket_test.py tcp_client --ip 192.168.1.100 --port 8080
*/ */
void ch395f_phase7_tests(void); void ch395f_phase7_tests(void);
/*
* Phase 8: 边界条件测试netTask 中运行)
* 覆盖零长度收发、DMA 边界4095/4096/4097B、recv 缓冲区小于数据、
* 连续快速发送、多轮快速连接-断开循环
* PC 端:
* python test/ch395f_socket_test.py tcp_client --ip 192.168.1.100 --port 8080
*/
void ch395f_phase8_init(void);
void ch395f_phase8_tests(void);
/*
* Phase 9: PHY 链路恢复测试
* 通过拔插网线验证 PHY 断开检测和链路恢复后 socket 自动重新监听
* 需物理操作PC 端:
* python test/ch395f_socket_test.py tcp_client --ip 192.168.1.100 --port 8080
*/
void ch395f_phase9_tests(void);
/*
* Phase 10: TCP KeepAlive 超时断开测试
* 验证 KeepAlive 在空闲超时后触发断开并自动重新监听
* PC 端:连接后静置(不发数据),等待 KeepAlive 触发
* python test/ch395f_socket_test.py tcp_client --ip 192.168.1.100 --port 8080 --silent
*/
void ch395f_phase10_tests(void);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@@ -182,14 +182,13 @@ static int receive_file(int socket, const char *path)
return -1; return -1;
} }
static unsigned char s_recv_buf[4096]; unsigned char buffer[1024];
int bufsize = 4096;
int err; int err;
int total = 0; int total = 0;
while ((err = lftpd_inet_read(socket, s_recv_buf, bufsize)) > 0) { while ((err = lftpd_inet_read(socket, buffer, sizeof(buffer))) > 0) {
total += err; total += err;
if (lftpd_io_write(fh, s_recv_buf, err) != err) { if (lftpd_io_write(fh, buffer, err) != err) {
err = -1; err = -1;
break; break;
} }

View File

@@ -107,7 +107,8 @@ int net_init(const char *ip, const char *mask, const char *gateway) {
ch395f_reset(); ch395f_reset();
DBG_INFO("net_init: set_fun_para..."); DBG_INFO("net_init: set_fun_para...");
/* CH395F 超时/DISCONNECT 后不要自动关闭 Socket由软件手动管理 */ /* 启用单连接模式 + 手动关闭 Socketbit3=1, bit1=0
* bit3=1: DISCONNECT/TIMEOUT 时不自动清空缓冲区,由软件排空数据后手动关闭 */
ch395f_set_fun_para(0x08); ch395f_set_fun_para(0x08);
DBG_INFO("net_init: set_tcp_mss..."); DBG_INFO("net_init: set_tcp_mss...");
@@ -776,6 +777,11 @@ int net_connect(int sockfd, const struct net_sockaddr *addr, int addrlen) {
return 0; return 0;
} }
/*
* SPI DMA 单次事务最大有效载荷(取 CH395F 驱动公开常量)
*/
#define NET_DMA_MAX_PAYLOAD ((int)CH395F_SPI_DMA_MAX_PAYLOAD)
/* /*
* 函数功能:发送数据(内部锁定版本,必须在 netTask 上下文调用) * 函数功能:发送数据(内部锁定版本,必须在 netTask 上下文调用)
*/ */
@@ -798,8 +804,8 @@ static int net_send_locked(net_sock_t *p_sock, const void *buf, int len) {
while (sent < len) { while (sent < len) {
int chunk = len - sent; int chunk = len - sent;
if (chunk > NET_SEND_BUF_SIZE) { if (chunk > NET_DMA_MAX_PAYLOAD) {
chunk = NET_SEND_BUF_SIZE; chunk = NET_DMA_MAX_PAYLOAD;
} }
if (!p_sock->send_ready) { if (!p_sock->send_ready) {
@@ -869,8 +875,18 @@ static int net_recv_locked(net_sock_t *p_sock, void *buf, int len, int flags) {
return -1; return -1;
} }
if (p_sock->state == NET_SOCK_STATE_TCP_ACCEPT || if (p_sock->state == NET_SOCK_STATE_TCP_ACCEPT) {
p_sock->state == NET_SOCK_STATE_CLOSED) { return 0;
}
if (p_sock->state == NET_SOCK_STATE_CLOSED) {
/* 断开前尝试排空 CH395F 接收缓冲区Trap 13FIN 可能比数据先到) */
uint16_t rem = ch395f_get_recv_len(sockfd);
if (rem > 0) {
int rd = (rem > (uint16_t)len) ? len : (int)rem;
ch395f_read_recv_buf(sockfd, (uint8_t *)buf, (uint16_t)rd);
p_sock->recv_bytes += (uint32_t)rd;
return rd;
}
return 0; return 0;
} }
} }
@@ -1188,9 +1204,9 @@ int net_recvfrom(int sockfd, void *buf, int len, int flags,
/* 读取数据 */ /* 读取数据 */
if (recv_len > 0) { if (recv_len > 0) {
int read_len = (recv_len > (uint16_t)len) ? len : (int)recv_len; int read_len = (recv_len > (uint16_t)len) ? len : (int)recv_len;
ch395f_read_recv_buf(sockfd, (uint8_t *)buf, (uint16_t)read_len); ch395f_read_recv_buf(sockfd, (uint8_t *)buf, (uint16_t)read_len);
p_sock->recv_bytes += (uint32_t)read_len; p_sock->recv_bytes += (uint32_t)read_len;
return read_len; return read_len;
} }
} }
@@ -1481,11 +1497,9 @@ static void handle_disconnect_event(net_sock_t *p_sock) {
} }
else if (p_sock->state == NET_SOCK_STATE_ESTABLISHED) { else if (p_sock->state == NET_SOCK_STATE_ESTABLISHED) {
if (p_sock->standalone_accept) { if (p_sock->standalone_accept) {
/* 独立监听模式PASV 数据通道):通知断开但不释放 Socket /* 独立监听模式:先不关 CH395F Socket
* 留给传输命令STOR/LIST的 accept 检测 CLOSED 状态后统一清理。 * 留给 net_recv_locked 把剩余数据读出来再关 */
* 但必须先关闭 CH395F 硬件 Socket否则后续 ch395f_open_socket 失败 */
DBG_INFO("sock%d DISCONNECTED, releasing", p_sock->ch395_sock); DBG_INFO("sock%d DISCONNECTED, releasing", p_sock->ch395_sock);
ch395f_close_socket(p_sock->ch395_sock);
p_sock->state = NET_SOCK_STATE_CLOSED; p_sock->state = NET_SOCK_STATE_CLOSED;
fire_event(p_sock, NET_EVENT_DISCONNECTED); fire_event(p_sock, NET_EVENT_DISCONNECTED);
} else { } else {
@@ -1512,11 +1526,9 @@ static void handle_disconnect_event(net_sock_t *p_sock) {
/* /*
* 函数功能处理数据接收事<E694B6>? */ * 函数功能处理数据接收事<E694B6>? */
static void handle_recv_event(net_sock_t *p_sock) { static void handle_recv_event(net_sock_t *p_sock) {
uint16_t recv_len = ch395f_get_recv_len(p_sock->ch395_sock); /* RECV_OK 中断已触发,直接通知上层。不在此读 recv_len
* 避免和 net_recv_locked 里面的 ch395f_get_recv_len 冲突Trap 13 */
if (recv_len > 0) { fire_event(p_sock, NET_EVENT_DATA_RECEIVED);
fire_event(p_sock, NET_EVENT_DATA_RECEIVED);
}
} }
/* /*
@@ -1534,12 +1546,8 @@ static void handle_timeout_event(net_sock_t *p_sock) {
p_sock->state = NET_SOCK_STATE_CREATED; p_sock->state = NET_SOCK_STATE_CREATED;
} }
else if (p_sock->state == NET_SOCK_STATE_ESTABLISHED) { else if (p_sock->state == NET_SOCK_STATE_ESTABLISHED) {
if (p_sock->standalone_accept) { DBG_ERROR("sock%d TIMEOUT", p_sock->ch395_sock);
DBG_INFO("sock%d TIMEOUT (ignored)", p_sock->ch395_sock); p_sock->state = p_sock->standalone_accept ? NET_SOCK_STATE_CLOSED : NET_SOCK_STATE_TCP_ACCEPT;
} else {
DBG_ERROR("sock%d TIMEOUT", p_sock->ch395_sock);
p_sock->state = NET_SOCK_STATE_TCP_ACCEPT;
}
} }
else if (p_sock->state == NET_SOCK_STATE_LISTENING) { else if (p_sock->state == NET_SOCK_STATE_LISTENING) {
/* 监听超时(异常情况) */ /* 监听超时(异常情况) */

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\adc_task.o --omf_browse .\stm32f407-demo\adc_task.crf --depend .\stm32f407-demo\adc_task.d "..\App\task\adc_task.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\app_main.o --omf_browse .\stm32f407-demo\app_main.crf --depend .\stm32f407-demo\app_main.d "..\App\app_main.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\ch395f.o --omf_browse .\stm32f407-demo\ch395f.crf --depend .\stm32f407-demo\ch395f.d "..\Drivers\BSP\CH395F\ch395f.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\ch395f_test.o --omf_browse .\stm32f407-demo\ch395f_test.crf --depend .\stm32f407-demo\ch395f_test.d "..\Drivers\BSP\CH395F\ch395f_test.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\cmsis_os2.o --omf_browse .\stm32f407-demo\cmsis_os2.crf --depend .\stm32f407-demo\cmsis_os2.d "../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2/cmsis_os2.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\crc.o --omf_browse .\stm32f407-demo\crc.crf --depend .\stm32f407-demo\crc.d "..\App\util\crc.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\croutine.o --omf_browse .\stm32f407-demo\croutine.crf --depend .\stm32f407-demo\croutine.d "../Middlewares/Third_Party/FreeRTOS/Source/croutine.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\dma.o --omf_browse .\stm32f407-demo\dma.crf --depend .\stm32f407-demo\dma.d "../Src/dma.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\event_groups.o --omf_browse .\stm32f407-demo\event_groups.crf --depend .\stm32f407-demo\event_groups.d "../Middlewares/Third_Party/FreeRTOS/Source/event_groups.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\ff.o --omf_browse .\stm32f407-demo\ff.crf --depend .\stm32f407-demo\ff.d "..\Lib\FatFs\ff.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\freertos.o --omf_browse .\stm32f407-demo\freertos.crf --depend .\stm32f407-demo\freertos.d "../Src/freertos.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\gd5f2gq5ue.o --omf_browse .\stm32f407-demo\gd5f2gq5ue.crf --depend .\stm32f407-demo\gd5f2gq5ue.d "..\Drivers\BSP\GD5F2GQ5UE\gd5f2gq5ue.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\gpio.o --omf_browse .\stm32f407-demo\gpio.crf --depend .\stm32f407-demo\gpio.d "../Src/gpio.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\heap_4.o --omf_browse .\stm32f407-demo\heap_4.crf --depend .\stm32f407-demo\heap_4.d "../Middlewares/Third_Party/FreeRTOS/Source/portable/MemMang/heap_4.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\i2c.o --omf_browse .\stm32f407-demo\i2c.crf --depend .\stm32f407-demo\i2c.d "../Src/i2c.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs --diag_suppress=177
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\journal.o --omf_browse .\stm32f407-demo\journal.crf --depend .\stm32f407-demo\journal.d "..\Lib\dhara\journal.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\lftpd.o --omf_browse .\stm32f407-demo\lftpd.crf --depend .\stm32f407-demo\lftpd.d "..\Drivers\BSP\NET\lftpd\lftpd.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\lftpd_inet.o --omf_browse .\stm32f407-demo\lftpd_inet.crf --depend .\stm32f407-demo\lftpd_inet.d "..\Drivers\BSP\NET\lftpd\lftpd_inet.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\lftpd_io.o --omf_browse .\stm32f407-demo\lftpd_io.crf --depend .\stm32f407-demo\lftpd_io.d "..\Drivers\BSP\NET\lftpd\lftpd_io.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\lftpd_string.o --omf_browse .\stm32f407-demo\lftpd_string.crf --depend .\stm32f407-demo\lftpd_string.d "..\Drivers\BSP\NET\lftpd\lftpd_string.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\list.o --omf_browse .\stm32f407-demo\list.crf --depend .\stm32f407-demo\list.d "../Middlewares/Third_Party/FreeRTOS/Source/list.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\main.o --omf_browse .\stm32f407-demo\main.crf --depend .\stm32f407-demo\main.d "../Src/main.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs --diag_suppress=177
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\map.o --omf_browse .\stm32f407-demo\map.crf --depend .\stm32f407-demo\map.d "..\Lib\dhara\map.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\nand_ftl.o --omf_browse .\stm32f407-demo\nand_ftl.crf --depend .\stm32f407-demo\nand_ftl.d "..\Drivers\BSP\GD5F2GQ5UE\nand_ftl.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\net_select.o --omf_browse .\stm32f407-demo\net_select.crf --depend .\stm32f407-demo\net_select.d "..\Drivers\BSP\NET\net_select.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\net_socket.o --omf_browse .\stm32f407-demo\net_socket.crf --depend .\stm32f407-demo\net_socket.d "..\Drivers\BSP\NET\net_socket.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\net_task.o --omf_browse .\stm32f407-demo\net_task.crf --depend .\stm32f407-demo\net_task.d "..\App\task\net_task.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\port.o --omf_browse .\stm32f407-demo\port.crf --depend .\stm32f407-demo\port.d "../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F/port.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\queue.o --omf_browse .\stm32f407-demo\queue.crf --depend .\stm32f407-demo\queue.d "../Middlewares/Third_Party/FreeRTOS/Source/queue.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\ringbuf.o --omf_browse .\stm32f407-demo\ringbuf.crf --depend .\stm32f407-demo\ringbuf.d "..\App\util\ringbuf.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\rs485.o --omf_browse .\stm32f407-demo\rs485.crf --depend .\stm32f407-demo\rs485.d "..\Drivers\BSP\RS485\rs485.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\rs485_task.o --omf_browse .\stm32f407-demo\rs485_task.crf --depend .\stm32f407-demo\rs485_task.d "..\App\task\rs485_task.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\sd2506.o --omf_browse .\stm32f407-demo\sd2506.crf --depend .\stm32f407-demo\sd2506.d "..\Drivers\BSP\SD2506\sd2506.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\spi.o --omf_browse .\stm32f407-demo\spi.crf --depend .\stm32f407-demo\spi.d "../Src/spi.c"

View File

@@ -1,5 +0,0 @@
--cpu Cortex-M4.fp.sp -g --apcs=interwork --pd "__MICROLIB SETA 1" -I ../Drivers/CMSIS/Include
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
--pd "__UVISION_VERSION SETA 538" --pd "_RTE_ SETA 1" --pd "STM32F407xx SETA 1" --pd "_RTE_ SETA 1"
--list startup_stm32f407xx.lst --xref -o .\stm32f407-demo\startup_stm32f407xx.o --depend .\stm32f407-demo\startup_stm32f407xx.d "startup_stm32f407xx.s"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal.o --omf_browse .\stm32f407-demo\stm32f4xx_hal.crf --depend .\stm32f407-demo\stm32f4xx_hal.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_cortex.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_cortex.crf --depend .\stm32f407-demo\stm32f4xx_hal_cortex.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_cortex.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_dma.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_dma.crf --depend .\stm32f407-demo\stm32f4xx_hal_dma.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_dma_ex.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_dma_ex.crf --depend .\stm32f407-demo\stm32f4xx_hal_dma_ex.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_dma_ex.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_exti.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_exti.crf --depend .\stm32f407-demo\stm32f4xx_hal_exti.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_exti.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_flash.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_flash.crf --depend .\stm32f407-demo\stm32f4xx_hal_flash.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_flash_ex.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_flash_ex.crf --depend .\stm32f407-demo\stm32f4xx_hal_flash_ex.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ex.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_flash_ramfunc.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_flash_ramfunc.crf --depend .\stm32f407-demo\stm32f4xx_hal_flash_ramfunc.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_flash_ramfunc.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_gpio.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_gpio.crf --depend .\stm32f407-demo\stm32f4xx_hal_gpio.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_gpio.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_i2c.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_i2c.crf --depend .\stm32f407-demo\stm32f4xx_hal_i2c.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_i2c_ex.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_i2c_ex.crf --depend .\stm32f407-demo\stm32f4xx_hal_i2c_ex.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_i2c_ex.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_msp.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_msp.crf --depend .\stm32f407-demo\stm32f4xx_hal_msp.d "../Src/stm32f4xx_hal_msp.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_pwr.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_pwr.crf --depend .\stm32f407-demo\stm32f4xx_hal_pwr.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_pwr_ex.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_pwr_ex.crf --depend .\stm32f407-demo\stm32f4xx_hal_pwr_ex.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_pwr_ex.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_rcc.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_rcc.crf --depend .\stm32f407-demo\stm32f4xx_hal_rcc.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_rcc_ex.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_rcc_ex.crf --depend .\stm32f407-demo\stm32f4xx_hal_rcc_ex.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_rcc_ex.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_spi.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_spi.crf --depend .\stm32f407-demo\stm32f4xx_hal_spi.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_spi.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_tim.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_tim.crf --depend .\stm32f407-demo\stm32f4xx_hal_tim.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_tim_ex.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_tim_ex.crf --depend .\stm32f407-demo\stm32f4xx_hal_tim_ex.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_tim_ex.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_timebase_tim.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_timebase_tim.crf --depend .\stm32f407-demo\stm32f4xx_hal_timebase_tim.d "../Src/stm32f4xx_hal_timebase_tim.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_hal_uart.o --omf_browse .\stm32f407-demo\stm32f4xx_hal_uart.crf --depend .\stm32f407-demo\stm32f4xx_hal_uart.d "../Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal_uart.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stm32f4xx_it.o --omf_browse .\stm32f407-demo\stm32f4xx_it.crf --depend .\stm32f407-demo\stm32f4xx_it.d "../Src/stm32f4xx_it.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\stream_buffer.o --omf_browse .\stm32f407-demo\stream_buffer.crf --depend .\stm32f407-demo\stream_buffer.d "../Middlewares/Third_Party/FreeRTOS/Source/stream_buffer.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\sys_clock.o --omf_browse .\stm32f407-demo\sys_clock.crf --depend .\stm32f407-demo\sys_clock.d "..\App\sys_clock.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\system_stm32f4xx.o --omf_browse .\stm32f407-demo\system_stm32f4xx.crf --depend .\stm32f407-demo\system_stm32f4xx.d "../Src/system_stm32f4xx.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\tasks.o --omf_browse .\stm32f407-demo\tasks.crf --depend .\stm32f407-demo\tasks.d "../Middlewares/Third_Party/FreeRTOS/Source/tasks.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\timers.o --omf_browse .\stm32f407-demo\timers.crf --depend .\stm32f407-demo\timers.d "../Middlewares/Third_Party/FreeRTOS/Source/timers.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\tpafe5160.o --omf_browse .\stm32f407-demo\tpafe5160.crf --depend .\stm32f407-demo\tpafe5160.d "..\Drivers\BSP\TPAFE5160\tpafe5160.c"

View File

@@ -1,5 +0,0 @@
--c99 -c --cpu Cortex-M4.fp.sp -D__MICROLIB -g -O3 --apcs=interwork --split_sections -I ../Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc -I ../Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32F4xx/Include -I ../Drivers/CMSIS/Include -I ../Drivers/BSP -I ../Drivers/BSP/CH395F -I ../Drivers/BSP/GD5F2GQ5UE -I ../Drivers/BSP/TPAFE5160 -I ../Drivers/BSP/SD2506 -I ../Drivers/BSP/RS485 -I ../Drivers/BSP/NET -I ../Drivers/BSP/NET/lftpd -I ../App -I ../App/task -I ../App/util -I ../Middlewares/Third_Party/FreeRTOS/Source/include -I ../Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS_V2 -I ../Middlewares/Third_Party/FreeRTOS/Source/portable/RVDS/ARM_CM4F -I ../Lib/dhara -I ../Lib/FatFs
-I.\RTE\_STM32F407-Demo
-IC:\Users\16241\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
-D__UVISION_VERSION="538" -D_RTE_ -DSTM32F407xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32F407xx -DNDEBUG
-o .\stm32f407-demo\usart.o --omf_browse .\stm32f407-demo\usart.crf --depend .\stm32f407-demo\usart.d "../Src/usart.c"

View File

@@ -0,0 +1,71 @@
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Rebuild target 'STM32F407-Demo'
assembling startup_stm32f407xx.s...
compiling crc.c...
compiling ringbuf.c...
compiling gpio.c...
compiling stm32f4xx_hal_msp.c...
compiling spi.c...
compiling stm32f4xx_it.c...
compiling stm32f4xx_hal_flash_ramfunc.c...
compiling stm32f4xx_hal_timebase_tim.c...
compiling usart.c...
compiling i2c.c...
compiling app_main.c...
compiling stm32f4xx_hal_flash_ex.c...
compiling dma.c...
compiling stm32f4xx_hal_gpio.c...
compiling stm32f4xx_hal_flash.c...
compiling sys_clock.c...
compiling adc_task.c...
compiling stm32f4xx_hal_rcc_ex.c...
compiling rs485_task.c...
compiling stm32f4xx_hal_rcc.c...
compiling freertos.c...
compiling stm32f4xx_hal_tim_ex.c...
compiling net_task.c...
compiling main.c...
compiling stm32f4xx_hal_tim.c...
compiling stm32f4xx_hal_dma_ex.c...
compiling stm32f4xx_hal_dma.c...
compiling stm32f4xx_hal_pwr.c...
compiling stm32f4xx_hal_pwr_ex.c...
compiling stm32f4xx_hal_i2c_ex.c...
compiling stm32f4xx_hal_exti.c...
compiling system_stm32f4xx.c...
compiling stm32f4xx_hal_cortex.c...
compiling stm32f4xx_hal.c...
compiling rs485.c...
compiling lftpd_string.c...
compiling sd2506.c...
compiling croutine.c...
compiling tpafe5160.c...
compiling ch395f.c...
compiling gd5f2gq5ue.c...
compiling stm32f4xx_hal_spi.c...
compiling nand_ftl.c...
compiling net_select.c...
compiling ch395f_test.c...
compiling stm32f4xx_hal_uart.c...
compiling event_groups.c...
compiling lftpd_inet.c...
compiling list.c...
compiling lftpd.c...
compiling net_socket.c...
compiling heap_4.c...
compiling stream_buffer.c...
compiling timers.c...
compiling queue.c...
compiling map.c...
compiling stm32f4xx_hal_i2c.c...
compiling journal.c...
compiling port.c...
compiling tasks.c...
compiling ff.c...
compiling lftpd_io.c...
compiling cmsis_os2.c...
linking...
Program Size: Code=59404 RO-data=2172 RW-data=408 ZI-data=66744
FromELF: creating hex file...
".\STM32F407-Demo\STM32F407-Demo.axf" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:17

View File

@@ -1,264 +1,634 @@
# CH395F 测试使用指南 # CH395F 网络测试规范
## 目录 ## 1. 概述
1. [快速开始](#1-快速开始) 本文档定义 CH395F 以太网驱动STM32F407ZGTxSPI2 接口)在**单连接 socket 模式**下的测试规范。测试按阶段TM-PHY-NN组织每个阶段包含独立测试用例TC-NET-NNN
2. [各阶段测试](#2-各阶段测试)
- [Phase 1: 寄存器测试](#phase-1-寄存器测试)
- [Phase 2: TCP Client 收发+重连](#phase-2-tcp-client)
- [Phase 3: UDP Server Echo](#phase-3-udp-server-echo)
- [Phase 4: NET 层 TCP Echo](#phase-4-net-层-tcp-echo)
- [Phase 5: NET 层 UDP Echo](#phase-5-net-层-udp-echo)
- [Phase 6: DHCP](#phase-6-dhcp)
- [Phase 7: Select/Poll](#phase-7-selectpoll)
- [Phase 8: 多客户端并发](#phase-8-多客户端并发)
3. [Python 脚本参考](#3-python-脚本参考)
4. [常见问题](#4-常见问题)
5. [陷阱记录](#5-陷阱记录)
--- ### 设计原则
## 1. 快速开始 | 原则 | 描述 | 验证用例 |
|------|------|----------|
| DP-01 | 单连接 socketSocket 0 唯一复用监听和数据通道CONNECT 后切换数据通道DISCONNECT/TIMEOUT 后重新 OPEN → LISTEN | TC-NET-201~406 |
| DP-02 | 中断集中处理:所有 CH395F 中断在 `net_poll()` 中通过 `GET_GLOB_INT_STATUS` 统一读取并清除ISR 及其他位置不处理 | TC-NET-101 |
| DP-03 | 线程安全:所有 CH395F 操作通过 `netMsgQueue` 在 netTask 串行处理 | TC-NET-301~302 |
| DP-04 | DMA 边界安全:`CH395F_SPI_DMA_BUF_SIZE=4100`,单次事务最大载荷 `4096B`,超限自动分块 | TC-NET-801~805 |
| DP-05 | PHY 链路恢复PHY 断连/重连后 socket 自动恢复至 LISTEN | TC-NET-901~902 |
### 启用/禁用测试 ### CH395F 缓冲架构(关键参数)
编辑 `Drivers/BSP/CH395F/ch395f_test.h`,取消注释想要测试的阶段: | 参数 | 值 | 说明 |
|------|-----|------|
| CH395F 内部总缓冲 | 32KB32 块 × 1KB | Socket 0~3 各 4KB 默认 |
| Socket 0 发送缓冲 | 4096B硬件默认 | 未显式配置时使用 |
| Socket 0 接收缓冲 | 4096B硬件默认 | 未显式配置时使用 |
| **SPI DMA 缓冲** | **4100B** | `CH395F_SPI_DMA_BUF_SIZE` |
| **单次 SPI 最大载荷** | **4096B** | `CH395F_SPI_DMA_MAX_PAYLOAD` |
| 单次 net_send 最大分块 | 4096B | 超限自动分多次 DMA |
| recv_len 最大值 | 65535 | `uint16_t` |
```c > **关键约束**CH395F 硬件接收缓冲 4096B。`recv_len` 在调 `read_recv_buf` 读取**部分**数据后归零Trap 13。因此每次接收调用需确保 `read_len >= recv_len`,或增大 DMA 缓冲以一次性读空。当前 `CH395F_SPI_DMA_BUF_SIZE=4100` 可覆盖完整 4096B 接收缓冲。
//#define ENABLE_PHASE1_TESTS /* 取消注释即启用 */
//#define ENABLE_PHASE2_TESTS /* 默认关闭 */ ### 大文件传输20KB+)策略
//#define ENABLE_PHASE3_TESTS /* 默认关闭 */
#define ENABLE_PHASE4_TESTS /* 当前默认启用netTask TCP echo */ 单连接模式下,超过 Socket 0 硬件缓冲4KB的数据通过以下机制传输
//#define ENABLE_PHASE5_TESTS /* 默认关闭 */
//#define ENABLE_PHASE6_TESTS /* 默认关闭(会改 IP */ ```
//#define ENABLE_PHASE7_TESTS /* 默认关闭 */ 发送端net_send(buf, 20480)
→ net_send_locked 分块,每块 ≤ 4096B
→ 块 1: ch395f_write_send_buf(sock, buf[0..4095], 4096) // DMA 事务 1
→ 等待 SENDBUF_FREE
→ 块 2: ch395f_write_send_buf(sock, buf[4096..8191], 4096) // DMA 事务 2
→ ...
→ 共 5 次 DMA 事务完成 20KB
接收端net_recv(buf, 20480)
→ net_recv_locked 循环拉取
→ ch395f_get_recv_len() 返回硬件缓冲中当前可用数据≤4096B
→ ch395f_read_recv_buf() 一次性读空硬件缓冲≤4096B/DMA 事务)
→ 循环直至全部 20480B 收完
``` ```
### 测试拓扑 **边界条件**
- 发送 `≤4096B`:一次 DMA 事务完成
- 发送 `4097B`:两次 DMA 事务4096 + 1
- 接收缓冲满4096B必须一次性读空否则 `recv_len` 归零导致剩余数据丢失
- 发送 `0B``net_send` 返回 `-1``NET_ERR_INVAL`
### 测试环境
``` ```
PC (192.168.1.2) ──── 交换机 ──── CH395F (192.168.1.100) PC (192.168.1.2) ──── 交换机 ──── CH395F (192.168.1.100)
MCU: STM32F407ZGTx @ 168MHz, Keil MDK-ARM v5 (ARMCC)
``` ```
### 启用测试
编辑 `Drivers/BSP/CH395F/ch395f_test.h`,取消注释对应 `ENABLE_PHASEx_TESTS` 宏。
--- ---
## 2. 阶段测试 ## 2. 阶段 1寄存器与 SPI 命令验证
### Phase 1: 寄存器测试 | 阶段 ID | TM-PHY-01 |
|---------|-----------|
| **类型** | 独立运行 |
| **耗时** | ~1 秒 |
| **入口** | `ch395f_phase1_tests()``main.c USER CODE BEGIN 2` |
| **出口** | 串口 "Phase 1 Tests Complete" 且 0 失败 |
| 项目 | 说明 | ### TC-NET-101: SPI 命令路径完整性
|------|------|
| 类型 | 独立运行,无需 PC 配合 |
| 耗时 | ~1 秒 |
| 测试项 | 芯片版本、命令状态、IP/网关/掩码、全局中断一致性、Socket 中断、ARP、TTL |
**操作** | 字段 | 值 |
``` |------|-----|
1. 只启用 ENABLE_PHASE1_TESTS | **ID** | TC-NET-101 |
2. 编译烧录 | **优先级** | P0 |
3. 看串口输出 | **类型** | 功能测试 |
``` | **标题** | 验证所有 SPI 命令路径返回预期值 |
| **前置条件** | 1. CH395F 已上电SPI2 已初始化<br>2. 未启用其他阶段 |
| **测试步骤** | 1. `ch395f_check_exist()` → 验证回显测试字节按位取反<br>2. `ch395f_get_version()` → 验证版本 != 0xFF 且 != 0x00<br>3. 设 IP 192.168.1.100,回读验证<br>4. 设网关 192.168.1.1,回读验证<br>5. 设掩码 255.255.255.0,回读验证<br>6. `ch395f_get_glob_int_status()` → 验证返回 0x00<br>7. 打开→关闭 Socket 0 → 验证 `CMD_STATUS == CH395F_ERR_SUCCESS`<br>8. 设置 ARP 参数<br>9. 设置 TTL |
| **预期结果** | 全部 9 项打印 `OK`/`SUCCESS`/`0x00` |
| **通过标准** | 9/9 通过0 失败 |
| **覆盖原则** | DP-02 |
**通过标准**:串口打印 `=== Phase 1 Tests Complete ===`,中间无 ERROR。 ### TC-NET-102: 全局中断状态一致性
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-102 |
| **优先级** | P1 |
| **类型** | 功能测试 |
| **标题** | 无事件时 `GET_GLOB_INT_STATUS_ALL` 返回 0 |
| **前置条件** | TC-NET-101 通过,芯片空闲 |
| **测试步骤** | 1. 读 `ch395f_get_glob_int_status_all()`<br>2. 读 `ch395f_get_glob_int_status()`1 字节版) |
| **预期结果** | 两者均为 0 |
| **通过标准** | 两次读取均为 0 |
--- ---
### Phase 2: TCP Client ## 3. 阶段 2TCP ClientCH395F 主动发起连接)
| 项目 | 说明 | | 阶段 ID | TM-PHY-02 |
|------|------| |---------|-----------|
| 类型 | 需 PC 配合 | | **类型** | 需 PC 配合 |
| 耗时 | ~60 秒 | | **耗时** | ~60 秒 |
| 测试项 | TCP Client 连接、收发 64 字节、关闭重连 ×3 轮 | | **入口** | `ch395f_phase2_tests()``main.c USER CODE BEGIN 2` |
| 默认端口 | CH395F → PC:8081 | | **出口** | 串口 "Phase 2 Tests Complete" 且 0 失败 |
**操作** ### TC-NET-201: TCP Client 连接与数据交换
```
终端 1: python test/ch395f_socket_test.py tcp_server --port 8081 --timeout 180
终端 2: 编译烧录(只启用 ENABLE_PHASE2_TESTS
```
**通过标准**:串口显示 3 轮 `closed: sock=0x00`PC 显示 3 次连接且 PING echo 匹配。 | 字段 | 值 |
|------|-----|
| **ID** | TC-NET-201 |
| **优先级** | P0 |
| **类型** | 功能测试 |
| **标题** | CH395F TCP Client → PC TCP Server64 字节收发 |
| **前置条件** | PC: `python ch395f_socket_test.py tcp_server --port 8081` |
| **测试步骤** | 1. CH395F 开 Socket 0配置 TCP<br>2. 连接 PC:8081<br>3. 发 64 字节 → 收回显 → 比较 |
| **通过标准** | 64 字节收发一致,无超时 |
### TC-NET-202: TCP Client 关闭重连 ×3 轮
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-202 |
| **优先级** | P0 |
| **类型** | 功能测试 / 恢复测试 |
| **标题** | 关闭→重连循环 3 轮,每轮含数据交换 |
| **测试步骤** | 每轮:关 Socket 0 → 重开 → 重连 → 发 64B → 验证回显 |
| **通过标准** | 3/3 轮通过 |
| **覆盖原则** | DP-01open→connect→close→re-open→reconnect |
### TC-NET-203: TCP Client 连接超时
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-203 |
| **优先级** | P1 |
| **类型** | 负向测试 |
| **标题** | 目标端口无服务时连接超时 |
| **前置条件** | PC 未运行 TCP Server |
| **测试步骤** | 1. 开 Socket 0 → 尝试连接 192.168.1.2:8081<br>2. 等待 TIMEOUT<br>3. 关 Socket 0 |
| **通过标准** | TIMEOUT 检测到,无崩溃 |
| **覆盖原则** | DP-01 |
--- ---
### Phase 3: UDP Server Echo ## 4. 阶段 3UDP Server 回显
| 项目 | 说明 | | 阶段 ID | TM-PHY-03 |
|------|------| |---------|-----------|
| 类型 | 需 PC 配合 | | **类型** | 需 PC 配合 |
| 耗时 | ~30 秒 | | **耗时** | ~30 秒 |
| 测试项 | UDP Server 模式、8 字节头解析、30 轮 echo含 HELLO + PING + 大包) | | **入口** | `ch395f_phase3_tests()``main.c USER CODE BEGIN 2` |
| 默认端口 | CH395F:60000PC 发到 60000 | | **出口** | 串口 "Phase 3 Tests Complete" 且 0 失败 |
**操作** ### TC-NET-301: UDP 回显 — HELLO + PING + 大包 ×30
```
终端 1: 编译烧录(只启用 ENABLE_PHASE3_TESTS
终端 2: python test/ch395f_socket_test.py udp_client --ip 192.168.1.100 --port 60000 --timeout 30
```
**通过标准**PC 显示 30/30 回显匹配(含 HELLO ×1 + PING ×5 + 大包 ×20 + 其他)。 | 字段 | 值 |
|------|-----|
| **ID** | TC-NET-301 |
| **优先级** | P0 |
| **类型** | 功能测试 |
| **标题** | UDP Server 接收并回显 30 轮(含 HELLO、PING、1024B 大包) |
| **前置条件** | PC: `python ch395f_socket_test.py udp_client --ip 192.168.1.100 --port 60000` |
| **测试步骤** | 1. PC 发 HELLO → MCU 回显<br>2. PC 发 5×PING → MCU 回显<br>3. PC 发 10×1024B → MCU 回显<br>4. PC 发 14×混合大小 → MCU 回显 |
| **通过标准** | 30/30 回显匹配 100% |
| **覆盖原则** | DP-03 |
> **关键发现**CH395F UDP 分两种模式——DesIP=`255.255.255.255` 是 Server 模式(接受任意来源),否则只能收指定 IP:Port。每次 `write_send_buf` 后必须等 `SINT_STAT_SENDBUF_FREE`。 ### TC-NET-302: SENDBUF_FREE 等待合规
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-302 |
| **优先级** | P1 |
| **类型** | 合规测试 |
| **标题** | 每次 `write_send_buf` 后等待 `SENDBUF_FREE` |
| **前置条件** | TC-NET-301 运行中 |
| **测试步骤** | PC 连续发小包(<100ms 间隔) |
| **通过标准** | 30/30 成功,无丢包 |
| **覆盖原则** | DP-03 |
--- ---
### Phase 4: NET 层 TCP Echo ## 5. 阶段 4NET 层 TCP Echo(单连接基础)
| 项目 | 说明 | | 阶段 ID | TM-PHY-04 |
|------|------| |---------|-----------|
| 类型 | 需 PC 配合netTask 运行 | | **类型** | PC 配合netTask 运行 |
| 耗时 | 按需 | | **耗时** | 持续运行 |
| 测试项 | `net_recv()` + `net_send()` 非阻塞 echo | | **入口** | `ENABLE_PHASE4_TESTS`netTask 中循环调用 `ch395f_phase4_tests()` |
| 默认端口 | CH395F TCP Server:8080PC 连到 8080 | | **出口** | 用户终止 |
> ⚠️ 该测试在 FreeRTOS netTask 中运行,需等调度器启动(`osKernelStart`)后约 2 秒。 ### TC-NET-401: Socket 0 单连接生命周期
**操作** | 字段 | 值 |
``` |------|-----|
终端 1: 编译烧录(只启用 ENABLE_PHASE4_TESTS看到 "netTask: started" | **ID** | TC-NET-401 |
终端 2: python test/ch395f_socket_test.py tcp_client --ip 192.168.1.100 --port 8080 | **优先级** | P0 |
``` | **类型** | 功能测试 |
| **标题** | Socket 0: OPEN → TCP_LISTEN → ESTABLISHED单连接 |
| **前置条件** | 1. `net_init("192.168.1.100")` 成功<br>2. `net_listen(sock0)` 已调用<br>3. PC: `python ch395f_socket_test.py tcp_client --ip 192.168.1.100 --port 8080` |
| **测试步骤** | 1. PC 连接 8080<br>2. Socket 0 收到 CONNECT → ESTABLISHED<br>3. 发数据 → 回显 |
| **通过标准** | 仅 s0 状态变化;串口 `s0:int=0x08` → ESTABLISHED |
| **覆盖原则** | DP-01 |
**通过标准**10/10 回显匹配 + 大数据传输完整。 ### TC-NET-402: 64 字节小包回显
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-402 |
| **优先级** | P0 |
| **类型** | 功能测试 |
| **标题** | 10 轮 64B TCP 回显 |
| **测试步骤** | PC 发 10×64BMCU 回显 |
| **通过标准** | 10/10 匹配 |
### TC-NET-403: 1460 字节 MSS 回显
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-403 |
| **优先级** | P0 |
| **类型** | 边界测试 |
| **标题** | MSS 大小1460BTCP 回显 |
| **测试步骤** | PC 发 1460BMCU 回显 |
| **通过标准** | 1460B 完全匹配,无截断 |
### TC-NET-404: 4096 字节缓冲满回显
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-404 |
| **优先级** | P0 |
| **类型** | 边界测试 |
| **标题** | 填满 Socket 0 接收缓冲4096B回显 |
| **前置条件** | DMABUF=4100 可一次性读空 |
| **测试步骤** | PC 发 4096BMCU 经 DMA 一次性读取并回显 |
| **通过标准** | 4096B 完全匹配 |
| **覆盖原则** | DP-04 |
### TC-NET-405: 断开重连
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-405 |
| **优先级** | P0 |
| **类型** | 恢复测试 |
| **标题** | PC 断开后 Socket 0 自动重新监听并接受新连接 |
| **测试步骤** | 1. PC 断连 → s0 收 DISCONNECT → CLOSED → re-OPEN → LISTEN<br>2. PC 重连 → s0 → ESTABLISHED<br>3. 发 64B → 验证回显 |
| **通过标准** | 重连成功,回显正常 |
| **覆盖原则** | DP-01 |
### TC-NET-406: 超时恢复
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-406 |
| **优先级** | P1 |
| **类型** | 恢复测试 |
| **标题** | KeepAlive 超时后 Socket 0 自动重新监听 |
| **测试步骤** | 1. PC 断连后停止响应<br>2. 等待 KeepAlive 触发 TIMEOUT<br>3. s0 → CLOSED → re-OPEN → LISTEN<br>4. PC 重连 → 验证回显 |
| **通过标准** | 自动恢复,无需手动复位 |
| **覆盖原则** | DP-01 |
--- ---
### Phase 5: NET 层 UDP Echo ## 6. 阶段 5大文件传输20KB+
| 项目 | 说明 | | 阶段 ID | TM-PHY-05 |
|------|------| |---------|-----------|
| 类型 | 需 PC 配合netTask 运行 | | **类型** | PC 配合netTask 运行 |
| 耗时 | 按需 | | **耗时** | 取决于文件大小和速率 |
| 测试项 | `net_recvfrom()` + `net_sendto()` 非阻塞 echo | | **入口** | `ENABLE_PHASE5_TESTS` |
| 默认端口 | CH395F UDP:60000 | | **配置** | `PHASE5_FILE_SIZE`(默认 20480|
> ⚠️ 该测试在 FreeRTOS netTask 中运行,需等调度器启动后约 2 秒。 ### TC-NET-501: 20KB 分块传输
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-501 |
| **优先级** | P0 |
| **类型** | 功能测试 |
| **标题** | 20480 字节 TCP 分块收发(>Socket 0 硬件缓冲 4KB |
| **前置条件** | `net_send_locked` 支持自动分块(每块 ≤4096B |
| **测试步骤** | 1. MCU 填 20KB 递增模式数据<br>2. MCU 分块发送,每块 4096B<br>3. PC 回显<br>4. MCU 接收并逐字节验证 |
| **通过标准** | 20KB 完全匹配,每字节验证通过 |
| **覆盖原则** | DP-04 |
### TC-NET-502: 64KB 传输recv_len 上限)
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-502 |
| **优先级** | P1 |
| **类型** | 边界测试 |
| **标题** | 65535 字节传输(`recv_len` uint16 上限) |
| **前置条件** | TC-NET-501 通过 |
| **测试步骤** | 同 501文件大小 65535 |
| **通过标准** | 65535B 完全匹配 |
| **覆盖原则** | DP-04 |
### 实现说明
`ch395f_phase5_tests()` 状态机:
**操作**
``` ```
终端 1: 编译烧录(只启用 ENABLE_PHASE5_TESTS看到 "netTask: started" IDLE → (连接建立) → SENDING(分块发) → RECVING(分块收+验证) → DONE → IDLE
终端 2: python test/ch395f_socket_test.py udp_client --ip 192.168.1.100 --port 60000 --timeout 30
``` ```
**通过标准**PING 5/5 + 大包 10/10。 - 每次 `net_send_sock` 自动分块(`net_send_locked` 内按 `NET_DMA_MAX_PAYLOAD=4096` 拆分)
- 每次 `net_recv_sock` 通过 `ch395f_get_recv_len` 获取硬件缓冲可用数据量≤4096B一次性读空
- 验证模式递增字节offset & 0xFF接收端逐字节比较
--- ---
### Phase 6: DHCP ## 7. 阶段 6DHCP
| 项目 | 说明 | | 阶段 ID | TM-PHY-06 |
|------|------| |---------|-----------|
| 类型 | 需 PC 配合 | | **类型** | PC 配合Windows 需管理员权限) |
| 耗时 | ~15 秒 | | **耗时** | ~15 秒 |
| 测试项 | DHCP 自动获取 IP、HELLO echo 验证连通性 | | **入口** | `ENABLE_PHASE6_TESTS` |
| **注意** | **改变 CH395F IP**,必须独立运行 |
> ⚠️ **DHCP 会改变 CH395F IP** 必须独立运行,不能与其他 Phase 同时启用。 ### TC-NET-601: DHCP 完整握手
PC 运行内置 DHCP Server完整 DISCOVER → OFFER → REQUEST → ACK 握手,然后发送 HELLO 验证 UDP 连通性。 | 字段 | 值 |
|------|-----|
| **ID** | TC-NET-601 |
| **优先级** | P0 |
| **类型** | 功能测试 |
| **标题** | DISCOVER → OFFER → REQUEST → ACK |
| **前置条件** | PC: `python ch395f_socket_test.py dhcp_server ...`(管理员权限)|
| **测试步骤** | 1. CH395F 发 DISCOVER → PC 回 OFFER → CH395F 发 REQUEST → PC 回 ACK<br>2. CH395F 应用 IP 配置 |
| **通过标准** | DHCP SUCCESSIP != 0.0.0.0 |
| **覆盖原则** | DP-03 |
``` ### TC-NET-602: DHCP 后连通性验证
终端 1: python test/ch395f_socket_test.py dhcp_server --dhcp-iface 192.168.1.2 --ip 192.168.1.100 --dhcp-mask 255.255.255.0 --dhcp-gw 192.168.1.1
终端 2: 编译烧录(只启用 ENABLE_PHASE6_TESTS
```
**通过标准**PC 显示 `DHCP 分配完成!` + 连通性验证通过。 | 字段 | 值 |
|------|-----|
> **关键:** 需管理员权限Windows 绑定端口 67。xid 偏移为 `data[4:8]`。`--dhcp-iface` 为 PC 网卡 IP用于区分网卡 | **ID** | TC-NET-602 |
| **优先级** | P1 |
**通过标准**PC 显示 `收到 CH395F 广播宣告` + 3 轮 HELLO echo 成功率 100%。 | **类型** | 功能测试 |
| **标题** | DHCP 分配 IP 后广播宣告 + HELLO 回显 |
> **关键:** CH395F 每次 `write_send_buf` 后必须等 `SENDBUF_FREE` 中断,否则后续接收操作失败。 | **前置条件** | TC-NET-601 通过 |
| **测试步骤** | 1. CH395F 广播 HELLO含 IP<br>2. PC 收 HELLO<br>3. PC 发 3×HELLO 回显请求<br>4. CH395F 回显 |
| **通过标准** | 3/3 HELLO 回显 100% |
--- ---
### Phase 7: Select/Poll ## 8. 阶段 7Select/Poll I/O 多路复用(单连接)
| 项目 | 说明 | | 阶段 ID | TM-PHY-07 |
|------|------| |---------|-----------|
| 类型 | 需 PC 配合netTask 运行 | | **类型** | PC 配合netTask 运行 |
| 耗时 | 按需 | | **耗时** | 持续运行 |
| 测试项 | `net_select()` 多路复用检测可读 socket → echo | | **入口** | `ENABLE_PHASE7_TESTS` |
| 默认端口 | CH395F TCP Server:8080 |
> ⚠️ 该测试在 FreeRTOS netTask 中运行,需等调度器启动后约 2 秒。 ### TC-NET-701: net_select() 单 socket 就绪检测
**操作**:同 Phase 4TCP Client 连 8080 | 字段 | 值 |
|------|-----|
| **ID** | TC-NET-701 |
| **优先级** | P0 |
| **类型** | 功能测试 |
| **标题** | `net_select()` 在 Socket 0 数据到达时正确返回 |
| **前置条件** | Socket 0 ESTABLISHED |
| **测试步骤** | 1. PC 发送数据<br>2. `net_select(1, &readfds, ...)` → 返回 > 0<br>3. `NET_FD_ISSET(0, &readfds)` == true<br>4. `net_recv()``net_send()` 回显 |
| **通过标准** | 回显成功 |
| **覆盖原则** | DP-02select 内部调 net_poll |
**通过标准**:同 Phase 410/10 回显匹配)。 ### TC-NET-702: net_select() 超时
> Phase 4 和 Phase 7 功能相同但实现不同通常只启用一个。Phase 7 额外验证了 `NET_FD_SET/ISSET` 宏和 `net_select()`。 | 字段 | 值 |
|------|-----|
| **ID** | TC-NET-702 |
| **优先级** | P1 |
| **类型** | 负向测试 |
| **标题** | 100ms 超时内无数据则返回 0 |
| **前置条件** | Socket 0 ESTABLISHEDPC 静置 |
| **测试步骤** | `net_select(1, &readfds, ..., 100ms)` |
| **通过标准** | 返回值 == 0无崩溃 |
--- ---
### Phase 8: 多客户端并发 ## 9. 阶段 8边界条件测试
| 项目 | 说明 | | 阶段 ID | TM-PHY-08 |
|------|------| |---------|-----------|
| 类型 | 需 PC 配合,主循环运行 | | **类型** | PC 配合netTask 运行 |
| 耗时 | ~2 秒 | | **耗时** | 按需 |
| 测试项 | 7 个 TCP 客户端并发,每客户端 10 轮 PING echo | | **入口** | `ENABLE_PHASE8_TESTS` |
| 默认端口 | CH395F TCP Server:8080 |
**操作** ### TC-NET-801: DMA 边界 14095 字节)
```
终端 1: 编译烧录(启用 ENABLE_PHASE4_TESTS 或 ENABLE_PHASE7_TESTS
终端 2: python test/ch395f_socket_test.py stress --ip 192.168.1.100 --port 8080 --count 10 --timeout 30
```
**通过标准**7 并发 × 10 轮 = 70/70 成功率 100%。 | 字段 | 值 |
|------|-----|
| **ID** | TC-NET-801 |
| **优先级** | P0 |
| **类型** | 边界测试 |
| **标题** | 发送 4095 字节SPI 最大载荷 1单次 DMA 可容纳) |
| **前置条件** | Socket 0 ESTABLISHED |
| **测试步骤** | MCU 生成 4095B 递增模式数据 → `net_send_sock(sk, data, 4095)` → 等待 PC 回显 → 验证 |
| **通过标准** | 4095B 完全匹配 |
| **覆盖原则** | DP-04 |
> **关键陷阱**`net_listen()` 中数据 Socket 1~7 的配置必须在监听 Socket 0 的 `OPEN + TCP_LISTEN` **之前**完成。CH395F 在 `TCP_LISTEN` 时刻一次性扫描可用 Socket若颠倒顺序则 Socket 4~7 不被识别,最多只接受 3 个并发连接。详见 `docs/CH395F_Trap_Records.md → Trap 01`。 ### TC-NET-802: DMA 边界4096 字节)
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-802 |
| **优先级** | P0 |
| **类型** | 边界测试 |
| **标题** | 发送 4096 字节(等于 SPI 最大载荷,填满单次 DMA |
| **测试步骤** | MCU 发 4096B → 等待回显 → 验证 |
| **通过标准** | 4096B 完全匹配 |
| **覆盖原则** | DP-04 |
### TC-NET-803: DMA 边界 +14097 字节)
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-803 |
| **优先级** | P0 |
| **类型** | 边界测试 |
| **标题** | 发送 4097 字节(超过 SPI 最大载荷,自动拆两次 DMA4096+1 |
| **测试步骤** | MCU 发 4097B → `net_send_locked` 自动拆 4096+1 → 等待回显 → 验证 |
| **通过标准** | 4097B 完全匹配,两次 DMA 无缝衔接 |
| **覆盖原则** | DP-04 |
### TC-NET-804: 零长度收发
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-804 |
| **优先级** | P1 |
| **类型** | 负向测试 |
| **标题** | `net_send_sock(sk, buf, 0)` 返回 1 |
| **测试步骤** | `net_send_sock(sk, s_phase8_tx, 0)` |
| **通过标准** | 返回 < 0无崩溃 |
### TC-NET-805: 连续快速发送 20 小包
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-805 |
| **优先级** | P1 |
| **类型** | 压力测试 |
| **标题** | 20 × 100 字节连续快速发送(验证 SENDBUF_FREE 等待机制) |
| **测试步骤** | 循环 20 次:`net_send_sock(sk, buf, 100)`,间隔 1ms |
| **通过标准** | 20/20 成功,回显 2000B 完全匹配 |
### TC-NET-806: 快速连接-断开 ×20 轮
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-806 |
| **优先级** | P1 |
| **类型** | 稳定性测试 |
| **标题** | 20 次快速连接-断开循环 |
| **测试步骤** | PC 连 8080 → 立即断开 → 等 s0 恢复 LISTEN → 重复 20 次 |
| **通过标准** | 20/20 不卡死s0 始终回到 LISTEN |
--- ---
## 3. Python 脚本参考 ## 10. 阶段 9PHY 链路恢复
| 命令 | 说明 | | 阶段 ID | TM-PHY-09 |
|------|------| |---------|-----------|
| `tcp_server --port 8081` | PC 作 TCP Server测试 CH395F TCP Client | | **类型** | 需物理拔插网线 |
| `tcp_client --ip x.x.x.x --port 8080` | PC 作 TCP Client测试 CH395F TCP Server echo | | **耗时** | ~45 秒 |
| `udp_client --ip x.x.x.x --port 60000 --timeout 30` | PC 发 UDP PING测试 CH395F UDP echo | | **入口** | `ENABLE_PHASE9_TESTS` |
| `udp_server --port 8082 --timeout 60` | PC 作 UDP Server接收 CH395F 数据 |
| `stress --ip x.x.x.x --port 8080 --count 10` | 7 并发压力测试 |
| `dhcp_server --dhcp-iface IP --dhcp-mask MASK --dhcp-gw GW` | 内置 DHCP Server完整握手 + 连通性验证(需管理员权限) |
通用参数: ### TC-NET-901: PHY 断开检测
通用参数:
- `--ip`:目标 IP默认 192.168.1.100 | 字段 | 值 |
- `--port`:端口(各模式默认不同) |------|-----|
- `--count`:测试次数(默认 10 | **ID** | TC-NET-901 |
- `--timeout`:超时秒数(默认 30 | **优先级** | P1 |
- `--size`:数据包大小(默认 1024 | **类型** | 恢复测试 |
| **标题** | 拔网线后 `net_poll` 检测到 PHY_CHANGE + DISCONN |
| **测试步骤** | 拔网线 → 等 `net_poll` 检测 `CH395F_GINT_STAT_PHY_CHANGE` → 读 PHY = DISCONN |
| **通过标准** | 15 秒内串口 "PHY disconnect detected" |
| **覆盖原则** | DP-02, DP-05 |
### TC-NET-902: PHY 重连 + Socket 恢复
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-902 |
| **优先级** | P1 |
| **类型** | 恢复测试 |
| **标题** | 插回网线后 Socket 0 自动监听,新连接正常 |
| **前置条件** | TC-NET-901 通过(已拔线) |
| **测试步骤** | 1. 插网线 → 等 PHY_CHANGE → 链路恢复<br>2. s0 re-OPEN → LISTEN<br>3. PC 连接 → 64B 回显 |
| **通过标准** | 30 秒内回显成功,无需手动复位 |
| **覆盖原则** | DP-01, DP-05 |
--- ---
## 4. 常见问题 ## 11. 阶段 10KeepAlive 超时断开
| 问题 | 原因 | 解决 | | 阶段 ID | TM-PHY-10 |
|---------|-----------|
| **类型** | PC 配合netTask 运行 |
| **耗时** | ~65 秒60s idle + 15s probes |
| **入口** | `ENABLE_PHASE10_TESTS` |
| **配置** | KeepAlive 空闲 60s探测间隔 5s3 次 |
### TC-NET-1001: KeepAlive 触发断开
| 字段 | 值 |
|------|-----|
| **ID** | TC-NET-1001 |
| **优先级** | P1 |
| **类型** | 功能测试 |
| **标题** | TCP 连接空闲超过 KeepAlive 阈值后自动断开 |
| **前置条件** | 1. `ch395f_set_keepalive_idle(60000)`<br>2. `ch395f_set_keepalive_intvl(5000)`<br>3. `ch395f_set_keepalive_cnt(3)`<br>4. PC 连接后静置(不发数据) |
| **测试步骤** | 1. PC 连接 8080不发数据<br>2. 等待 KeepAlive 探测60s idle + 3×5s = 75s 最大)<br>3. CH395F 接收 TIMEOUT → s0 → CLOSED → LISTEN |
| **通过标准** | 超时时间 ≥ 60ss0 回到 LISTEN |
---
## 12. Python 测试脚本参考
| 命令 | 模式 | 说明 |
|------|------|------| |------|------|------|
| Phase 2 `open_socket: 0x20 (FAIL)` | socket 未完全关闭 | 已修复:先 closeRST不等 disconnect | | `tcp_server --port 8081` | PC 作 TCP Server | 测试 TCP Client阶段 2 |
| Phase 2 收到 `\x00(\x00\x00...` 乱码 | socket 7`NET_MAX_SOCKETS-1`)默认无发送缓冲 | 在 `open_socket` 前调用 `set_send_buf(sock, 28, 2)` 分配 | | `tcp_client --ip ... --port 8080` | PC 作 TCP Client | 测试 TCP Echo阶段 4/7/8 |
| Phase 3 UDP 收不到数据 | DesIP 设为具体 IP 而非 255.255.255.255 | 设 DesIP=`0xFFFFFFFF` 进入 Server 模式 | | `tcp_file --ip ... --port 8080 --size 20480` | PC 作文件接收 | 测试大文件传输(阶段 5 |
| Phase 3 HELLO 收到但 PING 收不到 | 没等 `SENDBUF_FREE` 就第二次写 | 每次 `write_send_buf` 后轮询 `SINT_STAT_SENDBUF_FREE` | | `udp_client --ip ... --port 60000` | PC 作 UDP Client | 测试 UDP Echo阶段 3 |
| Python 报 `WinError 10054` | STM32 还没启动 | 等串口看到阶段启动信息再跑 Python | | `udp_server --port 8082` | PC 作 UDP Server | 接收 CH395F UDP 数据 |
| Phase 5 UDP 不工作 | NET 层 `net_bind()` 没打开 CH395F Socket | 已修复:`net_bind()` 对 DGRAM 类型自动打开 | | `stress --ip ... --port 8080 --count 10` | 压力测试 | 7 并发 × 10 轮 |
| `net_recvfrom()` 源地址错误 | UDP 头解析偏移错了 | 已修复:端口读 `header[2-3]`IP 读 `header[4-7]` | | `dhcp_server ...` | DHCP Server | 内置 DHCP阶段 6需管理员权限 |
| Phase 8 Socket 4~7 分配不到 | 数据 Socket 配置在 `TCP_LISTEN` 之后CH395F 在 listen 时扫描) | 先配数据 Socket 1~7 的缓冲/端口/协议,再配监听 Socket 0 |
### 通用参数
| 参数 | 默认值 | 说明 |
|------|--------|------|
| `--ip` | 192.168.1.100 | 目标 IP |
| `--port` | 因模式而异 | 端口 |
| `--count` | 10 | 测试次数 |
| `--timeout` | 30 | 超时秒数 |
| `--size` | 1024 | 包大小 |
--- ---
## 5. 陷阱记录 ## 13. 已知陷阱
详细陷阱记录(含根因分析、解决方案、发现时间)见 `docs/CH395F_Trap_Records.md` | ID | 陷阱 | 现象 | 修复 |
|----|------|------|------|
| TRAP-01 | ~~多连接初始化顺序~~ | 已废弃(单连接模式) | — |
| TRAP-02 | ~~数据 socket 缓冲重叠~~ | 已废弃(单连接模式) | — |
| TRAP-03 | DHCP xid 偏移错误 | DHCP 握手失败 | xid 在 `data[4:8]` |
| TRAP-04 | UDP 无 SENDBUF_FREE 等待 | 后续接收挂起 | 每次 write 后等 SENDBUF_FREE |
| TRAP-05 | PHY 不兼容 RTL8305NBI | 链路抖动 | `ch395f_set_phy(0x08)` 强制 100M_FULL |
| TRAP-06 | KeepAlive 非 500ms 倍数 | 参数不生效 | 必须 500ms 倍数 |
| TRAP-07 | TCP 误用 disconnect | 卡 FIN_WAIT_2 | 用 `close_socket`(RST) 非 `disconnect` |
| TRAP-08 | RECV 电平中断无限循环 | netTask 饿死 | `net_poll` 每次只一批,数据在应用中读 |
| TRAP-09 | PHY 刚建立 link 立即 open | 首次连接失败 | 启动延时 + 重试 |
| TRAP-10 | 消息队列值拷贝丢失 | API 返回旧值 | 改用 `xTaskNotify` |
| TRAP-11 | `net_accept_locked` 拒 ESTABLISHED | FTP PASV 失败 | 允许 ESTABLISHED |
| TRAP-12 | FatFS 不接受 `/` 前缀 | FTP 路径解析失败 | `to_fatfs_path()` 剥离 |
| **TRAP-13** | **`recv_len` 分批读取归零** | **大包截断** | **DMA 缓冲增至 4100一次读空 ✅ 已修复** |
| **TRAP-14** | **`NET_SEND_BUF_SIZE` > DMA 限制** | **>1496B 发送静默失败** | **`net_send_locked``NET_DMA_MAX_PAYLOAD` 分块 ✅ 已修复** |
| # | 陷阱 | 对应文件 | ---
|---|------|----------|
| 01 | Socket 4~7 自动分配不到(初始化顺序) | `net_socket.c``net_listen()` | ## 附录 A通过/失败汇总
| 02 | 数据 Socket 缓冲区重叠 | `net_socket.c``net_listen()` |
| 03 | DHCP 包 xid 偏移错误 | `test/ch395f_socket_test.py` | | 阶段 | TC ID | 优先级 | 类型 | 状态 |
| 04 | UDP 发送未等待 SENDBUF_FREE | `ch395f.c` / `ch395f_test.c` | |------|-------|--------|------|------|
| 05 | CH395F 与 RTL8305NBI 自动协商不兼容 | `ch395f.c` | | TM-PHY-01 | TC-NET-101 | P0 | 功能测试 | ✅ |
| 06 | TCP KeepAlive 参数非 500ms 倍数 | `net_socket.c``net_init()` | | TM-PHY-01 | TC-NET-102 | P1 | 功能测试 | ✅ |
| 07 | TCP 关闭误用 disconnect 导致 FIN_WAIT_2 | `ch395f.c` | | TM-PHY-02 | TC-NET-201 | P0 | 功能测试 | ✅ |
| 08 | RECV 中断电平触发无限循环 | `net_socket.c``net_poll()` | | TM-PHY-02 | TC-NET-202 | P0 | 恢复测试 | ✅ |
| TM-PHY-02 | TC-NET-203 | P1 | 负向测试 | ✅ |
| TM-PHY-03 | TC-NET-301 | P0 | 功能测试 | ✅ |
| TM-PHY-03 | TC-NET-302 | P1 | 合规测试 | ✅ |
| TM-PHY-04 | TC-NET-401 | P0 | 功能测试 | 🟡 |
| TM-PHY-04 | TC-NET-402 | P0 | 功能测试 | 🟡 |
| TM-PHY-04 | TC-NET-403 | P0 | 边界测试 | 🟡 |
| TM-PHY-04 | TC-NET-404 | P0 | 边界测试 | 🟡 |
| TM-PHY-04 | TC-NET-405 | P0 | 恢复测试 | 🟡 |
| TM-PHY-04 | TC-NET-406 | P1 | 恢复测试 | 🟡 |
| TM-PHY-05 | TC-NET-501 | P0 | 功能测试 | 🟡 |
| TM-PHY-05 | TC-NET-502 | P1 | 边界测试 | 🟡 |
| TM-PHY-06 | TC-NET-601 | P0 | 功能测试 | ✅ |
| TM-PHY-06 | TC-NET-602 | P1 | 功能测试 | ✅ |
| TM-PHY-07 | TC-NET-701 | P0 | 功能测试 | 🟡 |
| TM-PHY-07 | TC-NET-702 | P1 | 负向测试 | 🟡 |
| TM-PHY-08 | TC-NET-801 | P0 | 边界测试 | 🟡 |
| TM-PHY-08 | TC-NET-802 | P0 | 边界测试 | 🟡 |
| TM-PHY-08 | TC-NET-803 | P0 | 边界测试 | 🟡 |
| TM-PHY-08 | TC-NET-804 | P1 | 负向测试 | 🟡 |
| TM-PHY-08 | TC-NET-805 | P1 | 压力测试 | 🟡 |
| TM-PHY-08 | TC-NET-806 | P1 | 稳定性测试 | 🟡 |
| TM-PHY-09 | TC-NET-901 | P1 | 恢复测试 | ✅ |
| TM-PHY-09 | TC-NET-902 | P1 | 恢复测试 | ✅ |
| TM-PHY-10 | TC-NET-1001 | P1 | 功能测试 | 🟡 |
✅ = 已实现并验证 | 🟡 = 已实现待验证 | 🟠 = 待实现
## 附录 B设计原则覆盖
| 原则 | 覆盖用例 |
|------|----------|
| DP-01单 socket 生命周期 | TC-NET-202, 203, 401, 405, 406, 806, 902 |
| DP-02中断集中处理 | TC-NET-101, 102, 701, 901 |
| DP-03消息队列线程安全 | TC-NET-301, 302, 601 |
| DP-04DMA 边界安全 | TC-NET-403, 404, 501, 502, 801, 802, 803, 804, 805 |
| DP-05PHY 链路恢复 | TC-NET-901, 902 |
## 附录 CCH395F 边界条件速查
| 操作 | 大小 | 行为 |
|------|------|------|
| `net_send(buf, ≤1496)` | 1~1496B | 单次 DMA 事务(旧 DMABUF=1500 时完全容纳) |
| `net_send(buf, 1497~4096)` | 1497~4096B | 旧代码**静默失败**;现 DMABUF=4100 **一次 DMA 容纳** |
| `net_send(buf, 4097~65535)` | >4096B | `net_send_locked` **自动分块**,每块 4096B |
| `net_send(buf, 0)` | 0 | 返回 `-1``NET_ERR_INVAL` |
| `ch395f_get_recv_len()` | 0~65535 | 返回 CH395F 硬件缓冲当前可用数据量 |
| `ch395f_read_recv_buf(buf, 4096)` | 4096B | 一次性读空 Socket 0 整个接收缓冲 |
| `ch395f_read_recv_buf(buf, 100)` | 100B | ⚠️ `recv_len` 之后**归零**,剩余数据**丢失** |

View File

@@ -367,3 +367,31 @@ static const char *to_fatfs_path(const char *path) {
| 8 | `ftpTask` 启动时 PHY 未稳定 | Trap 09 子类 | `freertos.c: osDelay(7000)` | | 8 | `ftpTask` 启动时 PHY 未稳定 | Trap 09 子类 | `freertos.c: osDelay(7000)` |
| 9 | 会话结束后立即重建监听失败 | Trap 09 子类 | `lftpd.c: vTaskDelay(200ms)` | | 9 | 会话结束后立即重建监听失败 | Trap 09 子类 | `lftpd.c: vTaskDelay(200ms)` |
| 10 | `s_file_open` 单文件限制 | 已知限制 | `lftpd_io.c` (全局变量) | | 10 | `s_file_open` 单文件限制 | 已知限制 | `lftpd_io.c` (全局变量) |
| 11 | CH395F DMA buffer 太小,分批读导致 recv_len 归零 | Trap 13 | `ch395f.c + lftpd.c` |
| 12 | `malloc` 嵌入式环境失败 | Trap 13 子类 | `lftpd.c: static buffer` |
| 13 | `net_listen_locked` 缓冲区覆盖s0/s1 争用 block 0-3 | Trap 02 翻版 | `net_socket.c: 单连接用默认 buf` |
| 14 | CH395F TIMEOUT 立即触发(数据连接无数据) | Trap 09 子类 | `net_socket.c: CLOSED 状态处理` |
| 15 | `NET_RECV_TIMEOUT_MS=5s` 控制通道超时断开 | 配置 | `net_config.h: 30000` |
| 16 | `receive_file` 0 bytes 当作成功 | 逻辑 | `lftpd.c: total==0 则失败` |
| 17 | MobaXterm 连数据端口不发数据(客户端特殊行为) | 外部 | Python 抓包确认,超时恢复 |
---
## Trap 13CH395F `recv_len` 分批读取时归零
### 现象
MobaXterm 上传文件时 CH395F 收到数据(`s1 int=0x04` RECV_OK 持续触发),但 `ch395f_get_recv_len(1)` 第一次返回 2920读 1024 字节后第二次永远返回 0。`GINT=0x0020` 反复触发但无数据可读——死循环。
### 根因
`ch395f_read_recv_buf` 读部分数据后CH395F 的 `recv_len` 寄存器**被重置为 0**(非递减)。缓冲区中剩余的 1896 字节仍然存在RECV_OK 标志为真),但 `ch395f_get_recv_len` 报告 0。
同时 `CH395F_DMA_BUF_SIZE=1500`header 4 + max 1496 data无法一次读取完整的 4096 字节 CH395F 接收缓冲区。
### 解决方案
1. `CH395F_DMA_BUF_SIZE` 从 1500 增大到 4100支持一次读 4096 字节 header+data
2. `receive_file` 缓冲区从 1024 增大到 4096一次性读空 CH395F 接收缓冲区
3. 不能使用 `malloc`(嵌入式堆可能不可用),改用 `static unsigned char s_recv_buf[4096]`
### 注意事项
- CH395F 接收缓冲区默认 socket 0: 4096B, socket 1: 4096B。读空后客户端继续发数据recv_len 重新递增——正常
- 清理中断状态后 `handle_timeout_event` 中的 `ch395f_close_socket` 必须显式调用,确保下次 `open_socket` 成功

View File

@@ -0,0 +1,221 @@
# 测试文档模板规范
本文档定义本项目中测试文档的统一模板和编写规范确保各模块CH395F、GD5F2GQ5UE、TPAFE5160 等)的测试文档格式一致、可追溯。
---
## 1. 文档结构
每份测试文档包含以下章节:
```
# [模块名] 测试规范
## 1. 概述
- 测试范围
- 设计原则覆盖表DP-xx → 描述 → 验证用例)
- 测试环境(拓扑、工具链、硬件版本)
- 启用测试的方法
## 2~N. 阶段 x[阶段名]
- 阶段元信息表:阶段 ID、类型、耗时、入口、出口
- TC-NET-xxx: 测试用例(完整表格)
## N+1. 脚本参考(如有 PC 端工具)
## N+2. 已知陷阱与故障模式(引用 Traps 文档)
## 附录 A通过/失败汇总矩阵
## 附录 B测试覆盖 vs 设计原则
```
---
## 2. 阶段元信息表
每个阶段以表格开头,描述阶段的整体属性:
| 字段名 | 填写说明 |
|--------|----------|
| **阶段 ID** | `TM-模块缩写-两位数序号`,如 TM-PHY-01、TM-NAND-01 |
| **类型** | 独立运行 / 需 PC 配合 / 需物理操作 / 在 xxTask 中运行 |
| **耗时** | 预估执行时间 |
| **入口** | 代码入口函数或宏定义 |
| **出口** | 阶段结束标志(如串口输出内容) |
---
## 3. 测试用例表格模板
每个测试用例使用统一表格格式:
```
### TC-模块缩写-序号: 用例标题
| 字段 | 值 |
|------|-----|
| **ID** | TC-XXX-NNN全局唯一 |
| **优先级** | P0 / P1 |
| **类型** | 见下文 3.1 |
| **标题** | 一句话描述测试什么 |
| **前置条件** | 测试执行前必须满足的条件(编号列表) |
| **测试步骤** | 操作步骤(编号列表,动作具体到 API 或操作) |
| **预期结果** | 系统应表现的行为 |
| **通过标准** | 可量化的判定条件 |
| **覆盖原则** | DP-xx可选关联设计原则 |
```
### 3.1 类型枚举
| 类型 | 说明 | 适用场景 |
|------|------|----------|
| 功能测试 | 验证某项功能是否符合预期 | 正常的收发、初始化、配置等 |
| 负向测试 | 验证系统对非法/异常输入的处理 | 超时、断开、无效参数等 |
| 边界测试 | 验证系统在边界条件的表现 | 最大包长、最小超时、满队列等 |
| 压力测试 | 验证系统在高负载下的稳定性 | 多客户端、高频请求、长时运行等 |
| 恢复测试 | 验证系统从故障中恢复的能力 | 断线重连、PHY 重连、复位恢复等 |
| 合规测试 | 验证实现是否符合特定约束 | 中断处理位置、等待顺序、字节序等 |
| 稳定性测试 | 验证系统长时间运行的可靠性 | 长时间压力、反复循环等 |
### 3.2 优先级定义
| 优先级 | 定义 |
|--------|------|
| **P0** | 核心功能,必须通过。阻塞后续测试或影响系统基本可用性 |
| **P1** | 重要功能,建议通过。失败表明潜在缺陷但不阻塞基本功能 |
---
## 4. 命名规则
### 4.1 阶段 ID
```
TM-{MOD}-{NN}
```
- `TM` — Test Module
- `{MOD}` — 模块缩写(大写)
- `PHY` — CH395F 网络
- `NAND` — GD5F2GQ5UE NAND Flash
- `ADC` — TPAFE5160 ADC
- `RTC` — SD2506 RTC
- `RS485` — RS-485 通信
- `{NN}` — 两位序号,从 01 开始
示例:`TM-PHY-01`, `TM-NAND-03`
### 4.2 测试用例 ID
```
TC-{MOD}-{NNN}
```
- `TC` — Test Case
- `{MOD}` — 模块缩写(同上)
- `{NNN}` — 三位序号,从 001 开始
示例:`TC-PHY-101`, `TC-NAND-201`
### 4.3 设计原则 ID
```
DP-{NN}
```
- `DP` — Design Principle
- `{NN}` — 两位序号,从 01 开始
示例:`DP-01`, `DP-02`
---
## 5. 编写规范
### 5.1 表格格式
- 使用 GFM (GitHub Flavored Markdown) 表格
- 首列为字段名,加粗(`**字段**`
- 第二列为值,左对齐
- 多行内容使用 `<br>` 换行(保持表格可读性)
### 5.2 测试步骤与前置条件
- 使用有序列表(`1. 2. 3.`
- 每个步骤是一个完整的可执行动作
- 包含具体 API 名或操作名(如 `net_recv()``ch395f_open_socket()`
- 前置条件写明硬件状态、PC 端命令、代码配置等
### 5.3 语言
- 中文书写(技术标识保留英文)
- 保持客观、精确、可验证
- 避免模糊表述(如 "应该能正常工作" → "回显内容与发送完全一致"
### 5.4 通过标准
- 必须可量化验证
- 好的示例:`70/70 成功率100%``串口显示 "PHY_CHANGE: 0x01"``10/10 回显匹配`
- 差的示例:`功能正常``系统稳定`
### 5.5 引用
- 引用函数、宏、文件名使用反引号(`` `net_poll()` ``
- 引用其他文档使用相对路径:`docs/CH395F_Trap_Records.md`
---
## 6. 快速参考
### 6.1 新模块测试文档模板
```markdown
# [模块名] 测试规范
## 1. 概述
### 设计原则覆盖
| 原则 | 描述 | 验证用例 |
|------|------|----------|
| DP-01 | ... | TC-XXX-xxx |
### 测试环境
```
[硬件拓扑]
```
## 2. 阶段 1[阶段名]
| 阶段 ID | TM-XXX-01 |
|---------|------------|
| **类型** | ... |
| **耗时** | ... |
| **入口** | ... |
### TC-XXX-001: 用例标题
| 字段 | 值 |
|------|-----|
| **ID** | TC-XXX-001 |
| **优先级** | P0 |
| **类型** | 功能测试 |
| **标题** | ... |
| **前置条件** | 1. ...<br>2. ... |
| **测试步骤** | 1. ... |
| **预期结果** | ... |
| **通过标准** | ... |
```
### 6.2 附录模板
```markdown
## 附录 A通过/失败汇总矩阵
| 阶段 | TC ID | 优先级 | 类型 | 状态 |
|------|-------|--------|------|------|
## 附录 B测试覆盖 vs 设计原则
| 原则 | 覆盖用例 |
|------|----------|
```

193
test/ftp_speed_test.py Normal file
View File

@@ -0,0 +1,193 @@
#!/usr/bin/env python3
"""
FTP 速度测试 — 上传/下载大文件,测量传输速度
用法python ftp_speed_test.py --host 192.168.1.100 [--size 512] [--port 21]
"""
import socket
import sys
import time
import re
import argparse
import os
HOST = "192.168.1.100"
PORT = 21
FILE_SIZE_KB = 512 # 默认 512KB 测试文件
def log(msg, *args):
print(f" {msg % args if args else msg}")
def recv_line(sock, timeout=60.0):
data = b""
sock.settimeout(timeout)
while True:
try:
ch = sock.recv(1)
except socket.timeout:
return None
if not ch:
return data if data else None
data += ch
if data.endswith(b"\r\n"):
return data
def send_cmd(sock, cmd):
sock.sendall((cmd + "\r\n").encode())
time.sleep(0.1)
return recv_line(sock)
def parse_pasv(resp):
m = re.search(r"(\d+),(\d+),(\d+),(\d+),(\d+),(\d+)", resp.decode())
if m:
a, b, c, d, e, f = [int(x) for x in m.groups()]
return f"{a}.{b}.{c}.{d}", e * 256 + f
return None, None
def test_speed(host, port, size_kb):
total_bytes = size_kb * 1024
test_data = os.urandom(total_bytes)
test_name = "SPEEDTST.DAT" # 8.3 format
print(f"\n=== FTP Speed Test: {host}:{port}, {size_kb}KB file ===")
print(f" Test data: {total_bytes:,} bytes generated\n")
# ---- Upload ----
print("[UPLOAD] Connecting...")
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.settimeout(60.0)
sock.connect((host, port))
recv_line(sock) # 220
send_cmd(sock, "USER anonymous")
send_cmd(sock, "PASS test@test.com")
send_cmd(sock, "TYPE I")
# PASV
resp = send_cmd(sock, "PASV")
if not resp:
print(" PASV failed"); sock.close(); return
pasv_ip, pasv_port = parse_pasv(resp)
if pasv_port is None:
print(f" PASV parse failed: {resp.decode()}"); sock.close(); return
# Connect data channel
data = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
data.settimeout(60.0)
data.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) # 关 Nagle防 FIN 跑在数据前面
try:
data.connect((pasv_ip, pasv_port))
except Exception as e:
print(f" Data connect failed: {e}"); sock.close(); return
# STOR - measure from STOR send to 226 response
t0 = time.time()
send_cmd(sock, f"STOR {test_name}")
# Send all data at once (sendall handles partial sends)
data.sendall(test_data)
data.shutdown(socket.SHUT_WR)
data.close()
# Wait for response from server (data received + written to disk)
resp = recv_line(sock, timeout=120.0)
t1 = time.time()
upload_time = t1 - t0
upload_speed = total_bytes / upload_time / 1024 if upload_time > 0 else 0
# Read STOR response
resp = recv_line(sock)
stor_code = resp[:3].decode() if resp else "???"
print(f" Sent: {sent:,} / {total_bytes:,} bytes")
print(f" Time: {upload_time:.1f}s")
print(f" Speed: {upload_speed:.1f} KB/s")
print(f" Response: {resp.decode().rstrip() if resp else 'NONE'}")
if stor_code != "226":
print(f" UPLOAD FAILED (code={stor_code}), skipping download")
send_cmd(sock, "QUIT")
sock.close()
return
# ---- Download ----
time.sleep(3.0)
resp = send_cmd(sock, "PASV")
if not resp:
print(" PASV failed"); sock.close(); return
pasv_ip, pasv_port = parse_pasv(resp)
if pasv_port is None:
print(f" PASV parse failed"); sock.close(); return
data = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
data.settimeout(60.0)
try:
data.connect((pasv_ip, pasv_port))
except Exception as e:
print(f" Data connect failed: {e}"); sock.close(); return
t0 = time.time()
send_cmd(sock, f"RETR {test_name}")
dl_data = b""
while True:
try:
chunk = data.recv(8192)
if not chunk:
break
dl_data += chunk
except socket.timeout:
break
data.close()
resp = recv_line(sock, timeout=120.0)
t1 = time.time()
download_time = t1 - t0
download_speed = len(dl_data) / download_time / 1024 if download_time > 0 else 0
resp = recv_line(sock)
retr_code = resp[:3].decode() if resp else "???"
print(f"\n[DOWNLOAD]")
print(f" Received: {len(dl_data):,} / {total_bytes:,} bytes")
print(f" Time: {download_time:.1f}s")
print(f" Speed: {download_speed:.1f} KB/s")
print(f" Response: {resp.decode().rstrip() if resp else 'NONE'}")
# Compare
print(f"\n[VERIFY]")
if len(dl_data) == total_bytes and dl_data == test_data:
print(f" *** MATCH! {total_bytes:,} bytes identical. ***")
else:
print(f" MISMATCH: sent={total_bytes}, got={len(dl_data)}")
if len(dl_data) != total_bytes:
print(f" Size mismatch!")
else:
for i in range(total_bytes):
if dl_data[i] != test_data[i]:
print(f" First diff at byte {i}")
break
# Cleanup
send_cmd(sock, f"DELE {test_name}")
send_cmd(sock, "QUIT")
sock.close()
print(f"\n=== Summary ===")
print(f" File size: {total_bytes:,} bytes ({size_kb} KB)")
print(f" Upload: {upload_speed:.1f} KB/s ({upload_time:.1f}s)")
print(f" Download: {download_speed:.1f} KB/s ({download_time:.1f}s)")
def main():
parser = argparse.ArgumentParser(description="FTP Speed Test")
parser.add_argument("--host", default=HOST)
parser.add_argument("--port", type=int, default=PORT)
parser.add_argument("--size", type=int, default=FILE_SIZE_KB,
help=f"File size in KB (default {FILE_SIZE_KB})")
args = parser.parse_args()
test_speed(args.host, args.port, args.size)
if __name__ == "__main__":
main()