mirror of https://github.com/RT-Thread/rt-thread
libcpu/bsp: fix the M33 assembly syntax errors and fix the compilation error of bsp
This commit is contained in:
parent
593ac8dbd6
commit
4f903298a2
|
@ -192,6 +192,7 @@ CONFIG_RT_USING_HW_ATOMIC=y
|
|||
CONFIG_RT_USING_CPU_FFS=y
|
||||
CONFIG_ARCH_ARM=y
|
||||
CONFIG_ARCH_ARM_CORTEX_M=y
|
||||
CONFIG_ARCH_ARM_CORTEX_SECURE=y
|
||||
CONFIG_ARCH_ARM_CORTEX_M33=y
|
||||
|
||||
#
|
||||
|
|
|
@ -3,6 +3,7 @@ menu "Hardware Drivers Config"
|
|||
config SOC_R7FA6E2BB
|
||||
bool
|
||||
select SOC_SERIES_R7FA6E2
|
||||
select ARCH_ARM_CORTEX_SECURE
|
||||
select RT_USING_COMPONENTS_INIT
|
||||
select RT_USING_USER_MAIN
|
||||
default y
|
||||
|
|
|
@ -67,19 +67,19 @@
|
|||
<nStopU2X>0</nStopU2X>
|
||||
</BeforeCompile>
|
||||
<BeforeMake>
|
||||
<RunUserProg1>1</RunUserProg1>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name>cmd /c "start "Renesas" /w cmd /c ""$Prasc_launcher.bat" "$Prasc_version.txt" -nosplash --launcher.suppressErrors --generate --compiler ARMv6 --devicefamily ra "$Pconfiguration.xml" 2> "%%TEMP%%\rasc_stderr.out"""</UserProg1Name>
|
||||
<UserProg1Name />
|
||||
<UserProg2Name />
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopB1X>2</nStopB1X>
|
||||
<nStopB1X>0</nStopB1X>
|
||||
<nStopB2X>0</nStopB2X>
|
||||
</BeforeMake>
|
||||
<AfterMake>
|
||||
<RunUserProg1>1</RunUserProg1>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name>cmd /c "start "Renesas" /w cmd /c ""$Prasc_launcher.bat" "$Prasc_version.txt" -nosplash --launcher.suppressErrors --gensmartbundle --compiler ARMv6 --devicefamily ra "$Pconfiguration.xml" "$L%L" 2> "%%TEMP%%\rasc_stderr.out"""</UserProg1Name>
|
||||
<UserProg1Name>cmd /c "start "Renesas" /w cmd /c ""$Slauncher\rasc_launcher.bat" "5.1.0" --gensecurebundle --compiler ARMv6 "$Pconfiguration.xml" "$L%L" 2> "%%TEMP%%\rasc_stderr.out"""</UserProg1Name>
|
||||
<UserProg2Name />
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
|
@ -335,9 +335,9 @@
|
|||
<v6Rtti>0</v6Rtti>
|
||||
<VariousControls>
|
||||
<MiscControls>-Wno-license-management -Wuninitialized -Wall -Wmissing-declarations -Wpointer-arith -Waggregate-return -Wfloat-equal</MiscControls>
|
||||
<Define>__STDC_LIMIT_MACROS, RT_USING_ARMLIBC, RT_USING_LIBC, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND</Define>
|
||||
<Define>RT_USING_LIBC, __STDC_LIMIT_MACROS, RT_USING_ARMLIBC, __CLK_TCK=RT_TICK_PER_SECOND, __RTTHREAD__</Define>
|
||||
<Undefine />
|
||||
<IncludePath>..\..\..\components\drivers\include;..\..\..\components\drivers\smp_call;..\libraries\HAL_Drivers\config;..\..\..\components\drivers\include;.;..\..\..\components\drivers\include;..\libraries\HAL_Drivers;..\..\..\components\libc\compilers\common\extension;board\ports;..\..\..\libcpu\arm\common;..\..\..\components\libc\compilers\common\include;..\..\..\components\finsh;..\..\..\components\drivers\include;..\..\..\components\libc\posix\io\poll;..\..\..\include;..\..\..\components\libc\posix\io\eventfd;..\..\..\libcpu\arm\cortex-m4;..\..\..\components\drivers\include;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\components\drivers\phy;board;..\..\..\components\libc\posix\io\epoll;..\..\..\components\libc\posix\ipc</IncludePath>
|
||||
<IncludePath>..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\smp_call;.;..\..\..\components\drivers\include;..\libraries\HAL_Drivers;..\..\..\libcpu\arm\common;..\..\..\components\drivers\phy;..\..\..\components\drivers\include;..\..\..\components\libc\posix\ipc;..\libraries\HAL_Drivers\config;..\..\..\components\finsh;..\..\..\components\libc\posix\io\poll;board\ports;..\..\..\components\libc\posix\io\epoll;..\..\..\components\libc\compilers\common\extension;..\..\..\components\libc\posix\io\eventfd;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\include;board;..\..\..\components\drivers\include;..\..\..\libcpu\arm\cortex-m33;..\..\..\components\libc\compilers\common\include</IncludePath>
|
||||
</VariousControls>
|
||||
</Cads>
|
||||
<Aads>
|
||||
|
@ -352,7 +352,6 @@
|
|||
<useXO>0</useXO>
|
||||
<ClangAsOpt>4</ClangAsOpt>
|
||||
<VariousControls>
|
||||
<MiscControls>--via=via/rasc_armasm.via</MiscControls>
|
||||
<Define />
|
||||
<Undefine />
|
||||
<IncludePath />
|
||||
|
@ -732,16 +731,16 @@
|
|||
<GroupName>Finsh</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>msh_parse.c</FileName>
|
||||
<FileName>msh.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\finsh\msh_parse.c</FilePath>
|
||||
<FilePath>..\..\..\components\finsh\msh.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>msh.c</FileName>
|
||||
<FileName>msh_parse.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\components\finsh\msh.c</FilePath>
|
||||
<FilePath>..\..\..\components\finsh\msh_parse.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
|
@ -1032,16 +1031,9 @@
|
|||
<GroupName>klibc</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>kstring.c</FileName>
|
||||
<FileName>rt_vsscanf.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\klibc\kstring.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>rt_vsnprintf_tiny.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
|
||||
<FilePath>..\..\..\src\klibc\rt_vsscanf.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
|
@ -1060,9 +1052,16 @@
|
|||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>rt_vsscanf.c</FileName>
|
||||
<FileName>rt_vsnprintf_tiny.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\klibc\rt_vsscanf.c</FilePath>
|
||||
<FilePath>..\..\..\src\klibc\rt_vsnprintf_tiny.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>kstring.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\src\klibc\kstring.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
|
@ -1093,14 +1092,28 @@
|
|||
<File>
|
||||
<FileName>context_rvds.S</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>..\..\..\libcpu\arm\cortex-m4\context_rvds.S</FilePath>
|
||||
<FilePath>..\..\..\libcpu\arm\cortex-m33\context_rvds.S</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>cpuport.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\libcpu\arm\cortex-m4\cpuport.c</FilePath>
|
||||
<FilePath>..\..\..\libcpu\arm\cortex-m33\cpuport.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>syscall_rvds.S</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>..\..\..\libcpu\arm\cortex-m33\syscall_rvds.S</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>trustzone.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\..\..\libcpu\arm\cortex-m33\trustzone.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
|
|
|
@ -111,6 +111,7 @@
|
|||
#define RT_USING_CPU_FFS
|
||||
#define ARCH_ARM
|
||||
#define ARCH_ARM_CORTEX_M
|
||||
#define ARCH_ARM_CORTEX_SECURE
|
||||
#define ARCH_ARM_CORTEX_M33
|
||||
|
||||
/* RT-Thread Components */
|
||||
|
|
|
@ -3,7 +3,7 @@ import sys
|
|||
|
||||
# toolchains options
|
||||
ARCH='arm'
|
||||
CPU='cortex-m4'
|
||||
CPU='cortex-m33'
|
||||
CROSS_TOOL='gcc'
|
||||
|
||||
if os.getenv('RTT_CC'):
|
||||
|
|
|
@ -70,20 +70,20 @@
|
|||
<nStopU2X>0</nStopU2X>
|
||||
</BeforeCompile>
|
||||
<BeforeMake>
|
||||
<RunUserProg1>1</RunUserProg1>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name>cmd /c "start "Renesas" /w cmd /c ""$Prasc_launcher.bat" "$Prasc_version.txt" -nosplash --launcher.suppressErrors --generate --compiler ARMv6 --devicefamily ra "$Pconfiguration.xml" 2> "%%TEMP%%\rasc_stderr.out"""</UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Name />
|
||||
<UserProg2Name />
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopB1X>2</nStopB1X>
|
||||
<nStopB1X>0</nStopB1X>
|
||||
<nStopB2X>0</nStopB2X>
|
||||
</BeforeMake>
|
||||
<AfterMake>
|
||||
<RunUserProg1>1</RunUserProg1>
|
||||
<RunUserProg1>0</RunUserProg1>
|
||||
<RunUserProg2>0</RunUserProg2>
|
||||
<UserProg1Name>cmd /c "start "Renesas" /w cmd /c ""$Prasc_launcher.bat" "$Prasc_version.txt" -nosplash --launcher.suppressErrors --gensmartbundle --compiler ARMv6 --devicefamily ra "$Pconfiguration.xml" "$L%L" 2> "%%TEMP%%\rasc_stderr.out"""</UserProg1Name>
|
||||
<UserProg2Name></UserProg2Name>
|
||||
<UserProg1Name>cmd /c "start "Renesas" /w cmd /c ""$Slauncher\rasc_launcher.bat" "5.1.0" --gensecurebundle --compiler ARMv6 "$Pconfiguration.xml" "$L%L" 2> "%%TEMP%%\rasc_stderr.out"""</UserProg1Name>
|
||||
<UserProg2Name />
|
||||
<UserProg1Dos16Mode>0</UserProg1Dos16Mode>
|
||||
<UserProg2Dos16Mode>0</UserProg2Dos16Mode>
|
||||
<nStopA1X>2</nStopA1X>
|
||||
|
@ -355,7 +355,6 @@
|
|||
<useXO>0</useXO>
|
||||
<ClangAsOpt>4</ClangAsOpt>
|
||||
<VariousControls>
|
||||
<MiscControls>--via=via/rasc_armasm.via</MiscControls>
|
||||
<Define></Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath></IncludePath>
|
||||
|
|
|
@ -146,10 +146,10 @@ contex_ns_store
|
|||
|
||||
MRS r1, psp ; get from thread stack pointer
|
||||
|
||||
#if defined (__VFP_FP__) && !defined(__SOFTFP__)
|
||||
IF {FPU} != "SoftVFP"
|
||||
TST lr, #0x10 ; if(!EXC_RETURN[4])
|
||||
VSTMFDEQ r1!, {d8 - d15} ; push FPU register s16~s31
|
||||
#endif
|
||||
ENDIF
|
||||
|
||||
STMFD r1!, {r4 - r11} ; push r4 - r11 register
|
||||
|
||||
|
@ -190,10 +190,10 @@ switch_to_thread
|
|||
contex_ns_load
|
||||
LDMFD r1!, {r4 - r11} ; pop r4 - r11 register
|
||||
|
||||
#if defined (__VFP_FP__) && !defined(__SOFTFP__)
|
||||
IF {FPU} != "SoftVFP"
|
||||
TST lr, #0x10 ; if(!EXC_RETURN[4])
|
||||
VLDMFDEQ r1!, {d8 - d15} ; pop FPU register s16~s31
|
||||
#endif
|
||||
ENDIF
|
||||
|
||||
pendsv_exit
|
||||
MSR psp, r1 ; update stack pointer
|
||||
|
@ -215,12 +215,12 @@ rt_hw_context_switch_to PROC
|
|||
LDR r1, =rt_interrupt_to_thread
|
||||
STR r0, [r1]
|
||||
|
||||
#if defined (__VFP_FP__) && !defined(__SOFTFP__)
|
||||
IF {FPU} != "SoftVFP"
|
||||
; CLEAR CONTROL.FPCA
|
||||
MRS r2, CONTROL ; read
|
||||
BIC r2, #0x04 ; modify
|
||||
MSR CONTROL, r2 ; write-back
|
||||
#endif
|
||||
ENDIF
|
||||
|
||||
; set from thread to 0
|
||||
LDR r1, =rt_interrupt_from_thread
|
||||
|
|
Loading…
Reference in New Issue