mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-22 00:56:50 +08:00
修改bsp tms320c6678工程,并测试
This commit is contained in:
File diff suppressed because it is too large
Load Diff
+35
-35
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>ti-c6678</name>
|
||||
<name>ti-tms320c6678</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
@@ -25,130 +25,130 @@
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>SConscript</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/SConscript</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>clock.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/clock.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/clock.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>components.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/components.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/components.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>context.asm</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/libcpu/ti-dsp/c6x/context.asm</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/context.asm</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>contextinc.asm</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/contextinc.asm</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>cpu.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/cpu.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/cpu.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>cpuport.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/libcpu/ti-dsp/c6x/cpuport.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/cpuport.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>device.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/device.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/device.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>idle.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/idle.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>inct.asm</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/libcpu/ti-dsp/c6x/inct.asm</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/idle.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>interrupt.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/libcpu/ti-dsp/c6x/interrupt.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/interrupt.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>intexc.asm</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/intexc.asm</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>ipc.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/ipc.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/ipc.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>irq.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/irq.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/irq.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>kservice.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/kservice.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/kservice.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>mem.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/mem.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/mem.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>memheap.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/memheap.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/memheap.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>mempool.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/mempool.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/mempool.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>object.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/object.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/object.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>scheduler.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/scheduler.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/scheduler.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>signal.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/signal.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/signal.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>slab.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/slab.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/slab.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>stack.asm</name>
|
||||
<name>stack.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/libcpu/ti-dsp/c6x/stack.asm</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/stack.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>thread.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/thread.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/thread.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>timer.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/src/timer.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/src/timer.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>trap.c</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/libcpu/ti-dsp/c6x/trap.c</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/trap.c</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>vector.asm</name>
|
||||
<type>1</type>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/libcpu/ti-dsp/c6x/vector.asm</locationURI>
|
||||
<locationURI>PARENT-2-PROJECT_LOC/git-source/rt-thread/libcpu/ti-dsp/c6x/vector.asm</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//Debug/applications/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/applications/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/driver/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/driver/subdir_vars.mk=UTF-8
|
||||
encoding//Debug/makefile=UTF-8
|
||||
encoding//Debug/objects.mk=UTF-8
|
||||
encoding//Debug/sources.mk=UTF-8
|
||||
encoding//Debug/subdir_rules.mk=UTF-8
|
||||
encoding//Debug/subdir_vars.mk=UTF-8
|
||||
@@ -16,7 +16,6 @@
|
||||
void rt_init_thread_entry(void *parameter)
|
||||
{
|
||||
rt_kprintf("hello rt-thread\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int rt_application_init(void)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
||||
本工程使用TI公司编译器CCS5.5进行编译,工程中使用到了TI官方提供的K1_STK_v1.1,
|
||||
如有需要的请到TI官方论坛自行下载,并将K1_STK_v1.1中的KeyStone_common.c和KeyStone_common.h文件
|
||||
放置到本工程的driver目录下。
|
||||
本工程使用TI公司编译器CCS5.5进行编译,需要安装TI提供的CSL库pdk_C6678_1_1_2_6,
|
||||
我的安装路径为C盘。
|
||||
"C:\ti\pdk_C6678_1_1_2_6\packages"
|
||||
"C:\ti\pdk_C6678_1_1_2_6\packages\ti\csl"
|
||||
@@ -18,11 +18,6 @@
|
||||
;-----------------------------------------------------------
|
||||
DP .set B14
|
||||
SP .set B15
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; extern variable
|
||||
;-----------------------------------------------------------
|
||||
.ref rt_system_stack_top
|
||||
;
|
||||
;-----------------------------------------------------------
|
||||
;
|
||||
@@ -165,8 +160,7 @@ rt_hw_context_switch_to:
|
||||
LDDW .D2T2 *++SP[1],B13:B12 ; get PC (B13) and CSR (B12)
|
||||
NOP 2
|
||||
MV B8,B0
|
||||
[B0] B _rt_thread_interrupt_stack
|
||||
NOP 5
|
||||
[B0] BNOP _rt_thread_interrupt_stack, 5
|
||||
;
|
||||
; this maybe do better
|
||||
;
|
||||
@@ -275,7 +269,6 @@ rt_interrupt_context_restore:
|
||||
NOP 4
|
||||
CMPEQ 1,A1,A2
|
||||
[A2] BNOP rt_preempt_context_restore,5
|
||||
NOP 5
|
||||
LDDW .D2T2 *++SP[1],B9:B8 ; get TSR (B9)
|
||||
LDDW .D2T2 *++SP[1],B11:B10 ; get RILC (B11) and ILC (B10)
|
||||
LDDW .D2T2 *++SP[1],B13:B12 ; get PC (B13) and CSR (B12)
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
; 2021-11-16 Dystopia the first version
|
||||
;
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; extern variable
|
||||
;-----------------------------------------------------------
|
||||
.ref rt_system_stack_top
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; macro definition
|
||||
;-----------------------------------------------------------
|
||||
|
||||
@@ -26,7 +26,7 @@ rt_uint32_t rt_thread_switch_interrupt_flag;
|
||||
void rt_hw_interrupt_init(void)
|
||||
{
|
||||
// initial system trap
|
||||
rt_trap_init();
|
||||
//rt_trap_init();
|
||||
|
||||
/* init exceptions table */
|
||||
rt_memset(isr_table, 0x00, sizeof(isr_table));
|
||||
|
||||
@@ -65,14 +65,6 @@ SP .set B15
|
||||
;-----------------------------------------------------------
|
||||
;
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; extern variable
|
||||
;-----------------------------------------------------------
|
||||
.ref rt_system_stack_top
|
||||
;
|
||||
;-----------------------------------------------------------
|
||||
;
|
||||
|
||||
;-----------------------------------------------------------
|
||||
; interrupt macro definition
|
||||
;-----------------------------------------------------------
|
||||
|
||||
@@ -31,8 +31,8 @@ extern rt_uint32_t rt_hw_get_current_dp(void);
|
||||
rt_uint8_t *rt_hw_stack_init(void *tentry, void *parameter,
|
||||
rt_uint8_t *stack_addr, void *texit)
|
||||
{
|
||||
rt_hw_thread_stack_register *thread_context;
|
||||
rt_uint32_t stk;
|
||||
rt_hw_thread_stack_register *thread_context = RT_NULL;
|
||||
rt_uint32_t stk = 0;
|
||||
|
||||
stack_addr += sizeof(rt_uint32_t);
|
||||
stack_addr = (rt_uint8_t *)RT_ALIGN_DOWN((rt_uint32_t)stack_addr, 8);
|
||||
|
||||
@@ -90,8 +90,9 @@ extern int __ffs(int val);
|
||||
static inline int fls(int x)
|
||||
{
|
||||
if (!x)
|
||||
{
|
||||
return 0;
|
||||
|
||||
}
|
||||
return 32 - __fls(x);
|
||||
}
|
||||
|
||||
@@ -107,8 +108,9 @@ static inline int fls(int x)
|
||||
static inline int ffs(int x)
|
||||
{
|
||||
if (!x)
|
||||
{
|
||||
return 0;
|
||||
|
||||
}
|
||||
return __ffs(x) + 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user