unused files
This commit is contained in:
parent
d909ad0f9a
commit
6feb76a6a2
|
@ -1,131 +0,0 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file ARMCMx/RVCT/cstartup.s
|
||||
* @brief Generic RVCT Cortex-Mx startup file.
|
||||
*
|
||||
* @addtogroup ARMCMx_RVCT_STARTUP
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
|
||||
;/* <<< Use Configuration Wizard in Context Menu >>> */
|
||||
|
||||
;// <h> Main Stack Configuration (IRQ Stack)
|
||||
;// <o> Main Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
;// </h>
|
||||
main_stack_size EQU 0x00000400
|
||||
|
||||
;// <h> Process Stack Configuration
|
||||
;// <o> Process Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
;// </h>
|
||||
proc_stack_size EQU 0x00000400
|
||||
|
||||
;// <h> C-runtime heap size
|
||||
;// <o> C-runtime heap size (in Bytes) <0x0-0xFFFFFFFF:8>
|
||||
;// </h>
|
||||
heap_size EQU 0x00000400
|
||||
|
||||
AREA MSTACK, NOINIT, READWRITE, ALIGN=3
|
||||
main_stack_mem SPACE main_stack_size
|
||||
EXPORT __initial_msp
|
||||
__initial_msp
|
||||
|
||||
AREA CSTACK, NOINIT, READWRITE, ALIGN=3
|
||||
__main_thread_stack_base__
|
||||
EXPORT __main_thread_stack_base__
|
||||
proc_stack_mem SPACE proc_stack_size
|
||||
EXPORT __initial_sp
|
||||
__initial_sp
|
||||
|
||||
AREA HEAP, NOINIT, READWRITE, ALIGN=3
|
||||
__heap_base
|
||||
Heap_Mem SPACE heap_size
|
||||
__heap_limit
|
||||
|
||||
CONTROL_MODE_PRIVILEGED EQU 0
|
||||
CONTROL_MODE_UNPRIVILEGED EQU 1
|
||||
CONTROL_USE_MSP EQU 0
|
||||
CONTROL_USE_PSP EQU 2
|
||||
|
||||
PRESERVE8
|
||||
THUMB
|
||||
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
/*
|
||||
* Reset handler.
|
||||
*/
|
||||
IMPORT __main
|
||||
EXPORT Reset_Handler
|
||||
Reset_Handler PROC
|
||||
cpsid i
|
||||
ldr r0, =__initial_sp
|
||||
msr PSP, r0
|
||||
movs r0, #CONTROL_MODE_PRIVILEGED :OR: CONTROL_USE_PSP
|
||||
msr CONTROL, r0
|
||||
isb
|
||||
bl __early_init
|
||||
|
||||
IF {CPU} = "Cortex-M4.fp"
|
||||
LDR R0, =0xE000ED88 ; Enable CP10,CP11
|
||||
LDR R1, [R0]
|
||||
ORR R1, R1, #(0xF << 20)
|
||||
STR R1, [R0]
|
||||
ENDIF
|
||||
|
||||
ldr r0, =__main
|
||||
bx r0
|
||||
ENDP
|
||||
|
||||
__early_init PROC
|
||||
EXPORT __early_init [WEAK]
|
||||
bx lr
|
||||
ENDP
|
||||
|
||||
ALIGN
|
||||
|
||||
/*
|
||||
* User Initial Stack & Heap.
|
||||
*/
|
||||
IF :DEF:__MICROLIB
|
||||
|
||||
EXPORT __initial_sp
|
||||
EXPORT __heap_base
|
||||
EXPORT __heap_limit
|
||||
|
||||
ELSE
|
||||
|
||||
IMPORT __use_two_region_memory
|
||||
EXPORT __user_initial_stackheap
|
||||
__user_initial_stackheap
|
||||
ldr r0, =Heap_Mem
|
||||
ldr r1, =(proc_stack_mem + proc_stack_size)
|
||||
ldr r2, =(Heap_Mem + heap_size)
|
||||
ldr r3, =proc_stack_mem
|
||||
bx lr
|
||||
|
||||
ALIGN
|
||||
|
||||
ENDIF
|
||||
|
||||
END
|
||||
|
||||
#endif /* !defined(__DOXYGEN__) */
|
||||
|
||||
/**< @} */
|
File diff suppressed because it is too large
Load Diff
|
@ -1,139 +0,0 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio.
|
||||
|
||||
This file is part of ChibiOS.
|
||||
|
||||
ChibiOS 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ChibiOS 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file compilers/RVCT/chcoreasm_v6m.s
|
||||
* @brief ARMv6-M architecture port low level code.
|
||||
*
|
||||
* @addtogroup ARMCMx_RVCT_CORE
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if !defined(FALSE) || defined(__DOXYGEN__)
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#if !defined(TRUE) || defined(__DOXYGEN__)
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#define _FROM_ASM_
|
||||
#include "chconf.h"
|
||||
#include "chcore.h"
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
|
||||
CONTEXT_OFFSET EQU 12
|
||||
SCB_ICSR EQU 0xE000ED04
|
||||
|
||||
PRESERVE8
|
||||
THUMB
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
IMPORT chThdExit
|
||||
IMPORT chSchDoReschedule
|
||||
#if CH_DBG_STATISTICS
|
||||
IMPORT _stats_start_measure_crit_thd
|
||||
IMPORT _stats_stop_measure_crit_thd
|
||||
#endif
|
||||
#if CH_DBG_SYSTEM_STATE_CHECK
|
||||
IMPORT _dbg_check_unlock
|
||||
IMPORT _dbg_check_lock
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Performs a context switch between two threads.
|
||||
*/
|
||||
EXPORT _port_switch
|
||||
_port_switch PROC
|
||||
push {r4, r5, r6, r7, lr}
|
||||
mov r4, r8
|
||||
mov r5, r9
|
||||
mov r6, r10
|
||||
mov r7, r11
|
||||
push {r4, r5, r6, r7}
|
||||
mov r3, sp
|
||||
str r3, [r1, #CONTEXT_OFFSET]
|
||||
ldr r3, [r0, #CONTEXT_OFFSET]
|
||||
mov sp, r3
|
||||
pop {r4, r5, r6, r7}
|
||||
mov r8, r4
|
||||
mov r9, r5
|
||||
mov r10, r6
|
||||
mov r11, r7
|
||||
pop {r4, r5, r6, r7, pc}
|
||||
ENDP
|
||||
|
||||
/*
|
||||
* Start a thread by invoking its work function.
|
||||
* If the work function returns @p chThdExit() is automatically invoked.
|
||||
*/
|
||||
EXPORT _port_thread_start
|
||||
_port_thread_start PROC
|
||||
#if CH_DBG_SYSTEM_STATE_CHECK
|
||||
bl _dbg_check_unlock
|
||||
#endif
|
||||
#if CH_DBG_STATISTICS
|
||||
bl _stats_stop_measure_crit_thd
|
||||
#endif
|
||||
cpsie i
|
||||
mov r0, r5
|
||||
blx r4
|
||||
bl chThdExit
|
||||
ENDP
|
||||
|
||||
/*
|
||||
* Post-IRQ switch code.
|
||||
* Exception handlers return here for context switching.
|
||||
*/
|
||||
EXPORT _port_switch_from_isr
|
||||
EXPORT _port_exit_from_isr
|
||||
_port_switch_from_isr PROC
|
||||
#if CH_DBG_STATISTICS
|
||||
bl _stats_start_measure_crit_thd
|
||||
#endif
|
||||
#if CH_DBG_SYSTEM_STATE_CHECK
|
||||
bl _dbg_check_lock
|
||||
#endif
|
||||
bl chSchDoReschedule
|
||||
#if CH_DBG_SYSTEM_STATE_CHECK
|
||||
bl _dbg_check_unlock
|
||||
#endif
|
||||
#if CH_DBG_STATISTICS
|
||||
bl _stats_stop_measure_crit_thd
|
||||
#endif
|
||||
_port_exit_from_isr
|
||||
ldr r2, =SCB_ICSR
|
||||
movs r3, #128
|
||||
#if CORTEX_ALTERNATE_SWITCH
|
||||
lsls r3, r3, #21
|
||||
str r3, [r2, #0]
|
||||
cpsie i
|
||||
#else
|
||||
lsls r3, r3, #24
|
||||
str r3, [r2, #0]
|
||||
#endif
|
||||
waithere b waithere
|
||||
ENDP
|
||||
|
||||
END
|
||||
|
||||
#endif /* !defined(__DOXYGEN__) */
|
||||
|
||||
/** @} */
|
|
@ -1,148 +0,0 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio.
|
||||
|
||||
This file is part of ChibiOS.
|
||||
|
||||
ChibiOS 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ChibiOS 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file compilers/RVCT/chcoreasm_v7m.s
|
||||
* @brief ARMv7-M architecture port low level code.
|
||||
*
|
||||
* @addtogroup ARMCMx_RVCT_CORE
|
||||
* @{
|
||||
*/
|
||||
|
||||
#if !defined(FALSE) || defined(__DOXYGEN__)
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
#if !defined(TRUE) || defined(__DOXYGEN__)
|
||||
#define TRUE 1
|
||||
#endif
|
||||
|
||||
#define _FROM_ASM_
|
||||
#include "chconf.h"
|
||||
#include "chcore.h"
|
||||
|
||||
#if !defined(__DOXYGEN__)
|
||||
|
||||
CONTEXT_OFFSET EQU 12
|
||||
SCB_ICSR EQU 0xE000ED04
|
||||
ICSR_PENDSVSET EQU 0x10000000
|
||||
|
||||
PRESERVE8
|
||||
THUMB
|
||||
AREA |.text|, CODE, READONLY
|
||||
|
||||
IMPORT chThdExit
|
||||
IMPORT chSchDoReschedule
|
||||
#if CH_DBG_STATISTICS
|
||||
IMPORT _stats_start_measure_crit_thd
|
||||
IMPORT _stats_stop_measure_crit_thd
|
||||
#endif
|
||||
#if CH_DBG_SYSTEM_STATE_CHECK
|
||||
IMPORT _dbg_check_unlock
|
||||
IMPORT _dbg_check_lock
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Performs a context switch between two threads.
|
||||
*/
|
||||
EXPORT _port_switch
|
||||
_port_switch PROC
|
||||
push {r4, r5, r6, r7, r8, r9, r10, r11, lr}
|
||||
#if CORTEX_USE_FPU
|
||||
vpush {s16-s31}
|
||||
#endif
|
||||
|
||||
str sp, [r1, #CONTEXT_OFFSET]
|
||||
#if (CORTEX_SIMPLIFIED_PRIORITY == FALSE) && \
|
||||
((CORTEX_MODEL == 3) || (CORTEX_MODEL == 4))
|
||||
/* Workaround for ARM errata 752419, only applied if
|
||||
condition exists for it to be triggered.*/
|
||||
ldr r3, [r0, #CONTEXT_OFFSET]
|
||||
mov sp, r3
|
||||
#else
|
||||
ldr sp, [r0, #CONTEXT_OFFSET]
|
||||
#endif
|
||||
|
||||
#if CORTEX_USE_FPU
|
||||
vpop {s16-s31}
|
||||
#endif
|
||||
pop {r4, r5, r6, r7, r8, r9, r10, r11, pc}
|
||||
ENDP
|
||||
|
||||
/*
|
||||
* Start a thread by invoking its work function.
|
||||
* If the work function returns @p chThdExit() is automatically invoked.
|
||||
*/
|
||||
EXPORT _port_thread_start
|
||||
_port_thread_start PROC
|
||||
#if CH_DBG_SYSTEM_STATE_CHECK
|
||||
bl _dbg_check_unlock
|
||||
#endif
|
||||
#if CH_DBG_STATISTICS
|
||||
bl _stats_stop_measure_crit_thd
|
||||
#endif
|
||||
#if CORTEX_SIMPLIFIED_PRIORITY
|
||||
cpsie i
|
||||
#else
|
||||
movs r3, #0 /* CORTEX_BASEPRI_DISABLED */
|
||||
msr BASEPRI, r3
|
||||
#endif
|
||||
mov r0, r5
|
||||
blx r4
|
||||
bl chThdExit
|
||||
ENDP
|
||||
|
||||
/*
|
||||
* Post-IRQ switch code.
|
||||
* Exception handlers return here for context switching.
|
||||
*/
|
||||
EXPORT _port_switch_from_isr
|
||||
EXPORT _port_exit_from_isr
|
||||
_port_switch_from_isr PROC
|
||||
#if CH_DBG_STATISTICS
|
||||
bl _stats_start_measure_crit_thd
|
||||
#endif
|
||||
#if CH_DBG_SYSTEM_STATE_CHECK
|
||||
bl _dbg_check_lock
|
||||
#endif
|
||||
bl chSchDoReschedule
|
||||
#if CH_DBG_SYSTEM_STATE_CHECK
|
||||
bl _dbg_check_unlock
|
||||
#endif
|
||||
#if CH_DBG_STATISTICS
|
||||
bl _stats_stop_measure_crit_thd
|
||||
#endif
|
||||
_port_exit_from_isr
|
||||
#if CORTEX_SIMPLIFIED_PRIORITY
|
||||
mov r3, #SCB_ICSR :AND: 0xFFFF
|
||||
movt r3, #SCB_ICSR :SHR: 16
|
||||
mov r2, #ICSR_PENDSVSET
|
||||
str r2, [r3, #0]
|
||||
cpsie i
|
||||
#else
|
||||
svc #0
|
||||
#endif
|
||||
waithere b waithere
|
||||
ENDP
|
||||
|
||||
END
|
||||
|
||||
#endif /* !defined(__DOXYGEN__) */
|
||||
|
||||
/** @} */
|
|
@ -1,98 +0,0 @@
|
|||
/*
|
||||
ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio.
|
||||
|
||||
This file is part of ChibiOS.
|
||||
|
||||
ChibiOS 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 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
ChibiOS 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file ARMCMx/compilers/RVCT/chtypes.h
|
||||
* @brief ARM Cortex-Mx port system types.
|
||||
*
|
||||
* @addtogroup ARMCMx_RVCT_CORE
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _CHTYPES_H_
|
||||
#define _CHTYPES_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
/**
|
||||
* @name Common constants
|
||||
*/
|
||||
/**
|
||||
* @brief Generic 'false' boolean constant.
|
||||
*/
|
||||
#if !defined(FALSE) || defined(__DOXYGEN__)
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Generic 'true' boolean constant.
|
||||
*/
|
||||
#if !defined(TRUE) || defined(__DOXYGEN__)
|
||||
#define TRUE (!FALSE)
|
||||
#endif
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @name Kernel types
|
||||
* @{
|
||||
*/
|
||||
typedef uint32_t rtcnt_t; /**< Realtime counter. */
|
||||
typedef uint64_t rttime_t; /**< Realtime accumulator. */
|
||||
typedef uint32_t syssts_t; /**< System status word. */
|
||||
typedef uint8_t tmode_t; /**< Thread flags. */
|
||||
typedef uint8_t tstate_t; /**< Thread state. */
|
||||
typedef uint8_t trefs_t; /**< Thread references counter. */
|
||||
typedef uint8_t tslices_t; /**< Thread time slices counter.*/
|
||||
typedef uint32_t tprio_t; /**< Thread priority. */
|
||||
typedef int32_t msg_t; /**< Inter-thread message. */
|
||||
typedef int32_t eventid_t; /**< Numeric event identifier. */
|
||||
typedef uint32_t eventmask_t; /**< Mask of event identifiers. */
|
||||
typedef uint32_t eventflags_t; /**< Mask of event flags. */
|
||||
typedef int32_t cnt_t; /**< Generic signed counter. */
|
||||
typedef uint32_t ucnt_t; /**< Generic unsigned counter. */
|
||||
/** @} */
|
||||
|
||||
/**
|
||||
* @brief ROM constant modifier.
|
||||
* @note It is set to use the "const" keyword in this port.
|
||||
*/
|
||||
#define ROMCONST const
|
||||
|
||||
/**
|
||||
* @brief Makes functions not inlineable.
|
||||
* @note If the compiler does not support such attribute then the
|
||||
* realtime counter precision could be degraded.
|
||||
*/
|
||||
#define NOINLINE
|
||||
|
||||
/**
|
||||
* @brief Optimized thread function declaration macro.
|
||||
*/
|
||||
#define PORT_THD_FUNCTION(tname, arg) void tname(void *arg)
|
||||
|
||||
/**
|
||||
* @brief Packed variable specifier.
|
||||
*/
|
||||
#define PACKED_VAR __packed
|
||||
|
||||
#endif /* _CHTYPES_H_ */
|
||||
|
||||
/** @} */
|
Loading…
Reference in New Issue