1、解决未在rtconfig.h中定义“RT_USING_CPU_FFS”宏时,使用arm-gcc编译会出现__rt_ffs() 函数重定义,导致编译不通过的问题; (#5755)

2、解决bsp/rm48x50工程使用arm-gcc编译下载后,程序运行出现prefetch abort异常的问题。
This commit is contained in:
changzehai 2022-04-05 10:26:12 +08:00 committed by GitHub
parent 039efbb075
commit 3f7cc54449
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View File

@ -87,9 +87,11 @@ void rt_hw_cpu_dcache_disable()
}
#elif __GNUC__
#ifdef RT_USING_CPU_FFS
int __rt_ffs(int value)
{
return __builtin_ffs(value);
}
#endif
#endif
/*@}*/

View File

@ -54,6 +54,23 @@ _reset:
@-------------------------------------------------------------------------------
@ Initialize CPU Registers
@ After reset, the CPU is in the Supervisor mode (M = 10011)
mov r0, #0x0000
mov r1, #0x0000
mov r2, #0x0000
mov r3, #0x0000
mov r4, #0x0000
mov r5, #0x0000
mov r6, #0x0000
mov r7, #0x0000
mov r8, #0x0000
mov r9, #0x0000
mov r10, #0x0000
mov r11, #0x0000
mov r12, #0x0000
mov r13, #0x0000
mrs r1, cpsr
msr spsr_cxsf, r1
cpsid if, #19
#if defined (__VFP_FP__) && !defined(__SOFTFP__) && defined(RT_VFP_LAZY_STACKING)