Skip to content

Commit 44dcf1d

Browse files
committed
Merge remote-tracking branch 'remotes/origin/gitee_master'
2 parents 71ba65e + 1c4c186 commit 44dcf1d

24 files changed

+1123
-0
lines changed

Diff for: bsp/ti-tms320c6678/.ccsproject

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<?ccsproject version="1.0"?>
3+
<projectOptions>
4+
<deviceVariant value="TMS320C66XX.TMS320C6678"/>
5+
<deviceFamily value="C6000"/>
6+
<deviceEndianness value="little"/>
7+
<codegenToolVersion value="8.3.5"/>
8+
<isElfFormat value="true"/>
9+
<rts value="libc.a"/>
10+
<templateProperties value="id=com.ti.common.project.core.emptyProjectTemplate,"/>
11+
<isTargetManual value="false"/>
12+
</projectOptions>

Diff for: bsp/ti-tms320c6678/.cproject

+162
Large diffs are not rendered by default.

Diff for: bsp/ti-tms320c6678/.project

+154
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>ti-tms320c6678</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
15+
<triggers>full,incremental,</triggers>
16+
<arguments>
17+
</arguments>
18+
</buildCommand>
19+
</buildSpec>
20+
<natures>
21+
<nature>com.ti.ccstudio.core.ccsNature</nature>
22+
<nature>org.eclipse.cdt.core.cnature</nature>
23+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
24+
<nature>org.eclipse.cdt.core.ccnature</nature>
25+
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
26+
</natures>
27+
<linkedResources>
28+
<link>
29+
<name>clock.c</name>
30+
<type>1</type>
31+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/clock.c</locationURI>
32+
</link>
33+
<link>
34+
<name>components.c</name>
35+
<type>1</type>
36+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/components.c</locationURI>
37+
</link>
38+
<link>
39+
<name>context.asm</name>
40+
<type>1</type>
41+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/context.asm</locationURI>
42+
</link>
43+
<link>
44+
<name>contextinc.asm</name>
45+
<type>1</type>
46+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/contextinc.asm</locationURI>
47+
</link>
48+
<link>
49+
<name>cpu.c</name>
50+
<type>1</type>
51+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/cpu.c</locationURI>
52+
</link>
53+
<link>
54+
<name>cpuport.c</name>
55+
<type>1</type>
56+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/cpuport.c</locationURI>
57+
</link>
58+
<link>
59+
<name>device.c</name>
60+
<type>1</type>
61+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/device.c</locationURI>
62+
</link>
63+
<link>
64+
<name>idle.c</name>
65+
<type>1</type>
66+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/idle.c</locationURI>
67+
</link>
68+
<link>
69+
<name>interrupt.c</name>
70+
<type>1</type>
71+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/interrupt.c</locationURI>
72+
</link>
73+
<link>
74+
<name>intexc.asm</name>
75+
<type>1</type>
76+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/intexc.asm</locationURI>
77+
</link>
78+
<link>
79+
<name>ipc.c</name>
80+
<type>1</type>
81+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/ipc.c</locationURI>
82+
</link>
83+
<link>
84+
<name>irq.c</name>
85+
<type>1</type>
86+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/irq.c</locationURI>
87+
</link>
88+
<link>
89+
<name>kservice.c</name>
90+
<type>1</type>
91+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/kservice.c</locationURI>
92+
</link>
93+
<link>
94+
<name>mem.c</name>
95+
<type>1</type>
96+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/mem.c</locationURI>
97+
</link>
98+
<link>
99+
<name>memheap.c</name>
100+
<type>1</type>
101+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/memheap.c</locationURI>
102+
</link>
103+
<link>
104+
<name>mempool.c</name>
105+
<type>1</type>
106+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/mempool.c</locationURI>
107+
</link>
108+
<link>
109+
<name>object.c</name>
110+
<type>1</type>
111+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/object.c</locationURI>
112+
</link>
113+
<link>
114+
<name>scheduler.c</name>
115+
<type>1</type>
116+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/scheduler.c</locationURI>
117+
</link>
118+
<link>
119+
<name>signal.c</name>
120+
<type>1</type>
121+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/signal.c</locationURI>
122+
</link>
123+
<link>
124+
<name>slab.c</name>
125+
<type>1</type>
126+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/slab.c</locationURI>
127+
</link>
128+
<link>
129+
<name>stack.c</name>
130+
<type>1</type>
131+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/stack.c</locationURI>
132+
</link>
133+
<link>
134+
<name>thread.c</name>
135+
<type>1</type>
136+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/thread.c</locationURI>
137+
</link>
138+
<link>
139+
<name>timer.c</name>
140+
<type>1</type>
141+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/timer.c</locationURI>
142+
</link>
143+
<link>
144+
<name>trap.c</name>
145+
<type>1</type>
146+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/trap.c</locationURI>
147+
</link>
148+
<link>
149+
<name>vector.asm</name>
150+
<type>1</type>
151+
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/vector.asm</locationURI>
152+
</link>
153+
</linkedResources>
154+
</projectDescription>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
eclipse.preferences.version=1
2+
inEditor=false
3+
onBuild=false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
org.eclipse.cdt.debug.core.toggleBreakpointModel=com.ti.ccstudio.debug.CCSBreakpointMarker
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
eclipse.preferences.version=1
2+
encoding//Debug/applications/subdir_rules.mk=UTF-8
3+
encoding//Debug/applications/subdir_vars.mk=UTF-8
4+
encoding//Debug/common/subdir_rules.mk=UTF-8
5+
encoding//Debug/common/subdir_vars.mk=UTF-8
6+
encoding//Debug/driver/subdir_rules.mk=UTF-8
7+
encoding//Debug/driver/subdir_vars.mk=UTF-8
8+
encoding//Debug/makefile=UTF-8
9+
encoding//Debug/objects.mk=UTF-8
10+
encoding//Debug/sources.mk=UTF-8
11+
encoding//Debug/subdir_rules.mk=UTF-8
12+
encoding//Debug/subdir_vars.mk=UTF-8

Diff for: bsp/ti-tms320c6678/KeyStone.cmd

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
/****************************************************************************/
2+
/* */
3+
/* M6678.cmd */
4+
/* Copyright (c): NUDT */
5+
/* */
6+
/* */
7+
/* Description: This file is a sample linker command file that can be */
8+
/* used for linking programs built with the C compiler and */
9+
/* running the resulting .out file on an M6678 */
10+
/* device. Use it as a guideline. You will want to */
11+
/* change the memory layout to match your specific C6xxx */
12+
/* target system. You may want to change the allocation */
13+
/* scheme according to the size of your program. */
14+
/* */
15+
/* */
16+
/****************************************************************************/
17+
18+
-heap 0x800
19+
-stack 0x1000
20+
21+
MEMORY
22+
{
23+
VECTORS: o = 0x00800000 l = 0x00000200
24+
LL2_CODE: o = 0x00800200 l = 0x0001FE00
25+
LL2_RW_DATA: o = 0x00820000 l = 0x00020000 /*set memory protection attribitue as read/write*/
26+
}
27+
28+
SECTIONS
29+
{
30+
.vecs > VECTORS
31+
32+
.text > LL2_CODE
33+
.cinit > LL2_CODE
34+
.const > LL2_CODE
35+
.switch > LL2_CODE
36+
.stack > LL2_RW_DATA
37+
GROUP
38+
{
39+
.neardata
40+
.rodata
41+
.bss
42+
} > LL2_RW_DATA
43+
.far > LL2_RW_DATA
44+
.fardata > LL2_RW_DATA
45+
.cio > LL2_RW_DATA
46+
.sysmem > LL2_RW_DATA
47+
}

Diff for: bsp/ti-tms320c6678/README.md

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
### 1. 简介
2+
3+
TMS320C6678是TI基于KeyStone的多核固定浮点数字信号处理器,DSP集成C66x CorePac,每个核心在1GHz至1.25 GHz的运行。该设备支持高性能的信号处理应用,如任务关键,医疗成像,测试和自动化。
4+
5+
### 2. 编译说明
6+
7+
TMS320C6678 工程的编译和下载要使用的是 TI 官方提供的 Code Composer Studio。在本工程使用的是 CCS5.5 版本编译调试,CCS5.5 Compiler version:TIv8.3.5进行编译,需要安装TI提供的CSL库pdk_C6678_1_1_2_6。
8+
9+
### 2.1 导入工程
10+
11+
首先打开 Code Composer Studio,点击 Project -> Import CCS Projects...
12+
13+
![输入图片说明](figures/import(1).png)
14+
15+
在打开的对话框中,点击 Select search -> directory 右边的 Browse... 选择 TMS320C6678 BSP 所在文件夹,如图所示。选择完成后点击 Finish 完成导入。
16+
17+
![输入图片说明](figures/import(2).png)
18+
19+
### 2.2 检查工程路径和编译器
20+
21+
- 检查工程路径是否正确,是否成功安装pdk_C6678_1_1_2_6,本工程安装路径为C盘。
22+
23+
![输入图片说明](figures/filepath.png)
24+
25+
- 检查编译器版本,本工程使用的是TIv8.3.5
26+
27+
![输入图片说明](figures/general.jpg)
28+
29+
### 3. 编译工程
30+
31+
导入工程后,选中导入的 ti-tms320c6678 工程,右键点击,在弹出的菜单中选择 Build Project 即可开始编译。
32+
33+
### 4. 加载和调试
34+
35+
编译完成后,可以开始加载和调试。将板子和 XDS560 仿真器连接,仿真器可以将编译生成的可执行文件加载到L2或MSMC执行。
36+
37+
- 如下图ti-tms320c6678.out是编译之后生成的可执行文件。
38+
39+
![输入图片说明](figures/debug(1).png)
40+
41+
- 本工程目前只支持单核运行,按如下图加载可执行文件。
42+
43+
![输入图片说明](figures/load.png)
44+
45+
- 加载可执行文件完成后,CCS将进入调试模式,可以选择继续运行、单步调试、复位等操作。
46+
47+
![输入图片说明](figures/debug(2).png)
48+
49+
到此,可以开启tms320c6678 + rt-thread的愉快旅程了 :smile:

Diff for: bsp/ti-tms320c6678/applications/board.c

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright (c) 2021, Shenzhen Academy of Aerospace Technology
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2021-11-16 Dystopia the first version
9+
*/
10+
11+
#include "board.h"
12+
#include "interrupt.h"
13+
#include "drv_timer.h"
14+
#include "common.h"
15+
16+
#include <rtthread.h>
17+
18+
/**
19+
* This function will initial board.
20+
*/
21+
void rt_hw_board_init(void)
22+
{
23+
// initial CPU core
24+
keystone_cpu_init();
25+
26+
// initial interrupt controller
27+
rt_hw_interrupt_init();
28+
29+
// initial system timer
30+
rt_hw_system_timer_init();
31+
32+
/* initialize memory system */
33+
rt_kprintf("heap: 0x%08x - 0x%08x\n", RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
34+
rt_system_heap_init(RT_HW_HEAP_BEGIN, RT_HW_HEAP_END);
35+
36+
rt_hw_system_timer_start();
37+
}

Diff for: bsp/ti-tms320c6678/applications/board.h

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2021, Shenzhen Academy of Aerospace Technology
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2021-11-16 Dystopia the first version
9+
*/
10+
11+
#ifndef __BOARD_H__
12+
#define __BOARD_H__
13+
14+
#define RT_HW_HEAP_BEGIN (void*)0x0C000000
15+
#define RT_HW_HEAP_END (void*)0x0C100000
16+
17+
void rt_hw_board_init(void);
18+
19+
#endif /* __BOARD_H__ */
20+

0 commit comments

Comments
 (0)