mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-22 11:30:01 +08:00
tms320f28379d fix init (#6343)
解决 tms320f28379d bsp 启动的问题。主要改动如下。 修正context.s中汇编代码错误。在旧版的代码中,操作数为32位而汇编命令却使用了针对16位数据的命令MOV,导致程序在某些情况无法正常启动线程。 由于C28x的平台下,SP只支持16bit寻址,所以用于线程空间存放的heap以及ebss段都需要放在低16位的空间,针对这个问题修改了CMD文件。此外还增加基于CMD文件基于RAM的支持,方便调试。 新增rtdef.h中RT_SECTION,RT_USED,ALIGN和RT_WEAK的定义。旧版bsp中这些定义为空,导致INIT_EXPORT注册的函数失效。 修改程序启动代码,在程序入口直接调用原生启动代码 以上改动在LAUNCHXL-F28379D 通过了测试。
This commit is contained in:
+2
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
@@ -145,7 +145,6 @@ int $Sub$$main(void)
|
||||
return 0;
|
||||
}
|
||||
#elif defined(__ICCARM__)
|
||||
extern int main(void);
|
||||
/* __low_level_init will auto called by IAR cstartup */
|
||||
extern void __iar_data_init3(void);
|
||||
int __low_level_init(void)
|
||||
@@ -194,7 +193,7 @@ void main_thread_entry(void *parameter)
|
||||
extern int $Super$$main(void);
|
||||
$Super$$main(); /* for ARMCC. */
|
||||
}
|
||||
#elif defined(__ICCARM__) || defined(__GNUC__) || defined(__TASKING__)
|
||||
#elif defined(__ICCARM__) || defined(__GNUC__) || defined(__TASKING__) || defined(__TI_COMPILER_VERSION__)
|
||||
main();
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user