mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Add FreeRTOS-Plus directory.
This commit is contained in:
parent
7bd5f21ad5
commit
f508a5f653
6798 changed files with 134949 additions and 19 deletions
114
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h
Normal file
114
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/FreeRTOSConfig.h
Normal file
|
@ -0,0 +1,114 @@
|
|||
/*
|
||||
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS 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 and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Having a problem? Start by reading the FAQ "My application does *
|
||||
* not run, what could be wrong? *
|
||||
* *
|
||||
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, training, latest information,
|
||||
license and contact details.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool.
|
||||
|
||||
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
|
||||
the code with commercial support, indemnification, and middleware, under
|
||||
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
|
||||
provide a safety engineered and independently SIL3 certified version under
|
||||
the SafeRTOS brand: http://www.SafeRTOS.com.
|
||||
*/
|
||||
|
||||
#ifndef FREERTOS_CONFIG_H
|
||||
#define FREERTOS_CONFIG_H
|
||||
|
||||
#include <intrinsics.h>
|
||||
#include "Board.h"
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Application specific definitions.
|
||||
*
|
||||
* These definitions should be adjusted for your particular hardware and
|
||||
* application requirements.
|
||||
*
|
||||
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
|
||||
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
|
||||
*
|
||||
* See http://www.freertos.org/a00110.html.
|
||||
-----------------------------------------------------------*/
|
||||
|
||||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 47923200 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )
|
||||
#define configTOTAL_HEAP_SIZE ( ( size_t ) 14200 )
|
||||
#define configMAX_TASK_NAME_LEN ( 16 )
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
|
||||
/* Co-routine definitions. */
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
|
||||
|
||||
/* Set the following definitions to 1 to include the API function, or zero
|
||||
to exclude the API function. */
|
||||
|
||||
#define INCLUDE_vTaskPrioritySet 1
|
||||
#define INCLUDE_uxTaskPriorityGet 1
|
||||
#define INCLUDE_vTaskDelete 0
|
||||
#define INCLUDE_vTaskCleanUpResources 0
|
||||
#define INCLUDE_vTaskSuspend 1
|
||||
#define INCLUDE_vTaskDelayUntil 1
|
||||
#define INCLUDE_vTaskDelay 1
|
||||
|
||||
|
||||
#endif /* FREERTOS_CONFIG_H */
|
115
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/ParTest/ParTest.c
Normal file
115
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/ParTest/ParTest.c
Normal file
|
@ -0,0 +1,115 @@
|
|||
/*
|
||||
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS 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 and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Having a problem? Start by reading the FAQ "My application does *
|
||||
* not run, what could be wrong? *
|
||||
* *
|
||||
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, training, latest information,
|
||||
license and contact details.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool.
|
||||
|
||||
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
|
||||
the code with commercial support, indemnification, and middleware, under
|
||||
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
|
||||
provide a safety engineered and independently SIL3 certified version under
|
||||
the SafeRTOS brand: http://www.SafeRTOS.com.
|
||||
*/
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "partest.h"
|
||||
#include "board.h"
|
||||
|
||||
/*-----------------------------------------------------------
|
||||
* Simple parallel port IO routines for the LED's.
|
||||
*-----------------------------------------------------------*/
|
||||
|
||||
const unsigned long led_mask[ NB_LED ]= { LED1, LED2, LED3, LED4 };
|
||||
|
||||
void vParTestInitialise( void )
|
||||
{
|
||||
/* Start with all LED's off. */
|
||||
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, LED_MASK );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
if( uxLED < ( portBASE_TYPE ) NB_LED )
|
||||
{
|
||||
if( xValue )
|
||||
{
|
||||
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, led_mask[ uxLED ] );
|
||||
}
|
||||
else
|
||||
{
|
||||
AT91F_PIO_ClearOutput( AT91C_BASE_PIOA, led_mask[ uxLED ]);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
if( uxLED < ( portBASE_TYPE ) NB_LED )
|
||||
{
|
||||
if( AT91F_PIO_GetInput( AT91C_BASE_PIOA ) & led_mask[ uxLED ] )
|
||||
{
|
||||
AT91F_PIO_ClearOutput( AT91C_BASE_PIOA, led_mask[ uxLED ]);
|
||||
}
|
||||
else
|
||||
{
|
||||
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, led_mask[ uxLED ] );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
89
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/SrcIAR/Board.h
Normal file
89
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/SrcIAR/Board.h
Normal file
|
@ -0,0 +1,89 @@
|
|||
/*----------------------------------------------------------------------------
|
||||
* ATMEL Microcontroller Software Support - ROUSSET -
|
||||
*----------------------------------------------------------------------------
|
||||
* The software is delivered "AS IS" without warranty or condition of any
|
||||
* kind, either express, implied or statutory. This includes without
|
||||
* limitation any warranty or condition with respect to merchantability or
|
||||
* fitness for any particular purpose, or against the infringements of
|
||||
* intellectual property rights of others.
|
||||
*----------------------------------------------------------------------------
|
||||
* File Name : Board.h
|
||||
* Object : AT91SAM7S Evaluation Board Features Definition File.
|
||||
*
|
||||
* Creation : JPP 16/Jun/2004
|
||||
*----------------------------------------------------------------------------
|
||||
*/
|
||||
#ifndef Board_h
|
||||
#define Board_h
|
||||
|
||||
#include "AT91SAM7S64.h"
|
||||
#define __inline static inline
|
||||
#include "lib_AT91SAM7S64.h"
|
||||
|
||||
#define true -1
|
||||
#define false 0
|
||||
|
||||
/*-------------------------------*/
|
||||
/* SAM7Board Memories Definition */
|
||||
/*-------------------------------*/
|
||||
// The AT91SAM7S64 embeds a 16-Kbyte SRAM bank, and 64 K-Byte Flash
|
||||
|
||||
#define INT_SARM 0x00200000
|
||||
#define INT_SARM_REMAP 0x00000000
|
||||
|
||||
#define INT_FLASH 0x00000000
|
||||
#define INT_FLASH_REMAP 0x01000000
|
||||
|
||||
#define FLASH_PAGE_NB 512
|
||||
#define FLASH_PAGE_SIZE 128
|
||||
|
||||
/*-----------------*/
|
||||
/* Leds Definition */
|
||||
/*-----------------*/
|
||||
/* PIO Flash PA PB PIN */
|
||||
#define LED1 (1<<0) /* PA0 / PGMEN0 & PWM0 TIOA0 48 */
|
||||
#define LED2 (1<<1) /* PA1 / PGMEN1 & PWM1 TIOB0 47 */
|
||||
#define LED3 (1<<2) /* PA2 & PWM2 SCK0 44 */
|
||||
#define LED4 (1<<3) /* PA3 & TWD NPCS3 43 */
|
||||
#define NB_LED 4
|
||||
|
||||
#define LED_MASK (LED1|LED2|LED3|LED4)
|
||||
|
||||
/*-------------------------*/
|
||||
/* Push Buttons Definition */
|
||||
/*-------------------------*/
|
||||
/* PIO Flash PA PB PIN */
|
||||
#define SW1_MASK (1<<19) /* PA19 / PGMD7 & RK FIQ 13 */
|
||||
#define SW2_MASK (1<<20) /* PA20 / PGMD8 & RF IRQ0 16 */
|
||||
#define SW3_MASK (1<<15) /* PA15 / PGM3 & TF TIOA1 20 */
|
||||
#define SW4_MASK (1<<14) /* PA14 / PGMD2 & SPCK PWM3 21 */
|
||||
#define SW_MASK (SW1_MASK|SW2_MASK|SW3_MASK|SW4_MASK)
|
||||
|
||||
|
||||
#define SW1 (1<<19) // PA19
|
||||
#define SW2 (1<<20) // PA20
|
||||
#define SW3 (1<<15) // PA15
|
||||
#define SW4 (1<<14) // PA14
|
||||
|
||||
/*------------------*/
|
||||
/* USART Definition */
|
||||
/*------------------*/
|
||||
/* SUB-D 9 points J3 DBGU*/
|
||||
#define DBGU_RXD AT91C_PA9_DRXD /* JP11 must be close */
|
||||
#define DBGU_TXD AT91C_PA10_DTXD /* JP12 must be close */
|
||||
#define AT91C_DBGU_BAUD 115200 // Baud rate
|
||||
|
||||
#define US_RXD_PIN AT91C_PA5_RXD0 /* JP9 must be close */
|
||||
#define US_TXD_PIN AT91C_PA6_TXD0 /* JP7 must be close */
|
||||
#define US_RTS_PIN AT91C_PA7_RTS0 /* JP8 must be close */
|
||||
#define US_CTS_PIN AT91C_PA8_CTS0 /* JP6 must be close */
|
||||
|
||||
/*--------------*/
|
||||
/* Master Clock */
|
||||
/*--------------*/
|
||||
|
||||
#define EXT_OC 18432000 // Exetrnal ocilator MAINCK
|
||||
#define MCK 47923200 // MCK (PLLRC div by 2)
|
||||
#define MCKKHz (MCK/1000) //
|
||||
|
||||
#endif /* Board_h */
|
302
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/SrcIAR/Cstartup.s
Normal file
302
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/SrcIAR/Cstartup.s
Normal file
|
@ -0,0 +1,302 @@
|
|||
;* ----------------------------------------------------------------------------
|
||||
;* ATMEL Microcontroller Software Support - ROUSSET -
|
||||
;* ----------------------------------------------------------------------------
|
||||
;* Copyright (c) 2006, Atmel Corporation
|
||||
;
|
||||
;* All rights reserved.
|
||||
;*
|
||||
;* Redistribution and use in source and binary forms, with or without
|
||||
;* modification, are permitted provided that the following conditions are met:
|
||||
;*
|
||||
;* - Redistributions of source code must retain the above copyright notice,
|
||||
;* this list of conditions and the disclaimer below.
|
||||
;*
|
||||
;* - Redistributions in binary form must reproduce the above copyright notice,
|
||||
;* this list of conditions and the disclaimer below in the documentation and/or
|
||||
;* other materials provided with the distribution.
|
||||
;*
|
||||
;* Atmel's name may not be used to endorse or promote products derived from
|
||||
;* this software without specific prior written permission.
|
||||
;*
|
||||
;* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
|
||||
;* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
;* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
;* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
;* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
;* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
;* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
;* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
;* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
;* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
;* ----------------------------------------------------------------------------
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; Include your AT91 Library files
|
||||
;------------------------------------------------------------------------------
|
||||
#include "AT91SAM7X256_inc.h"
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
#define TOP_OF_MEMORY (AT91C_ISRAM + AT91C_ISRAM_SIZE)
|
||||
#define IRQ_STACK_SIZE 200
|
||||
; 3 words to be saved per interrupt priority level
|
||||
|
||||
; Mode, correspords to bits 0-5 in CPSR
|
||||
MODE_BITS DEFINE 0x1F ; Bit mask for mode bits in CPSR
|
||||
USR_MODE DEFINE 0x10 ; User mode
|
||||
FIQ_MODE DEFINE 0x11 ; Fast Interrupt Request mode
|
||||
IRQ_MODE DEFINE 0x12 ; Interrupt Request mode
|
||||
SVC_MODE DEFINE 0x13 ; Supervisor mode
|
||||
ABT_MODE DEFINE 0x17 ; Abort mode
|
||||
UND_MODE DEFINE 0x1B ; Undefined Instruction mode
|
||||
SYS_MODE DEFINE 0x1F ; System mode
|
||||
|
||||
I_BIT DEFINE 0x80
|
||||
F_BIT DEFINE 0x40
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; ?RESET
|
||||
; Reset Vector.
|
||||
; Normally, segment INTVEC is linked at address 0.
|
||||
; For debugging purposes, INTVEC may be placed at other addresses.
|
||||
; A debugger that honors the entry point will start the
|
||||
; program in a normal way even if INTVEC is not at address 0.
|
||||
;------------------------------------------------------------------------------
|
||||
SECTION .intvec:CODE:NOROOT(2)
|
||||
PUBLIC __vector
|
||||
PUBLIC __iar_program_start
|
||||
EXTERN vPortYieldProcessor
|
||||
|
||||
ARM
|
||||
__vector:
|
||||
ldr pc,[pc,#+24] ;; Reset
|
||||
__und_handler:
|
||||
ldr pc,[pc,#+24] ;; Undefined instructions
|
||||
__swi_handler:
|
||||
ldr pc,[pc,#+24] ;; Software interrupt (SWI/SVC)
|
||||
__prefetch_handler:
|
||||
ldr pc,[pc,#+24] ;; Prefetch abort
|
||||
__data_handler:
|
||||
ldr pc,[pc,#+24] ;; Data abort
|
||||
DC32 0xFFFFFFFF ;; RESERVED
|
||||
__irq_handler:
|
||||
LDR PC, [PC, #-0xF20]
|
||||
__fiq_handler:
|
||||
ldr pc,[pc,#+24] ;; FIQ
|
||||
|
||||
DC32 __iar_program_start
|
||||
DC32 __und_handler
|
||||
DC32 vPortYieldProcessor
|
||||
DC32 __prefetch_handler
|
||||
DC32 __data_handler
|
||||
B .
|
||||
DC32 IRQ_Handler_Entry
|
||||
DC32 FIQ_Handler_Entry
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
;- Manage exception: The exception must be ensure in ARM mode
|
||||
;------------------------------------------------------------------------------
|
||||
SECTION text:CODE:NOROOT(2)
|
||||
ARM
|
||||
;------------------------------------------------------------------------------
|
||||
;- Function : FIQ_Handler_Entry
|
||||
;- Treatments : FIQ Controller Interrupt Handler.
|
||||
;- R8 is initialize in Cstartup
|
||||
;- Called Functions : None only by FIQ
|
||||
;------------------------------------------------------------------------------
|
||||
FIQ_Handler_Entry:
|
||||
|
||||
;- Switch in SVC/User Mode to allow User Stack access for C code
|
||||
; because the FIQ is not yet acknowledged
|
||||
|
||||
;- Save and r0 in FIQ_Register
|
||||
mov r9,r0
|
||||
ldr r0 , [r8, #AIC_FVR]
|
||||
msr CPSR_c,#I_BIT | F_BIT | SVC_MODE
|
||||
;- Save scratch/used registers and LR in User Stack
|
||||
stmfd sp!, { r1-r3, r12, lr}
|
||||
|
||||
;- Branch to the routine pointed by the AIC_FVR
|
||||
mov r14, pc
|
||||
bx r0
|
||||
|
||||
;- Restore scratch/used registers and LR from User Stack
|
||||
ldmia sp!, { r1-r3, r12, lr}
|
||||
|
||||
;- Leave Interrupts disabled and switch back in FIQ mode
|
||||
msr CPSR_c, #I_BIT | F_BIT | FIQ_MODE
|
||||
|
||||
;- Restore the R0 ARM_MODE_SVC register
|
||||
mov r0,r9
|
||||
|
||||
;- Restore the Program Counter using the LR_fiq directly in the PC
|
||||
subs pc,lr,#4
|
||||
;------------------------------------------------------------------------------
|
||||
;- Function : IRQ_Handler_Entry
|
||||
;- Treatments : IRQ Controller Interrupt Handler.
|
||||
;- Called Functions : AIC_IVR[interrupt]
|
||||
;------------------------------------------------------------------------------
|
||||
IRQ_Handler_Entry:
|
||||
;-------------------------
|
||||
;- Manage Exception Entry
|
||||
;-------------------------
|
||||
;- Adjust and save LR_irq in IRQ stack
|
||||
sub lr, lr, #4
|
||||
stmfd sp!, {lr}
|
||||
|
||||
;- Save r0 and SPSR (need to be saved for nested interrupt)
|
||||
mrs r14, SPSR
|
||||
stmfd sp!, {r0,r14}
|
||||
|
||||
;- Write in the IVR to support Protect Mode
|
||||
;- No effect in Normal Mode
|
||||
;- De-assert the NIRQ and clear the source in Protect Mode
|
||||
ldr r14, =AT91C_BASE_AIC
|
||||
ldr r0 , [r14, #AIC_IVR]
|
||||
str r14, [r14, #AIC_IVR]
|
||||
|
||||
;- Enable Interrupt and Switch in Supervisor Mode
|
||||
msr CPSR_c, #SVC_MODE
|
||||
|
||||
;- Save scratch/used registers and LR in User Stack
|
||||
stmfd sp!, { r1-r3, r12, r14}
|
||||
|
||||
;----------------------------------------------
|
||||
;- Branch to the routine pointed by the AIC_IVR
|
||||
;----------------------------------------------
|
||||
mov r14, pc
|
||||
bx r0
|
||||
|
||||
;----------------------------------------------
|
||||
;- Manage Exception Exit
|
||||
;----------------------------------------------
|
||||
;- Restore scratch/used registers and LR from User Stack
|
||||
ldmia sp!, { r1-r3, r12, r14}
|
||||
|
||||
;- Disable Interrupt and switch back in IRQ mode
|
||||
msr CPSR_c, #I_BIT | IRQ_MODE
|
||||
|
||||
;- Mark the End of Interrupt on the AIC
|
||||
ldr r14, =AT91C_BASE_AIC
|
||||
str r14, [r14, #AIC_EOICR]
|
||||
|
||||
;- Restore SPSR_irq and r0 from IRQ stack
|
||||
ldmia sp!, {r0,r14}
|
||||
msr SPSR_cxsf, r14
|
||||
|
||||
;- Restore adjusted LR_irq from IRQ stack directly in the PC
|
||||
ldmia sp!, {pc}^
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
;- Exception Vectors
|
||||
;------------------------------------------------------------------------------
|
||||
PUBLIC AT91F_Default_FIQ_handler
|
||||
PUBLIC AT91F_Default_IRQ_handler
|
||||
PUBLIC AT91F_Spurious_handler
|
||||
|
||||
ARM ; Always ARM mode after exeption
|
||||
|
||||
AT91F_Default_FIQ_handler
|
||||
b AT91F_Default_FIQ_handler
|
||||
|
||||
AT91F_Default_IRQ_handler
|
||||
b AT91F_Default_IRQ_handler
|
||||
|
||||
AT91F_Spurious_handler
|
||||
b AT91F_Spurious_handler
|
||||
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
; ?INIT
|
||||
; Program entry.
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
SECTION FIQ_STACK:DATA:NOROOT(3)
|
||||
SECTION IRQ_STACK:DATA:NOROOT(3)
|
||||
SECTION SVC_STACK:DATA:NOROOT(3)
|
||||
SECTION ABT_STACK:DATA:NOROOT(3)
|
||||
SECTION UND_STACK:DATA:NOROOT(3)
|
||||
SECTION CSTACK:DATA:NOROOT(3)
|
||||
SECTION text:CODE:NOROOT(2)
|
||||
REQUIRE __vector
|
||||
EXTERN ?main
|
||||
PUBLIC __iar_program_start
|
||||
EXTERN AT91F_LowLevelInit
|
||||
|
||||
|
||||
__iar_program_start:
|
||||
|
||||
;------------------------------------------------------------------------------
|
||||
;- Low level Init is performed in a C function: AT91F_LowLevelInit
|
||||
;- Init Stack Pointer to a valid memory area before calling AT91F_LowLevelInit
|
||||
;------------------------------------------------------------------------------
|
||||
|
||||
;- Retrieve end of RAM address
|
||||
|
||||
ldr r13,=TOP_OF_MEMORY ;- Temporary stack in internal RAM for Low Level Init execution
|
||||
ldr r0,=AT91F_LowLevelInit
|
||||
mov lr, pc
|
||||
bx r0 ;- Branch on C function (with interworking)
|
||||
|
||||
; Initialize the stack pointers.
|
||||
; The pattern below can be used for any of the exception stacks:
|
||||
; FIQ, IRQ, SVC, ABT, UND, SYS.
|
||||
; The USR mode uses the same stack as SYS.
|
||||
; The stack segments must be defined in the linker command file,
|
||||
; and be declared above.
|
||||
|
||||
mrs r0,cpsr ; Original PSR value
|
||||
bic r0,r0,#MODE_BITS ; Clear the mode bits
|
||||
orr r0,r0,#SVC_MODE ; Set SVC mode bits
|
||||
msr cpsr_c,r0 ; Change the mode
|
||||
ldr sp,=SFE(SVC_STACK) ; End of SVC_STACK
|
||||
|
||||
bic r0,r0,#MODE_BITS ; Clear the mode bits
|
||||
orr r0,r0,#UND_MODE ; Set UND mode bits
|
||||
msr cpsr_c,r0 ; Change the mode
|
||||
ldr sp,=SFE(UND_STACK) ; End of UND_STACK
|
||||
|
||||
bic r0,r0,#MODE_BITS ; Clear the mode bits
|
||||
orr r0,r0,#ABT_MODE ; Set ABT mode bits
|
||||
msr cpsr_c,r0 ; Change the mode
|
||||
ldr sp,=SFE(ABT_STACK) ; End of ABT_STACK
|
||||
|
||||
bic r0,r0,#MODE_BITS ; Clear the mode bits
|
||||
orr r0,r0,#FIQ_MODE ; Set FIQ mode bits
|
||||
msr cpsr_c,r0 ; Change the mode
|
||||
ldr sp,=SFE(FIQ_STACK) ; End of FIQ_STACK
|
||||
;- Init the FIQ register
|
||||
ldr r8, =AT91C_BASE_AIC
|
||||
|
||||
bic r0,r0,#MODE_BITS ; Clear the mode bits
|
||||
orr r0,r0,#IRQ_MODE ; Set IRQ mode bits
|
||||
msr cpsr_c,r0 ; Change the mode
|
||||
ldr sp,=SFE(IRQ_STACK) ; End of IRQ_STACK
|
||||
|
||||
bic r0,r0,#MODE_BITS ; Clear the mode bits
|
||||
orr r0,r0,#SYS_MODE ; Set System mode bits
|
||||
msr cpsr_c,r0 ; Change the mode
|
||||
ldr sp,=SFE(CSTACK) ; End of CSTACK
|
||||
|
||||
|
||||
#ifdef __ARMVFP__
|
||||
; Enable the VFP coprocessor.
|
||||
mov r0, #0x40000000 ; Set EN bit in VFP
|
||||
fmxr fpexc, r0 ; FPEXC, clear others.
|
||||
|
||||
; Disable underflow exceptions by setting flush to zero mode.
|
||||
; For full IEEE 754 underflow compliance this code should be removed
|
||||
; and the appropriate exception handler installed.
|
||||
mov r0, #0x01000000 ; Set FZ bit in VFP
|
||||
fmxr fpscr, r0 ; FPSCR, clear others.
|
||||
#endif
|
||||
|
||||
; Add more initialization here
|
||||
msr CPSR_c,#I_BIT | F_BIT | SVC_MODE
|
||||
|
||||
|
||||
; Continue to ?main for more IAR specific system startup
|
||||
|
||||
ldr r0,=?main
|
||||
bx r0
|
||||
|
||||
END ;- Terminates the assembly of the last module in a file
|
84
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/SrcIAR/Cstartup_SAM7.c
Normal file
84
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/SrcIAR/Cstartup_SAM7.c
Normal file
|
@ -0,0 +1,84 @@
|
|||
//*----------------------------------------------------------------------------
|
||||
//* ATMEL Microcontroller Software Support - ROUSSET -
|
||||
//*----------------------------------------------------------------------------
|
||||
//* The software is delivered "AS IS" without warranty or condition of any
|
||||
//* kind, either express, implied or statutory. This includes without
|
||||
//* limitation any warranty or condition with respect to merchantability or
|
||||
//* fitness for any particular purpose, or against the infringements of
|
||||
//* intellectual property rights of others.
|
||||
//*----------------------------------------------------------------------------
|
||||
//* File Name : Cstartup_SAM7.c
|
||||
//* Object : Low level initializations written in C for IAR
|
||||
//* tools
|
||||
//* Creation : 12/Jun/04
|
||||
//*
|
||||
//*----------------------------------------------------------------------------
|
||||
|
||||
|
||||
// Include the board file description
|
||||
#include "Board.h"
|
||||
|
||||
// The following functions must be write in ARM mode this function called directly
|
||||
// by exception vector
|
||||
extern void AT91F_Spurious_handler(void);
|
||||
extern void AT91F_Default_IRQ_handler(void);
|
||||
extern void AT91F_Default_FIQ_handler(void);
|
||||
|
||||
//*----------------------------------------------------------------------------
|
||||
//* \fn AT91F_LowLevelInit
|
||||
//* \brief This function performs very low level HW initialization
|
||||
//* this function can be use a Stack, depending the compilation
|
||||
//* optimization mode
|
||||
//*----------------------------------------------------------------------------
|
||||
void AT91F_LowLevelInit( void );
|
||||
void AT91F_LowLevelInit( void) @ "ICODE"
|
||||
{
|
||||
int i;
|
||||
AT91PS_PMC pPMC = AT91C_BASE_PMC;
|
||||
//* Set Flash Waite sate
|
||||
// Single Cycle Access at Up to 30 MHz, or 40
|
||||
// if MCK = 47923200 I have 50 Cycle for 1 useconde ( flied MC_FMR->FMCN
|
||||
AT91C_BASE_MC->MC_FMR = ((AT91C_MC_FMCN)&(50 <<16)) | AT91C_MC_FWS_1FWS ;
|
||||
|
||||
//* Watchdog Disable
|
||||
AT91C_BASE_WDTC->WDTC_WDMR= AT91C_SYSC_WDDIS;
|
||||
|
||||
//* Set MCK at 47 923 200
|
||||
// 1 Enabling the Main Oscillator:
|
||||
// SCK = 1/32768 = 30.51 uSeconde
|
||||
// Start up time = 8 * 6 / SCK = 56 * 30.51 = 1,46484375 ms
|
||||
pPMC->PMC_MOR = (( AT91C_CKGR_OSCOUNT & (0x06 <<8) | AT91C_CKGR_MOSCEN ));
|
||||
// Wait the startup time
|
||||
while(!(pPMC->PMC_SR & AT91C_PMC_MOSCS));
|
||||
// 2 Checking the Main Oscillator Frequency (Optional)
|
||||
// 3 Setting PLL and divider:
|
||||
// - div by 5 Fin = 3,6864 =(18,432 / 5)
|
||||
// - Mul 25+1: Fout = 95,8464 =(3,6864 *26)
|
||||
// for 96 MHz the erroe is 0.16%
|
||||
// Field out NOT USED = 0
|
||||
// PLLCOUNT pll startup time esrtimate at : 0.844 ms
|
||||
// PLLCOUNT 28 = 0.000844 /(1/32768)
|
||||
pPMC->PMC_PLLR = ((AT91C_CKGR_DIV & 0x05) |
|
||||
(AT91C_CKGR_PLLCOUNT & (28<<8)) |
|
||||
(AT91C_CKGR_MUL & (25<<16)));
|
||||
|
||||
// Wait the startup time
|
||||
while(!(pPMC->PMC_SR & AT91C_PMC_LOCK));
|
||||
// 4. Selection of Master Clock and Processor Clock
|
||||
// select the PLL clock divided by 2
|
||||
pPMC->PMC_MCKR = AT91C_PMC_CSS_PLL_CLK | AT91C_PMC_PRES_CLK_2 ;
|
||||
|
||||
// Enable User Reset and set its minimal assertion to 960 us
|
||||
AT91C_BASE_RSTC->RSTC_RMR = AT91C_SYSC_URSTEN | (0x4<<8) | (unsigned int) (0xA5<<24);
|
||||
|
||||
|
||||
// Set up the default interrupts handler vectors
|
||||
AT91C_BASE_AIC->AIC_SVR[0] = (int) AT91F_Default_FIQ_handler ;
|
||||
for (i=1;i < 31; i++)
|
||||
{
|
||||
AT91C_BASE_AIC->AIC_SVR[i] = (int) AT91F_Default_IRQ_handler ;
|
||||
}
|
||||
AT91C_BASE_AIC->AIC_SPU = (int) AT91F_Spurious_handler ;
|
||||
|
||||
}
|
||||
|
1307
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c
Normal file
1307
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.c
Normal file
File diff suppressed because it is too large
Load diff
8
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.h
Normal file
8
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USBSample.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef USB_DEMO_H
|
||||
#define USB_DEMO_H
|
||||
|
||||
void vUSBDemoTask( void *pvParameters );
|
||||
|
||||
|
||||
#endif
|
||||
|
24
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USB_ISR.s79
Normal file
24
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/USB/USB_ISR.s79
Normal file
|
@ -0,0 +1,24 @@
|
|||
RSEG ICODE:CODE
|
||||
CODE32
|
||||
|
||||
EXTERN vUSB_ISR
|
||||
PUBLIC vUSBISREntry
|
||||
|
||||
; Wrapper for the USB interrupt service routine. This can cause a
|
||||
; context switch so requires an assembly wrapper.
|
||||
|
||||
; Defines the portSAVE_CONTEXT and portRESTORE_CONTEXT macros.
|
||||
#include "ISR_Support.h"
|
||||
|
||||
vUSBISREntry:
|
||||
|
||||
portSAVE_CONTEXT ; Save the context of the current task.
|
||||
|
||||
bl vUSB_ISR ; Call the ISR routine.
|
||||
|
||||
portRESTORE_CONTEXT ; Restore the context of the current task -
|
||||
; which may be different to the task that
|
||||
; was interrupted.
|
||||
|
||||
END
|
||||
|
286
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c
Normal file
286
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/main.c
Normal file
|
@ -0,0 +1,286 @@
|
|||
/*
|
||||
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS 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 and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Having a problem? Start by reading the FAQ "My application does *
|
||||
* not run, what could be wrong? *
|
||||
* *
|
||||
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, training, latest information,
|
||||
license and contact details.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool.
|
||||
|
||||
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
|
||||
the code with commercial support, indemnification, and middleware, under
|
||||
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
|
||||
provide a safety engineered and independently SIL3 certified version under
|
||||
the SafeRTOS brand: http://www.SafeRTOS.com.
|
||||
*/
|
||||
|
||||
/*
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Creates all the demo application tasks, then starts the scheduler. The WEB
|
||||
* documentation provides more details of the demo application tasks. The SAM7
|
||||
* includes a sample USB that emulates a Joystick input to a USB host.
|
||||
*
|
||||
* Main.c also creates a task called "Check". This only executes every three
|
||||
* seconds but has the highest priority so is guaranteed to get processor time.
|
||||
* Its main function is to check that all the other tasks are still operational.
|
||||
* Each task (other than the "flash" tasks) maintains a unique count that is
|
||||
* incremented each time the task successfully completes its function. Should
|
||||
* any error occur within such a task the count is permanently halted. The
|
||||
* check task inspects the count of each task to ensure it has changed since
|
||||
* the last time the check task executed. If all the count variables have
|
||||
* changed all the tasks are still executing error free, and the check task
|
||||
* toggles the onboard LED. Should any task contain an error at any time
|
||||
* the LED toggle rate will change from 3 seconds to 500ms.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "flash.h"
|
||||
#include "integer.h"
|
||||
#include "PollQ.h"
|
||||
#include "BlockQ.h"
|
||||
#include "semtest.h"
|
||||
#include "dynamic.h"
|
||||
#include "partest.h"
|
||||
#include "comtest2.h"
|
||||
#include "USB/USBSample.h"
|
||||
|
||||
/* Priorities for the demo application tasks. */
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 )
|
||||
#define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
#define mainBLOCK_Q_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
#define mainUSB_PRIORITY ( tskIDLE_PRIORITY + 2 )
|
||||
|
||||
/* Constants required by the 'Check' task. */
|
||||
#define mainNO_ERROR_FLASH_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
|
||||
#define mainERROR_FLASH_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
|
||||
#define mainCHECK_TASK_LED ( 3 )
|
||||
|
||||
/* Constants for the ComTest tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )
|
||||
#define mainCOM_TEST_LED ( 4 ) /* Off the board. */
|
||||
|
||||
/*
|
||||
* The task that executes at the highest priority and calls
|
||||
* prvCheckOtherTasksAreStillRunning(). See the description at the top
|
||||
* of the file.
|
||||
*/
|
||||
static void vErrorChecks( void *pvParameters );
|
||||
|
||||
/*
|
||||
* Configure the processor for use with the Atmel demo board. Setup is minimal
|
||||
* as the low level init function (called from the startup asm file) takes care
|
||||
* of most things.
|
||||
*/
|
||||
static void prvSetupHardware( void );
|
||||
|
||||
/*
|
||||
* Checks that all the demo application tasks are still executing without error
|
||||
* - as described at the top of the file.
|
||||
*/
|
||||
static long prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* Starts all the other tasks, then starts the scheduler.
|
||||
*/
|
||||
void main( void )
|
||||
{
|
||||
/* Setup any hardware that has not already been configured by the low
|
||||
level init routines. */
|
||||
prvSetupHardware();
|
||||
|
||||
/* Initialise the LED outputs for use by the demo application tasks. */
|
||||
vParTestInitialise();
|
||||
|
||||
/* Start all the standard demo application tasks. */
|
||||
vStartIntegerMathTasks( tskIDLE_PRIORITY );
|
||||
vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
|
||||
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
|
||||
vStartSemaphoreTasks( mainSEM_TEST_PRIORITY );
|
||||
vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );
|
||||
vStartDynamicPriorityTasks();
|
||||
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
|
||||
|
||||
/* Also start the USB demo which is just for the SAM7. */
|
||||
xTaskCreate( vUSBDemoTask, "USB", configMINIMAL_STACK_SIZE, NULL, mainUSB_PRIORITY, NULL );
|
||||
|
||||
/* Start the check task - which is defined in this file. */
|
||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Start the scheduler.
|
||||
|
||||
NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.
|
||||
The processor MUST be in supervisor mode when vTaskStartScheduler is
|
||||
called. The demo applications included in the FreeRTOS.org download switch
|
||||
to supervisor mode prior to main being called. If you are not using one of
|
||||
these demo application projects then ensure Supervisor mode is used here. */
|
||||
|
||||
vTaskStartScheduler();
|
||||
|
||||
/* We should never get here as control is now taken by the scheduler. */
|
||||
return;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void prvSetupHardware( void )
|
||||
{
|
||||
/* When using the JTAG debugger the hardware is not always initialised to
|
||||
the correct default state. This line just ensures that this does not
|
||||
cause all interrupts to be masked at the start. */
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
|
||||
/* Most setup is performed by the low level init function called from the
|
||||
startup asm file. */
|
||||
|
||||
/* Configure the PIO Lines corresponding to LED1 to LED4 to be outputs as
|
||||
well as the UART Tx line. */
|
||||
AT91F_PIO_CfgOutput( AT91C_BASE_PIOA, LED_MASK );
|
||||
|
||||
/* Enable the peripheral clock. */
|
||||
AT91F_PMC_EnablePeriphClock( AT91C_BASE_PMC, 1 << AT91C_ID_PIOA );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static void vErrorChecks( void *pvParameters )
|
||||
{
|
||||
portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;
|
||||
|
||||
/* The parameters are not used in this task. */
|
||||
( void ) pvParameters;
|
||||
|
||||
/* Cycle for ever, delaying then checking all the other tasks are still
|
||||
operating without error. If an error is detected then the delay period
|
||||
is decreased from mainNO_ERROR_FLASH_PERIOD to mainERROR_FLASH_PERIOD so
|
||||
the on board LED flash rate will increase. */
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
/* Delay until it is time to execute again. */
|
||||
vTaskDelay( xDelayPeriod );
|
||||
|
||||
/* Check all the standard demo application tasks are executing without
|
||||
error. */
|
||||
if( prvCheckOtherTasksAreStillRunning() != pdPASS )
|
||||
{
|
||||
/* An error has been detected in one of the tasks - flash faster. */
|
||||
xDelayPeriod = mainERROR_FLASH_PERIOD;
|
||||
}
|
||||
|
||||
vParTestToggleLED( mainCHECK_TASK_LED );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static long prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
long lReturn = ( long ) pdPASS;
|
||||
|
||||
/* Check all the demo tasks (other than the flash tasks) to ensure
|
||||
that they are all still running, and that none of them have detected
|
||||
an error. */
|
||||
|
||||
if( xAreIntegerMathsTaskStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreComTestTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
|
||||
{
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
return lReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
180
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/resource/SAM7.mac
Normal file
180
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/resource/SAM7.mac
Normal file
|
@ -0,0 +1,180 @@
|
|||
// ---------------------------------------------------------
|
||||
// ATMEL Microcontroller Software Support - ROUSSET -
|
||||
// ---------------------------------------------------------
|
||||
// The software is delivered "AS IS" without warranty or
|
||||
// condition of any kind, either express, implied or
|
||||
// statutory. This includes without limitation any warranty
|
||||
// or condition with respect to merchantability or fitness
|
||||
// for any particular purpose, or against the infringements of
|
||||
// intellectual property rights of others.
|
||||
// ---------------------------------------------------------
|
||||
// File: SAM7.mac
|
||||
//
|
||||
// User setup file for CSPY debugger to simulate interrupt
|
||||
// driven Fibonacchi data input.
|
||||
// 1.1 16/Jun/04 JPP : Creation
|
||||
//
|
||||
// $Revision: 1.3 $
|
||||
//
|
||||
// ---------------------------------------------------------
|
||||
|
||||
__var i;
|
||||
__var pt;
|
||||
|
||||
execUserPreload()
|
||||
{
|
||||
//* Set the RAM memory at 0x0020 0000 for code AT 0 flash area
|
||||
CheckRemap();
|
||||
//* Get the Chip ID (AT91C_DBGU_C1R & AT91C_DBGU_C2R
|
||||
i=__readMemory32(0xFFFFF240,"Memory");
|
||||
__message " ---------------------------------------- Chip ID 0x",i:%X;
|
||||
i=__readMemory32(0xFFFFF244,"Memory");
|
||||
__message " ---------------------------------------- Extention 0x",i:%X;
|
||||
//* Get the chip status
|
||||
|
||||
//* Init AIC
|
||||
AIC();
|
||||
//* Watchdog Disable
|
||||
Watchdog();
|
||||
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Watchdog
|
||||
//-------------------------------
|
||||
// Normally, the Watchdog is enable at the reset for load it's preferable to
|
||||
// Disable.
|
||||
//-----------------------------------------------------------------------------
|
||||
Watchdog()
|
||||
{
|
||||
//* Watchdog Disable
|
||||
// AT91C_BASE_WDTC->WDTC_WDMR= AT91C_SYSC_WDDIS;
|
||||
__writeMemory32(0x00008000,0xFFFFFD44,"Memory");
|
||||
__message "------------------------------- Watchdog Disable ----------------------------------------";
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Check Remap
|
||||
//-------------
|
||||
//-----------------------------------------------------------------------------
|
||||
CheckRemap()
|
||||
{
|
||||
//* Read the value at 0x0
|
||||
i=__readMemory32(0x00000000,"Memory");
|
||||
i=i+1;
|
||||
__writeMemory32(i,0x00,"Memory");
|
||||
pt=__readMemory32(0x00000000,"Memory");
|
||||
|
||||
if (i == pt)
|
||||
{
|
||||
__message "------------------------------- The Remap is done ----------------------------------------";
|
||||
//* Toggel RESET The remap
|
||||
__writeMemory32(0x00000001,0xFFFFFF00,"Memory");
|
||||
|
||||
} else {
|
||||
__message "------------------------------- The Remap is NOT -----------------------------------------";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
execUserSetup()
|
||||
{
|
||||
ini();
|
||||
__message "-------------------------------Set PC ----------------------------------------";
|
||||
__writeMemory32(0x00000000,0xB4,"Register");
|
||||
}
|
||||
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Reset the Interrupt Controller
|
||||
//-------------------------------
|
||||
// Normally, the code is executed only if a reset has been actually performed.
|
||||
// So, the AIC initialization resumes at setting up the default vectors.
|
||||
//-----------------------------------------------------------------------------
|
||||
AIC()
|
||||
{
|
||||
// Mask All interrupt pAic->AIC_IDCR = 0xFFFFFFFF;
|
||||
__writeMemory32(0xFFFFFFFF,0xFFFFF124,"Memory");
|
||||
|
||||
for (i=0;i < 8; i++)
|
||||
{
|
||||
// AT91C_BASE_AIC->AIC_EOICR
|
||||
pt = __readMemory32(0xFFFFF130,"Memory");
|
||||
|
||||
}
|
||||
__message "------------------------------- AIC INIT ---------------------------------------------";
|
||||
}
|
||||
|
||||
ini()
|
||||
{
|
||||
__writeMemory32(0x0,0x00,"Register");
|
||||
__writeMemory32(0x0,0x04,"Register");
|
||||
__writeMemory32(0x0,0x08,"Register");
|
||||
__writeMemory32(0x0,0x0C,"Register");
|
||||
__writeMemory32(0x0,0x10,"Register");
|
||||
__writeMemory32(0x0,0x14,"Register");
|
||||
__writeMemory32(0x0,0x18,"Register");
|
||||
__writeMemory32(0x0,0x1C,"Register");
|
||||
__writeMemory32(0x0,0x20,"Register");
|
||||
__writeMemory32(0x0,0x24,"Register");
|
||||
__writeMemory32(0x0,0x28,"Register");
|
||||
__writeMemory32(0x0,0x2C,"Register");
|
||||
__writeMemory32(0x0,0x30,"Register");
|
||||
__writeMemory32(0x0,0x34,"Register");
|
||||
__writeMemory32(0x0,0x38,"Register");
|
||||
|
||||
// Set CPSR
|
||||
__writeMemory32(0x0D3,0x98,"Register");
|
||||
|
||||
|
||||
}
|
||||
|
||||
RG()
|
||||
{
|
||||
|
||||
i=__readMemory32(0x00,"Register"); __message "R00 0x",i:%X;
|
||||
i=__readMemory32(0x04,"Register"); __message "R01 0x",i:%X;
|
||||
i=__readMemory32(0x08,"Register"); __message "R02 0x",i:%X;
|
||||
i=__readMemory32(0x0C,"Register"); __message "R03 0x",i:%X;
|
||||
i=__readMemory32(0x10,"Register"); __message "R04 0x",i:%X;
|
||||
i=__readMemory32(0x14,"Register"); __message "R05 0x",i:%X;
|
||||
i=__readMemory32(0x18,"Register"); __message "R06 0x",i:%X;
|
||||
i=__readMemory32(0x1C,"Register"); __message "R07 0x",i:%X;
|
||||
i=__readMemory32(0x20,"Register"); __message "R08 0x",i:%X;
|
||||
i=__readMemory32(0x24,"Register"); __message "R09 0x",i:%X;
|
||||
i=__readMemory32(0x28,"Register"); __message "R10 0x",i:%X;
|
||||
i=__readMemory32(0x2C,"Register"); __message "R11 0x",i:%X;
|
||||
i=__readMemory32(0x30,"Register"); __message "R12 0x",i:%X;
|
||||
i=__readMemory32(0x34,"Register"); __message "R13 0x",i:%X;
|
||||
i=__readMemory32(0x38,"Register"); __message "R14 0x",i:%X;
|
||||
i=__readMemory32(0x3C,"Register"); __message "R13 SVC 0x",i:%X;
|
||||
i=__readMemory32(0x40,"Register"); __message "R14 SVC 0x",i:%X;
|
||||
i=__readMemory32(0x44,"Register"); __message "R13 ABT 0x",i:%X;
|
||||
i=__readMemory32(0x48,"Register"); __message "R14 ABT 0x",i:%X;
|
||||
i=__readMemory32(0x4C,"Register"); __message "R13 UND 0x",i:%X;
|
||||
i=__readMemory32(0x50,"Register"); __message "R14 UND 0x",i:%X;
|
||||
i=__readMemory32(0x54,"Register"); __message "R13 IRQ 0x",i:%X;
|
||||
i=__readMemory32(0x58,"Register"); __message "R14 IRQ 0x",i:%X;
|
||||
i=__readMemory32(0x5C,"Register"); __message "R08 FIQ 0x",i:%X;
|
||||
i=__readMemory32(0x60,"Register"); __message "R09 FIQ 0x",i:%X;
|
||||
i=__readMemory32(0x64,"Register"); __message "R10 FIQ 0x",i:%X;
|
||||
i=__readMemory32(0x68,"Register"); __message "R11 FIQ 0x",i:%X;
|
||||
i=__readMemory32(0x6C,"Register"); __message "R12 FIQ 0x",i:%X;
|
||||
i=__readMemory32(0x70,"Register"); __message "R13 FIQ 0x",i:%X;
|
||||
i=__readMemory32(0x74,"Register"); __message "R14 FIQ0x",i:%X;
|
||||
i=__readMemory32(0x98,"Register"); __message "CPSR ",i:%X;
|
||||
i=__readMemory32(0x94,"Register"); __message "SPSR ",i:%X;
|
||||
i=__readMemory32(0x9C,"Register"); __message "SPSR ABT ",i:%X;
|
||||
i=__readMemory32(0xA0,"Register"); __message "SPSR ABT ",i:%X;
|
||||
i=__readMemory32(0xA4,"Register"); __message "SPSR UND ",i:%X;
|
||||
i=__readMemory32(0xA8,"Register"); __message "SPSR IRQ ",i:%X;
|
||||
i=__readMemory32(0xAC,"Register"); __message "SPSR FIQ ",i:%X;
|
||||
|
||||
i=__readMemory32(0xB4,"Register"); __message "PC 0x",i:%X;
|
||||
|
||||
}
|
||||
|
211
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/resource/SAM7_RAM.mac
Normal file
211
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/resource/SAM7_RAM.mac
Normal file
|
@ -0,0 +1,211 @@
|
|||
// ---------------------------------------------------------
|
||||
// ATMEL Microcontroller Software Support - ROUSSET -
|
||||
// ---------------------------------------------------------
|
||||
// The software is delivered "AS IS" without warranty or
|
||||
// condition of any kind, either express, implied or
|
||||
// statutory. This includes without limitation any warranty
|
||||
// or condition with respect to merchantability or fitness
|
||||
// for any particular purpose, or against the infringements of
|
||||
// intellectual property rights of others.
|
||||
// ---------------------------------------------------------
|
||||
// File: SAM7_RAM.mac
|
||||
//
|
||||
// User setup file for CSPY debugger to simulate interrupt
|
||||
// driven Fibonacchi data input.
|
||||
// 1.1 16/Jun/04 JPP : Creation
|
||||
// 1.2 27/Aug/04 JPP : PLL setting
|
||||
//
|
||||
// $Revision: 1.3 $
|
||||
//
|
||||
// ---------------------------------------------------------
|
||||
|
||||
__var i;
|
||||
__var pt;
|
||||
|
||||
execUserPreload()
|
||||
{
|
||||
//*
|
||||
PllSetting();
|
||||
//* Set the RAM memory at 0x0020 0000 for code AT 0 flash area
|
||||
CheckNoRemap();
|
||||
//* Get the Chip ID (AT91C_DBGU_C1R & AT91C_DBGU_C2R
|
||||
i=__readMemory32(0xFFFFF240,"Memory");
|
||||
__message " ---------------------------------------- Chip ID 0x",i:%X;
|
||||
i=__readMemory32(0xFFFFF244,"Memory");
|
||||
__message " ---------------------------------------- Extention 0x",i:%X;
|
||||
i=__readMemory32(0xFFFFFF6C,"Memory");
|
||||
__message " ---------------------------------------- Flash Version 0x",i:%X;
|
||||
//* Get the chip status
|
||||
|
||||
//* Init AIC
|
||||
AIC();
|
||||
//* Watchdog Disable
|
||||
Watchdog();
|
||||
}
|
||||
//-----------------------------------------------------------------------------
|
||||
// PllSetting
|
||||
//-------------------------------
|
||||
// Set PLL
|
||||
//-----------------------------------------------------------------------------
|
||||
PllSetting()
|
||||
{
|
||||
// -1- Enabling the Main Oscillator:
|
||||
//*#define AT91C_PMC_MOR ((AT91_REG *) 0xFFFFFC20) // (PMC) Main Oscillator Register
|
||||
//*#define AT91C_PMC_PLLR ((AT91_REG *) 0xFFFFFC2C) // (PMC) PLL Register
|
||||
//*#define AT91C_PMC_MCKR ((AT91_REG *) 0xFFFFFC30) // (PMC) Master Clock Register
|
||||
|
||||
//*pPMC->PMC_MOR = (( AT91C_CKGR_OSCOUNT & (0x06 <<8) | //0x0000 0600
|
||||
// AT91C_CKGR_MOSCEN )); //0x0000 0001
|
||||
__writeMemory32(0x00000601,0xFFFFFC20,"Memory");
|
||||
|
||||
// -2- Wait
|
||||
// -3- Setting PLL and divider:
|
||||
// - div by 5 Fin = 3,6864 =(18,432 / 5)
|
||||
// - Mul 25+1: Fout = 95,8464 =(3,6864 *26)
|
||||
// for 96 MHz the erroe is 0.16%
|
||||
// Field out NOT USED = 0
|
||||
// PLLCOUNT pll startup time esrtimate at : 0.844 ms
|
||||
// PLLCOUNT 28 = 0.000844 /(1/32768)
|
||||
// pPMC->PMC_PLLR = ((AT91C_CKGR_DIV & 0x05) | //0x0000 0005
|
||||
// (AT91C_CKGR_PLLCOUNT & (28<<8)) //0x0000 1C00
|
||||
// (AT91C_CKGR_MUL & (25<<16))); //0x0019 0000
|
||||
__writeMemory32(0x00191C05,0xFFFFFC2C,"Memory");
|
||||
// -2- Wait
|
||||
// -5- Selection of Master Clock and Processor Clock
|
||||
// select the PLL clock divided by 2
|
||||
// pPMC->PMC_MCKR = AT91C_PMC_CSS_PLL_CLK | //0x0000 0003
|
||||
// AT91C_PMC_PRES_CLK_2 ; //0x0000 0004
|
||||
__writeMemory32(0x00000007,0xFFFFFC30,"Memory");
|
||||
|
||||
__message "------------------------------- PLL Enable ----------------------------------------";
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Watchdog
|
||||
//-------------------------------
|
||||
// Normally, the Watchdog is enable at the reset for load it's preferable to
|
||||
// Disable.
|
||||
//-----------------------------------------------------------------------------
|
||||
Watchdog()
|
||||
{
|
||||
//* Watchdog Disable
|
||||
// AT91C_BASE_WDTC->WDTC_WDMR= AT91C_SYSC_WDDIS;
|
||||
__writeMemory32(0x00008000,0xFFFFFD44,"Memory");
|
||||
__message "------------------------------- Watchdog Disable ----------------------------------------";
|
||||
}
|
||||
|
||||
CheckNoRemap()
|
||||
{
|
||||
//* Read the value at 0x0
|
||||
i=__readMemory32(0x00000000,"Memory");
|
||||
i=i+1;
|
||||
__writeMemory32(i,0x00,"Memory");
|
||||
pt=__readMemory32(0x00000000,"Memory");
|
||||
|
||||
if (i == pt)
|
||||
{
|
||||
__message "------------------------------- The Remap is done ----------------------------------------";
|
||||
|
||||
} else {
|
||||
__message "------------------------------- The Remap is NOT -----------------------------------------";
|
||||
//* Toggel RESET The remap
|
||||
__writeMemory32(0x00000001,0xFFFFFF00,"Memory");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
execUserSetup()
|
||||
{
|
||||
ini();
|
||||
__message "-------------------------------Set PC ----------------------------------------";
|
||||
__writeMemory32(0x00000000,0xB4,"Register");
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Reset the Interrupt Controller
|
||||
//-------------------------------
|
||||
// Normally, the code is executed only if a reset has been actually performed.
|
||||
// So, the AIC initialization resumes at setting up the default vectors.
|
||||
//-----------------------------------------------------------------------------
|
||||
AIC()
|
||||
{
|
||||
// Mask All interrupt pAic->AIC_IDCR = 0xFFFFFFFF;
|
||||
__writeMemory32(0xFFFFFFFF,0xFFFFF124,"Memory");
|
||||
|
||||
for (i=0;i < 8; i++)
|
||||
{
|
||||
// AT91C_BASE_AIC->AIC_EOICR
|
||||
pt = __readMemory32(0xFFFFF130,"Memory");
|
||||
|
||||
}
|
||||
__message "------------------------------- AIC INIT ---------------------------------------------";
|
||||
}
|
||||
|
||||
ini()
|
||||
{
|
||||
__writeMemory32(0x0,0x00,"Register");
|
||||
__writeMemory32(0x0,0x04,"Register");
|
||||
__writeMemory32(0x0,0x08,"Register");
|
||||
__writeMemory32(0x0,0x0C,"Register");
|
||||
__writeMemory32(0x0,0x10,"Register");
|
||||
__writeMemory32(0x0,0x14,"Register");
|
||||
__writeMemory32(0x0,0x18,"Register");
|
||||
__writeMemory32(0x0,0x1C,"Register");
|
||||
__writeMemory32(0x0,0x20,"Register");
|
||||
__writeMemory32(0x0,0x24,"Register");
|
||||
__writeMemory32(0x0,0x28,"Register");
|
||||
__writeMemory32(0x0,0x2C,"Register");
|
||||
__writeMemory32(0x0,0x30,"Register");
|
||||
__writeMemory32(0x0,0x34,"Register");
|
||||
__writeMemory32(0x0,0x38,"Register");
|
||||
|
||||
// Set CPSR
|
||||
__writeMemory32(0x0D3,0x98,"Register");
|
||||
|
||||
}
|
||||
|
||||
RG()
|
||||
{
|
||||
|
||||
i=__readMemory32(0x00,"Register"); __message "R00 0x",i:%X;
|
||||
i=__readMemory32(0x04,"Register"); __message "R01 0x",i:%X;
|
||||
i=__readMemory32(0x08,"Register"); __message "R02 0x",i:%X;
|
||||
i=__readMemory32(0x0C,"Register"); __message "R03 0x",i:%X;
|
||||
i=__readMemory32(0x10,"Register"); __message "R04 0x",i:%X;
|
||||
i=__readMemory32(0x14,"Register"); __message "R05 0x",i:%X;
|
||||
i=__readMemory32(0x18,"Register"); __message "R06 0x",i:%X;
|
||||
i=__readMemory32(0x1C,"Register"); __message "R07 0x",i:%X;
|
||||
i=__readMemory32(0x20,"Register"); __message "R08 0x",i:%X;
|
||||
i=__readMemory32(0x24,"Register"); __message "R09 0x",i:%X;
|
||||
i=__readMemory32(0x28,"Register"); __message "R10 0x",i:%X;
|
||||
i=__readMemory32(0x2C,"Register"); __message "R11 0x",i:%X;
|
||||
i=__readMemory32(0x30,"Register"); __message "R12 0x",i:%X;
|
||||
i=__readMemory32(0x34,"Register"); __message "R13 0x",i:%X;
|
||||
i=__readMemory32(0x38,"Register"); __message "R14 0x",i:%X;
|
||||
i=__readMemory32(0x3C,"Register"); __message "R13 SVC 0x",i:%X;
|
||||
i=__readMemory32(0x40,"Register"); __message "R14 SVC 0x",i:%X;
|
||||
i=__readMemory32(0x44,"Register"); __message "R13 ABT 0x",i:%X;
|
||||
i=__readMemory32(0x48,"Register"); __message "R14 ABT 0x",i:%X;
|
||||
i=__readMemory32(0x4C,"Register"); __message "R13 UND 0x",i:%X;
|
||||
i=__readMemory32(0x50,"Register"); __message "R14 UND 0x",i:%X;
|
||||
i=__readMemory32(0x54,"Register"); __message "R13 IRQ 0x",i:%X;
|
||||
i=__readMemory32(0x58,"Register"); __message "R14 IRQ 0x",i:%X;
|
||||
i=__readMemory32(0x5C,"Register"); __message "R08 FIQ 0x",i:%X;
|
||||
i=__readMemory32(0x60,"Register"); __message "R09 FIQ 0x",i:%X;
|
||||
i=__readMemory32(0x64,"Register"); __message "R10 FIQ 0x",i:%X;
|
||||
i=__readMemory32(0x68,"Register"); __message "R11 FIQ 0x",i:%X;
|
||||
i=__readMemory32(0x6C,"Register"); __message "R12 FIQ 0x",i:%X;
|
||||
i=__readMemory32(0x70,"Register"); __message "R13 FIQ 0x",i:%X;
|
||||
i=__readMemory32(0x74,"Register"); __message "R14 FIQ0x",i:%X;
|
||||
i=__readMemory32(0x98,"Register"); __message "CPSR ",i:%X;
|
||||
i=__readMemory32(0x94,"Register"); __message "SPSR ",i:%X;
|
||||
i=__readMemory32(0x9C,"Register"); __message "SPSR ABT ",i:%X;
|
||||
i=__readMemory32(0xA0,"Register"); __message "SPSR ABT ",i:%X;
|
||||
i=__readMemory32(0xA4,"Register"); __message "SPSR UND ",i:%X;
|
||||
i=__readMemory32(0xA8,"Register"); __message "SPSR IRQ ",i:%X;
|
||||
i=__readMemory32(0xAC,"Register"); __message "SPSR FIQ ",i:%X;
|
||||
|
||||
i=__readMemory32(0xB4,"Register"); __message "PC 0x",i:%X;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,43 @@
|
|||
/*###ICF### Section handled by ICF editor, don't touch! ****/
|
||||
/*-Editor annotation file-*/
|
||||
/* IcfEditorFile="$TOOLKIT_DIR$\config\ide\IcfEditor\a_v1_0.xml" */
|
||||
/*-Specials-*/
|
||||
define symbol __ICFEDIT_intvec_start__ = 0x00100000;
|
||||
/*-Memory Regions-*/
|
||||
define symbol __ICFEDIT_region_ROM_start__ = 0x00100040;
|
||||
define symbol __ICFEDIT_region_ROM_end__ = 0x10FFFF;
|
||||
define symbol __ICFEDIT_region_RAM_start__ = 0x200000;
|
||||
define symbol __ICFEDIT_region_RAM_end__ = 0x203FFF;
|
||||
/*-Sizes-*/
|
||||
define symbol __ICFEDIT_size_cstack__ = 0x400;
|
||||
define symbol __ICFEDIT_size_svcstack__ = 0x100;
|
||||
define symbol __ICFEDIT_size_irqstack__ = 0x100;
|
||||
define symbol __ICFEDIT_size_fiqstack__ = 0x0;
|
||||
define symbol __ICFEDIT_size_undstack__ = 0x0;
|
||||
define symbol __ICFEDIT_size_abtstack__ = 0x0;
|
||||
define symbol __ICFEDIT_size_heap__ = 0x0;
|
||||
/**** End of ICF editor section. ###ICF###*/
|
||||
|
||||
|
||||
define memory mem with size = 4G;
|
||||
define region ROM_region = mem:[from __ICFEDIT_region_ROM_start__ to __ICFEDIT_region_ROM_end__];
|
||||
define region RAM_region = mem:[from __ICFEDIT_region_RAM_start__ to __ICFEDIT_region_RAM_end__];
|
||||
|
||||
define block CSTACK with alignment = 8, size = __ICFEDIT_size_cstack__ { };
|
||||
define block SVC_STACK with alignment = 8, size = __ICFEDIT_size_svcstack__ { };
|
||||
define block IRQ_STACK with alignment = 8, size = __ICFEDIT_size_irqstack__ { };
|
||||
define block FIQ_STACK with alignment = 8, size = __ICFEDIT_size_fiqstack__ { };
|
||||
define block UND_STACK with alignment = 8, size = __ICFEDIT_size_undstack__ { };
|
||||
define block ABT_STACK with alignment = 8, size = __ICFEDIT_size_abtstack__ { };
|
||||
define block HEAP with alignment = 8, size = __ICFEDIT_size_heap__ { };
|
||||
|
||||
initialize by copy { readwrite };
|
||||
do not initialize { section .noinit };
|
||||
|
||||
place at address mem:__ICFEDIT_intvec_start__ { readonly section .intvec };
|
||||
|
||||
place in ROM_region { readonly };
|
||||
place in RAM_region { readwrite,
|
||||
block CSTACK, block SVC_STACK, block IRQ_STACK, block FIQ_STACK,
|
||||
block UND_STACK, block ABT_STACK, block HEAP };
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
// ----------------------------------------------------------------------------
|
||||
// ATMEL Microcontroller Software Support - ROUSSET -
|
||||
// ----------------------------------------------------------------------------
|
||||
// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
|
||||
// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
|
||||
// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
|
||||
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// ----------------------------------------------------------------------------
|
||||
// File Name : SAM7_FLASH.mac
|
||||
// Object : Generic Macro File for IAR
|
||||
// 1.0 17/Aug/05 FBr : Creation
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* _InitRSTC()
|
||||
*
|
||||
* Function description
|
||||
* Initializes the RSTC (Reset controller).
|
||||
* This makes sense since the default is to not allow user resets, which makes it impossible to
|
||||
* apply a second RESET via J-Link
|
||||
*/
|
||||
_InitRSTC() {
|
||||
__writeMemory32(0xA5000001, 0xFFFFFD08,"Memory"); // Allow user reset
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* _InitPLL()
|
||||
* Function description
|
||||
* Initializes the PMC.
|
||||
* 1. Enable the Main Oscillator
|
||||
* 2. Configure PLL to 96MHz
|
||||
* 3. Switch Master Clock (MCK) on PLL/2 = 48MHz
|
||||
*/
|
||||
_InitPLL() {
|
||||
|
||||
__message "Enable Main Oscillator";
|
||||
__writeMemory32(0x00000601,0xFFFFFc20,"Memory"); // MOSC
|
||||
while( !(__readMemory32(0xFFFFFc68,"Memory") & 0x1) );
|
||||
|
||||
__message "Set PLL to 96MHz";
|
||||
__writeMemory32(0x10191c05,0xFFFFFc2c,"Memory"); // LOCK
|
||||
while( !(__readMemory32(0xFFFFFc68,"Memory") & 0x4) );
|
||||
|
||||
__message "Set Master Clock to 48MHz";
|
||||
__writeMemory32(0x00000004,0xFFFFFc30,"Memory"); // MCKRDY
|
||||
while( !(__readMemory32(0xFFFFFc68,"Memory") & 0x8) );
|
||||
__writeMemory32(0x00000007,0xFFFFFc30,"Memory"); // MCKRDY
|
||||
while( !(__readMemory32(0xFFFFFc68,"Memory") & 0x8) );
|
||||
|
||||
// Set 1 WS for Flash accesses on each EFC
|
||||
__writeMemory32(0x00480100,0xFFFFFF60,"Memory");
|
||||
__writeMemory32(0x00480100,0xFFFFFF70,"Memory");
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* execUserReset() : JTAG set initially to Full Speed
|
||||
*/
|
||||
execUserReset() {
|
||||
__message "execUserReset()";
|
||||
__hwReset(0); // Hardware Reset: CPU is automatically halted after the reset (JTAG is already configured to 32kHz)
|
||||
_InitPLL(); // Allow to debug at JTAG Full Speed
|
||||
_InitRSTC(); // Enable User Reset to allow execUserReset() execution
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<flash_board>
|
||||
<pass>
|
||||
<loader>$TOOLKIT_DIR$\config\flashloader\Atmel\AT91SAM7S64-EK\flash-at91sam7s64.flash</loader>
|
||||
<range>CODE 0x100000 0x110000</range>
|
||||
<rel_offset>0</rel_offset>
|
||||
<args>--flash
|
||||
--boot
|
||||
</args>
|
||||
</pass>
|
||||
</flash_board>
|
1387
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/rtosdemo.ewd
Normal file
1387
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/rtosdemo.ewd
Normal file
File diff suppressed because it is too large
Load diff
1670
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/rtosdemo.ewp
Normal file
1670
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/rtosdemo.ewp
Normal file
File diff suppressed because it is too large
Load diff
10
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/rtosdemo.eww
Normal file
10
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/rtosdemo.eww
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<workspace>
|
||||
<project>
|
||||
<path>$WS_DIR$\rtosdemo.ewp</path>
|
||||
</project>
|
||||
<batchBuild/>
|
||||
</workspace>
|
||||
|
||||
|
280
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c
Normal file
280
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serial.c
Normal file
|
@ -0,0 +1,280 @@
|
|||
/*
|
||||
FreeRTOS V7.1.1 - Copyright (C) 2012 Real Time Engineers Ltd.
|
||||
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* FreeRTOS tutorial books are available in pdf and paperback. *
|
||||
* Complete, revised, and edited pdf reference manuals are also *
|
||||
* available. *
|
||||
* *
|
||||
* Purchasing FreeRTOS documentation will not only help you, by *
|
||||
* ensuring you get running as quickly as possible and with an *
|
||||
* in-depth knowledge of how to use FreeRTOS, it will also help *
|
||||
* the FreeRTOS project to continue with its mission of providing *
|
||||
* professional grade, cross platform, de facto standard solutions *
|
||||
* for microcontrollers - completely free of charge! *
|
||||
* *
|
||||
* >>> See http://www.FreeRTOS.org/Documentation for details. <<< *
|
||||
* *
|
||||
* Thank you for using FreeRTOS, and thank you for your support! *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
FreeRTOS is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License (version 2) as published by the
|
||||
Free Software Foundation AND MODIFIED BY the FreeRTOS exception.
|
||||
>>>NOTE<<< The modification to the GPL is included to allow you to
|
||||
distribute a combined work that includes FreeRTOS without being obliged to
|
||||
provide the source code for proprietary components outside of the FreeRTOS
|
||||
kernel. FreeRTOS 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 and the FreeRTOS license exception along with FreeRTOS; if not it
|
||||
can be viewed here: http://www.freertos.org/a00114.html and also obtained
|
||||
by writing to Richard Barry, contact details for whom are available on the
|
||||
FreeRTOS WEB site.
|
||||
|
||||
1 tab == 4 spaces!
|
||||
|
||||
***************************************************************************
|
||||
* *
|
||||
* Having a problem? Start by reading the FAQ "My application does *
|
||||
* not run, what could be wrong? *
|
||||
* *
|
||||
* http://www.FreeRTOS.org/FAQHelp.html *
|
||||
* *
|
||||
***************************************************************************
|
||||
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, training, latest information,
|
||||
license and contact details.
|
||||
|
||||
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
|
||||
including FreeRTOS+Trace - an indispensable productivity tool.
|
||||
|
||||
Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell
|
||||
the code with commercial support, indemnification, and middleware, under
|
||||
the OpenRTOS brand: http://www.OpenRTOS.com. High Integrity Systems also
|
||||
provide a safety engineered and independently SIL3 certified version under
|
||||
the SafeRTOS brand: http://www.SafeRTOS.com.
|
||||
*/
|
||||
|
||||
/*
|
||||
BASIC INTERRUPT DRIVEN SERIAL PORT DRIVER FOR UART0.
|
||||
*/
|
||||
|
||||
/* Standard includes. */
|
||||
#include <stdlib.h>
|
||||
|
||||
/* Scheduler includes. */
|
||||
#include "FreeRTOS.h"
|
||||
#include "queue.h"
|
||||
|
||||
/* Demo application includes. */
|
||||
#include "serial.h"
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Location of the COM0 registers. */
|
||||
#define serCOM0 ( ( AT91PS_USART ) AT91C_BASE_US0 )
|
||||
|
||||
/* Interrupt control macros. */
|
||||
#define serINTERRUPT_LEVEL ( 5 )
|
||||
#define vInterruptOn() AT91F_US_EnableIt( serCOM0, AT91C_US_TXRDY | AT91C_US_RXRDY )
|
||||
#define vInterruptOff() AT91F_US_DisableIt( serCOM0, AT91C_US_TXRDY )
|
||||
|
||||
/* Misc constants. */
|
||||
#define serINVALID_QUEUE ( ( xQueueHandle ) 0 )
|
||||
#define serHANDLE ( ( xComPortHandle ) 1 )
|
||||
#define serNO_BLOCK ( ( portTickType ) 0 )
|
||||
#define serNO_TIMEGUARD ( ( unsigned long ) 0 )
|
||||
#define serNO_PERIPHERAL_B_SETUP ( ( unsigned long ) 0 )
|
||||
|
||||
|
||||
/* Queues used to hold received characters, and characters waiting to be
|
||||
transmitted. */
|
||||
static xQueueHandle xRxedChars;
|
||||
static xQueueHandle xCharsForTx;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Interrupt entry point written in the assembler file serialISR.s79. */
|
||||
extern void vSerialISREntry( void );
|
||||
|
||||
/* The interrupt service routine - called from the assembly entry point. */
|
||||
__arm void vSerialISR( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* See the serial2.h header file.
|
||||
*/
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
xComPortHandle xReturn = serHANDLE;
|
||||
extern void ( vUART_ISR )( void );
|
||||
|
||||
/* Create the queues used to hold Rx and Tx characters. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
|
||||
/* If the queues were created correctly then setup the serial port
|
||||
hardware. */
|
||||
if( ( xRxedChars != serINVALID_QUEUE ) && ( xCharsForTx != serINVALID_QUEUE ) )
|
||||
{
|
||||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Enable the USART clock. */
|
||||
AT91F_PMC_EnablePeriphClock( AT91C_BASE_PMC, 1 << AT91C_ID_US0 );
|
||||
|
||||
AT91F_PIO_CfgPeriph( AT91C_BASE_PIOA, ( ( unsigned long ) AT91C_PA5_RXD0 ) | ( ( unsigned long ) AT91C_PA6_TXD0 ), serNO_PERIPHERAL_B_SETUP );
|
||||
|
||||
/* Set the required protocol. */
|
||||
AT91F_US_Configure( serCOM0, configCPU_CLOCK_HZ, AT91C_US_ASYNC_MODE, ulWantedBaud, serNO_TIMEGUARD );
|
||||
|
||||
/* Enable Rx and Tx. */
|
||||
serCOM0->US_CR = AT91C_US_RXEN | AT91C_US_TXEN;
|
||||
|
||||
/* Enable the Rx interrupts. The Tx interrupts are not enabled
|
||||
until there are characters to be transmitted. */
|
||||
AT91F_US_EnableIt( serCOM0, AT91C_US_RXRDY );
|
||||
|
||||
/* Enable the interrupts in the AIC. */
|
||||
AT91F_AIC_ConfigureIt( AT91C_BASE_AIC, AT91C_ID_US0, serINTERRUPT_LEVEL, AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE, ( void (*)( void ) ) vSerialISREntry );
|
||||
AT91F_AIC_EnableIt( AT91C_BASE_AIC, AT91C_ID_US0 );
|
||||
}
|
||||
portEXIT_CRITICAL();
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = ( xComPortHandle ) 0;
|
||||
}
|
||||
|
||||
/* This demo file only supports a single port but we have to return
|
||||
something to comply with the standard demo header file. */
|
||||
return xReturn;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* The port handle is not required as this driver only supports one port. */
|
||||
( void ) pxPort;
|
||||
|
||||
/* Get the next character from the buffer. Return false if no characters
|
||||
are available, or arrive before xBlockTime expires. */
|
||||
if( xQueueReceive( xRxedChars, pcRxedChar, xBlockTime ) )
|
||||
{
|
||||
return pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return pdFALSE;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )
|
||||
{
|
||||
signed char *pxNext;
|
||||
|
||||
/* A couple of parameters that this port does not use. */
|
||||
( void ) usStringLength;
|
||||
( void ) pxPort;
|
||||
|
||||
/* NOTE: This implementation does not handle the queue being full as no
|
||||
block time is used! */
|
||||
|
||||
/* The port handle is not required as this driver only supports UART0. */
|
||||
( void ) pxPort;
|
||||
|
||||
/* Send each character in the string, one at a time. */
|
||||
pxNext = ( signed char * ) pcString;
|
||||
while( *pxNext )
|
||||
{
|
||||
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );
|
||||
pxNext++;
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
/* Place the character in the queue of characters to be transmitted. */
|
||||
if( xQueueSend( xCharsForTx, &cOutChar, xBlockTime ) != pdPASS )
|
||||
{
|
||||
return pdFAIL;
|
||||
}
|
||||
|
||||
/* Turn on the Tx interrupt so the ISR will remove the character from the
|
||||
queue and send it. This does not need to be in a critical section as
|
||||
if the interrupt has already removed the character the next interrupt
|
||||
will simply turn off the Tx interrupt again. */
|
||||
vInterruptOn();
|
||||
|
||||
return pdPASS;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSerialClose( xComPortHandle xPort )
|
||||
{
|
||||
/* Not supported as not required by the demo application. */
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Serial port ISR. This can cause a context switch so is not defined as a
|
||||
standard ISR using the __irq keyword. Instead a wrapper function is defined
|
||||
within serialISR.s79 which in turn calls this function. See the port
|
||||
documentation on the FreeRTOS.org website for more information. */
|
||||
__arm void vSerialISR( void )
|
||||
{
|
||||
unsigned long ulStatus;
|
||||
signed char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
ulStatus = serCOM0->US_CSR &= serCOM0->US_IMR;
|
||||
|
||||
if( ulStatus & AT91C_US_TXRDY )
|
||||
{
|
||||
/* The interrupt was caused by the THR becoming empty. Are there any
|
||||
more characters to transmit? */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
/* A character was retrieved from the queue so can be sent to the
|
||||
THR now. */
|
||||
serCOM0->US_THR = cChar;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Queue empty, nothing to send so turn off the Tx interrupt. */
|
||||
vInterruptOff();
|
||||
}
|
||||
}
|
||||
|
||||
if( ulStatus & AT91C_US_RXRDY )
|
||||
{
|
||||
/* The interrupt was caused by a character being received. Grab the
|
||||
character from the RHR and place it in the queue or received
|
||||
characters. */
|
||||
cChar = serCOM0->US_RHR;
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
/* If a task was woken by either a character being received or a character
|
||||
being transmitted then we may need to switch to another task. */
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
|
||||
/* End the interrupt in the AIC. */
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
24
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serialISR.s79
Normal file
24
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/serial/serialISR.s79
Normal file
|
@ -0,0 +1,24 @@
|
|||
RSEG ICODE:CODE
|
||||
CODE32
|
||||
|
||||
EXTERN vSerialISR
|
||||
PUBLIC vSerialISREntry
|
||||
|
||||
; Wrapper for the serial port interrupt service routine. This can cause a
|
||||
; context switch so requires an assembly wrapper.
|
||||
|
||||
; Defines the portSAVE_CONTEXT and portRESTORE_CONTEXT macros.
|
||||
#include "ISR_Support.h"
|
||||
|
||||
vSerialISREntry:
|
||||
|
||||
portSAVE_CONTEXT ; Save the context of the current task.
|
||||
|
||||
bl vSerialISR ; Call the ISR routine.
|
||||
|
||||
portRESTORE_CONTEXT ; Restore the context of the current task -
|
||||
; which may be different to the task that
|
||||
; was interrupted.
|
||||
|
||||
END
|
||||
|
71
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/Basic.dbgdt
Normal file
71
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/Basic.dbgdt
Normal file
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Project>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
<Column0>189</Column0><Column1>27</Column1><Column2>27</Column2></ColumnWidths>
|
||||
</Workspace>
|
||||
<Disassembly>
|
||||
|
||||
|
||||
|
||||
<PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><MixedMode>1</MixedMode><CodeCovEnabled>0</CodeCovEnabled><CodeCovShow>0</CodeCovShow></Disassembly>
|
||||
<Debug-Log/>
|
||||
<Build/>
|
||||
<Register><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows></Register><QWatch><Column0>188</Column0><Column1>171</Column1><Column2>100</Column2><Column3>100</Column3></QWatch><Memory><ZoneNumber>0</ZoneNumber><FindDirection>1</FindDirection><FindAsHex>0</FindAsHex></Memory><Watch><Format><struct_types/><watch_formats/></Format></Watch></Static>
|
||||
<Windows>
|
||||
<Wnd0>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-23416-30482</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd0>
|
||||
|
||||
<Wnd2>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-12145-30489</Identity>
|
||||
<TabName>Debug Log</TabName>
|
||||
<Factory>Debug-Log</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<Identity>TabID-22894-30492</Identity>
|
||||
<TabName>Build</TabName>
|
||||
<Factory>Build</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>1</SelectedTab></Wnd2>
|
||||
<Wnd4><Tabs><Tab><Identity>TabID-18780-12821</Identity><TabName>Memory</TabName><Factory>Memory</Factory><Session><SelectionAnchor>2097764</SelectionAnchor><SelectionEnd>2097764</SelectionEnd><UnitsPerGroup>1</UnitsPerGroup><EndianMode>0</EndianMode><DataCovEnabled>0</DataCovEnabled><DataCovShown>0</DataCovShown></Session></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd4><Wnd5><Tabs><Tab><Identity>TabID-23506-14575</Identity><TabName>Watch</TabName><Factory>Watch</Factory><Session><Expressions><Expression><Expression>pxCurrentTCB</Expression></Expression><Expression><Expression>ulCriticalNesting</Expression></Expression></Expressions><TabId>0</TabId><Column0>176</Column0><Column1>100</Column1><Column2>100</Column2><Column3>100</Column3></Session></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd5><Wnd1><Tabs><Tab><Identity>TabID-4859-22480</Identity><TabName>Disassembly</TabName><Factory>Disassembly</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd1><Wnd3><Tabs><Tab><Identity>TabID-154-22568</Identity><TabName>Register</TabName><Factory>Register</Factory><Session><REG1>0</REG1><REG2>0</REG2><Group>0</Group><States>1</States><State0>CPSR</State0></Session></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd3></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_Ateml_IAR\main.c</Filename><XPos>0</XPos><YPos>10</YPos><SelStart>378</SelStart><SelEnd>378</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\source\include\task.h</Filename><XPos>0</XPos><YPos>778</YPos><SelStart>24283</SelStart><SelEnd>24283</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\tasks.c</Filename><XPos>0</XPos><YPos>939</YPos><SelStart>30511</SelStart><SelEnd>30511</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_Ateml_IAR\SrcIAR\Cstartup.s79</Filename><XPos>0</XPos><YPos>48</YPos><SelStart>2226</SelStart><SelEnd>2226</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\Common\Minimal\flash.c</Filename><XPos>0</XPos><YPos>98</YPos><SelStart>4025</SelStart><SelEnd>4025</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\AtmelSAM7\portasm.s79</Filename><XPos>0</XPos><YPos>41</YPos><SelStart>1057</SelStart><SelEnd>1079</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_Ateml_IAR\srciar\lib_AT91SAM7S64.h</Filename><XPos>0</XPos><YPos>2778</YPos><SelStart>108450</SelStart><SelEnd>108450</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\AtmelSAM7\port.c</Filename><XPos>0</XPos><YPos>136</YPos><SelStart>5326</SelStart><SelEnd>5326</SelEnd></Tab><ActiveTab>7</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_Ateml_IAR\ParTest\ParTest.c</Filename><XPos>0</XPos><YPos>36</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\AtmelSAM7\portmacro.h</Filename><XPos>0</XPos><YPos>67</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-0084f8a0><key>IarIdePM1</key></Toolbar-0084f8a0></Sizes></Row0><Row1><Sizes><Toolbar-031ef990><key>DebuggerGui1</key></Toolbar-031ef990></Sizes></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>715</Bottom><Right>263</Right><x>-2</x><y>-2</y><xscreen>153</xscreen><yscreen>153</yscreen><sizeHorzCX>95625</sizeHorzCX><sizeHorzCY>136729</sizeHorzCY><sizeVertCX>165625</sizeVertCX><sizeVertCY>640750</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>715</Bottom><Right>647</Right><x>-2</x><y>-2</y><xscreen>190</xscreen><yscreen>190</yscreen><sizeHorzCX>118750</sizeHorzCX><sizeHorzCY>169794</sizeHorzCY><sizeVertCX>405625</sizeVertCX><sizeVertCY>640750</sizeVertCY></Rect></Wnd1></Sizes></Row0><Row1><Sizes><Wnd3><Rect><Top>-2</Top><Left>645</Left><Bottom>715</Bottom><Right>1025</Right><x>645</x><y>-2</y><xscreen>190</xscreen><yscreen>190</yscreen><sizeHorzCX>118750</sizeHorzCX><sizeHorzCY>169794</sizeHorzCY><sizeVertCX>237500</sizeVertCX><sizeVertCY>640750</sizeVertCY></Rect></Wnd3></Sizes></Row1></Right><Bottom><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>151</Bottom><Right>1602</Right><x>-2</x><y>-2</y><xscreen>1604</xscreen><yscreen>153</yscreen><sizeHorzCX>1002500</sizeHorzCX><sizeHorzCY>136729</sizeHorzCY><sizeVertCX>95625</sizeVertCX><sizeVertCY>136729</sizeVertCY></Rect></Wnd2></Sizes></Row0><Row1><Sizes><Wnd4><Rect><Top>149</Top><Left>-2</Left><Bottom>333</Bottom><Right>669</Right><x>-2</x><y>149</y><xscreen>671</xscreen><yscreen>184</yscreen><sizeHorzCX>419375</sizeHorzCX><sizeHorzCY>164432</sizeHorzCY><sizeVertCX>114375</sizeVertCX><sizeVertCY>163538</sizeVertCY></Rect></Wnd4><Wnd5><Rect><Top>149</Top><Left>667</Left><Bottom>333</Bottom><Right>1602</Right><x>667</x><y>149</y><xscreen>935</xscreen><yscreen>184</yscreen><sizeHorzCX>584375</sizeHorzCX><sizeHorzCY>164432</sizeHorzCY><sizeVertCX>115000</sizeVertCX><sizeVertCY>598748</sizeVertCY></Rect></Wnd5></Sizes></Row1></Bot
|
||||
tom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Project>
|
||||
|
||||
|
23
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/Basic.dni
Normal file
23
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/Basic.dni
Normal file
|
@ -0,0 +1,23 @@
|
|||
[DisAssemblyWindow]
|
||||
NumStates=_ 1
|
||||
State 1=_ 1
|
||||
[JLinkDriver]
|
||||
WatchVectorCatch=_ 0
|
||||
WatchCond=_ 0
|
||||
Watch0=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
|
||||
Watch1=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
|
||||
[Log file]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
Category=_ 0
|
||||
[TermIOLog]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
[Disassemble mode]
|
||||
mode=0
|
||||
[Breakpoints]
|
||||
Bp0=_ "Code" "{E:\Dev\FreeRTOS\Source\portable\IAR\AtmelSAM7\port.c}.141.1@1" 1 0 0 0 "" 0 ""
|
||||
Count=1
|
||||
[Low Level]
|
||||
Pipeline mode=0
|
||||
Initialized=0
|
80
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/BasicSAM7.wsdt
Normal file
80
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/BasicSAM7.wsdt
Normal file
|
@ -0,0 +1,80 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Workspace>
|
||||
<ConfigDictionary>
|
||||
|
||||
<CurrentConfigs><Project>rtosdemo/Flash Debug</Project></CurrentConfigs></ConfigDictionary>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
<Column0>232</Column0><Column1>27</Column1><Column2>27</Column2></ColumnWidths>
|
||||
</Workspace>
|
||||
<Build/>
|
||||
<TerminalIO/>
|
||||
<Profiling/>
|
||||
<Watch>
|
||||
<Format>
|
||||
<struct_types/>
|
||||
<watch_formats/>
|
||||
</Format>
|
||||
</Watch>
|
||||
<Debug-Log/>
|
||||
<Disassembly>
|
||||
|
||||
|
||||
|
||||
<MixedMode>1</MixedMode><CodeCovEnabled>0</CodeCovEnabled><CodeCovShow>0</CodeCovShow></Disassembly>
|
||||
<CodeCoveragePlugin/><Memory><ZoneNumber>0</ZoneNumber><FindDirection>1</FindDirection><FindAsHex>0</FindAsHex></Memory></Static>
|
||||
<Windows>
|
||||
|
||||
|
||||
<Wnd6>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-29690-30365</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd6><Wnd7>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-27076-30414</Identity>
|
||||
<TabName>Build</TabName>
|
||||
<Factory>Build</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<Identity>TabID-12668-30479</Identity>
|
||||
<TabName>Debug Log</TabName>
|
||||
<Factory>Debug-Log</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>1</SelectedTab></Wnd7></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\source\include\task.h</Filename><XPos>0</XPos><YPos>778</YPos><SelStart>24283</SelStart><SelEnd>24283</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\AtmelSAM7\portasm.s79</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>2583</SelStart><SelEnd>2583</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_Ateml_IAR\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_Ateml_IAR\SrcIAR\Cstartup.s79</Filename><XPos>0</XPos><YPos>30</YPos><SelStart>2226</SelStart><SelEnd>2226</SelEnd></Tab><ActiveTab>3</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_Ateml_IAR\srciar\lib_AT91SAM7S64.h</Filename><XPos>0</XPos><YPos>2371</YPos><SelStart>92638</SelStart><SelEnd>92638</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\Common\Minimal\flash.c</Filename><XPos>0</XPos><YPos>98</YPos><SelStart>4025</SelStart><SelEnd>4025</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\AtmelSAM7\port.c</Filename><XPos>0</XPos><YPos>177</YPos><SelStart>7662</SelStart><SelEnd>7662</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_Ateml_IAR\ParTest\ParTest.c</Filename><XPos>0</XPos><YPos>36</YPos><SelStart>0</SelStart><SelEnd>0</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\IAR\AtmelSAM7\portmacro.h</Filename><XPos>0</XPos><YPos>21</YPos><SelStart>2110</SelStart><SelEnd>2110</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Demo\ARM7_Ateml_IAR\SrcIAR\Cstartup_SAM7.c</Filename><XPos>0</XPos><YPos>29</YPos><SelStart>3116</SelStart><SelEnd>3116</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\portable\MemMang\heap_2.c</Filename><XPos>0</XPos><YPos>170</YPos><SelStart>7352</SelStart><SelEnd>7352</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>E:\Dev\FreeRTOS\Source\tasks.c</Filename><XPos>0</XPos><YPos>1270</YPos><SelStart>40884</SelStart><SelEnd>40884</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-0084f7c0><key>IarIdePM1</key></Toolbar-0084f7c0></Sizes></Row0></Top><Left><Row0><Sizes><Wnd6><Rect><Top>-2</Top><Left>-2</Left><Bottom>866</Bottom><Right>306</Right><x>-2</x><y>-2</y><xscreen>48</xscreen><yscreen>48</yscreen><sizeHorzCX>30000</sizeHorzCX><sizeHorzCY>42895</sizeHorzCY><sizeVertCX>192500</sizeVertCX><sizeVertCY>775692</sizeVertCY></Rect></Wnd6></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd7><Rect><Top>-2</Top><Left>-2</Left><Bottom>206</Bottom><Right>1602</Right><x>-2</x><y>-2</y><xscreen>1604</xscreen><yscreen>208</yscreen><sizeHorzCX>1002500</sizeHorzCX><sizeHorzCY>185880</sizeHorzCY><sizeVertCX>30000</sizeVertCX><sizeVertCY>42895</sizeVertCY></Rect></Wnd7></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
62
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/rtosdemo.dbgdt
Normal file
62
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/rtosdemo.dbgdt
Normal file
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Project>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
<Column0>204</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
</Workspace>
|
||||
<Disassembly>
|
||||
|
||||
|
||||
|
||||
<PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><MixedMode>1</MixedMode><CodeCovEnabled>0</CodeCovEnabled><CodeCovShow>0</CodeCovShow></Disassembly>
|
||||
<Debug-Log><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Build</Factory></Window></Windows></PreferedWindows><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1622</ColumnWidth1></Debug-Log>
|
||||
<Build><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window></Windows></PreferedWindows></Build>
|
||||
<Register>
|
||||
<PreferedWindows>
|
||||
|
||||
|
||||
|
||||
|
||||
<Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows>
|
||||
</Register>
|
||||
<QWatch><Column0>161</Column0><Column1>100</Column1><Column2>100</Column2><Column3>100</Column3></QWatch><Memory><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><ZoneNumber>0</ZoneNumber><FindDirection>1</FindDirection><FindAsHex>0</FindAsHex></Memory></Static>
|
||||
<Windows>
|
||||
|
||||
|
||||
|
||||
<Wnd0>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-22256-14845</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode><ExpandedNode>rtosdemo/USBSample.c</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-18517-20319</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd1></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_AT91SAM7S64_IAR\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>880</SelStart><SelEnd>880</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\rc\1\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\SrcIAR\Cstartup.s</Filename><XPos>0</XPos><YPos>213</YPos><SelStart>8773</SelStart><SelEnd>8773</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\rc\1\FreeRTOS\Source\portable\IAR\AtmelSAM7S64\AT91SAM7S64.h</Filename><XPos>0</XPos><YPos>18</YPos><SelStart>2080</SelStart><SelEnd>2080</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\rc\1\FreeRTOS\Source\portable\IAR\AtmelSAM7S64\port.c</Filename><XPos>0</XPos><YPos>234</YPos><SelStart>9960</SelStart><SelEnd>9960</SelEnd></Tab><ActiveTab>3</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-00abb198><key>iaridepm.enu1</key></Toolbar-00abb198><Toolbar-049f1f30><key>debuggergui.enu1</key></Toolbar-049f1f30></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>740</Bottom><Right>278</Right><x>-2</x><y>-2</y><xscreen>0</xscreen><yscreen>0</yscreen><sizeHorzCX>0</sizeHorzCX><sizeHorzCY>0</sizeHorzCY><sizeVertCX>166667</sizeVertCX><sizeVertCY>755601</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>198</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>200</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>119048</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Project>
|
||||
|
||||
|
47
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/rtosdemo.dni
Normal file
47
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/rtosdemo.dni
Normal file
|
@ -0,0 +1,47 @@
|
|||
[DisAssemblyWindow]
|
||||
NumStates=_ 1
|
||||
State 1=_ 1
|
||||
[JLinkDriver]
|
||||
WatchVectorCatch=_ 0
|
||||
WatchCond=_ 0
|
||||
Watch0=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
|
||||
Watch1=_ 0 "" 0 "" 0 "" 0 "" 0 0 0 0
|
||||
[Low Level]
|
||||
Pipeline mode=1
|
||||
Initialized=0
|
||||
[CodeCoverage]
|
||||
Enabled=_ 0
|
||||
[Profiling]
|
||||
Enabled=0
|
||||
[StackPlugin]
|
||||
Enabled=1
|
||||
OverflowWarningsEnabled=1
|
||||
WarningThreshold=90
|
||||
SpWarningsEnabled=1
|
||||
WarnHow=0
|
||||
UseTrigger=1
|
||||
TriggerName=main
|
||||
LimitSize=0
|
||||
ByteLimit=50
|
||||
[TraceHelper]
|
||||
Enabled=0
|
||||
ShowSource=1
|
||||
[DebugChecksum]
|
||||
Checksum=-1701609349
|
||||
[InstructionProfiling]
|
||||
Enabled=_ 0
|
||||
[Log file]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
Category=_ 0
|
||||
[TermIOLog]
|
||||
LoggingEnabled=_ 0
|
||||
LogFile=_ ""
|
||||
[DriverProfiling]
|
||||
Enabled=0
|
||||
Source=2
|
||||
Graph=0
|
||||
[Disassemble mode]
|
||||
mode=0
|
||||
[Breakpoints]
|
||||
Count=0
|
76
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/rtosdemo.wsdt
Normal file
76
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/rtosdemo.wsdt
Normal file
|
@ -0,0 +1,76 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<Workspace>
|
||||
<ConfigDictionary>
|
||||
|
||||
<CurrentConfigs><Project>rtosdemo/Flash Debug</Project></CurrentConfigs></ConfigDictionary>
|
||||
<Desktop>
|
||||
<Static>
|
||||
<Workspace>
|
||||
<ColumnWidths>
|
||||
|
||||
|
||||
|
||||
<Column0>236</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
|
||||
</Workspace>
|
||||
<Build><ColumnWidth0>18</ColumnWidth0><ColumnWidth1>1155</ColumnWidth1><ColumnWidth2>308</ColumnWidth2><ColumnWidth3>77</ColumnWidth3></Build>
|
||||
<Debug-Log/>
|
||||
<TerminalIO/>
|
||||
<CodeCoveragePlugin/>
|
||||
<Profiling/>
|
||||
<Watch>
|
||||
<Format>
|
||||
<struct_types/>
|
||||
<watch_formats/>
|
||||
</Format>
|
||||
</Watch>
|
||||
<Disassembly><MixedMode>1</MixedMode><CodeCovEnabled>0</CodeCovEnabled><CodeCovShow>0</CodeCovShow></Disassembly><Memory><ZoneNumber>0</ZoneNumber><FindDirection>1</FindDirection><FindAsHex>0</FindAsHex></Memory></Static>
|
||||
<Windows>
|
||||
|
||||
|
||||
<Wnd2>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-17425-14382</Identity>
|
||||
<TabName>Workspace</TabName>
|
||||
<Factory>Workspace</Factory>
|
||||
<Session>
|
||||
|
||||
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode></NodeDict></Session>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd2><Wnd3>
|
||||
<Tabs>
|
||||
<Tab>
|
||||
<Identity>TabID-4084-16269</Identity>
|
||||
<TabName>Build</TabName>
|
||||
<Factory>Build</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
<Tab>
|
||||
<Identity>TabID-25581-16276</Identity>
|
||||
<TabName>Debug Log</TabName>
|
||||
<Factory>Debug-Log</Factory>
|
||||
<Session/>
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
<SelectedTab>0</SelectedTab></Wnd3></Windows>
|
||||
<Editor>
|
||||
|
||||
|
||||
|
||||
|
||||
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\WorkingCopy\Demo\ARM7_AT91SAM7S64_IAR\main.c</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>880</SelStart><SelEnd>880</SelEnd></Tab><ActiveTab>0</ActiveTab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
|
||||
<Positions>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<Top><Row0><Sizes><Toolbar-00abb198><key>iaridepm.enu1</key></Toolbar-00abb198></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>576</Bottom><Right>310</Right><x>-2</x><y>-2</y><xscreen>32</xscreen><yscreen>26</yscreen><sizeHorzCX>19048</sizeHorzCX><sizeHorzCY>26477</sizeHorzCY><sizeVertCX>185714</sizeVertCX><sizeVertCY>588595</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>362</Bottom><Right>1682</Right><x>-2</x><y>-2</y><xscreen>1684</xscreen><yscreen>364</yscreen><sizeHorzCX>1002381</sizeHorzCX><sizeHorzCY>370672</sizeHorzCY><sizeVertCX>19048</sizeVertCX><sizeVertCY>26477</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
|
||||
</Desktop>
|
||||
</Workspace>
|
||||
|
||||
|
17
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/rtosdemo_lnk.par
Normal file
17
FreeRTOS/Demo/ARM7_AT91SAM7S64_IAR/settings/rtosdemo_lnk.par
Normal file
|
@ -0,0 +1,17 @@
|
|||
// IAR XLINK Setup
|
||||
// Autogenerated file - do not edit
|
||||
%
|
||||
setrangelist($evec_ADR,[0-3F]);
|
||||
setrangelist($internal_ROM,[8000-FFFFF]);
|
||||
setrangelist($external_ROM,[]);
|
||||
setrangelist($internal_RAM,[100000-7FFFFF]);
|
||||
setrangelist($external_RAM,[]);
|
||||
$CSTACK_SIZE=200;
|
||||
$IRQSTACK_SIZE=100;
|
||||
$HEAP_SIZE=4;
|
||||
$COMMANDS="";
|
||||
$STACK_LOCATION="Internal RAM";
|
||||
$IRQSTACK_LOCATION="Internal RAM";
|
||||
$HEAP_LOCATION="Internal RAM";
|
||||
$iar_saved_xclfilename="E:\Dev\FreeRTOS\Demo\ARM7_AT91SAM7S64_IAR\resource\at91SAM7S64_NoRemap.xcl";
|
||||
%
|
Loading…
Add table
Add a link
Reference in a new issue