From 2b21d2316aaac2e04fce72a5ffb64cc7c511c9b6 Mon Sep 17 00:00:00 2001 From: shaojinchun Date: Mon, 10 Dec 2018 18:23:21 +0800 Subject: 修改许可协议 修改cpu目录名及相关修改 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/lwp/SConscript | 2 +- components/lwp/arch/arm/R6/lwp_gcc.S | 94 --------------------------- components/lwp/arch/arm/arm9/lwp_gcc.S | 81 +++++++++++++++++++++++ components/lwp/arch/arm/cortex-a9/lwp_gcc.S | 70 ++++++++++++++++++++ components/lwp/arch/arm/cortex-m3/lwp_gcc.S | 19 +----- components/lwp/arch/arm/cortex-m3/lwp_iar.S | 19 +----- components/lwp/arch/arm/cortex-m3/lwp_rvds.S | 19 +----- components/lwp/arch/arm/cortex-m4/lwp_gcc.S | 19 +----- components/lwp/arch/arm/cortex-m4/lwp_iar.S | 19 +----- components/lwp/arch/arm/cortex-m4/lwp_rvds.S | 19 +----- components/lwp/arch/arm/cortex-m7/lwp_gcc.S | 19 +----- components/lwp/arch/arm/cortex-m7/lwp_iar.S | 19 +----- components/lwp/arch/arm/cortex-m7/lwp_rvds.S | 19 +----- components/lwp/arch/arm/vexpress-a9/lwp_gcc.S | 83 ----------------------- components/lwp/lwp.c | 20 ++---- components/lwp/lwp.h | 19 +----- components/lwp/lwp_mem.c | 20 +----- components/lwp/lwp_mem.h | 19 +----- components/lwp/lwp_memheap.c | 18 +---- components/lwp/lwp_memheap.h | 19 +----- components/lwp/lwp_syscall.c | 19 +----- components/lwp/lwp_syscall.h | 19 +----- 22 files changed, 203 insertions(+), 451 deletions(-) delete mode 100644 components/lwp/arch/arm/R6/lwp_gcc.S create mode 100644 components/lwp/arch/arm/arm9/lwp_gcc.S create mode 100644 components/lwp/arch/arm/cortex-a9/lwp_gcc.S delete mode 100644 components/lwp/arch/arm/vexpress-a9/lwp_gcc.S (limited to 'components/lwp') diff --git a/components/lwp/SConscript b/components/lwp/SConscript index 53e445f8cc..75dd25e84a 100644 --- a/components/lwp/SConscript +++ b/components/lwp/SConscript @@ -5,7 +5,7 @@ cwd = GetCurrentDir() src = [] CPPPATH = [] -support_arch = {"arm": ["cortex-m3", "cortex-m4", "cortex-m7", "R6", "vexpress-a9"]} +support_arch = {"arm": ["cortex-m3", "cortex-m4", "cortex-m7", "arm9", "cortex-a9"]} platform_file = {'armcc': 'rvds.S', 'gcc': 'gcc.S', 'iar': 'iar.S'} if rtconfig.PLATFORM in platform_file.keys(): # support platforms diff --git a/components/lwp/arch/arm/R6/lwp_gcc.S b/components/lwp/arch/arm/R6/lwp_gcc.S deleted file mode 100644 index bc684a939c..0000000000 --- a/components/lwp/arch/arm/R6/lwp_gcc.S +++ /dev/null @@ -1,94 +0,0 @@ -/* - * File : lwp_gcc.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Change Logs: - * Date Author Notes - */ - -#define Mode_USR 0x10 -#define Mode_FIQ 0x11 -#define Mode_IRQ 0x12 -#define Mode_SVC 0x13 -#define Mode_MON 0x16 -#define Mode_ABT 0x17 -#define Mode_UDF 0x1B -#define Mode_SYS 0x1F - -#define A_Bit 0x100 -#define I_Bit 0x80 @; when I bit is set, IRQ is disabled -#define F_Bit 0x40 @; when F bit is set, FIQ is disabled -#define T_Bit 0x20 - -.cpu arm9 -.syntax unified -.text - -/* - * void lwp_user_entry(args, text, data); - */ -.global lwp_user_entry -.type lwp_user_entry, % function -lwp_user_entry: - mrs r9, cpsr - mov r8, r9 - bic r9, #0x1f - orr r9, #Mode_USR - - orr r8, #I_Bit - msr cpsr_c, r8 - - msr spsr, r9 - - /* set data address. */ - mov r9, r2 - movs pc, r1 - -/* - * void SVC_Handler(void); - */ -.global SVC_Handler -.type SVC_Handler, % function -SVC_Handler: - push {lr} - mrs lr, spsr - push {r4, r5, lr} - - mrs r4, cpsr - bic r4, #I_Bit - msr cpsr_c, r4 - - push {r0 - r3, r12} - and r0, r7, #0xff - bl lwp_get_sys_api - cmp r0, #0 /* r0 = api */ - mov r4, r0 - pop {r0 - r3, r12} - beq svc_exit - ldr lr, = svc_exit - bx r4 - -svc_exit: - mrs r4, cpsr - orr r4, #I_Bit - msr cpsr_c, r4 - - pop {r4, r5, lr} - msr spsr_cxsf, lr - pop {lr} - movs pc, lr diff --git a/components/lwp/arch/arm/arm9/lwp_gcc.S b/components/lwp/arch/arm/arm9/lwp_gcc.S new file mode 100644 index 0000000000..2a8ce492eb --- /dev/null +++ b/components/lwp/arch/arm/arm9/lwp_gcc.S @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2018-12-10 Jesven first version + */ + +#define Mode_USR 0x10 +#define Mode_FIQ 0x11 +#define Mode_IRQ 0x12 +#define Mode_SVC 0x13 +#define Mode_MON 0x16 +#define Mode_ABT 0x17 +#define Mode_UDF 0x1B +#define Mode_SYS 0x1F + +#define A_Bit 0x100 +#define I_Bit 0x80 @; when I bit is set, IRQ is disabled +#define F_Bit 0x40 @; when F bit is set, FIQ is disabled +#define T_Bit 0x20 + +.cpu arm9 +.syntax unified +.text + +/* + * void lwp_user_entry(args, text, data); + */ +.global lwp_user_entry +.type lwp_user_entry, % function +lwp_user_entry: + mrs r9, cpsr + mov r8, r9 + bic r9, #0x1f + orr r9, #Mode_USR + + orr r8, #I_Bit + msr cpsr_c, r8 + + msr spsr, r9 + + /* set data address. */ + mov r9, r2 + movs pc, r1 + +/* + * void SVC_Handler(void); + */ +.global SVC_Handler +.type SVC_Handler, % function +SVC_Handler: + push {lr} + mrs lr, spsr + push {r4, r5, lr} + + mrs r4, cpsr + bic r4, #I_Bit + msr cpsr_c, r4 + + push {r0 - r3, r12} + and r0, r7, #0xff + bl lwp_get_sys_api + cmp r0, #0 /* r0 = api */ + mov r4, r0 + pop {r0 - r3, r12} + beq svc_exit + ldr lr, = svc_exit + bx r4 + +svc_exit: + mrs r4, cpsr + orr r4, #I_Bit + msr cpsr_c, r4 + + pop {r4, r5, lr} + msr spsr_cxsf, lr + pop {lr} + movs pc, lr diff --git a/components/lwp/arch/arm/cortex-a9/lwp_gcc.S b/components/lwp/arch/arm/cortex-a9/lwp_gcc.S new file mode 100644 index 0000000000..6c89152b0c --- /dev/null +++ b/components/lwp/arch/arm/cortex-a9/lwp_gcc.S @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2006-2018, RT-Thread Development Team + * + * SPDX-License-Identifier: Apache-2.0 + * + * Change Logs: + * Date Author Notes + * 2018-12-10 Jesven first version + */ + +#define Mode_USR 0x10 +#define Mode_FIQ 0x11 +#define Mode_IRQ 0x12 +#define Mode_SVC 0x13 +#define Mode_MON 0x16 +#define Mode_ABT 0x17 +#define Mode_UDF 0x1B +#define Mode_SYS 0x1F + +#define A_Bit 0x100 +#define I_Bit 0x80 @; when I bit is set, IRQ is disabled +#define F_Bit 0x40 @; when F bit is set, FIQ is disabled +#define T_Bit 0x20 + +.cpu cortex-a9 +.syntax unified +.text + +/* + * void lwp_user_entry(args, text, data); + */ +.global lwp_user_entry +.type lwp_user_entry, % function +lwp_user_entry: + mrs r9, cpsr + bic r9, #0x1f + orr r9, #Mode_USR + cpsid i + msr spsr, r9 + + /* set data address. */ + mov r9, r2 + movs pc, r1 + +/* + * void SVC_Handler(void); + */ +.global SVC_Handler +.type SVC_Handler, % function +SVC_Handler: + push {lr} + mrs lr, spsr + push {r4, r5, lr} + cpsie i + + push {r0 - r3, r12} + and r0, r7, #0xff + bl lwp_get_sys_api + cmp r0, #0 /* r0 = api */ + mov lr, r0 + pop {r0 - r3, r12} + beq svc_exit + blx lr + +svc_exit: + cpsid i + pop {r4, r5, lr} + msr spsr_cxsf, lr + pop {lr} + movs pc, lr diff --git a/components/lwp/arch/arm/cortex-m3/lwp_gcc.S b/components/lwp/arch/arm/cortex-m3/lwp_gcc.S index 54d045d4d2..846b06bb26 100644 --- a/components/lwp/arch/arm/cortex-m3/lwp_gcc.S +++ b/components/lwp/arch/arm/cortex-m3/lwp_gcc.S @@ -1,24 +1,11 @@ /* - * File : lwp_gcc.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes + * 2018-10-30 heyuanjie first version */ .cpu cortex-m3 diff --git a/components/lwp/arch/arm/cortex-m3/lwp_iar.S b/components/lwp/arch/arm/cortex-m3/lwp_iar.S index f8ac4a2052..a218569375 100644 --- a/components/lwp/arch/arm/cortex-m3/lwp_iar.S +++ b/components/lwp/arch/arm/cortex-m3/lwp_iar.S @@ -1,24 +1,11 @@ ;/* -; * File : lwp_iar.S -; * This file is part of RT-Thread RTOS -; * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team +; * Copyright (c) 2006-2018, RT-Thread Development Team ; * -; * This program is free software; you can redistribute it and/or modify -; * it under the terms of the GNU General Public License as published by -; * the Free Software Foundation; either version 2 of the License, or -; * (at your option) any later version. -; * -; * This program is distributed in the hope that it will be useful, -; * but WITHOUT ANY WARRANTY; without even the implied warranty of -; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; * GNU General Public License for more details. -; * -; * You should have received a copy of the GNU General Public License along -; * with this program; if not, write to the Free Software Foundation, Inc., -; * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +; * SPDX-License-Identifier: Apache-2.0 ; * ; * Change Logs: ; * Date Author Notes +; * 2018-10-30 heyuanjie first version ; */ SECTION .text:CODE(2) diff --git a/components/lwp/arch/arm/cortex-m3/lwp_rvds.S b/components/lwp/arch/arm/cortex-m3/lwp_rvds.S index b57dd11580..246751a847 100644 --- a/components/lwp/arch/arm/cortex-m3/lwp_rvds.S +++ b/components/lwp/arch/arm/cortex-m3/lwp_rvds.S @@ -1,24 +1,11 @@ ;/* -; * File : lwp_rvds.S -; * This file is part of RT-Thread RTOS -; * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team +; * Copyright (c) 2006-2018, RT-Thread Development Team ; * -; * This program is free software; you can redistribute it and/or modify -; * it under the terms of the GNU General Public License as published by -; * the Free Software Foundation; either version 2 of the License, or -; * (at your option) any later version. -; * -; * This program is distributed in the hope that it will be useful, -; * but WITHOUT ANY WARRANTY; without even the implied warranty of -; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; * GNU General Public License for more details. -; * -; * You should have received a copy of the GNU General Public License along -; * with this program; if not, write to the Free Software Foundation, Inc., -; * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +; * SPDX-License-Identifier: Apache-2.0 ; * ; * Change Logs: ; * Date Author Notes +; * 2018-10-30 heyuanjie first version ; */ AREA |.text|, CODE, READONLY, ALIGN=2 diff --git a/components/lwp/arch/arm/cortex-m4/lwp_gcc.S b/components/lwp/arch/arm/cortex-m4/lwp_gcc.S index 776df56810..e71dbb82c9 100644 --- a/components/lwp/arch/arm/cortex-m4/lwp_gcc.S +++ b/components/lwp/arch/arm/cortex-m4/lwp_gcc.S @@ -1,24 +1,11 @@ /* - * File : lwp_gcc.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes + * 2018-10-30 heyuanjie first version */ .cpu cortex-m4 diff --git a/components/lwp/arch/arm/cortex-m4/lwp_iar.S b/components/lwp/arch/arm/cortex-m4/lwp_iar.S index f8ac4a2052..a218569375 100644 --- a/components/lwp/arch/arm/cortex-m4/lwp_iar.S +++ b/components/lwp/arch/arm/cortex-m4/lwp_iar.S @@ -1,24 +1,11 @@ ;/* -; * File : lwp_iar.S -; * This file is part of RT-Thread RTOS -; * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team +; * Copyright (c) 2006-2018, RT-Thread Development Team ; * -; * This program is free software; you can redistribute it and/or modify -; * it under the terms of the GNU General Public License as published by -; * the Free Software Foundation; either version 2 of the License, or -; * (at your option) any later version. -; * -; * This program is distributed in the hope that it will be useful, -; * but WITHOUT ANY WARRANTY; without even the implied warranty of -; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; * GNU General Public License for more details. -; * -; * You should have received a copy of the GNU General Public License along -; * with this program; if not, write to the Free Software Foundation, Inc., -; * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +; * SPDX-License-Identifier: Apache-2.0 ; * ; * Change Logs: ; * Date Author Notes +; * 2018-10-30 heyuanjie first version ; */ SECTION .text:CODE(2) diff --git a/components/lwp/arch/arm/cortex-m4/lwp_rvds.S b/components/lwp/arch/arm/cortex-m4/lwp_rvds.S index b57dd11580..246751a847 100644 --- a/components/lwp/arch/arm/cortex-m4/lwp_rvds.S +++ b/components/lwp/arch/arm/cortex-m4/lwp_rvds.S @@ -1,24 +1,11 @@ ;/* -; * File : lwp_rvds.S -; * This file is part of RT-Thread RTOS -; * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team +; * Copyright (c) 2006-2018, RT-Thread Development Team ; * -; * This program is free software; you can redistribute it and/or modify -; * it under the terms of the GNU General Public License as published by -; * the Free Software Foundation; either version 2 of the License, or -; * (at your option) any later version. -; * -; * This program is distributed in the hope that it will be useful, -; * but WITHOUT ANY WARRANTY; without even the implied warranty of -; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; * GNU General Public License for more details. -; * -; * You should have received a copy of the GNU General Public License along -; * with this program; if not, write to the Free Software Foundation, Inc., -; * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +; * SPDX-License-Identifier: Apache-2.0 ; * ; * Change Logs: ; * Date Author Notes +; * 2018-10-30 heyuanjie first version ; */ AREA |.text|, CODE, READONLY, ALIGN=2 diff --git a/components/lwp/arch/arm/cortex-m7/lwp_gcc.S b/components/lwp/arch/arm/cortex-m7/lwp_gcc.S index 57b4cdfb60..848c592919 100644 --- a/components/lwp/arch/arm/cortex-m7/lwp_gcc.S +++ b/components/lwp/arch/arm/cortex-m7/lwp_gcc.S @@ -1,24 +1,11 @@ /* - * File : lwp_gcc.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes + * 2018-10-30 heyuanjie first version */ .cpu cortex-m7 diff --git a/components/lwp/arch/arm/cortex-m7/lwp_iar.S b/components/lwp/arch/arm/cortex-m7/lwp_iar.S index f8ac4a2052..a218569375 100644 --- a/components/lwp/arch/arm/cortex-m7/lwp_iar.S +++ b/components/lwp/arch/arm/cortex-m7/lwp_iar.S @@ -1,24 +1,11 @@ ;/* -; * File : lwp_iar.S -; * This file is part of RT-Thread RTOS -; * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team +; * Copyright (c) 2006-2018, RT-Thread Development Team ; * -; * This program is free software; you can redistribute it and/or modify -; * it under the terms of the GNU General Public License as published by -; * the Free Software Foundation; either version 2 of the License, or -; * (at your option) any later version. -; * -; * This program is distributed in the hope that it will be useful, -; * but WITHOUT ANY WARRANTY; without even the implied warranty of -; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; * GNU General Public License for more details. -; * -; * You should have received a copy of the GNU General Public License along -; * with this program; if not, write to the Free Software Foundation, Inc., -; * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +; * SPDX-License-Identifier: Apache-2.0 ; * ; * Change Logs: ; * Date Author Notes +; * 2018-10-30 heyuanjie first version ; */ SECTION .text:CODE(2) diff --git a/components/lwp/arch/arm/cortex-m7/lwp_rvds.S b/components/lwp/arch/arm/cortex-m7/lwp_rvds.S index b57dd11580..246751a847 100644 --- a/components/lwp/arch/arm/cortex-m7/lwp_rvds.S +++ b/components/lwp/arch/arm/cortex-m7/lwp_rvds.S @@ -1,24 +1,11 @@ ;/* -; * File : lwp_rvds.S -; * This file is part of RT-Thread RTOS -; * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team +; * Copyright (c) 2006-2018, RT-Thread Development Team ; * -; * This program is free software; you can redistribute it and/or modify -; * it under the terms of the GNU General Public License as published by -; * the Free Software Foundation; either version 2 of the License, or -; * (at your option) any later version. -; * -; * This program is distributed in the hope that it will be useful, -; * but WITHOUT ANY WARRANTY; without even the implied warranty of -; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; * GNU General Public License for more details. -; * -; * You should have received a copy of the GNU General Public License along -; * with this program; if not, write to the Free Software Foundation, Inc., -; * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +; * SPDX-License-Identifier: Apache-2.0 ; * ; * Change Logs: ; * Date Author Notes +; * 2018-10-30 heyuanjie first version ; */ AREA |.text|, CODE, READONLY, ALIGN=2 diff --git a/components/lwp/arch/arm/vexpress-a9/lwp_gcc.S b/components/lwp/arch/arm/vexpress-a9/lwp_gcc.S deleted file mode 100644 index 0337952fbb..0000000000 --- a/components/lwp/arch/arm/vexpress-a9/lwp_gcc.S +++ /dev/null @@ -1,83 +0,0 @@ -/* - * File : lwp_gcc.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Change Logs: - * Date Author Notes - */ - -#define Mode_USR 0x10 -#define Mode_FIQ 0x11 -#define Mode_IRQ 0x12 -#define Mode_SVC 0x13 -#define Mode_MON 0x16 -#define Mode_ABT 0x17 -#define Mode_UDF 0x1B -#define Mode_SYS 0x1F - -#define A_Bit 0x100 -#define I_Bit 0x80 @; when I bit is set, IRQ is disabled -#define F_Bit 0x40 @; when F bit is set, FIQ is disabled -#define T_Bit 0x20 - -.cpu cortex-a9 -.syntax unified -.text - -/* - * void lwp_user_entry(args, text, data); - */ -.global lwp_user_entry -.type lwp_user_entry, % function -lwp_user_entry: - mrs r9, cpsr - bic r9, #0x1f - orr r9, #Mode_USR - cpsid i - msr spsr, r9 - - /* set data address. */ - mov r9, r2 - movs pc, r1 - -/* - * void SVC_Handler(void); - */ -.global SVC_Handler -.type SVC_Handler, % function -SVC_Handler: - push {lr} - mrs lr, spsr - push {r4, r5, lr} - cpsie i - - push {r0 - r3, r12} - and r0, r7, #0xff - bl lwp_get_sys_api - cmp r0, #0 /* r0 = api */ - mov lr, r0 - pop {r0 - r3, r12} - beq svc_exit - blx lr - -svc_exit: - cpsid i - pop {r4, r5, lr} - msr spsr_cxsf, lr - pop {lr} - movs pc, lr diff --git a/components/lwp/lwp.c b/components/lwp/lwp.c index 62e10f8ed3..84d6515ac6 100644 --- a/components/lwp/lwp.c +++ b/components/lwp/lwp.c @@ -1,24 +1,12 @@ /* - * File : clock.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes + * 2006-03-12 Bernard first version + * 2018-11-02 heyuanjie fix complie error in iar */ #include diff --git a/components/lwp/lwp.h b/components/lwp/lwp.h index 0b25cf6917..f013f36768 100644 --- a/components/lwp/lwp.h +++ b/components/lwp/lwp.h @@ -1,24 +1,11 @@ /* - * File : lwp.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes + * 2018-06-29 heyuanjie first version */ #ifndef __LWP_H__ diff --git a/components/lwp/lwp_mem.c b/components/lwp/lwp_mem.c index 9b3dcf45a6..ebc878494a 100644 --- a/components/lwp/lwp_mem.c +++ b/components/lwp/lwp_mem.c @@ -1,25 +1,11 @@ /* - * File : lwp_mem.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2012, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes - * 2018-03-24 Tanek the first version + * 2018-06-10 Bernard first version */ #include diff --git a/components/lwp/lwp_mem.h b/components/lwp/lwp_mem.h index 117a18f677..8d333cfe4f 100644 --- a/components/lwp/lwp_mem.h +++ b/components/lwp/lwp_mem.h @@ -1,24 +1,11 @@ /* - * File : lwp_mem.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes + * 2018-06-10 Bernard first version */ #ifndef __LWP_MEM_H__ diff --git a/components/lwp/lwp_memheap.c b/components/lwp/lwp_memheap.c index 46ba667695..7d512a503f 100644 --- a/components/lwp/lwp_memheap.c +++ b/components/lwp/lwp_memheap.c @@ -1,21 +1,7 @@ /* - * File : lwp_memheap.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2012, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes diff --git a/components/lwp/lwp_memheap.h b/components/lwp/lwp_memheap.h index 064238585c..d0c09dfd01 100644 --- a/components/lwp/lwp_memheap.h +++ b/components/lwp/lwp_memheap.h @@ -1,24 +1,11 @@ /* - * File : lwp_memheap.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes + * 2018-06-10 Bernard first version */ #ifndef __LWP_MEMHEAP_H__ diff --git a/components/lwp/lwp_syscall.c b/components/lwp/lwp_syscall.c index 700444d6d6..5d4bbf6d91 100644 --- a/components/lwp/lwp_syscall.c +++ b/components/lwp/lwp_syscall.c @@ -1,24 +1,11 @@ /* - * File : lwp_syscall.c - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes + * 2018-06-10 Bernard first version */ /* RT-Thread System call */ diff --git a/components/lwp/lwp_syscall.h b/components/lwp/lwp_syscall.h index eb5d631357..286a0a8852 100644 --- a/components/lwp/lwp_syscall.h +++ b/components/lwp/lwp_syscall.h @@ -1,21 +1,7 @@ /* - * File : lwp_syscall.h - * This file is part of RT-Thread RTOS - * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team + * Copyright (c) 2006-2018, RT-Thread Development Team * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * SPDX-License-Identifier: Apache-2.0 * * Change Logs: * Date Author Notes @@ -24,6 +10,7 @@ * 2006-09-24 Bernard add rt_hw_context_switch_to declaration * 2012-12-29 Bernard add rt_hw_exception_install declaration * 2017-10-17 Hichard add some micros + * 2018-12-10 Jesven fix complie error in iar and keil */ #ifndef __LWP_SYSCALL_H__ -- cgit v1.3.1