diff options
| author | YuQi <[email protected]> | 2022-08-30 03:35:23 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-08-29 15:35:23 -0400 |
| commit | b11cb41ae70a8f31b58cda9807cb7a774369d8b8 (patch) | |
| tree | 06002c92168c59301c0e5e9097f4ce39e181ab0f /include/rtdef.h | |
| parent | 7d58cf16445aeebf8636af2cc0b2e7d60a1fe088 (diff) | |
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 通过了测试。
Diffstat (limited to 'include/rtdef.h')
| -rw-r--r-- | include/rtdef.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/rtdef.h b/include/rtdef.h index be702a0b26..f04c3300b6 100644 --- a/include/rtdef.h +++ b/include/rtdef.h @@ -208,11 +208,11 @@ typedef __gnuc_va_list va_list; /* The way that TI compiler set section is different from other(at least * GCC and MDK) compilers. See ARM Optimizing C/C++ Compiler 5.9.3 for more * details. */ -#define RT_SECTION(x) -#define RT_USED +#define RT_SECTION(x) __attribute__((section(x))) +#define RT_USED __attribute__((used)) #define PRAGMA(x) _Pragma(#x) -#define ALIGN(n) -#define RT_WEAK +#define ALIGN(n) __attribute__((aligned(n))) +#define RT_WEAK __attribute__((weak)) #define rt_inline static inline #define RTT_API #elif defined (__TASKING__) |
