Add FreeRTOS-Plus directory.

This commit is contained in:
Richard Barry 2012-08-11 21:34:11 +00:00
parent 7bd5f21ad5
commit f508a5f653
6798 changed files with 134949 additions and 19 deletions

View file

@ -0,0 +1,90 @@
;/*
; 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!
;
; http://www.FreeRTOS.org - Documentation, latest information, license and
; contact details.
;
; http://www.SafeRTOS.com - A version that is certified for use in safety
; critical systems.
;
; http://www.OpenRTOS.com - Commercial support, development, porting,
; licensing and training services.
;*/
;
; This file defines a wrapper for the interrupt generated each time the button
; on the target board is pushed. The asm wrapper is used to save and restore
; the task context as a context switch may occur within the ISR itself.
; The C portion of the ISR is defined within ButtonTask.c.
;
; Include the portSAVE_CONTEXT and portRESTORE_CONTEXT macros.
#include "ISR_Support.h"
PUBLIC vButtonISRWrapper
EXTERN vButtonISRHandler
RSEG CODE:CODE
vButtonISRWrapper:
; Save the current task context.
portSAVE_CONTEXT
; Call the C portion of the ISR.
call vButtonISRHandler
; Restore the context of whichever task is to run next - which might be
; different from the task that was originally interrupted.
portRESTORE_CONTEXT
reti
; Place the ISR into the vector table.
COMMON INTVEC:CODE:ROOT(1)
ORG 8
`??vButtonISRWrapper??INTVEC 8`:
DW vButtonISRWrapper
END

View file

@ -0,0 +1,136 @@
/*
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.
*/
/*
* This file defines the button push task and ISR as described at the top of
* main.c. The ISR is called from a wrapper function defined in ButtonISR.s26.
*/
/* Kernel includes. */
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
/* The LED output used by the button push task. */
#define butLED1 P7_bit.no7
/* A short delay used for button debouncing. */
#define butDEBOUNCE_DELAY ( 200 / portTICK_RATE_MS )
/* The semaphore used to synchronise the button push task with the interrupt. */
static xSemaphoreHandle xButtonSemaphore;
/*
* The definition of the button task itself. See the comments at the top of
* main.c.
*/
void vButtonTask( void *pvParameters )
{
/* Ensure the semaphore is created before it gets used. */
vSemaphoreCreateBinary( xButtonSemaphore );
for( ;; )
{
/* Block on the semaphore to wait for an interrupt event. The semaphore
is 'given' from vButtonISRHandler() below. Using portMAX_DELAY as the
block time will cause the task to block indefinitely provided
INCLUDE_vTaskSuspend is set to 1 in FreeRTOSConfig.h. */
xSemaphoreTake( xButtonSemaphore, portMAX_DELAY );
/* The button must have been pushed for this line to be executed.
Simply toggle the LED. */
butLED1 = !butLED1;
/* Wait a short time then clear any pending button pushes as a crude
method of debouncing the switch. xSemaphoreTake() uses a block time of
zero this time so it returns immediately rather than waiting for the
interrupt to occur. */
vTaskDelay( butDEBOUNCE_DELAY );
xSemaphoreTake( xButtonSemaphore, 0 );
}
}
/*-----------------------------------------------------------*/
/*
* The C portion of the interrupt handler. Interrupts are triggered by pushing
* the button on the target board. This interrupt can cause a context switch
* so has an assembly file wrapper defined within ButtonISR.s26.
*/
void vButtonISRHandler( void )
{
short sHigherPriorityTaskWoken = pdFALSE;
/* 'Give' the semaphore to unblock the button task. */
xSemaphoreGiveFromISR( xButtonSemaphore, &sHigherPriorityTaskWoken );
/* If giving the semaphore unblocked a task, and the unblocked task has a
priority that is higher than the currently running task, then
sHigherPriorityTaskWoken will have been set to pdTRUE. Passing a pdTRUE
value to portYIELD_FROM_ISR() will cause this interrupt to return directly
to the higher priority unblocked task. */
portYIELD_FROM_ISR( sHigherPriorityTaskWoken );
}
/*-----------------------------------------------------------*/

View file

@ -0,0 +1,162 @@
/*
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
/*
* 78K0R Clock Source Configuration
* 1 = use internal High Speed Clock Source (typically 8Mhz on the 78K0R/Kx3)
* 0 = use external Clock Source
*/
#define configCLOCK_SOURCE 0
/*
* 78K0R Memory Model
* 1 = use far memory mode
* 0 = use near memory mode
*
* This setting must match the setting in the IAR project options.
*/
#define configMEMORY_MODE 1
/*
* 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.
*/
#define configUSE_PREEMPTION 1
/* Only use following section for C files */
#ifdef __IAR_SYSTEMS_ICC__
#pragma language=extended
#pragma system_include
#include <intrinsics.h>
#define configUSE_IDLE_HOOK 0
#define configUSE_TICK_HOOK 0
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 100 )
#define configMAX_TASK_NAME_LEN ( 10 )
#define configUSE_TRACE_FACILITY 0
#define configUSE_16_BIT_TICKS 1
#define configIDLE_SHOULD_YIELD 1
#define configCHECK_FOR_STACK_OVERFLOW 2
#define configUSE_MUTEXES 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 1
#define INCLUDE_vTaskCleanUpResources 0
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
#if configCLOCK_SOURCE == 0
#define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) /* using the external clock source */
#else
#define configCPU_CLOCK_HZ ( ( unsigned long ) 8000000 ) /* using the internal high speed clock */
#endif /* configCLOCK_SOURCE */
/* Definitions that are specific to the project being used. */
#ifdef __IAR_78K0R_Kx3__
/* Device specific includes. */
#include <io78f1166_a0.h>
#include <io78f1166_a0_ext.h>
#define configTOTAL_HEAP_SIZE ( (size_t ) ( 7000 ) )
#endif /* __IAR_78K0R_Kx3__ */
#ifdef __IAR_78K0R_Kx3L__
/* Device specific includes. */
#include <io78f1009_64.h>
#include <io78f1009_64_ext.h>
#define configTOTAL_HEAP_SIZE ( (size_t ) ( 2500 ) )
#endif /* _IAR_78K0R_Kx3L__ */
#endif /* __IAR_SYSTEMS_ICC__ */
#endif /* FREERTOS_CONFIG_H */

View file

@ -0,0 +1,198 @@
;/*
; 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!
;
; http://www.FreeRTOS.org - Documentation, latest information, license and
; contact details.
;
; http://www.SafeRTOS.com - A version that is certified for use in safety
; critical systems.
;
; http://www.OpenRTOS.com - Commercial support, development, porting,
; licensing and training services.
;*/
;
; This file defines the RegTest tasks as described at the top of main.c
;
;------------------------------------------------------------------------------
#if __CORE__ != __78K0R__
#error "This file is only for 78K0R Devices"
#endif
; Functions implemented in this file
;------------------------------------------------------------------------------
PUBLIC vRegTest1
PUBLIC vRegTest2
; Functions used by this file
;------------------------------------------------------------------------------
EXTERN vRegTestError
;------------------------------------------------------------------------------
; Fill all the registers with known values, then check that the registers
; contain the expected value. An incorrect value being indicative of an
; error in the context switch mechanism.
;
; Input: NONE
;
; Call: Created as a task.
;
; Output: NONE
;
;------------------------------------------------------------------------------
RSEG CODE:CODE
vRegTest1:
; First fill the registers.
MOVW AX, #0x1122
MOVW BC, #0x3344
MOVW DE, #0x5566
MOVW HL, #0x7788
MOV CS, #0x01
#if configMEMORY_MODE == 1
; ES is not saved or restored when using the near memory model so only
; test it when using the far model.
MOV ES, #0x02
#endif
loop1:
; Continuously check that the register values remain at their expected
; values. The BRK is to test the yield. This task runs at low priority
; so will also regularly get preempted.
BRK
; Compare with the expected value.
CMPW AX, #0x1122
BZ +5
; Jump over the branch to vRegTestError() if the register contained the
; expected value - otherwise flag an error by executing vRegTestError().
BR vRegTestError
; Repeat for all the registers.
MOVW AX, BC
CMPW AX, #0x3344
BZ +5
BR vRegTestError
MOVW AX, DE
CMPW AX, #0x5566
BZ +5
BR vRegTestError
MOVW AX, HL
CMPW AX, #0x7788
BZ +5
BR vRegTestError
MOV A, CS
CMP A, #0x01
BZ +5
BR vRegTestError
#if configMEMORY_MODE == 1
; ES is not saved or restored when using the near memory model so only
; test it when using the far model.
MOV A, ES
CMP A, #0x02
BZ +5
BR vRegTestError
#endif
MOVW AX, #0x1122
BR loop1
;------------------------------------------------------------------------------
; Fill all the registers with known values, then check that the registers
; contain the expected value. An incorrect value being indicative of an
; error in the context switch mechanism.
;
; Input: NONE
;
; Call: Created as a task.
;
; Output: NONE
;
;------------------------------------------------------------------------------
RSEG CODE:CODE
vRegTest2:
MOVW AX, #0x99aa
MOVW BC, #0xbbcc
MOVW DE, #0xddee
MOVW HL, #0xff12
MOV CS, #0x03
#if configMEMORY_MODE == 1
MOV ES, #0x04
#endif
loop2:
CMPW AX, #0x99aa
BZ +5
BR vRegTestError
MOVW AX, BC
CMPW AX, #0xbbcc
BZ +5
BR vRegTestError
MOVW AX, DE
CMPW AX, #0xddee
BZ +5
BR vRegTestError
MOVW AX, HL
CMPW AX, #0xff12
BZ +5
BR vRegTestError
MOV A, CS
CMP A, #0x03
BZ +5
BR vRegTestError
#if configMEMORY_MODE == 1
MOV A, ES
CMP A, #0x04
BZ +5
BR vRegTestError
#endif
MOVW AX, #0x99aa
BR loop2
END

View file

@ -0,0 +1,659 @@
;
; This file should only be included in the 78K0R_Kx3L demo. The 78K0R_Kx3 demo
; uses the standard startup file. This is work around a bug in the startup
; file provided with the IAR tools.
;
;------------------------------------------------------------------------------
; CSTARTUP source for 78K
;
; This module contains the code executed before the C/C++ "main"
; function is called.
;
; The code usually must be tailored to suit a specific hardware
; configuration.
;
; Assembler options:
;
; -D__STANDARD_MODEL__ To assemble for use with compiler standard
; code model.
;
; -D__BANKED_MODEL__ To assemble for use with compiler banked
; code model.
;
; -D__NEAR_MODEL__ To assemble for use with compiler near
; code model.
;
; -D__FAR_MODEL__ To assemble for use with compiler far
; code model.
;
; Linker options:
;
; -D_CODEBANK_REG=0 To link for use with "standard" code model,
; no banked functions.
;
; -D_CODEBANK_REG='addr' To link for use with "banked" code model or
; "standard" code model with banked functions.
; 'addr' = bank switch register address.
;
;------------------------------------------------------------------------------
; Copyright (c) 2003-2008 IAR Systems AB.
; $Revision: 3577 $
;------------------------------------------------------------------------------
#if !defined(__STANDARD_MODEL__) && !defined(__BANKED_MODEL__) && !defined(__NEAR_MODEL__) && !defined(__FAR_MODEL__)
#error One of the macros __STANDARD_MODEL__, __BANKED_MODEL__, __NEAR_MODEL__ or __FAR_MODEL__ must be defined !
#endif
;------------------------------------------------------------------------------
; The stack segment.
; The stack size is defined in the linker command file
;------------------------------------------------------------------------------
MODULE ?CSTARTUP
RSEG CSTACK:DATA:ROOT(1)
;------------------------------------------------------------------------------
; The interrupt vector segment.
; Interrupt functions with defined vectors will reserve
; space in this area as well as conformingly written assembly
; language interrupt handlers
;------------------------------------------------------------------------------
COMMON INTVEC:CODE:ROOT(1)
DC16 __program_start_fr ; Reset vector
;------------------------------------------------------------------------------
; The actual startup code
;
; Entry: __program_start
;------------------------------------------------------------------------------
RSEG RCODE:CODE:ROOT(0)
PUBLIC ?C_STARTUP
PUBLIC `@cstart` ; NEC debugger specific
PUBLIC __program_start_fr
EXTERN __low_level_init
EXTERN __MAIN_CALL
#if defined(__STANDARD_MODEL__) || defined(__BANKED_MODEL__)
EXTERN _CODEBANK_REG
#else
EXTERN _NEAR_CONST_LOCATION
PMC DEFINE 0xFFFFE
#endif
#if defined(__BANKED_MODEL__)
EXTERN ?FAR_CALL_L07
SFRTYPE BANK_REG BYTE, READ, WRITE = _CODEBANK_REG
#endif
REQUIRE __MAIN_CALL
;------------------------------------------------------------------------------
; Perform the run-time initialization.
;------------------------------------------------------------------------------
?C_STARTUP:
`@cstart`:
__program_start_fr:
DI
#if defined(__BANKED_MODEL__)
MOV BANK_REG, #0 ; Banked, clear bank register
#elif defined(__STANDARD_MODEL__)
MOVW AX, #_CODEBANK_REG
OR A, X
BZ nobank ; Standard, no banked functions, no bank register (=0)
MOVW HL, #_CODEBANK_REG
XOR A, A
MOV [HL], A ; Standard with banked functions, clear bank register
nobank:
#else
MOV A, #(_NEAR_CONST_LOCATION & 1) ; Near/Far, set mirror area
MOV1 CY, A.0
MOV1 PMC.0, CY
#endif
#if __CORE__ != __78K0S__
MOVW SP, #sfe(CSTACK)
#else
MOVW AX, #sfe(CSTACK)
MOVW SP, AX
#endif
; Init stack segment for 78K0R, as the generated code may sometimes
; access the 4th byte of a return address before it is initialized
#if __CORE__ == __78K0R__
MOVW HL, #sfb(CSTACK)
MOVW BC, #LWRD(sizeof(CSTACK))
CMP0 C
SKZ
INC B
MOV A, #0xCD
loop_s:
MOV [HL], A
INCW HL
DEC C
BNZ loop_s
DEC B
BNZ loop_s
#endif
#if __CORE__ == __78K0R__
MOV CS, #0
#endif
;------------------------------------------------------------------------------
; Here is the place to put user initializations.
;------------------------------------------------------------------------------
; User initialization code
;------------------------------------------------------------------------------
; Call __low_level_init to perform initialization before initializing
; segments and calling main.
; If the function returns 0, no segment initialization should take place.
;
; Link with your own version of __low_level_init to override the
; default action: to do nothing but return 1.
;------------------------------------------------------------------------------
#if defined(__FAR_MODEL__)
CALL F:__low_level_init
#elif defined(__BANKED_MODEL__)
MOV E, #byte3(__low_level_init)
MOVW HL, #lwrd(__low_level_init)
CALL ?FAR_CALL_L07
#else
CALL __low_level_init
#endif
OR A, X
#if __CORE__ == __78K0R__
SKNZ
BR N:__MAIN_CALL
#else
BZ __MAIN_CALL
#endif
ENDMOD
#if defined(__NEAR_MODEL__) || defined(__FAR_MODEL__)
;------------------------------------------------------------------------------
; Segment initialization
;
; FAR_Z "uninitialized far data" are filled with zero
;------------------------------------------------------------------------------
MODULE ?__INIT_FAR_Z
RSEG FAR_Z:DATA(0)
RSEG RCODE:CODE:NOROOT(0)
PUBLIC __INIT_FAR_Z
__INIT_FAR_Z:
MOV ES, #BYTE3(sfb(FAR_Z))
MOVW HL, #LWRD(sfb(FAR_Z))
MOV D, #BYTE3(sizeof(FAR_Z))
MOVW BC, #LWRD(sizeof(FAR_Z))
CMP0 C
SKZ
INC B
CMP0 B
SKZ
INC D
CLRB A
loop:
MOV ES:[HL], A
INCW HL
MOV A, H
OR A, L
CLRB A
SKNZ
INC ES
DEC C
BNZ loop
DEC B
BNZ loop
DEC D
BNZ loop
ENDMOD
#endif
;------------------------------------------------------------------------------
; Segment initialization
;
; NEAR_Z "uninitialized near data" are filled with zero
;------------------------------------------------------------------------------
MODULE ?__INIT_NEAR_Z
RSEG NEAR_Z:DATA(0)
RSEG RCODE:CODE:NOROOT(0)
PUBLIC __INIT_NEAR_Z
__INIT_NEAR_Z:
#if __CORE__ == __78K0R__
LIMIT sfb(NEAR_Z)>=0xF0000,1,1,"NEAR_I not placed in near memory"
#endif
MOVW HL, #sfb(NEAR_Z)
MOVW BC, #sizeof(NEAR_Z)
#if __CORE__ == __78K0R__
CMP0 C
SKZ
INC B
CLRB A
#else
MOV A, C
OR A, A
BZ cont
INC B
XOR A, A
cont:
#endif
loop:
MOV [HL], A
INCW HL
#if __CORE__ == __78K0R__
DEC C
BNZ loop
DEC B
BNZ loop
#else
DBNZ C, loop
DBNZ B, loop
#endif
ENDMOD
;------------------------------------------------------------------------------
; Segment initialization
;
; SADDR_Z "uninitialized saddr data" are filled with zero
;------------------------------------------------------------------------------
MODULE ?__INIT_SADDR_Z
RSEG SADDR_Z:DATA(0)
RSEG RCODE:CODE:NOROOT(0)
PUBLIC __INIT_SADDR_Z
__INIT_SADDR_Z:
#if __CORE__ == __78K0R__
LIMIT sfb(SADDR_Z),0xFFE20,0xFFF1F,"SADDR_Z not within saddr memory range"
LIMIT sfe(SADDR_Z),0xFFE20,0xFFF1F,"SADDR_Z not within saddr memory range"
#else
LIMIT sfb(SADDR_Z),0xFE20,0xFF1F,"SADDR_Z not within saddr memory range"
LIMIT sfe(SADDR_Z),0xFE20,0xFF1F,"SADDR_Z not within saddr memory range"
#endif
MOVW HL, #sfb(SADDR_Z)
MOV B, #sizeof(SADDR_Z)
#if __CORE__ == __78K0R__
CLRB A
#else
XOR A, A
#endif
loop:
MOV [HL], A
INCW HL
#if __CORE__ == __78K0R__
DEC B
BNZ loop
#else
DBNZ B, loop
#endif
ENDMOD
;------------------------------------------------------------------------------
; Segment initialization
;
; WRKSEG short address work area is filled with zero
;------------------------------------------------------------------------------
MODULE ?__INIT_WRKSEG
RSEG WRKSEG:DATA(0)
RSEG RCODE:CODE:NOROOT(0)
PUBLIC __INIT_WRKSEG
__INIT_WRKSEG:
#if __CORE__ == __78K0R__
LIMIT sfb(WRKSEG),0xFFE20,0xFFF1F,"WRKSEG not within saddr memory range"
LIMIT sfe(WRKSEG),0xFFE20,0xFFF1F,"WRKSEG not within saddr memory range"
#else
LIMIT sfb(WRKSEG),0xFE20,0xFF1F,"WRKSEG not within saddr memory range"
LIMIT sfe(WRKSEG),0xFE20,0xFF1F,"WRKSEG not within saddr memory range"
#endif
MOVW HL, #sfb(WRKSEG)
MOV B, #sizeof(WRKSEG)
#if __CORE__ == __78K0R__
CLRB A
#else
XOR A, A
#endif
loop:
MOV [HL], A
INCW HL
#if __CORE__ == __78K0R__
DEC B
BNZ loop
#else
DBNZ B, loop
#endif
ENDMOD
#if defined(__NEAR_MODEL__) || defined(__FAR_MODEL__)
;------------------------------------------------------------------------------
; Segment initialization
;
; FAR_ID is copied to FAR_I "initialized far data"
;------------------------------------------------------------------------------
MODULE ?__INIT_FAR_I
RSEG FAR_I:DATA(0)
RSEG FAR_ID:DATA(0)
RSEG RCODE:CODE:NOROOT(0)
PUBLIC __INIT_FAR_I
__INIT_FAR_I:
; First make sure FAR_I and FAR_ID have the same size
LIMIT sizeof(FAR_I)-sizeof(FAR_ID),0,0,"FAR_I and FAR_ID not same size"
; Sanity check
LIMIT (sfb(FAR_I)-sfb(FAR_ID))==0,0,0,"FAR_I and FAR_ID have same start address"
; FAR_I and FAR_ID must start at the same offset in a 64k page, unless sizeof
; FAR_I is less than 64k, then it's enugh if both segments reside within a 64k
; boundary
LIMIT (((sfb(FAR_I)^sfb(FAR_ID)) & 0xFFFF) == 0) || ( (sizeof(FAR_I)< 0x10000) && (((sfb(FAR_I)^sfe(FAR_I)) & 0xF0000) == 0) && (((sfb(FAR_I)^sfe(FAR_I)) & 0xF0000) == 0) ),1,1,"FAR_I and FAR_ID have same start address"
; LIMIT (sfb(FAR_I)^sfb(FAR_ID)) & 0xFFFF,0,0,"FAR_I and FAR_ID must start at the same offset into a 64k page"
MOV ES, #BYTE3(sfb(FAR_ID))
MOVW HL, #LWRD(sfb(FAR_ID))
MOV CS, #BYTE3(sizeof(FAR_ID)) ; CS is used as counter
MOVW AX, #LWRD(sizeof(FAR_ID))
MOVW BC, AX
CMP0 C
SKZ
INC B
CMP0 B
SKZ
INC CS ; counter
MOV A, #BYTE3(sfb(FAR_I))
MOVW DE, #LWRD(sfb(FAR_I))
MOV X, A
loop:
MOV A, ES:[HL]
XCH A, X
XCH A, ES
XCH A, X
MOV ES:[DE], A
XCH A, X
XCH A, ES
XCH A, X
INCW HL
MOV A, H
OR A, L
SKNZ
INC ES
INCW DE
MOV A, D
OR A, E
SKNZ
INC X
DEC C
BNZ loop
DEC B
BNZ loop
DEC CS ; counter
BNZ loop
ENDMOD
#endif
;------------------------------------------------------------------------------
; Segment initialization
;
; NEAR_ID is copied to NEAR_I "initialized near data"
;------------------------------------------------------------------------------
MODULE ?__INIT_NEAR_I
RSEG NEAR_I:DATA(0)
RSEG NEAR_ID:DATA(0)
RSEG RCODE:CODE:NOROOT(0)
PUBLIC __INIT_NEAR_I
__INIT_NEAR_I:
#if __CORE__ == __78K0R__
LIMIT sfb(NEAR_I)>=0xF0000,1,1,"NEAR_I not placed in near memory"
#endif
LIMIT sizeof(NEAR_I)-sizeof(NEAR_ID),0,0,"NEAR_I and NEAR_ID not same size"
#if __CORE__ == __78K0R__
MOV ES, #BYTE3(sfb(NEAR_ID))
#endif
MOVW HL, #sfb(NEAR_ID)
MOVW BC, #sizeof(NEAR_ID)
#if __CORE__ == __78K0R__
CMP0 C
SKZ
INC B
#else
MOV A, C
OR A, A
BZ cont
INC B
cont:
#endif
MOVW DE, #sfb(NEAR_I)
loop:
#if __CORE__ != __78K0R__
MOV A, [HL]
#else
MOV A, ES:[HL]
#endif
MOV [DE], A
INCW HL
INCW DE
#if __CORE__ == __78K0R__
DEC C
BNZ loop
DEC B
BNZ loop
#else
DBNZ C, loop
DBNZ B, loop
#endif
ENDMOD
;------------------------------------------------------------------------------
; Segment initialization
;
; SADDR_ID is copied to SADDR_I "initialized saddr data"
;------------------------------------------------------------------------------
MODULE ?__INIT_SADDR_I
RSEG SADDR_I:DATA(0)
RSEG SADDR_ID:DATA(0)
RSEG RCODE:CODE:NOROOT(0)
PUBLIC __INIT_SADDR_I
__INIT_SADDR_I:
#if __CORE__ == __78K0R__
LIMIT sfb(SADDR_I),0xFFE20,0xFFF1F,"SADDR_I not within saddr memory range"
LIMIT sfe(SADDR_I),0xFFE20,0xFFF1F,"SADDR_I not within saddr memory range"
#else
LIMIT sfb(SADDR_I),0xFE20,0xFF1F,"SADDR_I not within saddr memory range"
LIMIT sfe(SADDR_I),0xFE20,0xFF1F,"SADDR_I not within saddr memory range"
#endif
LIMIT sizeof(SADDR_I)-sizeof(SADDR_ID),0,0,"SADDR_I and SADDR_ID not same size"
#if __CORE__ == __78K0R__
MOV ES, #BYTE3(sfb(SADDR_ID))
#endif
MOVW HL, #sfb(SADDR_ID)
MOV B, #sizeof(SADDR_ID)
MOVW DE, #sfb(SADDR_I)
loop:
#if __CORE__ != __78K0R__
MOV A, [HL]
#else
MOV A, ES:[HL]
#endif
MOV [DE], A
INCW HL
INCW DE
#if __CORE__ == __78K0R__
DEC B
BNZ loop
#else
DBNZ B, loop
#endif
ENDMOD
;------------------------------------------------------------------------------
; Initialize constructors
;
; This segment part is required by the compiler when it is
; necessary to call constructors of global objects.
;------------------------------------------------------------------------------
MODULE ?__INIT_CTORS
RSEG DIFUNCT(0)
RSEG RCODE:CODE:NOROOT(0)
PUBLIC __INIT_CTORS
EXTERN __call_ctors
#if defined(__BANKED_MODEL__)
EXTERN ?FAR_CALL_L07
#endif
__INIT_CTORS:
#if __CORE__ == __78K0R__
MOV X, #byte3(sfe(DIFUNCT))
PUSH AX
MOVW AX, #lwrd(sfe(DIFUNCT))
PUSH AX
MOV X, #byte3(sfb(DIFUNCT))
PUSH AX
MOVW AX, #lwrd(sfb(DIFUNCT))
PUSH AX
CALL F:__call_ctors
#elif defined(__BANKED_MODEL__)
MOVW AX, #sfb(DIFUNCT)
MOVW BC, #sfe(DIFUNCT)
MOV E, #byte3(__call_ctors)
MOVW HL, #lwrd(__call_ctors)
CALL ?FAR_CALL_L07
#else
MOVW AX, #sfb(DIFUNCT)
MOVW BC, #sfe(DIFUNCT)
CALL __call_ctors
#endif
ENDMOD
;------------------------------------------------------------------------------
; Enter main
;
; Call the actual "main" function
;------------------------------------------------------------------------------
MODULE ?__MAIN_CALL
RSEG RCODE:CODE:NOROOT(0)
PUBLIC __MAIN_CALL
PUBLIC `@cend` ; NEC debugger specific
EXTERN main
EXTERN exit
#if defined(__BANKED_MODEL__)
EXTERN ?FAR_CALL_L07
#endif
__MAIN_CALL:
#if defined(__FAR_MODEL__)
CALL F:main
CALL F:exit
#elif defined(__BANKED_MODEL__)
MOV E, #byte3(main)
MOVW HL, #lwrd(main)
CALL ?FAR_CALL_L07
MOV E, #byte3(exit)
MOVW HL, #lwrd(exit)
CALL ?FAR_CALL_L07
#else
CALL main
CALL exit
#endif
`@cend`:
; STOP ; Should not return
ENDMOD
;------------------------------------------------------------------------------
; Low level initialization function
;
; Entry: __low_level_init
;
; The only action of this default version of '__low_level_init' is to
; return 1. By doing so it signals that normal initialization of data
; segments should be done.
;
; A customized version of '__low_level_init' may be created in order to
; perform initialization before initializing segments and calling main
; and/or to skip initialization of data segments under certain
; circumstances.
;------------------------------------------------------------------------------
MODULE ?__low_level_init_stub
RSEG RCODE:CODE:NOROOT(0)
PUBLIC __low_level_init
__low_level_init: ; By returning 1 this function
MOVW AX, #1 ; indicates that the normal
RET ; initialization should take place
ENDMOD
END

View file

@ -0,0 +1,410 @@
/*
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.
*/
/*
* Creates all the demo application tasks, then starts the scheduler. The WEB
* documentation provides more details of the standard demo application tasks.
* In addition to the standard demo tasks, the following tasks and tests are
* defined and/or created within this file:
*
* "Check" task - This only executes every three seconds but has a high priority
* to ensure it gets processor time. Its main function is to check that all the
* standard demo tasks are still operational. If everything is running as
* expected then the check task will toggle an LED every 3 seconds. An error
* being discovered in any task will cause the toggle rate to increase to 500ms.
*
* "Reg test" tasks - These fill the registers with known values, then check
* that each register still contains its expected value. Each task uses
* different values. The tasks run with very low priority so get preempted very
* frequently. A register containing an unexpected value is indicative of an
* error in the context switching mechanism.
*
*
* Also in addition to the standard demo tasks is a button push task. This is
* a very basic task that is included as an example of how to write an interrupt
* service routine that interacts with a task. The button on the target board
* is used to generate an interrupt that 'gives' a semaphore in order to unblock
* a task. In doing so the task is synchronised with the interrupt. Each time
* the task unblocks it simply toggles an LED before entering the Blocked state
* again to wait for the next button push.
*/
/* Standard includes. */
#include <stdlib.h>
#include <string.h>
/* Scheduler include files. */
#include "FreeRTOS.h"
#include "task.h"
/* Standard demo file headers. */
#include "PollQ.h"
#include "semtest.h"
#include "GenQTest.h"
#include "dynamic.h"
#include "blocktim.h"
/*
* Priority definitions for most of the tasks in the demo application. Some
* tasks just use the idle priority.
*/
#define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 2 )
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 1 )
#define mainSEMTEST_PRIORITY ( tskIDLE_PRIORITY + 1 )
#define mainBUTTON_PRIORITY ( configMAX_PRIORITIES - 1 )
#define mainGEN_QUEUE_PRIORITY ( tskIDLE_PRIORITY )
/* The period between executions of the check task. */
#define mainNO_ERROR_TOGGLE_PERIOD ( ( portTickType ) 3000 / portTICK_RATE_MS )
#define mainERROR_TOGGLE_PERIOD ( ( portTickType ) 500 / portTICK_RATE_MS )
/* The LED toggled by the check task. */
#define mainLED_0 P7_bit.no6
/* A value that is passed in as the parameter to the 'check' task. This is done
purely to check that the parameter passing mechanism is functioning correctly. */
#define mainCHECK_PARAMETER_VALUE ( 0x5678 )
/*-----------------------------------------------------------*/
/*
* The function that defines the 'check' task as described at the top of this
* file.
*/
static void vErrorChecks( void *pvParameters );
/*
* This function is called from the C startup routine to setup the processor -
* in particular the clock source.
*/
int __low_level_init(void);
/*
* Functions that define the RegTest tasks as described at the top of this file.
*/
extern void vRegTest1( void *pvParameters );
extern void vRegTest2( void *pvParameters );
/*
* Function that defines the button push task as described at the top of this
* file.
*/
extern void vButtonTask( void *pvParameters );
/*-----------------------------------------------------------*/
/* If an error is discovered by one of the RegTest tasks then this flag is set
to pdFAIL. The 'check' task then inspects this flag to detect errors within
the RegTest tasks. */
static short sRegTestStatus = pdPASS;
/* 78K0R Option Byte Definition. Watchdog disabled, LVI enabled, OCD interface
enabled. */
__root __far const unsigned portCHAR OptionByte[] @ 0x00C0 =
{
WATCHDOG_DISABLED, LVI_ENABLED, RESERVED_FF, OCD_ENABLED
};
/* Security byte definition */
__root __far const unsigned portCHAR SecuIDCode[] @ 0x00C4 =
{
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
/*-----------------------------------------------------------*/
short main( void )
{
/* Creates all the tasks, then starts the scheduler. */
/* First create the 'standard demo' tasks. These are used to demonstrate
API functions being used and also to test the kernel port. More information
is provided on the FreeRTOS.org WEB site. */
vStartDynamicPriorityTasks();
/* Create the RegTest tasks as described at the top of this file. */
xTaskCreate( vRegTest1, "Reg1", configMINIMAL_STACK_SIZE, NULL, 0, NULL );
xTaskCreate( vRegTest2, "Reg2", configMINIMAL_STACK_SIZE, NULL, 0, NULL );
/* Create the button push task as described at the top of this file. */
xTaskCreate( vButtonTask, "Button", configMINIMAL_STACK_SIZE, NULL, mainBUTTON_PRIORITY, NULL );
/* Create the 'check' task as described at the top of this file. */
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, ( void* )mainCHECK_PARAMETER_VALUE, mainCHECK_TASK_PRIORITY, NULL );
#ifdef __IAR_78K0R_Kx3__
{
/* The Kx3 has enough RAM to create more of the standard demo tasks. */
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
vStartSemaphoreTasks(mainSEMTEST_PRIORITY);
vStartGenericQueueTasks( mainGEN_QUEUE_PRIORITY );
vCreateBlockTimeTasks();
}
#endif
/* Finally start the scheduler running. */
vTaskStartScheduler();
/* If this line is reached then vTaskStartScheduler() returned because there
was insufficient heap memory remaining for the idle task to be created. */
for( ;; );
}
/*-----------------------------------------------------------*/
static void vErrorChecks( void *pvParameters )
{
portTickType xToggleRate = mainNO_ERROR_TOGGLE_PERIOD, xLastWakeTime;
/* Ensure the parameter was passed in as expected. This is just a test of
the kernel port, the parameter is not actually used for anything. The
pointer will only actually be either 3 or 2 bytes, depending on the memory
model. */
if( pvParameters != ( void * ) mainCHECK_PARAMETER_VALUE )
{
xToggleRate = mainERROR_TOGGLE_PERIOD;
}
/* Initialise xLastWakeTime before it is used. After this point it is not
written to directly. */
xLastWakeTime = xTaskGetTickCount();
/* Cycle for ever, delaying then checking all the other tasks are still
operating without error. */
for( ;; )
{
/* Wait until it is time to check all the other tasks again. */
vTaskDelayUntil( &xLastWakeTime, xToggleRate );
if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )
{
xToggleRate = mainERROR_TOGGLE_PERIOD;
}
if( sRegTestStatus != pdPASS )
{
xToggleRate = mainERROR_TOGGLE_PERIOD;
}
#ifdef __IAR_78K0R_Kx3__
{
/* Only the Kx3 runs all the tasks. */
if( xArePollingQueuesStillRunning() != pdTRUE)
{
xToggleRate = mainERROR_TOGGLE_PERIOD;
}
if( xAreSemaphoreTasksStillRunning() != pdTRUE)
{
xToggleRate = mainERROR_TOGGLE_PERIOD;
}
if( xAreGenericQueueTasksStillRunning() != pdTRUE )
{
xToggleRate = mainERROR_TOGGLE_PERIOD;
}
if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )
{
xToggleRate = mainERROR_TOGGLE_PERIOD;
}
}
#endif
/* Toggle the LED. The toggle rate will depend on whether or not an
error has been found in any tasks. */
mainLED_0 = !mainLED_0;
}
}
/*-----------------------------------------------------------*/
int __low_level_init(void)
{
unsigned portCHAR ucResetFlag = RESF;
portDISABLE_INTERRUPTS();
/* Clock Configuration:
In this port, to use the internal high speed clock source of the microcontroller
define the configCLOCK_SOURCE as 1 in FreeRTOSConfig.h. To use an external
clock define configCLOCK_SOURCE as 0. */
#if configCLOCK_SOURCE == 1
{
/* Set XT1 and XT2 in Input Port Mode
Set X1 and X2 in Input Port Mode
High speed oscillator frequency 2MHz <= fMX <= 10MHz */
CMC = 0x00;
/* X1 external oszillation stopped. */
MSTOP = 1;
/* Enable internal high speed oszillation. */
HIOSTOP = 0;
MCM0 = 0;
/* Stop internal subsystem clock. */
XTSTOP = 1;
/* Set clock speed. */
CSS = 0;
CKC &= (unsigned portCHAR)~0x07;
CKC |= 0x00;
}
#else
{
/* XT1 and XT2 pin in input port mode
X1 and X2 pin in crystal resonator mode
High speed oszillation frequency 10MHz < fMX <= 20MHz */
CMC = 0x41;
/* Set oscillation stabilization time. */
OSTS = 0x07;
/* Set speed mode: fMX > 10MHz for Flash memory high speed operation. */
OSMC = 0x01;
/* Start up X1 oscillator operation
Internal high-speed oscillator operating. */
MSTOP = 0;
/* Check oscillation stabilization time status. */
while(OSTC < 0x07)
{
/* Wait until X1 clock stabilization time. */
portNOP();
}
/* Switch CPU clock to X1 oscillator. */
MCM0 = 1;
while(MCS != 1)
{
/* Wait until CPU and peripherals operate with fX1 clock. */
portNOP();
}
/* Stop the internal high-speed oscillator operation. */
HIOSTOP = 1;
/* Stop the XT1 oscillator operation. */
XTSTOP = 1;
/* Operating frequency f = fx
Change clock generator setting, if necessary. */
CKC &= 0xF8;
/* From here onwards the X1 oscillator is supplied to the CPU. */
}
#endif
/* LED port initialization - set port register. */
P7 = 0x80;
/* Set port mode register. */
PM7 = 0x3F;
/* Switch pin initialization - enable pull-up resistor. */
PU12_bit.no0 = 1;
/* INTP0 is used by the button on the target board. */
/* INTP0 disable. */
PMK0 = 1;
/* INTP0 IF clear. */
PIF0 = 0;
EGN0_bit.no0 = 1;
/* INTP0 priority low. */
PPR10 = 0;
PPR00 = 1;
/* Enable ext. INTP0 interrupt */
PMK0 = 0;
return pdTRUE;
}
/*-----------------------------------------------------------*/
void vRegTestError( void )
{
/* Called by the RegTest tasks if an error is found. lRegTestStatus is
inspected by the check task. */
sRegTestStatus = pdFAIL;
/* Do not return from here as the reg test tasks clobber all registers so
function calls may not function correctly. */
for( ;; );
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( void )
{
/* This will get called if an overflow is detected in the stack of a task.
Inspect pxCurrentTCB to see which was the offending task. */
for( ;; );
}

View file

@ -0,0 +1,479 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<project>
<fileVersion>2</fileVersion>
<configuration>
<name>78K0R_Kx3</name>
<toolchain>
<name>78000</name>
</toolchain>
<debug>1</debug>
<settings>
<name>C-SPY</name>
<archiveVersion>5</archiveVersion>
<data>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CMandatory</name>
<state>1</state>
</option>
<option>
<name>CInput</name>
<state>1</state>
</option>
<option>
<name>DebuggerProcessorVariant</name>
<state>0</state>
</option>
<option>
<name>DebuggerCodeModel</name>
<state>0</state>
</option>
<option>
<name>CRunToEnable</name>
<state>1</state>
</option>
<option>
<name>CRunToName</name>
<state>main</state>
</option>
<option>
<name>CMacOverride</name>
<state>0</state>
</option>
<option>
<name>CMacFile</name>
<state></state>
</option>
<option>
<name>DynDriver</name>
<state>MIC78K</state>
</option>
<option>
<name>DDFOverride</name>
<state>0</state>
</option>
<option>
<name>DDFFile</name>
<state>$TOOLKIT_DIR$\CONFIG\DDF\io78f1166_a0.ddf</state>
</option>
<option>
<name>DebuggerNearConstLocation</name>
<state>0</state>
</option>
<option>
<name>DDDFileSlave</name>
<state>1</state>
</option>
<option>
<name>CSpyExtraOptionsCheck</name>
<state>0</state>
</option>
<option>
<name>CSpyExtraOptions</name>
<state></state>
</option>
</data>
</settings>
<settings>
<name>EMU78K</name>
<archiveVersion>5</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CEmuMandatory</name>
<state>0</state>
</option>
<option>
<name>EMUSuppressLoad</name>
<state>0</state>
</option>
<option>
<name>EmuLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>EmuDoLogfile</name>
<state>0</state>
</option>
<option>
<name>EMUVerifyLoad</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>IEC78K</name>
<archiveVersion>5</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CEmuMandatory</name>
<state>0</state>
</option>
<option>
<name>EMUSuppressLoad</name>
<state>0</state>
</option>
<option>
<name>EMUVerifyLoad</name>
<state>0</state>
</option>
<option>
<name>EmuLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>EmuDoLogfile</name>
<state>0</state>
</option>
<option>
<name>EMUSupExchAdapter</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>MIC78K</name>
<archiveVersion>5</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CEmuMandatory</name>
<state>0</state>
</option>
<option>
<name>EMUSuppressLoad</name>
<state>0</state>
</option>
<option>
<name>EMUVerifyLoad</name>
<state>0</state>
</option>
<option>
<name>EmuLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>EmuDoLogfile</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>SIM78K</name>
<archiveVersion>5</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CSimMandatory</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>TKS78K</name>
<archiveVersion>5</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CEmuMandatory</name>
<state>0</state>
</option>
<option>
<name>EMUSuppressLoad</name>
<state>0</state>
</option>
<option>
<name>EMUVerifyLoad</name>
<state>0</state>
</option>
<option>
<name>EmuLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>EmuDoLogfile</name>
<state>0</state>
</option>
<option>
<name>EmuComPort</name>
<version>0</version>
<state>2</state>
</option>
</data>
</settings>
<debuggerPlugins>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Profiling\Profiling.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
</debuggerPlugins>
</configuration>
<configuration>
<name>78K0R_Kx3L</name>
<toolchain>
<name>78000</name>
</toolchain>
<debug>1</debug>
<settings>
<name>C-SPY</name>
<archiveVersion>5</archiveVersion>
<data>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CMandatory</name>
<state>1</state>
</option>
<option>
<name>CInput</name>
<state>1</state>
</option>
<option>
<name>DebuggerProcessorVariant</name>
<state>0</state>
</option>
<option>
<name>DebuggerCodeModel</name>
<state>0</state>
</option>
<option>
<name>CRunToEnable</name>
<state>1</state>
</option>
<option>
<name>CRunToName</name>
<state>main</state>
</option>
<option>
<name>CMacOverride</name>
<state>0</state>
</option>
<option>
<name>CMacFile</name>
<state></state>
</option>
<option>
<name>DynDriver</name>
<state>MIC78K</state>
</option>
<option>
<name>DDFOverride</name>
<state>0</state>
</option>
<option>
<name>DDFFile</name>
<state>$TOOLKIT_DIR$\CONFIG\DDF\io78f1009_64.ddf</state>
</option>
<option>
<name>DebuggerNearConstLocation</name>
<state>0</state>
</option>
<option>
<name>DDDFileSlave</name>
<state>1</state>
</option>
<option>
<name>CSpyExtraOptionsCheck</name>
<state>0</state>
</option>
<option>
<name>CSpyExtraOptions</name>
<state></state>
</option>
</data>
</settings>
<settings>
<name>EMU78K</name>
<archiveVersion>5</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CEmuMandatory</name>
<state>0</state>
</option>
<option>
<name>EMUSuppressLoad</name>
<state>0</state>
</option>
<option>
<name>EmuLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>EmuDoLogfile</name>
<state>0</state>
</option>
<option>
<name>EMUVerifyLoad</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>IEC78K</name>
<archiveVersion>5</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CEmuMandatory</name>
<state>0</state>
</option>
<option>
<name>EMUSuppressLoad</name>
<state>0</state>
</option>
<option>
<name>EMUVerifyLoad</name>
<state>0</state>
</option>
<option>
<name>EmuLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>EmuDoLogfile</name>
<state>0</state>
</option>
<option>
<name>EMUSupExchAdapter</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>MIC78K</name>
<archiveVersion>5</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CEmuMandatory</name>
<state>0</state>
</option>
<option>
<name>EMUSuppressLoad</name>
<state>0</state>
</option>
<option>
<name>EMUVerifyLoad</name>
<state>0</state>
</option>
<option>
<name>EmuLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>EmuDoLogfile</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
<name>SIM78K</name>
<archiveVersion>5</archiveVersion>
<data>
<version>0</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CSimMandatory</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>TKS78K</name>
<archiveVersion>5</archiveVersion>
<data>
<version>1</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
<name>CEmuMandatory</name>
<state>0</state>
</option>
<option>
<name>EMUSuppressLoad</name>
<state>0</state>
</option>
<option>
<name>EMUVerifyLoad</name>
<state>0</state>
</option>
<option>
<name>EmuLogFile</name>
<state>$PROJ_DIR$\cspycomm.log</state>
</option>
<option>
<name>EmuDoLogfile</name>
<state>0</state>
</option>
<option>
<name>EmuComPort</name>
<version>0</version>
<state>2</state>
</option>
</data>
</settings>
<debuggerPlugins>
<plugin>
<file>$TOOLKIT_DIR$\plugins\rtos\embOS\embOSPlugin.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Profiling\Profiling.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Stack\Stack.ENU.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
</debuggerPlugins>
</configuration>
</project>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<workspace>
<project>
<path>$WS_DIR$\rtosdemo.ewp</path>
</project>
<batchBuild/>
</workspace>

View file

@ -0,0 +1,32 @@
@REM This bat file has been generated by the IAR Embeddded Workbench
@REM C-SPY interactive debugger,as an aid to preparing a command
@REM line for running the cspybat command line utility with the
@REM appropriate settings.
@REM
@REM After making some adjustments to this file, you can launch cspybat
@REM by typing the name of this file followed by the name of the debug
@REM file (usually an ubrof file). Note that this file is generated
@REM every time a new debug session is initialized, so you may want to
@REM move or rename the file before making changes.
@REM
@REM Note: some command line arguments cannot be properly generated
@REM by this process. Specifically, the plugin which is responsible
@REM for the Terminal I/O window (and other C runtime functionality)
@REM comes in a special version for cspybat, and the name of that
@REM plugin dll is not known when generating this file. It resides in
@REM the $TOOLKIT_DIR$\bin folder and is usually called XXXbat.dll or
@REM XXXlibsupportbat.dll, where XXX is the name of the corresponding
@REM tool chain. Replace the '<libsupport_plugin>' parameter
@REM below with the appropriate file name. Other plugins loaded by
@REM C-SPY are usually not needed by, or will not work in, cspybat
@REM but they are listed at the end of this file for reference.
"C:\Devtools\IAR Systems\Embedded Workbench 5.0\common\bin\cspybat" "C:\Devtools\IAR Systems\Embedded Workbench 5.0\78k\bin\78k0rproc.dll" "C:\Devtools\IAR Systems\Embedded Workbench 5.0\78k\bin\78k0rminitks.dll" %1 --plugin "C:\Devtools\IAR Systems\Embedded Workbench 5.0\78k\bin\<libsupport_plugin>" --backend -B "--core" "78k0r" "--near_const_location" "rom0" "--near_const_start" "0xF1000" "--near_const_size" "47.75" "-p" "C:\Devtools\IAR Systems\Embedded Workbench 5.0\78k\CONFIG\DDF\io78f1166_a0.ddf" "-d" "minicube"
@REM Loaded plugins:
@REM 78kLibSupport.dll
@REM C:\Devtools\IAR Systems\Embedded Workbench 5.0\common\plugins\CodeCoverage\CodeCoverage.dll
@REM C:\Devtools\IAR Systems\Embedded Workbench 5.0\common\plugins\Profiling\Profiling.dll
@REM C:\Devtools\IAR Systems\Embedded Workbench 5.0\common\plugins\stack\stack.dll

View file

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<Project>
<Desktop>
<Static>
<Debug-Log><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Watch</Factory></Window><Window><Factory>Breakpoints</Factory></Window><Window><Factory>Watch</Factory></Window></Windows></PreferedWindows></Debug-Log>
<Build>
<ColumnWidth0>20</ColumnWidth0>
<ColumnWidth1>1216</ColumnWidth1>
<ColumnWidth2>324</ColumnWidth2>
<ColumnWidth3>81</ColumnWidth3>
<PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window><Window><Factory>Breakpoints</Factory></Window><Window><Factory>Watch</Factory></Window></Windows></PreferedWindows></Build>
<Workspace>
<ColumnWidths>
<Column0>138</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><CodeCovShow>0</CodeCovShow></Disassembly>
<Register><PreferedWindows><Position>2</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows></Register><Watch><Format><struct_types/><watch_formats><Fmt><Key>{W}Watch-1:usCriticalNesting</Key><Value>3</Value></Fmt><Fmt><Key>{W}Watch-1:xNextFreeByte</Key><Value>3</Value></Fmt></watch_formats></Format><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window><Window><Factory>Watch</Factory></Window><Window><Factory>Breakpoints</Factory></Window></Windows></PreferedWindows><Column0>203</Column0><Column1>122</Column1><Column2>100</Column2><Column3>100</Column3></Watch><Memory><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows/></PreferedWindows><FindDirection>1</FindDirection><FindAsHex>0</FindAsHex></Memory><Breakpoints><PreferedWindows><Position>3</Position><ScreenPosX>0</ScreenPosX><ScreenPosY>0</ScreenPosY><Windows><Window><Factory>Debug-Log</Factory></Window><Window><Factory>Watch</Factory></Window><Window><Factory>Watch</Factory></Window></Windows></PreferedWindows></Breakpoints></Static>
<Windows>
<Wnd0>
<Tabs>
<Tab>
<Identity>TabID-26641-1982</Identity>
<TabName>Workspace</TabName>
<Factory>Workspace</Factory>
<Session>
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode><ExpandedNode>rtosdemo/Demo Source</ExpandedNode><ExpandedNode>rtosdemo/Kernel Source</ExpandedNode><ExpandedNode>rtosdemo/Output</ExpandedNode></NodeDict></Session>
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-12022-5554</Identity><TabName>Memory</TabName><Factory>Memory</Factory><Session><ZoneNumber>5</ZoneNumber><SelectionAnchor>104832064d</SelectionAnchor><SelectionEnd>104832064d</SelectionEnd><UnitsPerGroup>2</UnitsPerGroup><EndianMode>0</EndianMode><DataCovEnabled>0</DataCovEnabled><DataCovShown>0</DataCovShown><HScroll>064d</HScroll><VScroll>6549664d</VScroll></Session></Tab><Tab><Identity>TabID-12503-6978</Identity><TabName>Watch</TabName><Factory>Watch</Factory><Session><Expressions/><TabId>1</TabId><Column0>203</Column0><Column1>122</Column1><Column2>100</Column2><Column3>100</Column3></Session></Tab><Tab><Identity>TabID-27225-8954</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-5499-14538</Identity><TabName>Breakpoints</TabName><Factory>Breakpoints</Factory></Tab></Tabs><SelectedTab>2</SelectedTab></Wnd1></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\V5.1.2\FreeRTOS\Demo\NEC_78K0R_IAR\cstartup.s26</Filename><XPos>0</XPos><YPos>0</YPos><SelStart>193</SelStart><SelEnd>193</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\V5.1.2\FreeRTOS\Demo\NEC_78K0R_IAR\main.c</Filename><XPos>0</XPos><YPos>152</YPos><SelStart>6701</SelStart><SelEnd>6701</SelEnd></Tab><ActiveTab>1</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\V5.1.2\FreeRTOS\Demo\NEC_78K0R_IAR\FreeRTOSConfig.h</Filename><XPos>0</XPos><YPos>45</YPos><SelStart>2951</SelStart><SelEnd>2951</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\V5.1.2\FreeRTOS\Source\tasks.c</Filename><XPos>0</XPos><YPos>1397</YPos><SelStart>43332</SelStart><SelEnd>43332</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\V5.1.2\FreeRTOS\Demo\Common\Minimal\dynamic.c</Filename><XPos>0</XPos><YPos>153</YPos><SelStart>8668</SelStart><SelEnd>8668</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\V5.1.2\FreeRTOS\Source\portable\IAR\78K0R\port.c</Filename><XPos>0</XPos><YPos>175</YPos><SelStart>7497</SelStart><SelEnd>7497</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\V5.1.2\FreeRTOS\Source\portable\IAR\78K0R\portasm.s26</Filename><XPos>0</XPos><YPos>63</YPos><SelStart>2908</SelStart><SelEnd>2908</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\V5.1.2\FreeRTOS\Demo\NEC_78K0R_IAR\ButtonTask.c</Filename><XPos>0</XPos><YPos>70</YPos><SelStart>3299</SelStart><SelEnd>3299</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\V5.1.2\FreeRTOS\Source\include\StackMacros.h</Filename><XPos>0</XPos><YPos>117</YPos><SelStart>5582</SelStart><SelEnd>6753</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\V5.1.2\FreeRTOS\Demo\NEC_78K0R_IAR\RegTest.s26</Filename><XPos>0</XPos><YPos>136</YPos><SelStart>4439</SelStart><SelEnd>4439</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\V5.1.2\FreeRTOS\Source\portable\MemMang\heap_1.c</Filename><XPos>0</XPos><YPos>90</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-00aa98f0><key>iaridepm.enu1</key></Toolbar-00aa98f0><Toolbar-03b55638><key>debuggergui.enu1</key></Toolbar-03b55638></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>550</Bottom><Right>212</Right><x>-2</x><y>-2</y><xscreen>200</xscreen><yscreen>200</yscreen><sizeHorzCX>142857</sizeHorzCX><sizeHorzCY>203666</sizeHorzCY><sizeVertCX>152857</sizeVertCX><sizeVertCY>562118</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>388</Bottom><Right>1402</Right><x>-2</x><y>-2</y><xscreen>1404</xscreen><yscreen>390</yscreen><sizeHorzCX>1002857</sizeHorzCX><sizeHorzCY>397149</sizeHorzCY><sizeVertCX>119286</sizeVertCX><sizeVertCY>203666</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Project>

View file

@ -0,0 +1,94 @@
[CodeCoverage]
Enabled=_ 0
[MINICUBE2]
Map0=0,0,262143,262144
Map1=1,1036032,1048319,12288
MapEntries=2
HWsettings=4,0,1,2,4,0,2,0
HWsettingsCube=2,4294967295,2,4294967295,0,1,0,0
HWsettingsRsuid=FFFFFFFFFFFFFFFFFFFF
EventEntries=0
SeqName0=
SeqData0=0,0
SeqEnable10=0,0,0,0,0,0,0,0,0,0
SeqEnable20=0,0,0,0,0,0,0,0,0,0
SeqEnable30=0,0,0,0,0,0,0,0,0,0
SeqEnable40=0,0,0,0,0,0,0,0,0,0
SeqDisable0=0,0,0,0,0,0,0,0,0,0
SeqData20=0,0,0,0,0,0
SeqName1=
SeqData1=0,0
SeqEnable11=0,0,0,0,0,0,0,0,0,0
SeqEnable21=0,0,0,0,0,0,0,0,0,0
SeqEnable31=0,0,0,0,0,0,0,0,0,0
SeqEnable41=0,0,0,0,0,0,0,0,0,0
SeqDisable1=0,0,0,0,0,0,0,0,0,0
SeqData21=0,0,0,0,0,0
SeqName2=
SeqData2=0,0
SeqEnable12=0,0,0,0,0,0,0,0,0,0
SeqEnable22=0,0,0,0,0,0,0,0,0,0
SeqEnable32=0,0,0,0,0,0,0,0,0,0
SeqEnable42=0,0,0,0,0,0,0,0,0,0
SeqDisable2=0,0,0,0,0,0,0,0,0,0
SeqData22=0,0,0,0,0,0
SeqName3=
SeqData3=0,0
SeqEnable13=0,0,0,0,0,0,0,0,0,0
SeqEnable23=0,0,0,0,0,0,0,0,0,0
SeqEnable33=0,0,0,0,0,0,0,0,0,0
SeqEnable43=0,0,0,0,0,0,0,0,0,0
SeqDisable3=0,0,0,0,0,0,0,0,0,0
SeqData23=0,0,0,0,0,0
SeqName4=
SeqData4=0,0
SeqEnable14=0,0,0,0,0,0,0,0,0,0
SeqEnable24=0,0,0,0,0,0,0,0,0,0
SeqEnable34=0,0,0,0,0,0,0,0,0,0
SeqEnable44=0,0,0,0,0,0,0,0,0,0
SeqDisable4=0,0,0,0,0,0,0,0,0,0
SeqData24=0,0,0,0,0,0
TraceSettings=64,0,0,0,0,0,8192
TimerSettings=0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
CoverSettings=1048192,1048207,0
Version=1,78k0rtrace.txt
LastDevFile=DF1166A0.78K
EmulType=320
EventLimits=0, 1, 1, 2
LastSetupFailed=0
[DisAssemblyWindow]
NumStates=_ 1
State 1=_ 1
[Profiling]
Enabled=0
[StackPlugin]
Enabled=1
OverflowWarningsEnabled=1
WarningThreshold=90
SpWarningsEnabled=1
WarnHow=0
UseTrigger=1
TriggerName=main
LimitSize=0
ByteLimit=50
[Interrupts]
Enabled=1
[MemoryMap]
Enabled=0
Base=0
UseAuto=0
TypeViolation=1
UnspecRange=1
ActionState=1
[Log file]
LoggingEnabled=_ 0
LogFile=_ ""
Category=_ 0
[TermIOLog]
LoggingEnabled=_ 0
LogFile=_ ""
[TraceHelper]
Enabled=0
ShowSource=1
[Breakpoints]
Count=0

View file

@ -0,0 +1,66 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<Workspace>
<ConfigDictionary>
<CurrentConfigs><Project>rtosdemo/78K0R_Kx3</Project></CurrentConfigs></ConfigDictionary>
<Desktop>
<Static>
<Workspace>
<ColumnWidths>
<Column0>277</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
</Workspace>
<Build>
<ColumnWidth0>20</ColumnWidth0><ColumnWidth1>916</ColumnWidth1><ColumnWidth2>244</ColumnWidth2><ColumnWidth3>61</ColumnWidth3></Build>
<Debug-Log/><TerminalIO/><Find-in-Files><ColumnWidth0>482</ColumnWidth0><ColumnWidth1>68</ColumnWidth1><ColumnWidth2>826</ColumnWidth2></Find-in-Files></Static>
<Windows>
<Wnd0>
<Tabs>
<Tab>
<Identity>TabID-28554-14697</Identity>
<TabName>Workspace</TabName>
<Factory>Workspace</Factory>
<Session>
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode><ExpandedNode>rtosdemo/Demo Source</ExpandedNode></NodeDict></Session>
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1>
<Tabs>
<Tab>
<Identity>TabID-24371-14776</Identity>
<TabName>Build</TabName>
<Factory>Build</Factory>
<Session/>
</Tab>
<Tab><Identity>TabID-2405-1208</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab><Tab><Identity>TabID-11455-24944</Identity><TabName>Find in Files</TabName><Factory>Find-in-Files</Factory><Session/></Tab></Tabs>
<SelectedTab>0</SelectedTab></Wnd1></Windows>
<Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\temp\V5.1.2\FreeRTOS\Demo\NEC_78K0R_IAR\main.c</Filename><XPos>0</XPos><YPos>152</YPos><SelStart>6701</SelStart><SelEnd>6701</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-00aa98f0><key>iaridepm.enu1</key></Toolbar-00aa98f0></Sizes></Row0><Row1><Sizes/></Row1></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>713</Bottom><Right>351</Right><x>-2</x><y>-2</y><xscreen>218</xscreen><yscreen>205</yscreen><sizeHorzCX>155714</sizeHorzCX><sizeHorzCY>208758</sizeHorzCY><sizeVertCX>252143</sizeVertCX><sizeVertCY>728106</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>225</Bottom><Right>1402</Right><x>-2</x><y>-2</y><xscreen>1404</xscreen><yscreen>227</yscreen><sizeHorzCX>1002857</sizeHorzCX><sizeHorzCY>231161</sizeHorzCY><sizeVertCX>155714</sizeVertCX><sizeVertCY>208758</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>