diff --git a/bsp/Infineon/docs/PSOC6系列BSP制作教程.md b/bsp/Infineon/docs/PSOC6系列BSP制作教程.md index 90f33f0a65..d234b6485f 100644 --- a/bsp/Infineon/docs/PSOC6系列BSP制作教程.md +++ b/bsp/Infineon/docs/PSOC6系列BSP制作教程.md @@ -127,9 +127,9 @@ BSP 的制作过程分为如下四个步骤: #### 3.4.2 修改构建脚本 -**SConscript** 脚本决定 MDK/IAR 工程的生成以及编译过程中要添加文件。 +**SConscript** 脚本决定 MDK/IAR/RT-Thread Studio 工程的生成以及编译过程中要添加文件。 -在这一步中需要修改芯片型号以及芯片启动文件的地址,修改内容如下图所示: +在这一步中需要修改芯片型号以及芯片启动文件的地址,修改内容如下图所示:其中 CPPDEFINES 的参数要根据芯片的 low level(hal) 库中定义的芯片型号去填写。 ![](./figures/SConscript.png) @@ -153,21 +153,53 @@ rtconfig.py 用于选择编译工具链,可以自行在 CROSS_TOOL 后面选 ![](./figures/template_3.png) +--- + +以 RT-Thread Studio 为例,介绍如何导入,修改模板配置: + +首先打开 RT-Thread Studio ,在 IDE 的左上角点击 `文件—>导入—>RT-Thread Bsp 到工作空间中` + +![](./figures/studio1.png) + +![](./figures/studio2.png) + +导入成功后,文件资源管理器窗口中会显示如下结构,其中 RT-Thread Settings 为图形化工程配置文件,双击打开即可。 + +![](./figures/studio3.png) + +RT-Thread Settings 中硬件相关配置是在 board/Kconfig 中描述的。移植过程如需添加/修改配置,请修改此文件。 + +![](./figures/studio4.png) + ### 3.5 重新生成工程 -重新生成工程需要使用 Env 工具。 +* MDK5 :重新生成工程需要使用 Env 工具。 + +* RT-Thread Studio:使用 Env 工具/同步 scons 配置至项目 + +同步 scons 配置至项目: + +![](./figures/studio5.png) #### 3.5.1 重新生成 rtconfig.h 文件 +**MDK5:** + 在 Env 界面输入命令 menuconfig 对工程进行配置,并生成新的 rtconfig.h 文件。如下图所示: ![](./figures/menuconfig_1.png) ![](./figures/menuconfig_2.png) +--- + +**RT-Thread Studio:** + +使用上述方法/点击同步 scons 配置至项目 + #### 3.5.2 重新生成 MDK 工程 -下面以重新生成 MDK 工程为例,介绍如何重新生成 BSP 工程。 +以重新生成 MDK 工程为例,介绍如何重新生成 BSP 工程。 使用 env 工具输入命令 `scons --target=mdk5` 重新生成工程,如下图所示: @@ -177,6 +209,10 @@ rtconfig.py 用于选择编译工具链,可以自行在 CROSS_TOOL 后面选 接下来我们可以分别使用命令 `scons --target=mdk4` 和 `scons --target=iar`,来更新 MDK4 和 IAR 的工程,使得该 BSP 变成一个完整的,可以提交到 GitHub 的 BSP (MDK4工程的制作为可选)。 +--- + +**RT-Thread Studio:** 使用上述方法/点击同步 scons 配置至项目 + 感谢每一位贡献代码的开发者,RT-Thread 将与你一同成长。 ## 4. 规范 @@ -218,4 +254,4 @@ PSOC6 BSP 的制作规范主要分为 3 个方面:工程配置,ENV 配置和 - 只提交 BSP 必要的文件,删除无关的中间文件,能够提交的文件请对照其他 BSP。 - 提交 PSOC6 不同系列的 Library 库时,请参考 PSOC62 系列的 HAL 库,删除多余库文件 - 提交前要对 BSP 进行编译测试,确保在不同编译器下编译正常 -- 提交前要对 BSP 进行功能测试,确保 BSP 的在提交前符合工程配置章节中的要求 \ No newline at end of file +- 提交前要对 BSP 进行功能测试,确保 BSP 的在提交前符合工程配置章节中的要求 diff --git a/bsp/Infineon/docs/figures/studio1.png b/bsp/Infineon/docs/figures/studio1.png new file mode 100644 index 0000000000..983f024026 Binary files /dev/null and b/bsp/Infineon/docs/figures/studio1.png differ diff --git a/bsp/Infineon/docs/figures/studio2.png b/bsp/Infineon/docs/figures/studio2.png new file mode 100644 index 0000000000..14ceddcb5e Binary files /dev/null and b/bsp/Infineon/docs/figures/studio2.png differ diff --git a/bsp/Infineon/docs/figures/studio3.png b/bsp/Infineon/docs/figures/studio3.png new file mode 100644 index 0000000000..60e9b56a76 Binary files /dev/null and b/bsp/Infineon/docs/figures/studio3.png differ diff --git a/bsp/Infineon/docs/figures/studio4.png b/bsp/Infineon/docs/figures/studio4.png new file mode 100644 index 0000000000..30d529981d Binary files /dev/null and b/bsp/Infineon/docs/figures/studio4.png differ diff --git a/bsp/Infineon/docs/figures/studio5.png b/bsp/Infineon/docs/figures/studio5.png new file mode 100644 index 0000000000..b30732a22f Binary files /dev/null and b/bsp/Infineon/docs/figures/studio5.png differ diff --git a/bsp/Infineon/libraries/templates/PSOC62/.cproject b/bsp/Infineon/libraries/templates/PSOC62/.cproject index 52796a8a5d..9e31c68f0b 100644 --- a/bsp/Infineon/libraries/templates/PSOC62/.cproject +++ b/bsp/Infineon/libraries/templates/PSOC62/.cproject @@ -76,6 +76,7 @@ + @@ -98,7 +99,7 @@ - + @@ -118,6 +118,9 @@ @@ -184,6 +187,7 @@ + @@ -208,7 +212,7 @@ - + @@ -228,7 +232,7 @@ - + diff --git a/bsp/Infineon/libraries/templates/PSOC62/.project b/bsp/Infineon/libraries/templates/PSOC62/.project index f7b356f1f9..49424bb16d 100644 --- a/bsp/Infineon/libraries/templates/PSOC62/.project +++ b/bsp/Infineon/libraries/templates/PSOC62/.project @@ -1,6 +1,6 @@ - dist_ide_project + 1111 diff --git a/bsp/Infineon/libraries/templates/PSOC62/.settings/.OpenOCD.Debug.rttlaunch b/bsp/Infineon/libraries/templates/PSOC62/.settings/.OpenOCD.Debug.rttlaunch new file mode 100644 index 0000000000..5bb288b6c2 --- /dev/null +++ b/bsp/Infineon/libraries/templates/PSOC62/.settings/.OpenOCD.Debug.rttlaunch @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bsp/Infineon/libraries/templates/PSOC62/.settings/language.settings.xml b/bsp/Infineon/libraries/templates/PSOC62/.settings/language.settings.xml new file mode 100644 index 0000000000..10c41d4686 --- /dev/null +++ b/bsp/Infineon/libraries/templates/PSOC62/.settings/language.settings.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/bsp/Infineon/libraries/templates/PSOC62/.settings/projcfg.ini b/bsp/Infineon/libraries/templates/PSOC62/.settings/projcfg.ini new file mode 100644 index 0000000000..f3fd2c88e5 --- /dev/null +++ b/bsp/Infineon/libraries/templates/PSOC62/.settings/projcfg.ini @@ -0,0 +1,20 @@ +#RT-Thread Studio Project Configuration +#Fri Jan 06 10:38:41 CST 2023 +project_type=rt-thread +chip_name=CY8C624ABZI +os_branch=full +example_name= +os_version=latest +selected_rtt_version=latest +cfg_version=v3.0 +board_base_nano_proj=False +is_use_scons_build=True +output_project_path=E\:/software/RT-ThreadStudio/workspace +project_base_bsp=true +hardware_adapter=KitProg3 +project_name=1111 +is_base_example_project=False +board_name=PSOC62-IFX-PROTO-KIT +device_vendor=Infineon +bsp_path=repo/Extract/Board_Support_Packages/Infineon/PSOC62-IFX-PROTO-KIT/1.0.0 +bsp_version=1.0.0 diff --git a/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.cproject b/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.cproject index 52796a8a5d..9e31c68f0b 100644 --- a/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.cproject +++ b/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.cproject @@ -76,6 +76,7 @@ + @@ -98,7 +99,7 @@ - + @@ -118,6 +118,9 @@ @@ -184,6 +187,7 @@ + @@ -208,7 +212,7 @@ - + @@ -228,7 +232,7 @@ - + diff --git a/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.project b/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.project index f7b356f1f9..49424bb16d 100644 --- a/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.project +++ b/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.project @@ -1,6 +1,6 @@ - dist_ide_project + 1111 diff --git a/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.settings/.OpenOCD.Debug.rttlaunch b/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.settings/.OpenOCD.Debug.rttlaunch new file mode 100644 index 0000000000..5bb288b6c2 --- /dev/null +++ b/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.settings/.OpenOCD.Debug.rttlaunch @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.settings/language.settings.xml b/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.settings/language.settings.xml new file mode 100644 index 0000000000..10c41d4686 --- /dev/null +++ b/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.settings/language.settings.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.settings/projcfg.ini b/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.settings/projcfg.ini new file mode 100644 index 0000000000..f3fd2c88e5 --- /dev/null +++ b/bsp/Infineon/psoc6-cy8ckit-062S2-43012/.settings/projcfg.ini @@ -0,0 +1,20 @@ +#RT-Thread Studio Project Configuration +#Fri Jan 06 10:38:41 CST 2023 +project_type=rt-thread +chip_name=CY8C624ABZI +os_branch=full +example_name= +os_version=latest +selected_rtt_version=latest +cfg_version=v3.0 +board_base_nano_proj=False +is_use_scons_build=True +output_project_path=E\:/software/RT-ThreadStudio/workspace +project_base_bsp=true +hardware_adapter=KitProg3 +project_name=1111 +is_base_example_project=False +board_name=PSOC62-IFX-PROTO-KIT +device_vendor=Infineon +bsp_path=repo/Extract/Board_Support_Packages/Infineon/PSOC62-IFX-PROTO-KIT/1.0.0 +bsp_version=1.0.0