LwIP 2.2.1在STM32F407VET6平台 移植

This commit is contained in:
冯佳
2026-01-29 17:26:04 +08:00
parent ffd33c4644
commit e7e10a8328
2207 changed files with 409723 additions and 165 deletions

58
ThirdParty/lwip-2.2.1/port/arch/cc.h vendored Normal file
View File

@ -0,0 +1,58 @@
/*
* cc.h - STM32F407VET6 平台的 LwIP 架构特定配置文件
*/
#ifndef __ARCH_CC_H__
#define __ARCH_CC_H__
/* 包含标准库头文件 */
#include <stdio.h>
/* 包含错误码定义 */
#include "errno.h"
/* 使用系统提供的struct timeval定义 */
#define LWIP_TIMEVAL_PRIVATE 0
#include <sys/time.h>
/* ---------- 编译器配置 ---------- */
/* 内联函数 */
#define LWIP_INLINE inline
/* 打包结构体 */
#define PACK_STRUCT_BEGIN
#define PACK_STRUCT_STRUCT
#define PACK_STRUCT_END
#define PACK_STRUCT_FIELD(x) x
#define PACK_STRUCT_USE_INCLUDES
/* 编译器特定的属性 */
#define LWIP_UNUSED(x) (void)(x)
/* ---------- 调试配置 ---------- */
/* 调试输出函数 */
#define LWIP_PLATFORM_DIAG(x) printf x
/* 平台断言函数 */
#define LWIP_PLATFORM_ASSERT(msg) \
do { \
printf("Assertion failed at %s:%d: %s\n", __FILE__, __LINE__, msg); \
while (1); \
} while (0)
/* ---------- 编译器屏障 ---------- */
/* 编译器屏障指令 */
#define LWIP_COMPILER_BARRIER() __asm__ volatile ("" ::: "memory")
/* ---------- 优化配置 ---------- */
/* 启用内联函数 */
#define LWIP_NO_INLINE 0
/* 启用快速内存分配 */
#define MEM_ALIGNMENT 4
#endif /* __ARCH_CC_H__ */