Update Infineon documents and introduce
@ -72,7 +72,7 @@ RT-Thread supports many architectures, and has covered the major architectures i
|
||||
|
||||
- **ARM Cortex-M0/M0+**:manufacturers like ST
|
||||
- **ARM Cortex-M3**:manufacturers like ST、Winner Micro、MindMotion, ect.
|
||||
- **ARM Cortex-M4**:manufacturers like ST、Nuvoton、NXP、[Nordic](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nrf5x)、GigaDevice、Realtek、Ambiq Micro, ect.
|
||||
- **ARM Cortex-M4**:manufacturers like ST、Infineon、Nuvoton、NXP、[Nordic](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nrf5x)、GigaDevice、Realtek、Ambiq Micro, ect.
|
||||
- **ARM Cortex-M7**:manufacturers like ST、NXP
|
||||
- **ARM Cortex-M23**:manufacturers like GigaDevice
|
||||
- **ARM Cortex-M33**:manufacturers like ST
|
||||
|
@ -72,7 +72,7 @@ RT-Thread unterstützt viele Architekturen und hat die wichtigsten Architekturen
|
||||
|
||||
- **ARM Cortex-M0/M0+**:manufacturers like ST
|
||||
- **ARM Cortex-M3**:manufacturers like ST、Winner Micro、MindMotion, ect.
|
||||
- **ARM Cortex-M4**:manufacturers like ST、Nuvoton、NXP、[Nordic](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nrf5x)、GigaDevice、Realtek、Ambiq Micro, ect.
|
||||
- **ARM Cortex-M4**:manufacturers like ST、Infineon、Nuvoton、NXP、[Nordic](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nrf5x)、GigaDevice、Realtek、Ambiq Micro, ect.
|
||||
- **ARM Cortex-M7**:manufacturers like ST、NXP
|
||||
- **ARM Cortex-M23**:manufacturers like GigaDevice
|
||||
- **ARM Cortex-M33**:manufacturers like ST
|
||||
|
@ -72,7 +72,7 @@ RT-Thread es compatible con muchas arquitecturas, y ha cubierto las principales
|
||||
|
||||
- **ARM Cortex-M0/M0+**:manufacturers like ST
|
||||
- **ARM Cortex-M3**:manufacturers like ST、Winner Micro、MindMotion, ect.
|
||||
- **ARM Cortex-M4**:manufacturers like ST、Nuvoton、NXP、[Nordic](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nrf5x)、GigaDevice、Realtek、Ambiq Micro, ect.
|
||||
- **ARM Cortex-M4**:manufacturers like ST、Infineon、Nuvoton、NXP、[Nordic](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nrf5x)、GigaDevice、Realtek、Ambiq Micro, ect.
|
||||
- **ARM Cortex-M7**:manufacturers like ST、NXP
|
||||
- **ARM Cortex-M23**:manufacturers like GigaDevice
|
||||
- **ARM Cortex-M33**:manufacturers like ST
|
||||
|
@ -83,7 +83,7 @@ RT-Thread RTOS 支持许多架构,并且已经涵盖了当前应用中的主
|
||||
|
||||
- ARM Cortex-M0/M0+:如芯片制造商 ST
|
||||
- ARM Cortex-M3:如芯片制造商 ST、全志、灵动等.
|
||||
- ARM Cortex-M4:如芯片制造商 ST、Nuvoton、NXP、[Nordic](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nrf5x)、GigaDevice、Realtek、Ambiq Micro等
|
||||
- ARM Cortex-M4:如芯片制造商 ST、Infineon、Nuvoton、NXP、[Nordic](https://github.com/RT-Thread/rt-thread/tree/master/bsp/nrf5x)、GigaDevice、Realtek、Ambiq Micro等
|
||||
- ARM Cortex-M7:如芯片制造商 ST、NXP
|
||||
- ARM Cortex-M23:如芯片制造商 GigaDevice
|
||||
- ARM Cortex-M33:如芯片制造商 ST
|
||||
|
@ -79,7 +79,7 @@ BSP 的制作过程分为如下四个步骤:
|
||||
|
||||
#### 3.2.1 堆内存配置讲解
|
||||
|
||||
通常情况下,系统 RAM 中的一部分内存空间会被用作堆内存。下面代码的作用是,在不同编译器下规定堆内存的起始地址 **HEAP_BEGIN** 和结束地址 **HEAP_END**。这里 **HEAP_BEGIN** 和 **HEAP_END** 的值需要和后面 [3.4.1 修改链接脚本](# 3.4.1 修改链接脚本) 章节所修改的配置相一致。
|
||||
通常情况下,系统 RAM 中的一部分内存空间会被用作堆内存。下面代码的作用是,在不同编译器下规定堆内存的起始地址 **HEAP_BEGIN** 和结束地址 **HEAP_END**。这里 **HEAP_BEGIN** 和 **HEAP_END** 的值需要和后面 [3.5.1 修改链接脚本](# 3.5.1 修改链接脚本) 章节所修改的配置相一致。
|
||||
|
||||
在某些系列的芯片中,芯片 RAM 可能分布在不连续的多块内存区域上。此时堆内存的位置可以和系统内存在同一片连续的内存区域,也可以存放在一片独立的内存区域中。
|
||||
|
||||
@ -103,16 +103,52 @@ BSP 的制作过程分为如下四个步骤:
|
||||
|
||||

|
||||
|
||||
### 3.4 修改工程构建相关文件
|
||||
### 3.4 添加外设相关文件
|
||||
|
||||
#### 3.4.1 添加底层外设库
|
||||
|
||||

|
||||
|
||||
接下来为 BSP 添加底层外设库文件,下图的文件是从 Modus 生成的文件中拷贝而来。
|
||||
|
||||

|
||||
|
||||
源库文件路径如下图:
|
||||
|
||||

|
||||
|
||||
同时拷贝 **TARGET_CY8CKIT-062S2-43012** 文件(需根据不同芯片型号拷贝不同名称的文件夹),该文件夹路径如下:
|
||||
|
||||

|
||||
|
||||
#### 3.4.1 修改外设配置脚本
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### 3.5 修改工程构建相关文件
|
||||
|
||||
接下来需要修改用于构建工程相关的文件。
|
||||
|
||||
#### 3.4.1 修改链接脚本
|
||||
#### 3.5.1 修改链接脚本
|
||||
|
||||
**linker_scripts** 链接文件如下图所示:
|
||||
|
||||

|
||||
|
||||
**linker_scripts** 链接文件是从 Modus 生成的示例工程中拷贝而来,需要修改其名称为 link.ld/.icf/.sct ,源文件路径如下:
|
||||
|
||||
ARMCC/ARMClang 使用:
|
||||
|
||||

|
||||
|
||||
GCC 使用:
|
||||
|
||||

|
||||
|
||||
下面以 MDK 使用的链接脚本 link.sct 为例,演示如何修改链接脚本:
|
||||
|
||||

|
||||
@ -125,7 +161,7 @@ BSP 的制作过程分为如下四个步骤:
|
||||
|
||||

|
||||
|
||||
#### 3.4.2 修改构建脚本
|
||||
#### 3.5.2 修改构建脚本
|
||||
|
||||
**SConscript** 脚本决定 MDK/IAR/RT-Thread Studio 工程的生成以及编译过程中要添加文件。
|
||||
|
||||
@ -133,13 +169,13 @@ BSP 的制作过程分为如下四个步骤:
|
||||
|
||||

|
||||
|
||||
#### 3.4.3 修改编译选项
|
||||
#### 3.5.3 修改编译选项
|
||||
|
||||
rtconfig.py 用于选择编译工具链,可以自行在 CROSS_TOOL 后面选择修改编译工程所需要的工具链,目前 PSCOC6 支持 gcc 和 armclang。
|
||||
|
||||

|
||||
|
||||
#### 3.4.4 修改工程模板
|
||||
#### 3.5.4 修改工程模板
|
||||
|
||||
**template** 文件是生成 MDK/IAR 工程的模板文件,通过修改该文件可以设置工程中使用的芯片型号以及下载方式。MDK4/MDK5/IAR 的工程模板文件,如下图所示:
|
||||
|
||||
@ -181,7 +217,31 @@ RT-Thread Settings 中硬件相关配置是在 board/Kconfig 中描述的。移
|
||||
|
||||

|
||||
|
||||
#### 3.5.1 重新生成 rtconfig.h 文件
|
||||
首先打开 RT-Thread Studio ,在 IDE 的左上角点击 `文件—>导入—>RT-Thread Bsp 到工作空间中`
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
导入成功后,文件资源管理器窗口中会显示如下结构,其中 RT-Thread Settings 为图形化工程配置文件,双击打开即可。
|
||||
|
||||

|
||||
|
||||
RT-Thread Settings 中硬件相关配置是在 board/Kconfig 中描述的。移植过程如需添加/修改配置,请修改此文件。
|
||||
|
||||

|
||||
|
||||
### 3.6 重新生成工程
|
||||
|
||||
* MDK5 :重新生成工程需要使用 Env 工具。
|
||||
|
||||
* RT-Thread Studio:使用 Env 工具/同步 scons 配置至项目
|
||||
|
||||
同步 scons 配置至项目:
|
||||
|
||||

|
||||
|
||||
#### 3.6.1 重新生成 rtconfig.h 文件
|
||||
|
||||
**MDK5:**
|
||||
|
||||
@ -197,6 +257,10 @@ RT-Thread Settings 中硬件相关配置是在 board/Kconfig 中描述的。移
|
||||
|
||||
使用上述方法/点击同步 scons 配置至项目
|
||||
|
||||
#### 3.6.2 重新生成 MDK 工程
|
||||
|
||||
使用上述方法/点击同步 scons 配置至项目
|
||||
|
||||
#### 3.5.2 重新生成 MDK 工程
|
||||
|
||||
以重新生成 MDK 工程为例,介绍如何重新生成 BSP 工程。
|
||||
|
BIN
bsp/Infineon/docs/figures/hal_config1.png
Normal file
After Width: | Height: | Size: 21 KiB |
BIN
bsp/Infineon/docs/figures/hal_config2.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
bsp/Infineon/docs/figures/hal_config3.png
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
bsp/Infineon/docs/figures/hal_config4.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
bsp/Infineon/docs/figures/hal_config5.png
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
bsp/Infineon/docs/figures/hal_config6.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
bsp/Infineon/docs/figures/hal_config7.png
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
bsp/Infineon/docs/figures/linker_scripts1.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
bsp/Infineon/docs/figures/linker_scripts2.png
Normal file
After Width: | Height: | Size: 14 KiB |