You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

261 lines
12 KiB

# Phytium-Standalone-SDK
!49 v0.3.0 更新 * Merge branch 'E2000_TEST' into 'new_master' * E2000 v0.3 发布 * Merge branch 'v0_2_0_gitee' into 'new_master' * Merge branch '0_2_0' into 'new_master' * build all, before push to gitee 0.2.0 * Merge branch 'gmac_phy_0526' into 'new_master' * 完善gmac驱动,完善裸机lwip测试,适配freertos的lwip测试 * Merge branch 'new_master' into 'new_master' * iic_timer_tacho * Merge branch 'debug_0609' into 'new_master' * 支持汇编调试打印,修改异常打印,增加例程用于异常调试 * Merge branch 'nand_0512' into 'new_master' * Nand 0512 * 重构SDIO驱动,支持SD 2.0协议和DMA读写 * 重构SDIO驱动,支持SD 2.0协议和DMA读写 * 合入Seamphore驱动,完成GDMA驱动重构 * 合入Seamphore驱动,完成GDMA驱动重构 * Merge branch 'pwm_0525' into 'new_master' * 重构CAN驱动,新增E2000 PWM、ADC驱动 * 合入DDMA驱动,新增DDMA+SPI回环例程,更新PR Check list和编码规范 * 合入DDMA驱动,新增DDMA+SPI回环例程,更新PR Check list和编码规范 * Merge branch 'new_master' into 'new_master' * fi2c_slave * Merge branch 'revert-425e915e' into 'new_master' * Revert "Merge branch 'revert' into 'new_master'" * Merge branch 'revert' into 'new_master' * revert version * Merge branch 'fi2c_0429' into 'new_master' * Fi2c 0429 * Merge branch 'new_master' into 'new_master' * add fi2c_master * Merge branch 'xmac_gmac' into 'new_master' * Gmac and Xmac Restruct * Merge branch 'new_gic' into 'new_master' * New gic * Merge branch 'spi_0413' into 'new_master' * 支持 LittleFS 和 Spiffs,新增 SPI 回环测试 * Merge branch '0_1_17' into 'new_master' * !40 Release v0.1.17 * Merge branch 'new_master' into 'new_master' * add uart file * Merge branch '0_1_17' into 'new_master' * v0.1.17发布前覆盖测试 * 解决Issue:I2C 驱动速度无法调节至3.4M * 解决Issue:I2C 驱动速度无法调节至3.4M * Merge branch 'wdt_restruct' into 'new_master' * watchdog驱动重构与验证 * Merge branch 'qspi' into 'new_master' * 重构QSPI驱动,解耦驱动和FLASH关联,完善功能特性支持和测试例程 * 重构芯片引脚控制和GPIO驱动,新增引脚控制相关例程 * 重构芯片引脚控制和GPIO驱动,新增引脚控制相关例程 * Merge branch 'ctest-pr-0317' into 'new_master' * redefine assert and shell cmd to support ctest * Merge branch 'openamp_update' into 'new_master' * Openamp update * Release v0.1.16, Support USB and SATA * Release v0.1.16, Support USB and SATA * Merge branch 'release_0218' into 'new_master' * Release 0.1.16 进行发布例程功能测试,修改许可证为Phytium Public License 1.0 * 合入FUSB和FXHCI驱动,支持通过FATFS读写U盘 * 合入FUSB和FXHCI驱动,支持通过FATFS读写U盘 * Merge branch 'back' into 'new_master' * 修改多核问题,删除glibc * Merge branch 'sata' into 'new_master' * add pcie & sata driver and example test * Merge branch 'rm_some_right' into 'new_master' * Rm some right
2 years ago
**v0.3.0** [ReleaseNote](./doc/ChangeLog.md)
## 1. 项目概要
### 1.1 基本介绍
本项目发布了 Phytium 系列 CPU 的 嵌入式软件开发工具包,包括板级支持包、第三方开源中间件、交叉编译构建工具、及其 Baremetal 参考例程,在支持多平台裸机应用开发的基础上,能够为多种RTOS提供外设驱动和配置构建工具。
![LetterShell](./doc/fig/letter_shell.png)
### 1.2 系统架构
本项目的整体设计如下所示,自下而上可以分为平台层、组件层、框架层和应用层。
![Framework](./doc/design/system_2.png)
- 平台层(Platform)在整个软件框架中位于最底层,提供了基本数据结构类型定义、驱动参数标定、硬件平台耦合的寄存器自检、板级启动、CPU 内存虚拟等功能
- 组件层(Component)在整个软件框架中位于中间位置,向下依赖于平台层提供的参数配置与内存方案,向上提供应用开发与模块测试的支持
- 框架层(Framework)为开发主机提供了开发环境,支持SDK安装,应用工程配置和二进制文件构建及烧录等工具。
- 应用层(Application)提供了应用开发模板和例程,帮助开发者迅速熟悉SDK的使用,进行不同类型的应用程序开发
### 1.3. 源代码结构
```
.
├── Kconfig --> 配置定义
├── LICENSE --> 版权声明
├── README.md --> 使用说明
├── arch
│   └── armv8 --> 架构相关
├── baremetal
│   └── example --> 裸机例程
├── board
│   ├── d2000
│   ├── e2000
│   └── ft2004 --> 平台相关
├── common
│   ├── f_printf.c
│   ├── f_printf.h
│   ├── fsleep.c
│   └── fsleep.h --> 通用方法
├── configs
│   ├── ft2004_aarch32_defconfig
│   └── ft2004_aarch64_defconfig --> 各平台默认配置
├── doc
!49 v0.3.0 更新 * Merge branch 'E2000_TEST' into 'new_master' * E2000 v0.3 发布 * Merge branch 'v0_2_0_gitee' into 'new_master' * Merge branch '0_2_0' into 'new_master' * build all, before push to gitee 0.2.0 * Merge branch 'gmac_phy_0526' into 'new_master' * 完善gmac驱动,完善裸机lwip测试,适配freertos的lwip测试 * Merge branch 'new_master' into 'new_master' * iic_timer_tacho * Merge branch 'debug_0609' into 'new_master' * 支持汇编调试打印,修改异常打印,增加例程用于异常调试 * Merge branch 'nand_0512' into 'new_master' * Nand 0512 * 重构SDIO驱动,支持SD 2.0协议和DMA读写 * 重构SDIO驱动,支持SD 2.0协议和DMA读写 * 合入Seamphore驱动,完成GDMA驱动重构 * 合入Seamphore驱动,完成GDMA驱动重构 * Merge branch 'pwm_0525' into 'new_master' * 重构CAN驱动,新增E2000 PWM、ADC驱动 * 合入DDMA驱动,新增DDMA+SPI回环例程,更新PR Check list和编码规范 * 合入DDMA驱动,新增DDMA+SPI回环例程,更新PR Check list和编码规范 * Merge branch 'new_master' into 'new_master' * fi2c_slave * Merge branch 'revert-425e915e' into 'new_master' * Revert "Merge branch 'revert' into 'new_master'" * Merge branch 'revert' into 'new_master' * revert version * Merge branch 'fi2c_0429' into 'new_master' * Fi2c 0429 * Merge branch 'new_master' into 'new_master' * add fi2c_master * Merge branch 'xmac_gmac' into 'new_master' * Gmac and Xmac Restruct * Merge branch 'new_gic' into 'new_master' * New gic * Merge branch 'spi_0413' into 'new_master' * 支持 LittleFS 和 Spiffs,新增 SPI 回环测试 * Merge branch '0_1_17' into 'new_master' * !40 Release v0.1.17 * Merge branch 'new_master' into 'new_master' * add uart file * Merge branch '0_1_17' into 'new_master' * v0.1.17发布前覆盖测试 * 解决Issue:I2C 驱动速度无法调节至3.4M * 解决Issue:I2C 驱动速度无法调节至3.4M * Merge branch 'wdt_restruct' into 'new_master' * watchdog驱动重构与验证 * Merge branch 'qspi' into 'new_master' * 重构QSPI驱动,解耦驱动和FLASH关联,完善功能特性支持和测试例程 * 重构芯片引脚控制和GPIO驱动,新增引脚控制相关例程 * 重构芯片引脚控制和GPIO驱动,新增引脚控制相关例程 * Merge branch 'ctest-pr-0317' into 'new_master' * redefine assert and shell cmd to support ctest * Merge branch 'openamp_update' into 'new_master' * Openamp update * Release v0.1.16, Support USB and SATA * Release v0.1.16, Support USB and SATA * Merge branch 'release_0218' into 'new_master' * Release 0.1.16 进行发布例程功能测试,修改许可证为Phytium Public License 1.0 * 合入FUSB和FXHCI驱动,支持通过FATFS读写U盘 * 合入FUSB和FXHCI驱动,支持通过FATFS读写U盘 * Merge branch 'back' into 'new_master' * 修改多核问题,删除glibc * Merge branch 'sata' into 'new_master' * add pcie & sata driver and example test * Merge branch 'rm_some_right' into 'new_master' * Rm some right
2 years ago
│   ├── ChangeLog.md --> 修改记录
│   └── reference --> 接口说明文档
├── drivers
│   ├── can
│   ├── dma
│   └── watchdog --> 外设驱动
├── install.py --> 安装脚本
├── lib
│   ├── Kconfiglib
│   ├── lib.mk
│   ├── libc
│   └── nostdlib --> 依赖库
├── make
│   ├── build_baremetal.mk
│   ├── buildinfo.mk
│   ├── complier.mk
│   └── preconfig.mk --> 编译脚本和链接脚本
├── requirements.txt --> python环境依赖组件
├── scripts
├── standalone.mk
├── third-party
3 years ago
│   └── letter-shell-3.1 --> 第三方库
├── tools
└── uninstall.py --> 卸载脚本
```
---
## 2. 快速入门
- 目前支持在Windows和Linux上使用SDK,支持在x86_64和ARM AARCH64设备上完成交叉编译
![windows](./doc/fig/windows.png)![linux](./doc/fig/linux.png)![输入图片说明](./doc/fig/kylin.png)
2 years ago
- 参考[Windows10 快速入门](./doc/reference/usr/install_windows.md), [Linux x86_64 快速入门](./doc/reference/usr/install_linux_x86_64.md)
- 参考[使用说明](./doc/reference/usr/usage.md), 新建Phytium Standalone SDK的应用工程,与开发板建立连接
- 参考[例程](./baremetal/example),开始使用SDK
---
## 3. 硬件参考
### 3.1 FT2000-4
FT-2000/4 是一款面向桌面应用的高性能通用 4 核处理器。每 2 个核构成 1 个处理器核簇(Cluster),并共享 L2 Cache。主要技术特征如下:
- 兼容 ARM v8 64 位指令系统,兼容 32 位指令
- 支持单精度、双精度浮点运算指令
- 支持 ASIMD 处理指令
- 集成 2 个 DDR4 通道,可对 DDR 存储数据进行实时加密
- 集成 34 Lane PCIE3.0 接口:2 个 X16(每个可拆分成 2 个 X8),2 个 X1
- 集成 2 个 GMAC,RGMII 接口,支持 10/100/1000 自适应
- 集成 1 个 SD 卡控制器,兼容 SD 2.0 规范
- 集成 1 个 HDAudio,支持音频输出,可同时支持最多 4 个 Codec
- 集成 SM2、SM3、SM4 模块
- 集成 4 个 UART,1 个 LPC,32 个 GPIO,4 个 I2C,1 个 QSPI,2 个通 用 SPI,2 个 WDT,16 个外部中断(和 GPIO 共用 IO)
- 集成温度传感器
### 3.2 D2000
D2000 是一款面向桌面应用的高性能通用 8 核处理器。每 2 个核构成 1 个处理器核簇(Cluster),并共享 L2 Cache。存储系统包含 Cache 子系统和 DDR,I/O 系统包含 PCIe、高速 IO 子系统、千兆位以太网 GMAC 和低速 IO 子系统,主要技术特征如下,
- 兼容 ARM v8 64 位指令系统,兼容 32 位指令
- 支持单精度、双精度浮点运算指令
- 支持 ASIMD 处理指令
- 集成 2 个 DDR 通道,支持 DDR4 和 LPDDR4,可对 DDR 存储数据进行实时加密
- 集成 34 Lane PCIE3.0 接口:2 个 X16(每个可拆分成 2 个 X8),2 个 X1
- 集成 2 个 GMAC,RGMII 接口,支持 10/100/1000 自适应
- 集成 1 个 SD 卡控制器,兼容 SD 2.0 规范
- 集成 1 个 HDAudio,支持音频输出,可同时支持最多 4 个 Codec
- 集成 SM2、SM3、SM4、SM9 模块
- 集成 4 个 UART,1 个 LPC,32 个 GPIO,4 个 I2C,1 个 QSPI,2 个通用 SPI,2 个 WDT,16 个外部中断(和 GPIO 共用 IO)
- 集成 2 个温度传感器
### 3.3 外设驱动支持情况
!49 v0.3.0 更新 * Merge branch 'E2000_TEST' into 'new_master' * E2000 v0.3 发布 * Merge branch 'v0_2_0_gitee' into 'new_master' * Merge branch '0_2_0' into 'new_master' * build all, before push to gitee 0.2.0 * Merge branch 'gmac_phy_0526' into 'new_master' * 完善gmac驱动,完善裸机lwip测试,适配freertos的lwip测试 * Merge branch 'new_master' into 'new_master' * iic_timer_tacho * Merge branch 'debug_0609' into 'new_master' * 支持汇编调试打印,修改异常打印,增加例程用于异常调试 * Merge branch 'nand_0512' into 'new_master' * Nand 0512 * 重构SDIO驱动,支持SD 2.0协议和DMA读写 * 重构SDIO驱动,支持SD 2.0协议和DMA读写 * 合入Seamphore驱动,完成GDMA驱动重构 * 合入Seamphore驱动,完成GDMA驱动重构 * Merge branch 'pwm_0525' into 'new_master' * 重构CAN驱动,新增E2000 PWM、ADC驱动 * 合入DDMA驱动,新增DDMA+SPI回环例程,更新PR Check list和编码规范 * 合入DDMA驱动,新增DDMA+SPI回环例程,更新PR Check list和编码规范 * Merge branch 'new_master' into 'new_master' * fi2c_slave * Merge branch 'revert-425e915e' into 'new_master' * Revert "Merge branch 'revert' into 'new_master'" * Merge branch 'revert' into 'new_master' * revert version * Merge branch 'fi2c_0429' into 'new_master' * Fi2c 0429 * Merge branch 'new_master' into 'new_master' * add fi2c_master * Merge branch 'xmac_gmac' into 'new_master' * Gmac and Xmac Restruct * Merge branch 'new_gic' into 'new_master' * New gic * Merge branch 'spi_0413' into 'new_master' * 支持 LittleFS 和 Spiffs,新增 SPI 回环测试 * Merge branch '0_1_17' into 'new_master' * !40 Release v0.1.17 * Merge branch 'new_master' into 'new_master' * add uart file * Merge branch '0_1_17' into 'new_master' * v0.1.17发布前覆盖测试 * 解决Issue:I2C 驱动速度无法调节至3.4M * 解决Issue:I2C 驱动速度无法调节至3.4M * Merge branch 'wdt_restruct' into 'new_master' * watchdog驱动重构与验证 * Merge branch 'qspi' into 'new_master' * 重构QSPI驱动,解耦驱动和FLASH关联,完善功能特性支持和测试例程 * 重构芯片引脚控制和GPIO驱动,新增引脚控制相关例程 * 重构芯片引脚控制和GPIO驱动,新增引脚控制相关例程 * Merge branch 'ctest-pr-0317' into 'new_master' * redefine assert and shell cmd to support ctest * Merge branch 'openamp_update' into 'new_master' * Openamp update * Release v0.1.16, Support USB and SATA * Release v0.1.16, Support USB and SATA * Merge branch 'release_0218' into 'new_master' * Release 0.1.16 进行发布例程功能测试,修改许可证为Phytium Public License 1.0 * 合入FUSB和FXHCI驱动,支持通过FATFS读写U盘 * 合入FUSB和FXHCI驱动,支持通过FATFS读写U盘 * Merge branch 'back' into 'new_master' * 修改多核问题,删除glibc * Merge branch 'sata' into 'new_master' * add pcie & sata driver and example test * Merge branch 'rm_some_right' into 'new_master' * Rm some right
2 years ago
| Hardware Interface | Platform Supported | Platform Developing | Component |
| ------------------------------ | -------------------------- | --------------------------- | ------------------------- |
| Generic Intrrupt Controller v3 | FT2000/4<br>E2000<br>D2000 | | gic/fgic |
| Generic Timer | FT2000/4<br>E2000<br>D2000 | | generic_timer |
| UART (PrimeCell PL011) | FT2000/4<br>E2000<br>D2000 | | usart/pl011_uart |
| 10/100/1000MB-ETHERNET | FT2000/4<br>E2000<br>D2000 | | eth/fgmac<br>eth/fxmac |
| ADC | E2000 | | adc/fadc |
| CAN | FT2000/4<br>E2000<br>D2000 | | can/fcan |
| DDMA | | E2000 | dma/fddma |
| GDMA | E2000 | | dma/gdma |
| GPIO | FT2000/4<br>E2000<br>D2000 | | gpio/fgpio |
| I2C | FT2000/4<br>E2000<br>D2000 | | i2c/fi2c |
| QSPI (Nor Flash) | FT2000/4<br>E2000<br>D2000 | | qspi/fqspi |
| SPI | FT2000/4<br>E2000<br>D2000 | | spi/fspim |
| TIMER & TACHO | E2000 | | timer/ftimer_tacho |
| MIO | E2000 | | mio/fmio |
| SDMMC | | FT2000/4<br>D2000 | mmc/fsdmmc |
| SDIO | E2000 | | mmc/fsdio |
| PCIE | FT2000/4<br>D2000<br>E2000 | | pcie/fpcie |
| NAND | E2000 | | nand/fnand |
| RTC | FT2000/4<br>D2000 | | rtc/frtc |
| SATA | FT2000/4<br>D2000<br>E2000 | | sata/fsata |
| USB-PCI | | FT2000/4<br>E2000<br>D2000 | usb/fxhci |
| PWM | E2000 | | pwm/fpwm |
| WDT | FT2000/4<br>D2000<br>E2000 | | watchdog/fwdt |
| Third-Party | Platform Supported | Platform Developing | Component |
| ------------------------------ | -------------------------- | --------------------------- | ------------------------- |
| LWIP 2.1.2 | FT2000/4<br>D2000<br>E2000 | | lwip-2.1.2 |
| Letter shell 3.1 | FT2000/4<br>D2000<br>E2000 | | letter-shell-3.1 |
| Sdmmc | FT2000/4<br>D2000 | | sdmmc |
| Sfud 1.1.0 | FT2000/4<br>D2000<br>E2000 | | sfud-1.1.0 |
| Backtrace | FT2000/4<br>D2000<br>E2000 | | backtrace |
| Tlsf | FT2000/4<br>D2000<br>E2000 | | tlsf-3.1.0 |
| Fatfs (RAM/Sd/SATA) | FT2000/4<br>D2000<br>E2000 | | fatfs-0.1.3 |
| Ymodem | FT2000/4<br>D2000<br>E2000 | | |
| OpenAMP | FT2000/4<br>D2000<br>E2000 | | openamp |
| LittleFS-2.4.2 | | FT2000/4<br>E2000<br>D2000 | littlefs-2.4.2 |
| SPIFFS-0.3.7 | FT2000/4<br>D2000<br>E2000 | | spiffs-0.3.7 |
3 years ago
---
## 4. API指南
3 years ago
### 4.1 DRIVERS
#### 4.1.1 [FI2C](./doc/reference/driver/fi2c.md)
#### 4.1.2 [FPL011](./doc/reference/driver/fpl011.md)
#### 4.1.3 [FRTC](./doc/reference/driver/frtc.md)
#### 4.1.4 [FWDT](./doc/reference/driver/fwdt.md)
#### 4.1.5 [FSPIM](./doc/reference/driver/fspim.md)
#### 4.1.6 [FQSPI](./doc/reference/driver/fqspi.md)
#### 4.1.7 [FSDMMC](./doc/reference/driver/fsdmmc.md)
3 years ago
#### 4.1.8 [FSATA](./doc/reference/driver/fsata.md)
3 years ago
#### 4.1.9 [FPCIE](./doc/reference/driver/fpcie.md)
3 years ago
#### 4.1.10 [FUSB](./doc/reference/driver/fusb.md)
3 years ago
#### 4.1.11 [FGPIO](./doc/reference/driver/fgpio.md)
2 years ago
#### 4.1.12 [FGIC](./doc/reference/driver/fgic.md)
#### 4.1.13 [FDDMA](./doc/reference/driver/fddma.md)
#### 4.1.14 [FCAN](./doc/reference/driver/fcan.md)
#### 4.1.15 [FADC](./doc/reference/driver/fadc.md)
#### 4.1.16 [FPWM](./doc/reference/driver/fpwm.md)
#### 4.1.17 [FSDIO](./doc/reference/driver/fsdio.md)
3 years ago
### 4.2 MEMORY
#### 4.2.1 [FMEMORY_POOL](./doc/reference/sdk/fmemory_pool.md)
3 years ago
### 4.3 CPU
3 years ago
#### 4.3.1 [MMU](./doc/reference/processor/mmu.md)
3 years ago
#### 4.3.2 [FPINCTRL](./doc/reference/sdk/fpinctrl.md)
2 years ago
#### 4.3.2 [INTERRUPT](./doc/reference/processor/interrupt.md)
---
## 5. 贡献方法
请联系飞腾嵌入式软件部
huanghe@phytium.com.cn
zhugengyu@phytium.com.cn
wangxiaodong1030@phytium.com.cn
liushengming1118@phytium.com.cn
---
## 6. 相关资源
- ARM Architecture Reference Manual
- ARM Cortex-A Series Programmer’s Guide
- Programmer Guide for ARMv8-A
- ARM System Developers Guide Designing and Optimizing System Software
- FT-2000/4 软件编程手册-V1.4
- D2000 软件编程手册-V1.0
- Bare-metal programming for ARM —— A hands-on guide
- Using the GNU Compiler Collection
- Using ld, The GNU Linker
- Using as, The GNU Assembler
- Armv8-A memory model guide
---
## 7. 许可协议
Phytium Public License 1.0 (PPL-1.0)