refactor(build): 更新项目配置和链接器设置 - 修改GD32C103CB的ROM基地址和大小配置 - 更新系统时钟向量表偏移量设置 - 在cproject.yml中添加BIN输出格式支持 - 增加-O3优化级别和代码移除选项 - 更新csolution版本依赖 feat(device): 优化ADC采样和配置管理 - 将DengFOC依赖替换为FOC模块 - 从config.h引入配置常量 - 重命名FILTER_SIZE为ADC_FILTER_SIZE以提高清晰度 - 优化温度和电流采样滤波实现 refactor(algorithm): 简化FOC控制函数接口 - 为angle_control、velocity_control等函数移除不必要的参数 - 统一函数指针类型定义 - 优化电流计算函数的代码格式 - 调整PID控制器初始化参数
102 lines
2.9 KiB
C
102 lines
2.9 KiB
C
#ifndef REGIONS_GD32C103CB_H
|
|
#define REGIONS_GD32C103CB_H
|
|
|
|
|
|
//-------- <<< Use Configuration Wizard in Context Menu >>> --------------------
|
|
//------ With VS Code: Open Preview for Configuration Wizard -------------------
|
|
|
|
// <n> Auto-generated using information from packs
|
|
// <i> Device Family Pack (DFP): GigaDevice::GD32C10x_DFP@1.0.1
|
|
|
|
// <h> ROM Configuration
|
|
// =======================
|
|
// <h> __ROM0 (is rx memory: IROM1 from DFP)
|
|
// <o> Base address <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines base address of memory region. Default: 0x08000000
|
|
// <i> Contains Startup and Vector Table
|
|
#define __ROM0_BASE 0x08011000
|
|
// <o> Region size [bytes] <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines size of memory region. Default: 0x00020000
|
|
#define __ROM0_SIZE 0x0000C000
|
|
// </h>
|
|
|
|
// <h> __ROM1 (unused)
|
|
// <o> Base address <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines base address of memory region.
|
|
#define __ROM1_BASE 0x0
|
|
// <o> Region size [bytes] <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines size of memory region.
|
|
#define __ROM1_SIZE 0x0
|
|
// </h>
|
|
|
|
// <h> __ROM2 (unused)
|
|
// <o> Base address <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines base address of memory region.
|
|
#define __ROM2_BASE 0x0
|
|
// <o> Region size [bytes] <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines size of memory region.
|
|
#define __ROM2_SIZE 0x0
|
|
// </h>
|
|
|
|
// <h> __ROM3 (unused)
|
|
// <o> Base address <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines base address of memory region.
|
|
#define __ROM3_BASE 0x0
|
|
// <o> Region size [bytes] <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines size of memory region.
|
|
#define __ROM3_SIZE 0x0
|
|
// </h>
|
|
|
|
// </h>
|
|
|
|
// <h> RAM Configuration
|
|
// =======================
|
|
// <h> __RAM0 (is rwx memory: IRAM1 from DFP)
|
|
// <o> Base address <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines base address of memory region. Default: 0x20000000
|
|
// <i> Contains uninitialized RAM, Stack, and Heap
|
|
#define __RAM0_BASE 0x20000000
|
|
// <o> Region size [bytes] <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines size of memory region. Default: 0x00008000
|
|
#define __RAM0_SIZE 0x00008000
|
|
// </h>
|
|
|
|
// <h> __RAM1 (unused)
|
|
// <o> Base address <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines base address of memory region.
|
|
#define __RAM1_BASE 0x0
|
|
// <o> Region size [bytes] <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines size of memory region.
|
|
#define __RAM1_SIZE 0x0
|
|
// </h>
|
|
|
|
// <h> __RAM2 (unused)
|
|
// <o> Base address <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines base address of memory region.
|
|
#define __RAM2_BASE 0x0
|
|
// <o> Region size [bytes] <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines size of memory region.
|
|
#define __RAM2_SIZE 0x0
|
|
// </h>
|
|
|
|
// <h> __RAM3 (unused)
|
|
// <o> Base address <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines base address of memory region.
|
|
#define __RAM3_BASE 0x0
|
|
// <o> Region size [bytes] <0x0-0xFFFFFFFF:8>
|
|
// <i> Defines size of memory region.
|
|
#define __RAM3_SIZE 0x0
|
|
// </h>
|
|
|
|
// </h>
|
|
|
|
// <h> Stack / Heap Configuration
|
|
// <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
|
// <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
|
#define __STACK_SIZE 0x00000200
|
|
#define __HEAP_SIZE 0x00000C00
|
|
// </h>
|
|
|
|
|
|
#endif /* REGIONS_GD32C103CB_H */
|