diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject b/FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject
index f62f239c4..b4e3afce3 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/.cproject
@@ -55,12 +55,17 @@
+
+
+
+
+
@@ -75,13 +80,11 @@
+
-
-
-
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/RTOSDemo.launch b/FreeRTOS/Demo/RL78_E2Studio_GCC/RTOSDemo.launch
index b35b0fe5a..3519abbb3 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/RTOSDemo.launch
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/RTOSDemo.launch
@@ -8,21 +8,36 @@
-
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -43,8 +58,12 @@
+
+
+
+
@@ -52,4 +71,5 @@
+
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOSConfig.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOSConfig.h
index 1833c1601..c2c21766e 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOSConfig.h
@@ -56,19 +56,19 @@
***************************************************************************
- http://www.FreeRTOS.org - Documentation, books, training, latest versions,
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,
license and Real Time Engineers Ltd. contact details.
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
including FreeRTOS+Trace - an indispensable productivity tool, and our new
fully thread aware and reentrant UDP/IP stack.
- http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High
- Integrity Systems, who sell the code with commercial support,
+ http://www.OpenRTOS.com - 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.SafeRTOS.com - High Integrity Systems also provide a safety
- engineered and independently SIL3 certified version for use in safety and
+
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety
+ engineered and independently SIL3 certified version for use in safety and
mission critical applications that require provable dependability.
*/
@@ -87,23 +87,9 @@
* See http://www.freertos.org/a00110.html.
*----------------------------------------------------------*/
-/* This #ifdef prevents the enclosed code being included from within an
-asm file. It is valid in a C file, but not valid in an asm file. */
-#ifdef __IAR_SYSTEMS_ICC__
-
- #pragma language=extended
- #pragma system_include
-
- #include
-
- /* Device specific includes. */
- #include
- #include
-
-#endif /* __IAR_SYSTEMS_ICC__ */
-
#define configUSE_PREEMPTION 1
#define configTICK_RATE_HZ ( ( unsigned short ) 1000 )
+#define configCPU_CLOCK_HZ ( ( unsigned long ) 32000000 ) /* Using the internal high speed clock */
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 4 )
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 80 )
#define configMAX_TASK_NAME_LEN ( 10 )
@@ -141,26 +127,11 @@ to exclude the API function. */
#define INCLUDE_xTaskGetIdleTaskHandle 0
#define INCLUDE_xTimerGetTimerDaemonTaskHandle 0
-
-/******************************************************************************
- * PORT SPECIFIC CONFIGURATION OPTIONS
- ******************************************************************************/
-
-/*
- * RL78/G13 Clock Source Configuration
- * 1 = use internal High Speed Clock Source (typically 32Mhz on the RL78/G13)
- * 0 = use external Clock Source
- */
-#define configCLOCK_SOURCE 1
-
-#if configCLOCK_SOURCE == 0
- #define configCPU_CLOCK_HZ ( ( unsigned long ) 20000000 ) /* using the external clock source */
-#else
- #define configCPU_CLOCK_HZ ( ( unsigned long ) 32000000 ) /* using the internal high speed clock */
-#endif /* configCLOCK_SOURCE */
-
#define configASSERT( x ) if( ( x ) == 0 ) { taskDISABLE_INTERRUPTS(); for( ;; ); }
+#define __DATA_MODEL_FAR__ 0
+#define __DATA_MODEL_NEAR__ 1
+#define __DATA_MODEL__ __DATA_MODEL_FAR__
#endif /* FREERTOS_CONFIG_H */
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/portable/GCC/RL78/portasm.S b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/portable/GCC/RL78/portasm.S
index e1468984f..cd0914cbb 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/portable/GCC/RL78/portasm.S
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/portable/GCC/RL78/portasm.S
@@ -72,6 +72,7 @@
mission critical applications that require provable dependability.
*/
+#include "FreeRTOSConfig.h"
#include "ISR_Support.h"
#define CS 0xFFFFC
@@ -93,40 +94,34 @@ _vPortYield:
portSAVE_CONTEXT
/* Call the scheduler to select the next task. */
call !!_vTaskSwitchContext
- /*portRESTORE_CONTEXT ; Restore the context of the next task to run.*/
+ /* Restore the context of the next task to run. */
+ portRESTORE_CONTEXT
retb
/* Starts the scheduler by restoring the context of the task that will execute
first. */
_vPortStartFirstTask:
- /* portRESTORE_CONTEXT ; Restore the context of whichever task the ... */
- reti /*An interrupt stack frame is used so the task */
- /* is started using a RETI instruction. */
+ /* Restore the context of whichever task will execute first. */
+ portRESTORE_CONTEXT
+ /* An interrupt stack frame is used so the task is started using RETI. */
+ reti
/* FreeRTOS tick handler. This is installed as the interval timer interrupt
handler. */
_vPortTickISR:
- /* portSAVE_CONTEXT ; Save the context of the current task. */
- call !!_vTaskIncrementTick /* Call the timer tick function. */
+ /* Save the context of the currently executing task. */
+ portSAVE_CONTEXT
+ /* Call the RTOS tick function. */
+ call !!_vTaskIncrementTick
#if configUSE_PREEMPTION == 1
- call !!_vTaskSwitchContext /* Call the scheduler to select the next task. */
+ /* Select the next task to run. */
+ call !!_vTaskSwitchContext
#endif
- /* portRESTORE_CONTEXT ; Restore the context of the next task to run. */
+ /* Retore the context of whichever task will run next. */
+ portRESTORE_CONTEXT
reti
-
-/* Install the interrupt handlers
-
- COMMON INTVEC:CODE:ROOT(1)
- ORG 56
- DW vPortTickISR
-
- COMMON INTVEC:CODE:ROOT(1)
- ORG 126
- DW vPortYield */
-
-
.end
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/portable/MemMang/heap_1.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/portable/MemMang/heap_1.c
new file mode 100644
index 000000000..4b65a0f3d
--- /dev/null
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/portable/MemMang/heap_1.c
@@ -0,0 +1,177 @@
+/*
+ FreeRTOS V7.4.0 - Copyright (C) 2013 Real Time Engineers Ltd.
+
+ FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
+ http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
+
+ ***************************************************************************
+ * *
+ * 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 itcan be
+ viewed here: http://www.freertos.org/a00114.html and also obtained by
+ writing to Real Time Engineers Ltd., 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, books, training, latest versions,
+ license and Real Time Engineers Ltd. contact details.
+
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
+ including FreeRTOS+Trace - an indispensable productivity tool, and our new
+ fully thread aware and reentrant UDP/IP stack.
+
+ http://www.OpenRTOS.com - 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.SafeRTOS.com - High Integrity Systems also provide a safety
+ engineered and independently SIL3 certified version for use in safety and
+ mission critical applications that require provable dependability.
+*/
+
+
+/*
+ * The simplest possible implementation of pvPortMalloc(). Note that this
+ * implementation does NOT allow allocated memory to be freed again.
+ *
+ * See heap_2.c, heap_3.c and heap_4.c for alternative implementations, and the
+ * memory management pages of http://www.FreeRTOS.org for more information.
+ */
+#include
+
+/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
+all the API functions to use the MPU wrappers. That should only be done when
+task.h is included from an application file. */
+#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
+
+#include "FreeRTOS.h"
+#include "task.h"
+
+#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
+
+/* A few bytes might be lost to byte aligning the heap start address. */
+#define configADJUSTED_HEAP_SIZE ( configTOTAL_HEAP_SIZE - portBYTE_ALIGNMENT )
+
+/* Allocate the memory for the heap. */
+static unsigned char ucHeap[ configTOTAL_HEAP_SIZE ];
+static size_t xNextFreeByte = ( size_t ) 0;
+
+/*-----------------------------------------------------------*/
+
+void *pvPortMalloc( size_t xWantedSize )
+{
+void *pvReturn = NULL;
+static unsigned char *pucAlignedHeap = NULL;
+
+ /* Ensure that blocks are always aligned to the required number of bytes. */
+ #if portBYTE_ALIGNMENT != 1
+ if( xWantedSize & portBYTE_ALIGNMENT_MASK )
+ {
+ /* Byte alignment required. */
+ xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
+ }
+ #endif
+
+ vTaskSuspendAll();
+ {
+ if( pucAlignedHeap == NULL )
+ {
+ /* Ensure the heap starts on a correctly aligned boundary. */
+ pucAlignedHeap = ( unsigned char * ) ( ( ( portPOINTER_SIZE_TYPE ) &ucHeap[ portBYTE_ALIGNMENT ] ) & ( ( portPOINTER_SIZE_TYPE ) ~portBYTE_ALIGNMENT_MASK ) );
+ }
+
+ /* Check there is enough room left for the allocation. */
+ if( ( ( xNextFreeByte + xWantedSize ) < configADJUSTED_HEAP_SIZE ) &&
+ ( ( xNextFreeByte + xWantedSize ) > xNextFreeByte ) )/* Check for overflow. */
+ {
+ /* Return the next free byte then increment the index past this
+ block. */
+ pvReturn = pucAlignedHeap + xNextFreeByte;
+ xNextFreeByte += xWantedSize;
+ }
+ }
+ xTaskResumeAll();
+
+ #if( configUSE_MALLOC_FAILED_HOOK == 1 )
+ {
+ if( pvReturn == NULL )
+ {
+ extern void vApplicationMallocFailedHook( void );
+ vApplicationMallocFailedHook();
+ }
+ }
+ #endif
+
+ return pvReturn;
+}
+/*-----------------------------------------------------------*/
+
+void vPortFree( void *pv )
+{
+ /* Memory cannot be freed using this scheme. See heap_2.c, heap_3.c and
+ heap_4.c for alternative implementations, and the memory management pages of
+ http://www.FreeRTOS.org for more information. */
+ ( void ) pv;
+
+ /* Force an assert as it is invalid to call this function. */
+ configASSERT( pv == NULL );
+}
+/*-----------------------------------------------------------*/
+
+void vPortInitialiseBlocks( void )
+{
+ /* Only required when static memory is not cleared. */
+ xNextFreeByte = ( size_t ) 0;
+}
+/*-----------------------------------------------------------*/
+
+size_t xPortGetFreeHeapSize( void )
+{
+ return ( configADJUSTED_HEAP_SIZE - xNextFreeByte );
+}
+
+
+
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/portable/MemMang/heap_4.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/portable/MemMang/heap_4.c
deleted file mode 100644
index b56bd2800..000000000
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/FreeRTOS_Source/portable/MemMang/heap_4.c
+++ /dev/null
@@ -1,359 +0,0 @@
-/*
- FreeRTOS V7.4.0 - Copyright (C) 2013 Real Time Engineers Ltd.
-
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
- http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
-
- ***************************************************************************
- * *
- * 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 itcan be
- viewed here: http://www.freertos.org/a00114.html and also obtained by
- writing to Real Time Engineers Ltd., 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, books, training, latest versions,
- license and Real Time Engineers Ltd. contact details.
-
- http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
- including FreeRTOS+Trace - an indispensable productivity tool, and our new
- fully thread aware and reentrant UDP/IP stack.
-
- http://www.OpenRTOS.com - 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.SafeRTOS.com - High Integrity Systems also provide a safety
- engineered and independently SIL3 certified version for use in safety and
- mission critical applications that require provable dependability.
-*/
-
-/*
- * A sample implementation of pvPortMalloc() and vPortFree() that combines
- * (coalescences) adjacent memory blocks as they are freed, and in so doing
- * limits memory fragmentation.
- *
- * See heap_1.c, heap_2.c and heap_3.c for alternative implementations, and the
- * memory management pages of http://www.FreeRTOS.org for more information.
- */
-#include
-
-/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
-all the API functions to use the MPU wrappers. That should only be done when
-task.h is included from an application file. */
-#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
-
-#include "FreeRTOS.h"
-#include "task.h"
-
-#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
-
-/* Block sizes must not get too small. */
-#define heapMINIMUM_BLOCK_SIZE ( ( size_t ) ( heapSTRUCT_SIZE * 2 ) )
-
-/* A few bytes might be lost to byte aligning the heap start address. */
-#define configADJUSTED_HEAP_SIZE ( configTOTAL_HEAP_SIZE - portBYTE_ALIGNMENT )
-
-/* Allocate the memory for the heap. */
-static unsigned char ucHeap[ configTOTAL_HEAP_SIZE ];
-
-/* Define the linked list structure. This is used to link free blocks in order
-of their memory address. */
-typedef struct A_BLOCK_LINK
-{
- struct A_BLOCK_LINK *pxNextFreeBlock; /*<< The next free block in the list. */
- size_t xBlockSize; /*<< The size of the free block. */
-} xBlockLink;
-
-/*-----------------------------------------------------------*/
-
-/*
- * Inserts a block of memory that is being freed into the correct position in
- * the list of free memory blocks. The block being freed will be merged with
- * the block in front it and/or the block behind it if the memory blocks are
- * adjacent to each other.
- */
-static void prvInsertBlockIntoFreeList( xBlockLink *pxBlockToInsert );
-
-/*
- * Called automatically to setup the required heap structures the first time
- * pvPortMalloc() is called.
- */
-static void prvHeapInit( void );
-
-/*-----------------------------------------------------------*/
-
-/* The size of the structure placed at the beginning of each allocated memory
-block must by correctly byte aligned. */
-static const unsigned short heapSTRUCT_SIZE = ( sizeof( xBlockLink ) + portBYTE_ALIGNMENT - ( sizeof( xBlockLink ) % portBYTE_ALIGNMENT ) );
-
-/* Ensure the pxEnd pointer will end up on the correct byte alignment. */
-static const size_t xTotalHeapSize = ( ( size_t ) configADJUSTED_HEAP_SIZE ) & ( ( size_t ) ~portBYTE_ALIGNMENT_MASK );
-
-/* Create a couple of list links to mark the start and end of the list. */
-static xBlockLink xStart, *pxEnd = NULL;
-
-/* Keeps track of the number of free bytes remaining, but says nothing about
-fragmentation. */
-static size_t xFreeBytesRemaining = ( ( size_t ) configADJUSTED_HEAP_SIZE ) & ( ( size_t ) ~portBYTE_ALIGNMENT_MASK );
-
-/* STATIC FUNCTIONS ARE DEFINED AS MACROS TO MINIMIZE THE FUNCTION CALL DEPTH. */
-
-/*-----------------------------------------------------------*/
-
-void *pvPortMalloc( size_t xWantedSize )
-{
-xBlockLink *pxBlock, *pxPreviousBlock, *pxNewBlockLink;
-void *pvReturn = NULL;
-
- vTaskSuspendAll();
- {
- /* If this is the first call to malloc then the heap will require
- initialisation to setup the list of free blocks. */
- if( pxEnd == NULL )
- {
- prvHeapInit();
- }
-
- /* The wanted size is increased so it can contain a xBlockLink
- structure in addition to the requested amount of bytes. */
- if( xWantedSize > 0 )
- {
- xWantedSize += heapSTRUCT_SIZE;
-
- /* Ensure that blocks are always aligned to the required number of
- bytes. */
- if( xWantedSize & portBYTE_ALIGNMENT_MASK )
- {
- /* Byte alignment required. */
- xWantedSize += ( portBYTE_ALIGNMENT - ( xWantedSize & portBYTE_ALIGNMENT_MASK ) );
- }
- }
-
- if( ( xWantedSize > 0 ) && ( xWantedSize < xTotalHeapSize ) )
- {
- /* Traverse the list from the start (lowest address) block until one
- of adequate size is found. */
- pxPreviousBlock = &xStart;
- pxBlock = xStart.pxNextFreeBlock;
- while( ( pxBlock->xBlockSize < xWantedSize ) && ( pxBlock->pxNextFreeBlock != NULL ) )
- {
- pxPreviousBlock = pxBlock;
- pxBlock = pxBlock->pxNextFreeBlock;
- }
-
- /* If the end marker was reached then a block of adequate size was
- not found. */
- if( pxBlock != pxEnd )
- {
- /* Return the memory space - jumping over the xBlockLink structure
- at its start. */
- pvReturn = ( void * ) ( ( ( unsigned char * ) pxPreviousBlock->pxNextFreeBlock ) + heapSTRUCT_SIZE );
-
- /* This block is being returned for use so must be taken out of
- the list of free blocks. */
- pxPreviousBlock->pxNextFreeBlock = pxBlock->pxNextFreeBlock;
-
- /* If the block is larger than required it can be split into two. */
- if( ( pxBlock->xBlockSize - xWantedSize ) > heapMINIMUM_BLOCK_SIZE )
- {
- /* This block is to be split into two. Create a new block
- following the number of bytes requested. The void cast is
- used to prevent byte alignment warnings from the compiler. */
- pxNewBlockLink = ( void * ) ( ( ( unsigned char * ) pxBlock ) + xWantedSize );
-
- /* Calculate the sizes of two blocks split from the single
- block. */
- pxNewBlockLink->xBlockSize = pxBlock->xBlockSize - xWantedSize;
- pxBlock->xBlockSize = xWantedSize;
-
- /* Insert the new block into the list of free blocks. */
- prvInsertBlockIntoFreeList( ( pxNewBlockLink ) );
- }
-
- xFreeBytesRemaining -= pxBlock->xBlockSize;
- }
- }
- }
- xTaskResumeAll();
-
- #if( configUSE_MALLOC_FAILED_HOOK == 1 )
- {
- if( pvReturn == NULL )
- {
- extern void vApplicationMallocFailedHook( void );
- vApplicationMallocFailedHook();
- }
- }
- #endif
-
- return pvReturn;
-}
-/*-----------------------------------------------------------*/
-
-void vPortFree( void *pv )
-{
-unsigned char *puc = ( unsigned char * ) pv;
-xBlockLink *pxLink;
-
- if( pv != NULL )
- {
- /* The memory being freed will have an xBlockLink structure immediately
- before it. */
- puc -= heapSTRUCT_SIZE;
-
- /* This casting is to keep the compiler from issuing warnings. */
- pxLink = ( void * ) puc;
-
- vTaskSuspendAll();
- {
- /* Add this block to the list of free blocks. */
- xFreeBytesRemaining += pxLink->xBlockSize;
- prvInsertBlockIntoFreeList( ( ( xBlockLink * ) pxLink ) );
- }
- xTaskResumeAll();
- }
-}
-/*-----------------------------------------------------------*/
-
-size_t xPortGetFreeHeapSize( void )
-{
- return xFreeBytesRemaining;
-}
-/*-----------------------------------------------------------*/
-
-void vPortInitialiseBlocks( void )
-{
- /* This just exists to keep the linker quiet. */
-}
-/*-----------------------------------------------------------*/
-
-static void prvHeapInit( void )
-{
-xBlockLink *pxFirstFreeBlock;
-unsigned char *pucHeapEnd, *pucAlignedHeap;
-
- /* Ensure the heap starts on a correctly aligned boundary. */
- pucAlignedHeap = ( unsigned char * ) ( ( ( portPOINTER_SIZE_TYPE ) &ucHeap[ portBYTE_ALIGNMENT ] ) & ( ( portPOINTER_SIZE_TYPE ) ~portBYTE_ALIGNMENT_MASK ) );
-
- /* xStart is used to hold a pointer to the first item in the list of free
- blocks. The void cast is used to prevent compiler warnings. */
- xStart.pxNextFreeBlock = ( void * ) pucAlignedHeap;
- xStart.xBlockSize = ( size_t ) 0;
-
- /* pxEnd is used to mark the end of the list of free blocks and is inserted
- at the end of the heap space. */
- pucHeapEnd = pucAlignedHeap + xTotalHeapSize;
- pucHeapEnd -= heapSTRUCT_SIZE;
- pxEnd = ( void * ) pucHeapEnd;
- configASSERT( ( ( ( unsigned long ) pxEnd ) & ( ( unsigned long ) portBYTE_ALIGNMENT_MASK ) ) == 0UL );
- pxEnd->xBlockSize = 0;
- pxEnd->pxNextFreeBlock = NULL;
-
- /* To start with there is a single free block that is sized to take up the
- entire heap space, minus the space taken by pxEnd. */
- pxFirstFreeBlock = ( void * ) pucAlignedHeap;
- pxFirstFreeBlock->xBlockSize = xTotalHeapSize - heapSTRUCT_SIZE;
- pxFirstFreeBlock->pxNextFreeBlock = pxEnd;
-
- /* The heap now contains pxEnd. */
- xFreeBytesRemaining -= heapSTRUCT_SIZE;
-}
-/*-----------------------------------------------------------*/
-
-static void prvInsertBlockIntoFreeList( xBlockLink *pxBlockToInsert )
-{
-xBlockLink *pxIterator;
-unsigned char *puc;
-
- /* Iterate through the list until a block is found that has a higher address
- than the block being inserted. */
- for( pxIterator = &xStart; pxIterator->pxNextFreeBlock < pxBlockToInsert; pxIterator = pxIterator->pxNextFreeBlock )
- {
- /* Nothing to do here, just iterate to the right position. */
- }
-
- /* Do the block being inserted, and the block it is being inserted after
- make a contiguous block of memory? */
- puc = ( unsigned char * ) pxIterator;
- if( ( puc + pxIterator->xBlockSize ) == ( unsigned char * ) pxBlockToInsert )
- {
- pxIterator->xBlockSize += pxBlockToInsert->xBlockSize;
- pxBlockToInsert = pxIterator;
- }
-
- /* Do the block being inserted, and the block it is being inserted before
- make a contiguous block of memory? */
- puc = ( unsigned char * ) pxBlockToInsert;
- if( ( puc + pxBlockToInsert->xBlockSize ) == ( unsigned char * ) pxIterator->pxNextFreeBlock )
- {
- if( pxIterator->pxNextFreeBlock != pxEnd )
- {
- /* Form one big block from the two blocks. */
- pxBlockToInsert->xBlockSize += pxIterator->pxNextFreeBlock->xBlockSize;
- pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock->pxNextFreeBlock;
- }
- else
- {
- pxBlockToInsert->pxNextFreeBlock = pxEnd;
- }
- }
- else
- {
- pxBlockToInsert->pxNextFreeBlock = pxIterator->pxNextFreeBlock;
- }
-
- /* If the block being inserted plugged a gab, so was merged with the block
- before and the block after, then it's pxNextFreeBlock pointer will have
- already been set, and should not be set here as that would make it point
- to itself. */
- if( pxIterator != pxBlockToInsert )
- {
- pxIterator->pxNextFreeBlock = pxBlockToInsert;
- }
-}
-
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/LED.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/LED.h
new file mode 100644
index 000000000..b51c12516
--- /dev/null
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/LED.h
@@ -0,0 +1,102 @@
+/*
+ FreeRTOS V7.4.0 - Copyright (C) 2013 Real Time Engineers Ltd.
+
+ FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT
+ http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
+
+ ***************************************************************************
+ * *
+ * 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 itcan be
+ viewed here: http://www.freertos.org/a00114.html and also obtained by
+ writing to Real Time Engineers Ltd., 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, books, training, latest versions,
+ license and Real Time Engineers Ltd. contact details.
+
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,
+ including FreeRTOS+Trace - an indispensable productivity tool, and our new
+ fully thread aware and reentrant UDP/IP stack.
+
+ http://www.OpenRTOS.com - 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.SafeRTOS.com - High Integrity Systems also provide a safety
+ engineered and independently SIL3 certified version for use in safety and
+ mission critical applications that require provable dependability.
+*/
+
+/*
+ * Board specific macros to initialise and toggle an LED.
+ */
+
+#ifndef LED_IO_H
+#define LED_IO_H
+
+ #ifdef YRPBRL78G13
+ #define LED_BIT ( P7_bit.no7 )
+ #define LED_INIT() P7 &= 0x7F; PM7 &= 0x7F
+ #endif /* YRPBRL78G13 */
+
+ #ifdef YRDKRL78G14
+ #define LED_BIT ( P1_bit.no0 )
+ #define LED_INIT() P1 &= 0xFE; PM1 &= 0xFE
+ #endif /* YRDKRL78G14 */
+
+ #ifdef RSKRL78G1C
+ #define LED_BIT ( P0_bit.no1 )
+ #define LED_INIT() P0 &= 0xFD; PM0 &= 0xFD
+ #endif /* RSKRL78G1C */
+
+ #ifndef LED_BIT
+ #error The hardware platform is not defined
+ #endif
+
+#endif /* LED_IO_H */
+
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/hardware_setup.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/hardware_setup.c
index 63bafbbc3..001539271 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/hardware_setup.c
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/hardware_setup.c
@@ -9,18 +9,36 @@
/* This file is generated by e2studio. */
/* */
/***********************************************************************/
-
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-extern void HardwareSetup(void);
-#ifdef __cplusplus
-}
-#endif
+/* Scheduler include files. */
+#include "FreeRTOS.h"
+
+/* Hardware includes. */
+#include "port_iodefine.h"
+
void HardwareSetup(void)
{
-
-}
+unsigned char ucResetFlag = RESF;
+
+ portDISABLE_INTERRUPTS();
+
+ /* Set fMX */
+ CMC = 0x00;
+ MSTOP = 1U;
+
+ /* Set fMAIN */
+ MCM0 = 0U;
+
+ /* Set fSUB */
+ XTSTOP = 1U;
+ OSMC = 0x10;
+
+ /* Set fCLK */
+ CSS = 0U;
+
+ /* Set fIH */
+ HIOSTOP = 0U;
+
+ /* LED port initialization. */
+ LED_INIT();
+}
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/interrupt_handlers.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/interrupt_handlers.c
index f28a4c8c8..59bc209a4 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/interrupt_handlers.c
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/interrupt_handlers.c
@@ -3,8 +3,8 @@
/* PROJECT NAME : RTOSDemo */
/* FILE : interrupt_handlers.c */
/* DESCRIPTION : Interrupt Handler */
-/* CPU SERIES : RL78 - G1C */
-/* CPU TYPE : R5F10JBC */
+/* CPU SERIES : RL78 - G14 */
+/* CPU TYPE : R5F104PJ */
/* */
/* This file is generated by e2studio. */
/* */
@@ -54,14 +54,24 @@ void INT_P4 (void) { }
void INT_P5 (void) { }
/*
- * INT_DMA0 (0x1A)
+ * INT_CSI20/INT_IIC20/INT_ST2 (0x14)
*/
-void INT_DMA0 (void) { }
+void INT_ST2 (void) { }
+//void INT_CSI20 (void) { }
+//void INT_IIC20 (void) { }
+
+/*
+ * INT_CSI21/INT_IIC21/INT_SR2 (0x16)
+ */
+void INT_SR2 (void) { }
+//void INT_CSI21 (void) { }
+//void INT_IIC21 (void) { }
/*
- * INT_DMA1 (0x1C)
+ * INT_SRE2/INT_TM11H (0x18)
*/
-void INT_DMA1 (void) { }
+void INT_TM11H (void) { }
+//void INT_SRE2 (void) { }
/*
* INT_CSI00/INT_IIC00/INT_ST0 (0x1E)
@@ -71,32 +81,47 @@ void INT_ST0 (void) { }
//void INT_IIC00 (void) { }
/*
- * INT_TM00 (0x20)
- */
-void INT_TM00 (void) { }
-
-/*
- * INT_CSI01/INT_IIC01/INT_SR0 (0x22)
+ * INT_CSI01/INT_IIC01/INT_SR0 (0x20)
*/
void INT_SR0 (void) { }
//void INT_CSI01 (void) { }
//void INT_IIC01 (void) { }
/*
- * INT_SRE0/INT_TM01H (0x24)
+ * INT_SRE0/INT_TM01H (0x22)
*/
void INT_TM01H (void) { }
//void INT_SRE0 (void) { }
/*
- * INT_TM03H (0x2A)
+ * INT_CSI10/INT_IIC10/INT_ST1 (0x24)
+ */
+void INT_ST1 (void) { }
+//void INT_CSI10 (void) { }
+//void INT_IIC10 (void) { }
+
+/*
+ * INT_CSI11/INT_IIC11/INT_SR1 (0x26)
+ */
+void INT_SR1 (void) { }
+//void INT_CSI11 (void) { }
+//void INT_IIC11 (void) { }
+
+/*
+ * INT_SRE1/INT_TM03H (0x28)
*/
void INT_TM03H (void) { }
+//void INT_SRE1 (void) { }
/*
- * INT_IICA0 (0x2C)
+ * INT_IICA0 (0x2A)
*/
void INT_IICA0 (void) { }
+
+/*
+ * INT_TM00 (0x2C)
+ */
+void INT_TM00 (void) { }
/*
* INT_TM01 (0x2E)
@@ -129,16 +154,60 @@ void INT_RTC (void) { }
void INT_IT (void) { }
/*
- * INT_USB (0x3C)
+ * INT_KR (0x3A)
*/
-void INT_USB (void) { }
+void INT_KR (void) { }
+
+/*
+ * INT_CSI30/INT_IIC30/INT_ST3 (0x3C)
+ */
+void INT_ST3 (void) { }
+//void INT_CSI30 (void) { }
+//void INT_IIC30 (void) { }
/*
- * INT_RSUM (0x3E)
+ * INT_CSI31/INT_IIC31/INT_SR3 (0x3E)
+ */
+void INT_SR3 (void) { }
+//void INT_CSI31 (void) { }
+//void INT_IIC31 (void) { }
+
+/*
+ * INT_TRJ0 (0x40)
+ */
+void INT_TRJ0 (void) { }
+
+/*
+ * INT_TM10 (0x42)
+ */
+void INT_TM10 (void) { }
+
+/*
+ * INT_TM11 (0x44)
+ */
+void INT_TM11 (void) { }
+
+/*
+ * INT_TM12 (0x46)
+ */
+void INT_TM12 (void) { }
+
+/*
+ * INT_TM13 (0x48)
*/
-void INT_RSUM (void) { }
+void INT_TM13 (void) { }
/*
+ * INT_P6 (0x4A)
+ */
+void INT_P6 (void) { }
+
+/*
+ * INT_P7 (0x4C)
+ */
+void INT_P7 (void) { }
+
+/*
* INT_P8 (0x4E)
*/
void INT_P8 (void) { }
@@ -149,11 +218,44 @@ void INT_P8 (void) { }
void INT_P9 (void) { }
/*
- * INT_MD (0x5E)
+ * INT_CMP0/INT_P10 (0x52)
+ */
+void INT_P10 (void) { }
+//void INT_CMP0 (void) { }
+
+/*
+ * INT_CMP1/INT_P11 (0x54)
+ */
+void INT_P11 (void) { }
+//void INT_CMP1 (void) { }
+
+/*
+ * INT_TRD0 (0x56)
*/
-void INT_MD (void) { }
+void INT_TRD0 (void) { }
/*
+ * INT_TRD1 (0x58)
+ */
+void INT_TRD1 (void) { }
+
+/*
+ * INT_TRG (0x5A)
+ */
+void INT_TRG (void) { }
+
+/*
+ * INT_SRE3/INT_TM13H (0x5C)
+ */
+void INT_TM13H (void) { }
+//void INT_SRE3 (void) { }
+
+/*
+ * INT_IICA1 (0x60)
+ */
+void INT_IICA1 (void) { }
+
+/*
* INT_FL (0x62)
*/
void INT_FL (void) { }
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/interrupt_handlers.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/interrupt_handlers.h
index b53d2f0ca..542e8158f 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/interrupt_handlers.h
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/interrupt_handlers.h
@@ -3,8 +3,8 @@
/* PROJECT NAME : RTOSDemo */
/* FILE : interrupt_handlers.h */
/* DESCRIPTION : Interrupt Handler Declarations */
-/* CPU SERIES : RL78 - G1C */
-/* CPU TYPE : R5F10JBC */
+/* CPU SERIES : RL78 - G14 */
+/* CPU TYPE : R5F104PJ */
/* */
/* This file is generated by e2studio. */
/* */
@@ -55,14 +55,24 @@ void INT_P4(void) __attribute__ ((interrupt));
void INT_P5(void) __attribute__ ((interrupt));
/*
- * INT_DMA0 (0x1A)
+ * INT_CSI20/INT_IIC20/INT_ST2 (0x14)
*/
-void INT_DMA0(void) __attribute__ ((interrupt));
+void INT_ST2(void) __attribute__ ((interrupt));
+//void INT_CSI20(void) __attribute__ ((interrupt));
+//void INT_IIC20(void) __attribute__ ((interrupt));
/*
- * INT_DMA1 (0x1C)
+ * INT_CSI21/INT_IIC21/INT_SR2 (0x16)
*/
-void INT_DMA1(void) __attribute__ ((interrupt));
+void INT_SR2(void) __attribute__ ((interrupt));
+//void INT_CSI21(void) __attribute__ ((interrupt));
+//void INT_IIC21(void) __attribute__ ((interrupt));
+
+/*
+ * INT_SRE2/INT_TM11H (0x18)
+ */
+void INT_TM11H(void) __attribute__ ((interrupt));
+//void INT_SRE2(void) __attribute__ ((interrupt));
/*
* INT_CSI00/INT_IIC00/INT_ST0 (0x1E)
@@ -72,33 +82,48 @@ void INT_ST0(void) __attribute__ ((interrupt));
//void INT_IIC00(void) __attribute__ ((interrupt));
/*
- * INT_TM00 (0x20)
- */
-void INT_TM00(void) __attribute__ ((interrupt));
-
-/*
- * INT_CSI01/INT_IIC01/INT_SR0 (0x22)
+ * INT_CSI01/INT_IIC01/INT_SR0 (0x20)
*/
void INT_SR0(void) __attribute__ ((interrupt));
//void INT_CSI01(void) __attribute__ ((interrupt));
//void INT_IIC01(void) __attribute__ ((interrupt));
/*
- * INT_SRE0/INT_TM01H (0x24)
+ * INT_SRE0/INT_TM01H (0x22)
*/
void INT_TM01H(void) __attribute__ ((interrupt));
//void INT_SRE0(void) __attribute__ ((interrupt));
/*
- * INT_TM03H (0x2A)
+ * INT_CSI10/INT_IIC10/INT_ST1 (0x24)
*/
-void INT_TM03H(void) __attribute__ ((interrupt));
+void INT_ST1(void) __attribute__ ((interrupt));
+//void INT_CSI10(void) __attribute__ ((interrupt));
+//void INT_IIC10(void) __attribute__ ((interrupt));
/*
- * INT_IICA0 (0x2C)
+ * INT_CSI11/INT_IIC11/INT_SR1 (0x26)
+ */
+void INT_SR1(void) __attribute__ ((interrupt));
+//void INT_CSI11(void) __attribute__ ((interrupt));
+//void INT_IIC11(void) __attribute__ ((interrupt));
+
+/*
+ * INT_SRE1/INT_TM03H (0x28)
+ */
+void INT_TM03H(void) __attribute__ ((interrupt));
+//void INT_SRE1(void) __attribute__ ((interrupt));
+
+/*
+ * INT_IICA0 (0x2A)
*/
void INT_IICA0(void) __attribute__ ((interrupt));
+/*
+ * INT_TM00 (0x2C)
+ */
+void INT_TM00(void) __attribute__ ((interrupt));
+
/*
* INT_TM01 (0x2E)
*/
@@ -130,14 +155,58 @@ void INT_RTC(void) __attribute__ ((interrupt));
void INT_IT(void) __attribute__ ((interrupt));
/*
- * INT_USB (0x3C)
+ * INT_KR (0x3A)
*/
-void INT_USB(void) __attribute__ ((interrupt));
+void INT_KR(void) __attribute__ ((interrupt));
/*
- * INT_RSUM (0x3E)
+ * INT_CSI30/INT_IIC30/INT_ST3 (0x3C)
*/
-void INT_RSUM(void) __attribute__ ((interrupt));
+void INT_ST3(void) __attribute__ ((interrupt));
+//void INT_CSI30(void) __attribute__ ((interrupt));
+//void INT_IIC30(void) __attribute__ ((interrupt));
+
+/*
+ * INT_CSI31/INT_IIC31/INT_SR3 (0x3E)
+ */
+void INT_SR3(void) __attribute__ ((interrupt));
+//void INT_CSI31(void) __attribute__ ((interrupt));
+//void INT_IIC31(void) __attribute__ ((interrupt));
+
+/*
+ * INT_TRJ0 (0x40)
+ */
+void INT_TRJ0(void) __attribute__ ((interrupt));
+
+/*
+ * INT_TM10 (0x42)
+ */
+void INT_TM10(void) __attribute__ ((interrupt));
+
+/*
+ * INT_TM11 (0x44)
+ */
+void INT_TM11(void) __attribute__ ((interrupt));
+
+/*
+ * INT_TM12 (0x46)
+ */
+void INT_TM12(void) __attribute__ ((interrupt));
+
+/*
+ * INT_TM13 (0x48)
+ */
+void INT_TM13(void) __attribute__ ((interrupt));
+
+/*
+ * INT_P6 (0x4A)
+ */
+void INT_P6(void) __attribute__ ((interrupt));
+
+/*
+ * INT_P7 (0x4C)
+ */
+void INT_P7(void) __attribute__ ((interrupt));
/*
* INT_P8 (0x4E)
@@ -150,9 +219,42 @@ void INT_P8(void) __attribute__ ((interrupt));
void INT_P9(void) __attribute__ ((interrupt));
/*
- * INT_MD (0x5E)
+ * INT_CMP0/INT_P10 (0x52)
*/
-void INT_MD(void) __attribute__ ((interrupt));
+void INT_P10(void) __attribute__ ((interrupt));
+//void INT_CMP0(void) __attribute__ ((interrupt));
+
+/*
+ * INT_CMP1/INT_P11 (0x54)
+ */
+void INT_P11(void) __attribute__ ((interrupt));
+//void INT_CMP1(void) __attribute__ ((interrupt));
+
+/*
+ * INT_TRD0 (0x56)
+ */
+void INT_TRD0(void) __attribute__ ((interrupt));
+
+/*
+ * INT_TRD1 (0x58)
+ */
+void INT_TRD1(void) __attribute__ ((interrupt));
+
+/*
+ * INT_TRG (0x5A)
+ */
+void INT_TRG(void) __attribute__ ((interrupt));
+
+/*
+ * INT_SRE3/INT_TM13H (0x5C)
+ */
+void INT_TM13H(void) __attribute__ ((interrupt));
+//void INT_SRE3(void) __attribute__ ((interrupt));
+
+/*
+ * INT_IICA1 (0x60)
+ */
+void INT_IICA1(void) __attribute__ ((interrupt));
/*
* INT_FL (0x62)
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine.h
index 8c7741bbd..a26684b71 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine.h
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine.h
@@ -3,22 +3,22 @@
/* PROJECT NAME : RTOSDemo */
/* FILE : iodefine.h */
/* DESCRIPTION : Definition of I/O Registers */
-/* CPU SERIES : RL78 - G1C */
-/* CPU TYPE : R5F10JBC */
+/* CPU SERIES : RL78 - G14 */
+/* CPU TYPE : R5F104PJ */
/* */
/* This file is generated by e2studio. */
/* */
-/***********************************************************************/
-
+/***********************************************************************/
+
/************************************************************************/
/* Header file generated from device file: */
-/* DR5F10JBC.DVF */
+/* DR5F104PJ.DVF */
/* Copyright(C) 2012 Renesas */
-/* File Version V1.00 */
+/* File Version V2.00 */
/* Tool Version 1.9.7121 */
/* Date Generated 13/11/2012 */
/************************************************************************/
-
+
#ifndef __IOREG_BIT_STRUCTURES
#define __IOREG_BIT_STRUCTURES
typedef struct {
@@ -91,6 +91,18 @@ union un_p7 {
unsigned char p7;
__BITS8 BIT;
};
+union un_p8 {
+ unsigned char p8;
+ __BITS8 BIT;
+};
+union un_p10 {
+ unsigned char p10;
+ __BITS8 BIT;
+};
+union un_p11 {
+ unsigned char p11;
+ __BITS8 BIT;
+};
union un_p12 {
unsigned char p12;
__BITS8 BIT;
@@ -99,6 +111,14 @@ union un_p13 {
unsigned char p13;
__BITS8 BIT;
};
+union un_p14 {
+ unsigned char p14;
+ __BITS8 BIT;
+};
+union un_p15 {
+ unsigned char p15;
+ __BITS8 BIT;
+};
union un_pm0 {
unsigned char pm0;
__BITS8 BIT;
@@ -131,10 +151,30 @@ union un_pm7 {
unsigned char pm7;
__BITS8 BIT;
};
+union un_pm8 {
+ unsigned char pm8;
+ __BITS8 BIT;
+};
+union un_pm10 {
+ unsigned char pm10;
+ __BITS8 BIT;
+};
+union un_pm11 {
+ unsigned char pm11;
+ __BITS8 BIT;
+};
union un_pm12 {
unsigned char pm12;
__BITS8 BIT;
};
+union un_pm14 {
+ unsigned char pm14;
+ __BITS8 BIT;
+};
+union un_pm15 {
+ unsigned char pm15;
+ __BITS8 BIT;
+};
union un_adm0 {
unsigned char adm0;
__BITS8 BIT;
@@ -147,6 +187,14 @@ union un_adm1 {
unsigned char adm1;
__BITS8 BIT;
};
+union un_dam {
+ unsigned char dam;
+ __BITS8 BIT;
+};
+union un_krm {
+ unsigned char krm;
+ __BITS8 BIT;
+};
union un_egp0 {
unsigned char egp0;
__BITS8 BIT;
@@ -171,6 +219,14 @@ union un_iicf0 {
unsigned char iicf0;
__BITS8 BIT;
};
+union un_iics1 {
+ unsigned char iics1;
+ __BITS8 BIT;
+};
+union un_iicf1 {
+ unsigned char iicf1;
+ __BITS8 BIT;
+};
union un_flars {
unsigned char flars;
__BITS8 BIT;
@@ -235,22 +291,6 @@ union un_asim {
unsigned char asim;
__BITS8 BIT;
};
-union un_dmc0 {
- unsigned char dmc0;
- __BITS8 BIT;
-};
-union un_dmc1 {
- unsigned char dmc1;
- __BITS8 BIT;
-};
-union un_drc0 {
- unsigned char drc0;
- __BITS8 BIT;
-};
-union un_drc1 {
- unsigned char drc1;
- __BITS8 BIT;
-};
union un_if2 {
unsigned short if2;
__BITS16 BIT;
@@ -416,16 +456,32 @@ union un_pmc {
#define P6_bit (*(volatile union un_p6 *)0xFFF06).BIT
#define P7 (*(volatile union un_p7 *)0xFFF07).p7
#define P7_bit (*(volatile union un_p7 *)0xFFF07).BIT
+#define P8 (*(volatile union un_p8 *)0xFFF08).p8
+#define P8_bit (*(volatile union un_p8 *)0xFFF08).BIT
+#define P10 (*(volatile union un_p10 *)0xFFF0A).p10
+#define P10_bit (*(volatile union un_p10 *)0xFFF0A).BIT
+#define P11 (*(volatile union un_p11 *)0xFFF0B).p11
+#define P11_bit (*(volatile union un_p11 *)0xFFF0B).BIT
#define P12 (*(volatile union un_p12 *)0xFFF0C).p12
#define P12_bit (*(volatile union un_p12 *)0xFFF0C).BIT
#define P13 (*(volatile union un_p13 *)0xFFF0D).p13
#define P13_bit (*(volatile union un_p13 *)0xFFF0D).BIT
+#define P14 (*(volatile union un_p14 *)0xFFF0E).p14
+#define P14_bit (*(volatile union un_p14 *)0xFFF0E).BIT
+#define P15 (*(volatile union un_p15 *)0xFFF0F).p15
+#define P15_bit (*(volatile union un_p15 *)0xFFF0F).BIT
#define SDR00 (*(volatile unsigned short *)0xFFF10)
#define SIO00 (*(volatile unsigned char *)0xFFF10)
#define TXD0 (*(volatile unsigned char *)0xFFF10)
#define SDR01 (*(volatile unsigned short *)0xFFF12)
#define RXD0 (*(volatile unsigned char *)0xFFF12)
#define SIO01 (*(volatile unsigned char *)0xFFF12)
+#define SDR12 (*(volatile unsigned short *)0xFFF14)
+#define SIO30 (*(volatile unsigned char *)0xFFF14)
+#define TXD3 (*(volatile unsigned char *)0xFFF14)
+#define SDR13 (*(volatile unsigned short *)0xFFF16)
+#define RXD3 (*(volatile unsigned char *)0xFFF16)
+#define SIO31 (*(volatile unsigned char *)0xFFF16)
#define TDR00 (*(volatile unsigned short *)0xFFF18)
#define TDR01 (*(volatile unsigned short *)0xFFF1A)
#define TDR01L (*(volatile unsigned char *)0xFFF1A)
@@ -448,14 +504,30 @@ union un_pmc {
#define PM6_bit (*(volatile union un_pm6 *)0xFFF26).BIT
#define PM7 (*(volatile union un_pm7 *)0xFFF27).pm7
#define PM7_bit (*(volatile union un_pm7 *)0xFFF27).BIT
+#define PM8 (*(volatile union un_pm8 *)0xFFF28).pm8
+#define PM8_bit (*(volatile union un_pm8 *)0xFFF28).BIT
+#define PM10 (*(volatile union un_pm10 *)0xFFF2A).pm10
+#define PM10_bit (*(volatile union un_pm10 *)0xFFF2A).BIT
+#define PM11 (*(volatile union un_pm11 *)0xFFF2B).pm11
+#define PM11_bit (*(volatile union un_pm11 *)0xFFF2B).BIT
#define PM12 (*(volatile union un_pm12 *)0xFFF2C).pm12
#define PM12_bit (*(volatile union un_pm12 *)0xFFF2C).BIT
+#define PM14 (*(volatile union un_pm14 *)0xFFF2E).pm14
+#define PM14_bit (*(volatile union un_pm14 *)0xFFF2E).BIT
+#define PM15 (*(volatile union un_pm15 *)0xFFF2F).pm15
+#define PM15_bit (*(volatile union un_pm15 *)0xFFF2F).BIT
#define ADM0 (*(volatile union un_adm0 *)0xFFF30).adm0
#define ADM0_bit (*(volatile union un_adm0 *)0xFFF30).BIT
#define ADS (*(volatile union un_ads *)0xFFF31).ads
#define ADS_bit (*(volatile union un_ads *)0xFFF31).BIT
#define ADM1 (*(volatile union un_adm1 *)0xFFF32).adm1
#define ADM1_bit (*(volatile union un_adm1 *)0xFFF32).BIT
+#define DACS0 (*(volatile unsigned char *)0xFFF34)
+#define DACS1 (*(volatile unsigned char *)0xFFF35)
+#define DAM (*(volatile union un_dam *)0xFFF36).dam
+#define DAM_bit (*(volatile union un_dam *)0xFFF36).BIT
+#define KRM (*(volatile union un_krm *)0xFFF37).krm
+#define KRM_bit (*(volatile union un_krm *)0xFFF37).BIT
#define EGP0 (*(volatile union un_egp0 *)0xFFF38).egp0
#define EGP0_bit (*(volatile union un_egp0 *)0xFFF38).BIT
#define EGN0 (*(volatile union un_egn0 *)0xFFF39).egn0
@@ -464,21 +536,46 @@ union un_pmc {
#define EGP1_bit (*(volatile union un_egp1 *)0xFFF3A).BIT
#define EGN1 (*(volatile union un_egn1 *)0xFFF3B).egn1
#define EGN1_bit (*(volatile union un_egn1 *)0xFFF3B).BIT
+#define SDR02 (*(volatile unsigned short *)0xFFF44)
+#define SIO10 (*(volatile unsigned char *)0xFFF44)
+#define TXD1 (*(volatile unsigned char *)0xFFF44)
+#define SDR03 (*(volatile unsigned short *)0xFFF46)
+#define RXD1 (*(volatile unsigned char *)0xFFF46)
+#define SIO11 (*(volatile unsigned char *)0xFFF46)
+#define SDR10 (*(volatile unsigned short *)0xFFF48)
+#define SIO20 (*(volatile unsigned char *)0xFFF48)
+#define TXD2 (*(volatile unsigned char *)0xFFF48)
+#define SDR11 (*(volatile unsigned short *)0xFFF4A)
+#define RXD2 (*(volatile unsigned char *)0xFFF4A)
+#define SIO21 (*(volatile unsigned char *)0xFFF4A)
#define IICA0 (*(volatile unsigned char *)0xFFF50)
#define IICS0 (*(volatile union un_iics0 *)0xFFF51).iics0
#define IICS0_bit (*(volatile union un_iics0 *)0xFFF51).BIT
#define IICF0 (*(volatile union un_iicf0 *)0xFFF52).iicf0
#define IICF0_bit (*(volatile union un_iicf0 *)0xFFF52).BIT
-#define CFIFO (*(volatile unsigned short *)0xFFF54)
-#define CFIFOL (*(volatile unsigned char *)0xFFF54)
-#define D0FIFO (*(volatile unsigned short *)0xFFF58)
-#define D0FIFOL (*(volatile unsigned char *)0xFFF58)
-#define D1FIFO (*(volatile unsigned short *)0xFFF5C)
-#define D1FIFOL (*(volatile unsigned char *)0xFFF5C)
+#define IICA1 (*(volatile unsigned char *)0xFFF54)
+#define IICS1 (*(volatile union un_iics1 *)0xFFF55).iics1
+#define IICS1_bit (*(volatile union un_iics1 *)0xFFF55).BIT
+#define IICF1 (*(volatile union un_iicf1 *)0xFFF56).iicf1
+#define IICF1_bit (*(volatile union un_iicf1 *)0xFFF56).BIT
+#define TRDGRC0 (*(volatile unsigned short *)0xFFF58)
+#define TRDGRD0 (*(volatile unsigned short *)0xFFF5A)
+#define TRDGRC1 (*(volatile unsigned short *)0xFFF5C)
+#define TRDGRD1 (*(volatile unsigned short *)0xFFF5E)
+#define TRGGRC (*(volatile unsigned short *)0xFFF60)
+#define TRGGRD (*(volatile unsigned short *)0xFFF62)
#define TDR02 (*(volatile unsigned short *)0xFFF64)
#define TDR03 (*(volatile unsigned short *)0xFFF66)
#define TDR03L (*(volatile unsigned char *)0xFFF66)
#define TDR03H (*(volatile unsigned char *)0xFFF67)
+#define TDR10 (*(volatile unsigned short *)0xFFF70)
+#define TDR11 (*(volatile unsigned short *)0xFFF72)
+#define TDR11L (*(volatile unsigned char *)0xFFF72)
+#define TDR11H (*(volatile unsigned char *)0xFFF73)
+#define TDR12 (*(volatile unsigned short *)0xFFF74)
+#define TDR13 (*(volatile unsigned short *)0xFFF76)
+#define TDR13L (*(volatile unsigned char *)0xFFF76)
+#define TDR13H (*(volatile unsigned char *)0xFFF77)
#define FLPMC (*(volatile unsigned char *)0xFFF80)
#define FLARS (*(volatile union un_flars *)0xFFF81).flars
#define FLARS_bit (*(volatile union un_flars *)0xFFF81).BIT
@@ -537,28 +634,6 @@ union un_pmc {
#define MONSTA0_bit (*(volatile union un_monsta0 *)0xFFFAE).BIT
#define ASIM (*(volatile union un_asim *)0xFFFAF).asim
#define ASIM_bit (*(volatile union un_asim *)0xFFFAF).BIT
-#define DSA0 (*(volatile unsigned char *)0xFFFB0)
-#define DSA1 (*(volatile unsigned char *)0xFFFB1)
-#define DRA0 (*(volatile unsigned short *)0xFFFB2)
-#define DRA0L (*(volatile unsigned char *)0xFFFB2)
-#define DRA0H (*(volatile unsigned char *)0xFFFB3)
-#define DRA1 (*(volatile unsigned short *)0xFFFB4)
-#define DRA1L (*(volatile unsigned char *)0xFFFB4)
-#define DRA1H (*(volatile unsigned char *)0xFFFB5)
-#define DBC0 (*(volatile unsigned short *)0xFFFB6)
-#define DBC0L (*(volatile unsigned char *)0xFFFB6)
-#define DBC0H (*(volatile unsigned char *)0xFFFB7)
-#define DBC1 (*(volatile unsigned short *)0xFFFB8)
-#define DBC1L (*(volatile unsigned char *)0xFFFB8)
-#define DBC1H (*(volatile unsigned char *)0xFFFB9)
-#define DMC0 (*(volatile union un_dmc0 *)0xFFFBA).dmc0
-#define DMC0_bit (*(volatile union un_dmc0 *)0xFFFBA).BIT
-#define DMC1 (*(volatile union un_dmc1 *)0xFFFBB).dmc1
-#define DMC1_bit (*(volatile union un_dmc1 *)0xFFFBB).BIT
-#define DRC0 (*(volatile union un_drc0 *)0xFFFBC).drc0
-#define DRC0_bit (*(volatile union un_drc0 *)0xFFFBC).BIT
-#define DRC1 (*(volatile union un_drc1 *)0xFFFBD).drc1
-#define DRC1_bit (*(volatile union un_drc1 *)0xFFFBD).BIT
#define IF2 (*(volatile union un_if2 *)0xFFFD0).if2
#define IF2_bit (*(volatile union un_if2 *)0xFFFD0).BIT
#define IF2L (*(volatile union un_if2l *)0xFFFD0).if2l
@@ -631,14 +706,9 @@ union un_pmc {
#define PR11L_bit (*(volatile union un_pr11l *)0xFFFEE).BIT
#define PR11H (*(volatile union un_pr11h *)0xFFFEF).pr11h
#define PR11H_bit (*(volatile union un_pr11h *)0xFFFEF).BIT
-#define MDAL (*(volatile unsigned short *)0xFFFF0)
-#define MULA (*(volatile unsigned short *)0xFFFF0)
-#define MDAH (*(volatile unsigned short *)0xFFFF2)
-#define MULB (*(volatile unsigned short *)0xFFFF2)
-#define MDBH (*(volatile unsigned short *)0xFFFF4)
-#define MULOH (*(volatile unsigned short *)0xFFFF4)
-#define MDBL (*(volatile unsigned short *)0xFFFF6)
-#define MULOL (*(volatile unsigned short *)0xFFFF6)
+#define MACRL (*(volatile unsigned short *)0xFFFF0)
+#define MACRH (*(volatile unsigned short *)0xFFFF2)
+#define MDUC (*(volatile unsigned char *)0xFFFFB)
#define PMC (*(volatile union un_pmc *)0xFFFFE).pmc
#define PMC_bit (*(volatile union un_pmc *)0xFFFFE).BIT
@@ -647,6 +717,8 @@ union un_pmc {
*/
#define ADCE ADM0_bit.no0
#define ADCS ADM0_bit.no7
+#define DACE0 DAM_bit.no4
+#define DACE1 DAM_bit.no5
#define SPD0 IICS0_bit.no0
#define STD0 IICS0_bit.no1
#define ACKD0 IICS0_bit.no2
@@ -659,10 +731,23 @@ union un_pmc {
#define STCEN0 IICF0_bit.no1
#define IICBSY0 IICF0_bit.no6
#define STCF0 IICF0_bit.no7
+#define SPD1 IICS1_bit.no0
+#define STD1 IICS1_bit.no1
+#define ACKD1 IICS1_bit.no2
+#define TRC1 IICS1_bit.no3
+#define COI1 IICS1_bit.no4
+#define EXC1 IICS1_bit.no5
+#define ALD1 IICS1_bit.no6
+#define MSTS1 IICS1_bit.no7
+#define IICRSV1 IICF1_bit.no0
+#define STCEN1 IICF1_bit.no1
+#define IICBSY1 IICF1_bit.no6
+#define STCF1 IICF1_bit.no7
#define FSSTP FSSQ_bit.no6
#define SQST FSSQ_bit.no7
#define SQEND FSASTH_bit.no6
#define ESQEND FSASTH_bit.no7
+#define RCLOE1 RTCC0_bit.no5
#define RTCE RTCC0_bit.no7
#define RWAIT RTCC1_bit.no0
#define RWST RTCC1_bit.no1
@@ -671,9 +756,13 @@ union un_pmc {
#define WALIE RTCC1_bit.no6
#define WALE RTCC1_bit.no7
#define HIOSTOP CSC_bit.no0
+#define XTSTOP CSC_bit.no6
#define MSTOP CSC_bit.no7
+#define SDIV CKC_bit.no3
#define MCM0 CKC_bit.no4
#define MCS CKC_bit.no5
+#define CSS CKC_bit.no6
+#define CLS CKC_bit.no7
#define PCLOE0 CKS0_bit.no7
#define PCLOE1 CKS1_bit.no7
#define LVIF LVIM_bit.no0
@@ -681,34 +770,79 @@ union un_pmc {
#define LVISEN LVIM_bit.no7
#define LVILV LVIS_bit.no0
#define LVIMD LVIS_bit.no7
-#define DWAIT0 DMC0_bit.no4
-#define DS0 DMC0_bit.no5
-#define DRS0 DMC0_bit.no6
-#define STG0 DMC0_bit.no7
-#define DWAIT1 DMC1_bit.no4
-#define DS1 DMC1_bit.no5
-#define DRS1 DMC1_bit.no6
-#define STG1 DMC1_bit.no7
-#define DST0 DRC0_bit.no0
-#define DEN0 DRC0_bit.no7
-#define DST1 DRC1_bit.no0
-#define DEN1 DRC1_bit.no7
+#define TMIF11 IF2_bit.no0
+#define TMIF12 IF2_bit.no1
+#define TMIF13 IF2_bit.no2
+#define PIF6 IF2_bit.no3
+#define PIF7 IF2_bit.no4
#define PIF8 IF2_bit.no5
#define PIF9 IF2_bit.no6
-#define MDIF IF2H_bit.no5
+#define CMPIF0 IF2_bit.no7
+#define PIF10 IF2_bit.no7
+#define CMPIF1 IF2H_bit.no0
+#define PIF11 IF2H_bit.no0
+#define TRDIF0 IF2H_bit.no1
+#define TRDIF1 IF2H_bit.no2
+#define TRGIF IF2H_bit.no3
+#define SREIF3 IF2H_bit.no4
+#define TMIF13H IF2H_bit.no4
+#define IICAIF1 IF2H_bit.no6
#define FLIF IF2H_bit.no7
+#define TMMK11 MK2_bit.no0
+#define TMMK12 MK2_bit.no1
+#define TMMK13 MK2_bit.no2
+#define PMK6 MK2_bit.no3
+#define PMK7 MK2_bit.no4
#define PMK8 MK2_bit.no5
#define PMK9 MK2_bit.no6
-#define MDMK MK2H_bit.no5
+#define CMPMK0 MK2_bit.no7
+#define PMK10 MK2_bit.no7
+#define CMPMK1 MK2H_bit.no0
+#define PMK11 MK2H_bit.no0
+#define TRDMK0 MK2H_bit.no1
+#define TRDMK1 MK2H_bit.no2
+#define TRGMK MK2H_bit.no3
+#define SREMK3 MK2H_bit.no4
+#define TMMK13H MK2H_bit.no4
+#define IICAMK1 MK2H_bit.no6
#define FLMK MK2H_bit.no7
+#define TMPR011 PR02_bit.no0
+#define TMPR012 PR02_bit.no1
+#define TMPR013 PR02_bit.no2
+#define PPR06 PR02_bit.no3
+#define PPR07 PR02_bit.no4
#define PPR08 PR02_bit.no5
#define PPR09 PR02_bit.no6
-#define MDPR0 PR02H_bit.no5
+#define CMPPR00 PR02_bit.no7
+#define PPR010 PR02_bit.no7
+#define CMPPR01 PR02H_bit.no0
+#define PPR011 PR02H_bit.no0
+#define TRDPR00 PR02H_bit.no1
+#define TRDPR01 PR02H_bit.no2
+#define TRGPR0 PR02H_bit.no3
+#define SREPR03 PR02H_bit.no4
+#define TMPR013H PR02H_bit.no4
+#define IICAPR01 PR02H_bit.no6
#define FLPR0 PR02H_bit.no7
+#define TMPR111 PR12_bit.no0
+#define TMPR112 PR12_bit.no1
+#define TMPR113 PR12_bit.no2
+#define PPR16 PR12_bit.no3
+#define PPR17 PR12_bit.no4
#define PPR18 PR12_bit.no5
#define PPR19 PR12_bit.no6
-#define MDPR1 PR12H_bit.no5
+#define CMPPR10 PR12_bit.no7
+#define PPR110 PR12_bit.no7
+#define CMPPR11 PR12H_bit.no0
+#define PPR111 PR12H_bit.no0
+#define TRDPR10 PR12H_bit.no1
+#define TRDPR11 PR12H_bit.no2
+#define TRGPR1 PR12H_bit.no3
+#define SREPR13 PR12H_bit.no4
+#define TMPR113H PR12H_bit.no4
+#define IICAPR11 PR12H_bit.no6
#define FLPR1 PR12H_bit.no7
+#define SROIF IF0_bit.no0
#define WDTIIF IF0_bit.no0
#define LVIIF IF0_bit.no1
#define PIF0 IF0_bit.no2
@@ -717,27 +851,48 @@ union un_pmc {
#define PIF3 IF0_bit.no5
#define PIF4 IF0_bit.no6
#define PIF5 IF0_bit.no7
-#define DMAIF0 IF0H_bit.no3
-#define DMAIF1 IF0H_bit.no4
+#define CSIIF20 IF0H_bit.no0
+#define IICIF20 IF0H_bit.no0
+#define STIF2 IF0H_bit.no0
+#define CSIIF21 IF0H_bit.no1
+#define IICIF21 IF0H_bit.no1
+#define SRIF2 IF0H_bit.no1
+#define SREIF2 IF0H_bit.no2
+#define TMIF11H IF0H_bit.no2
#define CSIIF00 IF0H_bit.no5
#define IICIF00 IF0H_bit.no5
#define STIF0 IF0H_bit.no5
-#define TMIF00 IF0H_bit.no6
-#define CSIIF01 IF0H_bit.no7
-#define IICIF01 IF0H_bit.no7
-#define SRIF0 IF0H_bit.no7
-#define SREIF0 IF1_bit.no0
-#define TMIF01H IF1_bit.no0
-#define TMIF03H IF1_bit.no3
-#define IICAIF0 IF1_bit.no4
+#define CSIIF01 IF0H_bit.no6
+#define IICIF01 IF0H_bit.no6
+#define SRIF0 IF0H_bit.no6
+#define SREIF0 IF0H_bit.no7
+#define TMIF01H IF0H_bit.no7
+#define CSIIF10 IF1_bit.no0
+#define IICIF10 IF1_bit.no0
+#define STIF1 IF1_bit.no0
+#define CSIIF11 IF1_bit.no1
+#define IICIF11 IF1_bit.no1
+#define SRIF1 IF1_bit.no1
+#define SREIF1 IF1_bit.no2
+#define TMIF03H IF1_bit.no2
+#define IICAIF0 IF1_bit.no3
+#define TMIF00 IF1_bit.no4
#define TMIF01 IF1_bit.no5
#define TMIF02 IF1_bit.no6
#define TMIF03 IF1_bit.no7
#define ADIF IF1H_bit.no0
#define RTCIF IF1H_bit.no1
#define ITIF IF1H_bit.no2
-#define USBIF IF1H_bit.no4
-#define RSUIF IF1H_bit.no5
+#define KRIF IF1H_bit.no3
+#define CSIIF30 IF1H_bit.no4
+#define IICIF30 IF1H_bit.no4
+#define STIF3 IF1H_bit.no4
+#define CSIIF31 IF1H_bit.no5
+#define IICIF31 IF1H_bit.no5
+#define SRIF3 IF1H_bit.no5
+#define TRJIF0 IF1H_bit.no6
+#define TMIF10 IF1H_bit.no7
+#define SROMK MK0_bit.no0
#define WDTIMK MK0_bit.no0
#define LVIMK MK0_bit.no1
#define PMK0 MK0_bit.no2
@@ -746,27 +901,48 @@ union un_pmc {
#define PMK3 MK0_bit.no5
#define PMK4 MK0_bit.no6
#define PMK5 MK0_bit.no7
-#define DMAMK0 MK0H_bit.no3
-#define DMAMK1 MK0H_bit.no4
+#define CSIMK20 MK0H_bit.no0
+#define IICMK20 MK0H_bit.no0
+#define STMK2 MK0H_bit.no0
+#define CSIMK21 MK0H_bit.no1
+#define IICMK21 MK0H_bit.no1
+#define SRMK2 MK0H_bit.no1
+#define SREMK2 MK0H_bit.no2
+#define TMMK11H MK0H_bit.no2
#define CSIMK00 MK0H_bit.no5
#define IICMK00 MK0H_bit.no5
#define STMK0 MK0H_bit.no5
-#define TMMK00 MK0H_bit.no6
-#define CSIMK01 MK0H_bit.no7
-#define IICMK01 MK0H_bit.no7
-#define SRMK0 MK0H_bit.no7
-#define SREMK0 MK1_bit.no0
-#define TMMK01H MK1_bit.no0
-#define TMMK03H MK1_bit.no3
-#define IICAMK0 MK1_bit.no4
+#define CSIMK01 MK0H_bit.no6
+#define IICMK01 MK0H_bit.no6
+#define SRMK0 MK0H_bit.no6
+#define SREMK0 MK0H_bit.no7
+#define TMMK01H MK0H_bit.no7
+#define CSIMK10 MK1_bit.no0
+#define IICMK10 MK1_bit.no0
+#define STMK1 MK1_bit.no0
+#define CSIMK11 MK1_bit.no1
+#define IICMK11 MK1_bit.no1
+#define SRMK1 MK1_bit.no1
+#define SREMK1 MK1_bit.no2
+#define TMMK03H MK1_bit.no2
+#define IICAMK0 MK1_bit.no3
+#define TMMK00 MK1_bit.no4
#define TMMK01 MK1_bit.no5
#define TMMK02 MK1_bit.no6
#define TMMK03 MK1_bit.no7
#define ADMK MK1H_bit.no0
#define RTCMK MK1H_bit.no1
#define ITMK MK1H_bit.no2
-#define USBMK MK1H_bit.no4
-#define RSUMK MK1H_bit.no5
+#define KRMK MK1H_bit.no3
+#define CSIMK30 MK1H_bit.no4
+#define IICMK30 MK1H_bit.no4
+#define STMK3 MK1H_bit.no4
+#define CSIMK31 MK1H_bit.no5
+#define IICMK31 MK1H_bit.no5
+#define SRMK3 MK1H_bit.no5
+#define TRJMK0 MK1H_bit.no6
+#define TMMK10 MK1H_bit.no7
+#define SROPR0 PR00_bit.no0
#define WDTIPR0 PR00_bit.no0
#define LVIPR0 PR00_bit.no1
#define PPR00 PR00_bit.no2
@@ -775,27 +951,48 @@ union un_pmc {
#define PPR03 PR00_bit.no5
#define PPR04 PR00_bit.no6
#define PPR05 PR00_bit.no7
-#define DMAPR00 PR00H_bit.no3
-#define DMAPR01 PR00H_bit.no4
+#define CSIPR020 PR00H_bit.no0
+#define IICPR020 PR00H_bit.no0
+#define STPR02 PR00H_bit.no0
+#define CSIPR021 PR00H_bit.no1
+#define IICPR021 PR00H_bit.no1
+#define SRPR02 PR00H_bit.no1
+#define SREPR02 PR00H_bit.no2
+#define TMPR011H PR00H_bit.no2
#define CSIPR000 PR00H_bit.no5
#define IICPR000 PR00H_bit.no5
#define STPR00 PR00H_bit.no5
-#define TMPR000 PR00H_bit.no6
-#define CSIPR001 PR00H_bit.no7
-#define IICPR001 PR00H_bit.no7
-#define SRPR00 PR00H_bit.no7
-#define SREPR00 PR01_bit.no0
-#define TMPR001H PR01_bit.no0
-#define TMPR003H PR01_bit.no3
-#define IICAPR00 PR01_bit.no4
+#define CSIPR001 PR00H_bit.no6
+#define IICPR001 PR00H_bit.no6
+#define SRPR00 PR00H_bit.no6
+#define SREPR00 PR00H_bit.no7
+#define TMPR001H PR00H_bit.no7
+#define CSIPR010 PR01_bit.no0
+#define IICPR010 PR01_bit.no0
+#define STPR01 PR01_bit.no0
+#define CSIPR011 PR01_bit.no1
+#define IICPR011 PR01_bit.no1
+#define SRPR01 PR01_bit.no1
+#define SREPR01 PR01_bit.no2
+#define TMPR003H PR01_bit.no2
+#define IICAPR00 PR01_bit.no3
+#define TMPR000 PR01_bit.no4
#define TMPR001 PR01_bit.no5
#define TMPR002 PR01_bit.no6
#define TMPR003 PR01_bit.no7
#define ADPR0 PR01H_bit.no0
#define RTCPR0 PR01H_bit.no1
#define ITPR0 PR01H_bit.no2
-#define USBPR0 PR01H_bit.no4
-#define RSUPR0 PR01H_bit.no5
+#define KRPR0 PR01H_bit.no3
+#define CSIPR030 PR01H_bit.no4
+#define IICPR030 PR01H_bit.no4
+#define STPR03 PR01H_bit.no4
+#define CSIPR031 PR01H_bit.no5
+#define IICPR031 PR01H_bit.no5
+#define SRPR03 PR01H_bit.no5
+#define TRJPR00 PR01H_bit.no6
+#define TMPR010 PR01H_bit.no7
+#define SROPR1 PR10_bit.no0
#define WDTIPR1 PR10_bit.no0
#define LVIPR1 PR10_bit.no1
#define PPR10 PR10_bit.no2
@@ -804,27 +1001,47 @@ union un_pmc {
#define PPR13 PR10_bit.no5
#define PPR14 PR10_bit.no6
#define PPR15 PR10_bit.no7
-#define DMAPR10 PR10H_bit.no3
-#define DMAPR11 PR10H_bit.no4
+#define CSIPR120 PR10H_bit.no0
+#define IICPR120 PR10H_bit.no0
+#define STPR12 PR10H_bit.no0
+#define CSIPR121 PR10H_bit.no1
+#define IICPR121 PR10H_bit.no1
+#define SRPR12 PR10H_bit.no1
+#define SREPR12 PR10H_bit.no2
+#define TMPR111H PR10H_bit.no2
#define CSIPR100 PR10H_bit.no5
#define IICPR100 PR10H_bit.no5
#define STPR10 PR10H_bit.no5
-#define TMPR100 PR10H_bit.no6
-#define CSIPR101 PR10H_bit.no7
-#define IICPR101 PR10H_bit.no7
-#define SRPR10 PR10H_bit.no7
-#define SREPR10 PR11_bit.no0
-#define TMPR101H PR11_bit.no0
-#define TMPR103H PR11_bit.no3
-#define IICAPR10 PR11_bit.no4
+#define CSIPR101 PR10H_bit.no6
+#define IICPR101 PR10H_bit.no6
+#define SRPR10 PR10H_bit.no6
+#define SREPR10 PR10H_bit.no7
+#define TMPR101H PR10H_bit.no7
+#define CSIPR110 PR11_bit.no0
+#define IICPR110 PR11_bit.no0
+#define STPR11 PR11_bit.no0
+#define CSIPR111 PR11_bit.no1
+#define IICPR111 PR11_bit.no1
+#define SRPR11 PR11_bit.no1
+#define SREPR11 PR11_bit.no2
+#define TMPR103H PR11_bit.no2
+#define IICAPR10 PR11_bit.no3
+#define TMPR100 PR11_bit.no4
#define TMPR101 PR11_bit.no5
#define TMPR102 PR11_bit.no6
#define TMPR103 PR11_bit.no7
#define ADPR1 PR11H_bit.no0
#define RTCPR1 PR11H_bit.no1
#define ITPR1 PR11H_bit.no2
-#define USBPR1 PR11H_bit.no4
-#define RSUPR1 PR11H_bit.no5
+#define KRPR1 PR11H_bit.no3
+#define CSIPR130 PR11H_bit.no4
+#define IICPR130 PR11H_bit.no4
+#define STPR13 PR11H_bit.no4
+#define CSIPR131 PR11H_bit.no5
+#define IICPR131 PR11H_bit.no5
+#define SRPR13 PR11H_bit.no5
+#define TRJPR10 PR11H_bit.no6
+#define TMPR110 PR11H_bit.no7
#define MAA PMC_bit.no0
/*
@@ -841,30 +1058,64 @@ union un_pmc {
#define INTP3_vect (0xE)
#define INTP4_vect (0x10)
#define INTP5_vect (0x12)
-#define INTDMA0_vect (0x1A)
-#define INTDMA1_vect (0x1C)
+#define INTCSI20_vect (0x14)
+#define INTIIC20_vect (0x14)
+#define INTST2_vect (0x14)
+#define INTCSI21_vect (0x16)
+#define INTIIC21_vect (0x16)
+#define INTSR2_vect (0x16)
+#define INTSRE2_vect (0x18)
+#define INTTM11H_vect (0x18)
#define INTCSI00_vect (0x1E)
#define INTIIC00_vect (0x1E)
#define INTST0_vect (0x1E)
-#define INTTM00_vect (0x20)
-#define INTCSI01_vect (0x22)
-#define INTIIC01_vect (0x22)
-#define INTSR0_vect (0x22)
-#define INTSRE0_vect (0x24)
-#define INTTM01H_vect (0x24)
-#define INTTM03H_vect (0x2A)
-#define INTIICA0_vect (0x2C)
+#define INTCSI01_vect (0x20)
+#define INTIIC01_vect (0x20)
+#define INTSR0_vect (0x20)
+#define INTSRE0_vect (0x22)
+#define INTTM01H_vect (0x22)
+#define INTCSI10_vect (0x24)
+#define INTIIC10_vect (0x24)
+#define INTST1_vect (0x24)
+#define INTCSI11_vect (0x26)
+#define INTIIC11_vect (0x26)
+#define INTSR1_vect (0x26)
+#define INTSRE1_vect (0x28)
+#define INTTM03H_vect (0x28)
+#define INTIICA0_vect (0x2A)
+#define INTTM00_vect (0x2C)
#define INTTM01_vect (0x2E)
#define INTTM02_vect (0x30)
#define INTTM03_vect (0x32)
#define INTAD_vect (0x34)
#define INTRTC_vect (0x36)
#define INTIT_vect (0x38)
-#define INTUSB_vect (0x3C)
-#define INTRSUM_vect (0x3E)
+#define INTKR_vect (0x3A)
+#define INTCSI30_vect (0x3C)
+#define INTIIC30_vect (0x3C)
+#define INTST3_vect (0x3C)
+#define INTCSI31_vect (0x3E)
+#define INTIIC31_vect (0x3E)
+#define INTSR3_vect (0x3E)
+#define INTTRJ0_vect (0x40)
+#define INTTM10_vect (0x42)
+#define INTTM11_vect (0x44)
+#define INTTM12_vect (0x46)
+#define INTTM13_vect (0x48)
+#define INTP6_vect (0x4A)
+#define INTP7_vect (0x4C)
#define INTP8_vect (0x4E)
#define INTP9_vect (0x50)
-#define INTMD_vect (0x5E)
+#define INTCMP0_vect (0x52)
+#define INTP10_vect (0x52)
+#define INTCMP1_vect (0x54)
+#define INTP11_vect (0x54)
+#define INTTRD0_vect (0x56)
+#define INTTRD1_vect (0x58)
+#define INTTRG_vect (0x5A)
+#define INTSRE3_vect (0x5C)
+#define INTTM13H_vect (0x5C)
+#define INTIICA1_vect (0x60)
#define INTFL_vect (0x62)
#define BRK_I_vect (0x7E)
#endif
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine_ext.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine_ext.h
index f60419811..d55c543ab 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine_ext.h
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/iodefine_ext.h
@@ -3,8 +3,8 @@
/* PROJECT NAME : RTOSDemo */
/* FILE : iodefine_ext.h */
/* DESCRIPTION : Definition of Extended SFRs */
-/* CPU SERIES : RL78 - G1C */
-/* CPU TYPE : R5F10JBC */
+/* CPU SERIES : RL78 - G14 */
+/* CPU TYPE : R5F104PJ */
/* */
/* This file is generated by e2studio. */
/* */
@@ -12,9 +12,9 @@
/************************************************************************/
/* Header file generated from device file: */
-/* DR5F10JBC.DVF */
+/* DR5F104PJ.DVF */
/* Copyright(C) 2012 Renesas */
-/* File Version V1.00 */
+/* File Version V2.00 */
/* Tool Version 1.9.7121 */
/* Date Generated 13/11/2012 */
/************************************************************************/
@@ -63,10 +63,6 @@ union un_adm2 {
unsigned char adm2;
__BITS8 BIT;
};
-union un_pms {
- unsigned char pms;
- __BITS8 BIT;
-};
union un_pu0 {
unsigned char pu0;
__BITS8 BIT;
@@ -87,46 +83,114 @@ union un_pu5 {
unsigned char pu5;
__BITS8 BIT;
};
+union un_pu6 {
+ unsigned char pu6;
+ __BITS8 BIT;
+};
union un_pu7 {
unsigned char pu7;
__BITS8 BIT;
};
+union un_pu8 {
+ unsigned char pu8;
+ __BITS8 BIT;
+};
+union un_pu10 {
+ unsigned char pu10;
+ __BITS8 BIT;
+};
+union un_pu11 {
+ unsigned char pu11;
+ __BITS8 BIT;
+};
union un_pu12 {
unsigned char pu12;
__BITS8 BIT;
};
+union un_pu14 {
+ unsigned char pu14;
+ __BITS8 BIT;
+};
union un_pim0 {
unsigned char pim0;
__BITS8 BIT;
};
+union un_pim1 {
+ unsigned char pim1;
+ __BITS8 BIT;
+};
union un_pim3 {
unsigned char pim3;
__BITS8 BIT;
};
+union un_pim4 {
+ unsigned char pim4;
+ __BITS8 BIT;
+};
union un_pim5 {
unsigned char pim5;
__BITS8 BIT;
};
+union un_pim8 {
+ unsigned char pim8;
+ __BITS8 BIT;
+};
+union un_pim14 {
+ unsigned char pim14;
+ __BITS8 BIT;
+};
union un_pom0 {
unsigned char pom0;
__BITS8 BIT;
};
+union un_pom1 {
+ unsigned char pom1;
+ __BITS8 BIT;
+};
union un_pom3 {
unsigned char pom3;
__BITS8 BIT;
};
+union un_pom4 {
+ unsigned char pom4;
+ __BITS8 BIT;
+};
union un_pom5 {
unsigned char pom5;
__BITS8 BIT;
};
+union un_pom7 {
+ unsigned char pom7;
+ __BITS8 BIT;
+};
+union un_pom8 {
+ unsigned char pom8;
+ __BITS8 BIT;
+};
+union un_pom14 {
+ unsigned char pom14;
+ __BITS8 BIT;
+};
union un_pmc0 {
unsigned char pmc0;
__BITS8 BIT;
};
+union un_pmc1 {
+ unsigned char pmc1;
+ __BITS8 BIT;
+};
+union un_pmc10 {
+ unsigned char pmc10;
+ __BITS8 BIT;
+};
union un_pmc12 {
unsigned char pmc12;
__BITS8 BIT;
};
+union un_pmc14 {
+ unsigned char pmc14;
+ __BITS8 BIT;
+};
union un_nfen0 {
unsigned char nfen0;
__BITS8 BIT;
@@ -135,10 +199,26 @@ union un_nfen1 {
unsigned char nfen1;
__BITS8 BIT;
};
+union un_nfen2 {
+ unsigned char nfen2;
+ __BITS8 BIT;
+};
union un_isc {
unsigned char isc;
__BITS8 BIT;
};
+union un_per1 {
+ unsigned char per1;
+ __BITS8 BIT;
+};
+union un_pms {
+ unsigned char pms;
+ __BITS8 BIT;
+};
+union un_gdidis {
+ unsigned char gdidis;
+ __BITS8 BIT;
+};
union un_dflctl {
unsigned char dflctl;
__BITS8 BIT;
@@ -155,10 +235,6 @@ union un_pfs {
unsigned char pfs;
__BITS8 BIT;
};
-union un_mduc {
- unsigned char mduc;
- __BITS8 BIT;
-};
union un_per0 {
unsigned char per0;
__BITS8 BIT;
@@ -187,6 +263,22 @@ union un_soe0l {
unsigned char soe0l;
__BITS8 BIT;
};
+union un_se1l {
+ unsigned char se1l;
+ __BITS8 BIT;
+};
+union un_ss1l {
+ unsigned char ss1l;
+ __BITS8 BIT;
+};
+union un_st1l {
+ unsigned char st1l;
+ __BITS8 BIT;
+};
+union un_soe1l {
+ unsigned char soe1l;
+ __BITS8 BIT;
+};
union un_te0l {
unsigned char te0l;
__BITS8 BIT;
@@ -203,6 +295,22 @@ union un_toe0l {
unsigned char toe0l;
__BITS8 BIT;
};
+union un_te1l {
+ unsigned char te1l;
+ __BITS8 BIT;
+};
+union un_ts1l {
+ unsigned char ts1l;
+ __BITS8 BIT;
+};
+union un_tt1l {
+ unsigned char tt1l;
+ __BITS8 BIT;
+};
+union un_toe1l {
+ unsigned char toe1l;
+ __BITS8 BIT;
+};
union un_iicctl00 {
unsigned char iicctl00;
__BITS8 BIT;
@@ -211,27 +319,284 @@ union un_iicctl01 {
unsigned char iicctl01;
__BITS8 BIT;
};
-union un_dscctl {
- unsigned char dscctl;
+union un_iicctl10 {
+ unsigned char iicctl10;
__BITS8 BIT;
};
-union un_mckc {
- unsigned char mckc;
+union un_iicctl11 {
+ unsigned char iicctl11;
+ __BITS8 BIT;
+};
+union un_trjioc0 {
+ unsigned char trjioc0;
+ __BITS8 BIT;
+};
+union un_trjmr0 {
+ unsigned char trjmr0;
+ __BITS8 BIT;
+};
+union un_trjisr0 {
+ unsigned char trjisr0;
+ __BITS8 BIT;
+};
+union un_trgmr {
+ unsigned char trgmr;
+ __BITS8 BIT;
+};
+union un_trgcntc {
+ unsigned char trgcntc;
+ __BITS8 BIT;
+};
+union un_trgcr {
+ unsigned char trgcr;
+ __BITS8 BIT;
+};
+union un_trgier {
+ unsigned char trgier;
+ __BITS8 BIT;
+};
+union un_trgsr {
+ unsigned char trgsr;
+ __BITS8 BIT;
+};
+union un_trgior {
+ unsigned char trgior;
+ __BITS8 BIT;
+};
+union un_trdelc {
+ unsigned char trdelc;
+ __BITS8 BIT;
+};
+union un_trdmr {
+ unsigned char trdmr;
+ __BITS8 BIT;
+};
+union un_trdpmr {
+ unsigned char trdpmr;
+ __BITS8 BIT;
+};
+union un_trdfcr {
+ unsigned char trdfcr;
+ __BITS8 BIT;
+};
+union un_trdoer1 {
+ unsigned char trdoer1;
+ __BITS8 BIT;
+};
+union un_trdoer2 {
+ unsigned char trdoer2;
+ __BITS8 BIT;
+};
+union un_trdocr {
+ unsigned char trdocr;
+ __BITS8 BIT;
+};
+union un_trddf0 {
+ unsigned char trddf0;
+ __BITS8 BIT;
+};
+union un_trddf1 {
+ unsigned char trddf1;
+ __BITS8 BIT;
+};
+union un_trdcr0 {
+ unsigned char trdcr0;
+ __BITS8 BIT;
+};
+union un_trdiora0 {
+ unsigned char trdiora0;
+ __BITS8 BIT;
+};
+union un_trdiorc0 {
+ unsigned char trdiorc0;
+ __BITS8 BIT;
+};
+union un_trdsr0 {
+ unsigned char trdsr0;
+ __BITS8 BIT;
+};
+union un_trdier0 {
+ unsigned char trdier0;
+ __BITS8 BIT;
+};
+union un_trdpocr0 {
+ unsigned char trdpocr0;
+ __BITS8 BIT;
+};
+union un_trdcr1 {
+ unsigned char trdcr1;
+ __BITS8 BIT;
+};
+union un_trdiora1 {
+ unsigned char trdiora1;
+ __BITS8 BIT;
+};
+union un_trdiorc1 {
+ unsigned char trdiorc1;
+ __BITS8 BIT;
+};
+union un_trdsr1 {
+ unsigned char trdsr1;
+ __BITS8 BIT;
+};
+union un_trdier1 {
+ unsigned char trdier1;
+ __BITS8 BIT;
+};
+union un_trdpocr1 {
+ unsigned char trdpocr1;
+ __BITS8 BIT;
+};
+union un_dtcen0 {
+ unsigned char dtcen0;
+ __BITS8 BIT;
+};
+union un_dtcen1 {
+ unsigned char dtcen1;
+ __BITS8 BIT;
+};
+union un_dtcen2 {
+ unsigned char dtcen2;
+ __BITS8 BIT;
+};
+union un_dtcen3 {
+ unsigned char dtcen3;
+ __BITS8 BIT;
+};
+union un_dtcen4 {
+ unsigned char dtcen4;
__BITS8 BIT;
};
union un_crc0ctl {
unsigned char crc0ctl;
__BITS8 BIT;
};
+union un_elselr00 {
+ unsigned char elselr00;
+ __BITS8 BIT;
+};
+union un_elselr01 {
+ unsigned char elselr01;
+ __BITS8 BIT;
+};
+union un_elselr02 {
+ unsigned char elselr02;
+ __BITS8 BIT;
+};
+union un_elselr03 {
+ unsigned char elselr03;
+ __BITS8 BIT;
+};
+union un_elselr04 {
+ unsigned char elselr04;
+ __BITS8 BIT;
+};
+union un_elselr05 {
+ unsigned char elselr05;
+ __BITS8 BIT;
+};
+union un_elselr06 {
+ unsigned char elselr06;
+ __BITS8 BIT;
+};
+union un_elselr07 {
+ unsigned char elselr07;
+ __BITS8 BIT;
+};
+union un_elselr08 {
+ unsigned char elselr08;
+ __BITS8 BIT;
+};
+union un_elselr09 {
+ unsigned char elselr09;
+ __BITS8 BIT;
+};
+union un_elselr10 {
+ unsigned char elselr10;
+ __BITS8 BIT;
+};
+union un_elselr11 {
+ unsigned char elselr11;
+ __BITS8 BIT;
+};
+union un_elselr12 {
+ unsigned char elselr12;
+ __BITS8 BIT;
+};
+union un_elselr13 {
+ unsigned char elselr13;
+ __BITS8 BIT;
+};
+union un_elselr14 {
+ unsigned char elselr14;
+ __BITS8 BIT;
+};
+union un_elselr15 {
+ unsigned char elselr15;
+ __BITS8 BIT;
+};
+union un_elselr16 {
+ unsigned char elselr16;
+ __BITS8 BIT;
+};
+union un_elselr17 {
+ unsigned char elselr17;
+ __BITS8 BIT;
+};
+union un_elselr18 {
+ unsigned char elselr18;
+ __BITS8 BIT;
+};
+union un_elselr19 {
+ unsigned char elselr19;
+ __BITS8 BIT;
+};
+union un_elselr20 {
+ unsigned char elselr20;
+ __BITS8 BIT;
+};
+union un_elselr21 {
+ unsigned char elselr21;
+ __BITS8 BIT;
+};
+union un_elselr22 {
+ unsigned char elselr22;
+ __BITS8 BIT;
+};
+union un_elselr23 {
+ unsigned char elselr23;
+ __BITS8 BIT;
+};
+union un_elselr24 {
+ unsigned char elselr24;
+ __BITS8 BIT;
+};
+union un_elselr25 {
+ unsigned char elselr25;
+ __BITS8 BIT;
+};
+union un_compmdr {
+ unsigned char compmdr;
+ __BITS8 BIT;
+};
+union un_compfir {
+ unsigned char compfir;
+ __BITS8 BIT;
+};
+union un_compocr {
+ unsigned char compocr;
+ __BITS8 BIT;
+};
+union un_comptcr {
+ unsigned char comptcr;
+ __BITS8 BIT;
+};
#define ADM2 (*(volatile union un_adm2 *)0xF0010).adm2
#define ADM2_bit (*(volatile union un_adm2 *)0xF0010).BIT
#define ADUL (*(volatile unsigned char *)0xF0011)
#define ADLL (*(volatile unsigned char *)0xF0012)
#define ADTES (*(volatile unsigned char *)0xF0013)
-#define PMS (*(volatile union un_pms *)0xF0018).pms
-#define PMS_bit (*(volatile union un_pms *)0xF0018).BIT
-#define PIOR (*(volatile unsigned char *)0xF001A)
#define PU0 (*(volatile union un_pu0 *)0xF0030).pu0
#define PU0_bit (*(volatile union un_pu0 *)0xF0030).BIT
#define PU1 (*(volatile union un_pu1 *)0xF0031).pu1
@@ -242,35 +607,79 @@ union un_crc0ctl {
#define PU4_bit (*(volatile union un_pu4 *)0xF0034).BIT
#define PU5 (*(volatile union un_pu5 *)0xF0035).pu5
#define PU5_bit (*(volatile union un_pu5 *)0xF0035).BIT
+#define PU6 (*(volatile union un_pu6 *)0xF0036).pu6
+#define PU6_bit (*(volatile union un_pu6 *)0xF0036).BIT
#define PU7 (*(volatile union un_pu7 *)0xF0037).pu7
#define PU7_bit (*(volatile union un_pu7 *)0xF0037).BIT
+#define PU8 (*(volatile union un_pu8 *)0xF0038).pu8
+#define PU8_bit (*(volatile union un_pu8 *)0xF0038).BIT
+#define PU10 (*(volatile union un_pu10 *)0xF003A).pu10
+#define PU10_bit (*(volatile union un_pu10 *)0xF003A).BIT
+#define PU11 (*(volatile union un_pu11 *)0xF003B).pu11
+#define PU11_bit (*(volatile union un_pu11 *)0xF003B).BIT
#define PU12 (*(volatile union un_pu12 *)0xF003C).pu12
#define PU12_bit (*(volatile union un_pu12 *)0xF003C).BIT
+#define PU14 (*(volatile union un_pu14 *)0xF003E).pu14
+#define PU14_bit (*(volatile union un_pu14 *)0xF003E).BIT
#define PIM0 (*(volatile union un_pim0 *)0xF0040).pim0
#define PIM0_bit (*(volatile union un_pim0 *)0xF0040).BIT
+#define PIM1 (*(volatile union un_pim1 *)0xF0041).pim1
+#define PIM1_bit (*(volatile union un_pim1 *)0xF0041).BIT
#define PIM3 (*(volatile union un_pim3 *)0xF0043).pim3
#define PIM3_bit (*(volatile union un_pim3 *)0xF0043).BIT
+#define PIM4 (*(volatile union un_pim4 *)0xF0044).pim4
+#define PIM4_bit (*(volatile union un_pim4 *)0xF0044).BIT
#define PIM5 (*(volatile union un_pim5 *)0xF0045).pim5
#define PIM5_bit (*(volatile union un_pim5 *)0xF0045).BIT
+#define PIM8 (*(volatile union un_pim8 *)0xF0048).pim8
+#define PIM8_bit (*(volatile union un_pim8 *)0xF0048).BIT
+#define PIM14 (*(volatile union un_pim14 *)0xF004E).pim14
+#define PIM14_bit (*(volatile union un_pim14 *)0xF004E).BIT
#define POM0 (*(volatile union un_pom0 *)0xF0050).pom0
#define POM0_bit (*(volatile union un_pom0 *)0xF0050).BIT
+#define POM1 (*(volatile union un_pom1 *)0xF0051).pom1
+#define POM1_bit (*(volatile union un_pom1 *)0xF0051).BIT
#define POM3 (*(volatile union un_pom3 *)0xF0053).pom3
#define POM3_bit (*(volatile union un_pom3 *)0xF0053).BIT
+#define POM4 (*(volatile union un_pom4 *)0xF0054).pom4
+#define POM4_bit (*(volatile union un_pom4 *)0xF0054).BIT
#define POM5 (*(volatile union un_pom5 *)0xF0055).pom5
#define POM5_bit (*(volatile union un_pom5 *)0xF0055).BIT
+#define POM7 (*(volatile union un_pom7 *)0xF0057).pom7
+#define POM7_bit (*(volatile union un_pom7 *)0xF0057).BIT
+#define POM8 (*(volatile union un_pom8 *)0xF0058).pom8
+#define POM8_bit (*(volatile union un_pom8 *)0xF0058).BIT
+#define POM14 (*(volatile union un_pom14 *)0xF005E).pom14
+#define POM14_bit (*(volatile union un_pom14 *)0xF005E).BIT
#define PMC0 (*(volatile union un_pmc0 *)0xF0060).pmc0
#define PMC0_bit (*(volatile union un_pmc0 *)0xF0060).BIT
+#define PMC1 (*(volatile union un_pmc1 *)0xF0061).pmc1
+#define PMC1_bit (*(volatile union un_pmc1 *)0xF0061).BIT
+#define PMC10 (*(volatile union un_pmc10 *)0xF006A).pmc10
+#define PMC10_bit (*(volatile union un_pmc10 *)0xF006A).BIT
#define PMC12 (*(volatile union un_pmc12 *)0xF006C).pmc12
#define PMC12_bit (*(volatile union un_pmc12 *)0xF006C).BIT
+#define PMC14 (*(volatile union un_pmc14 *)0xF006E).pmc14
+#define PMC14_bit (*(volatile union un_pmc14 *)0xF006E).BIT
#define NFEN0 (*(volatile union un_nfen0 *)0xF0070).nfen0
#define NFEN0_bit (*(volatile union un_nfen0 *)0xF0070).BIT
#define NFEN1 (*(volatile union un_nfen1 *)0xF0071).nfen1
#define NFEN1_bit (*(volatile union un_nfen1 *)0xF0071).BIT
+#define NFEN2 (*(volatile union un_nfen2 *)0xF0072).nfen2
+#define NFEN2_bit (*(volatile union un_nfen2 *)0xF0072).BIT
#define ISC (*(volatile union un_isc *)0xF0073).isc
#define ISC_bit (*(volatile union un_isc *)0xF0073).BIT
#define TIS0 (*(volatile unsigned char *)0xF0074)
#define ADPC (*(volatile unsigned char *)0xF0076)
-#define IAWCTL (*(volatile unsigned char *)0xF0077)
+#define PIOR0 (*(volatile unsigned char *)0xF0077)
+#define IAWCTL (*(volatile unsigned char *)0xF0078)
+#define PIOR1 (*(volatile unsigned char *)0xF0079)
+#define PER1 (*(volatile union un_per1 *)0xF007A).per1
+#define PER1_bit (*(volatile union un_per1 *)0xF007A).BIT
+#define PMS (*(volatile union un_pms *)0xF007B).pms
+#define PMS_bit (*(volatile union un_pms *)0xF007B).BIT
+#define GDIDIS (*(volatile union un_gdidis *)0xF007D).gdidis
+#define GDIDIS_bit (*(volatile union un_gdidis *)0xF007D).BIT
#define PRDSEL (*(volatile unsigned short *)0xF007E)
#define TOOLEN (*(volatile unsigned char *)0xF0080)
#define BPAL0 (*(volatile unsigned char *)0xF0081)
@@ -281,6 +690,13 @@ union un_crc0ctl {
#define BACDML0 (*(volatile unsigned char *)0xF0086)
#define BACDMH0 (*(volatile unsigned char *)0xF0087)
#define MONMOD (*(volatile unsigned char *)0xF0088)
+#define BPAL1 (*(volatile unsigned char *)0xF0089)
+#define BPAH1 (*(volatile unsigned char *)0xF008A)
+#define BPAS1 (*(volatile unsigned char *)0xF008B)
+#define BACDVL1 (*(volatile unsigned char *)0xF008C)
+#define BACDVH1 (*(volatile unsigned char *)0xF008D)
+#define BACDML1 (*(volatile unsigned char *)0xF008E)
+#define BACDMH1 (*(volatile unsigned char *)0xF008F)
#define DFLCTL (*(volatile union un_dflctl *)0xF0090).dflctl
#define DFLCTL_bit (*(volatile union un_dflctl *)0xF0090).BIT
#define HIOTRM (*(volatile unsigned char *)0xF00A0)
@@ -313,10 +729,6 @@ union un_crc0ctl {
#define FSCTL (*(volatile unsigned char *)0xF00CF)
#define ICEADR (*(volatile unsigned short *)0xF00D0)
#define ICEDAT (*(volatile unsigned short *)0xF00D2)
-#define MDCL (*(volatile unsigned short *)0xF00E0)
-#define MDCH (*(volatile unsigned short *)0xF00E2)
-#define MDUC (*(volatile union un_mduc *)0xF00E8).mduc
-#define MDUC_bit (*(volatile union un_mduc *)0xF00E8).BIT
#define PER0 (*(volatile union un_per0 *)0xF00F0).per0
#define PER0_bit (*(volatile union un_per0 *)0xF00F0).BIT
#define OSMC (*(volatile unsigned char *)0xF00F3)
@@ -330,14 +742,26 @@ union un_crc0ctl {
#define SSR00L (*(volatile unsigned char *)0xF0100)
#define SSR01 (*(volatile unsigned short *)0xF0102)
#define SSR01L (*(volatile unsigned char *)0xF0102)
+#define SSR02 (*(volatile unsigned short *)0xF0104)
+#define SSR02L (*(volatile unsigned char *)0xF0104)
+#define SSR03 (*(volatile unsigned short *)0xF0106)
+#define SSR03L (*(volatile unsigned char *)0xF0106)
#define SIR00 (*(volatile unsigned short *)0xF0108)
#define SIR00L (*(volatile unsigned char *)0xF0108)
#define SIR01 (*(volatile unsigned short *)0xF010A)
#define SIR01L (*(volatile unsigned char *)0xF010A)
+#define SIR02 (*(volatile unsigned short *)0xF010C)
+#define SIR02L (*(volatile unsigned char *)0xF010C)
+#define SIR03 (*(volatile unsigned short *)0xF010E)
+#define SIR03L (*(volatile unsigned char *)0xF010E)
#define SMR00 (*(volatile unsigned short *)0xF0110)
#define SMR01 (*(volatile unsigned short *)0xF0112)
+#define SMR02 (*(volatile unsigned short *)0xF0114)
+#define SMR03 (*(volatile unsigned short *)0xF0116)
#define SCR00 (*(volatile unsigned short *)0xF0118)
#define SCR01 (*(volatile unsigned short *)0xF011A)
+#define SCR02 (*(volatile unsigned short *)0xF011C)
+#define SCR03 (*(volatile unsigned short *)0xF011E)
#define SE0 (*(volatile unsigned short *)0xF0120)
#define SE0L (*(volatile union un_se0l *)0xF0120).se0l
#define SE0L_bit (*(volatile union un_se0l *)0xF0120).BIT
@@ -357,10 +781,65 @@ union un_crc0ctl {
#define EDR00L (*(volatile unsigned char *)0xF012C)
#define EDR01 (*(volatile unsigned short *)0xF012E)
#define EDR01L (*(volatile unsigned char *)0xF012E)
+#define EDR02 (*(volatile unsigned short *)0xF0130)
+#define EDR02L (*(volatile unsigned char *)0xF0130)
+#define EDR03 (*(volatile unsigned short *)0xF0132)
+#define EDR03L (*(volatile unsigned char *)0xF0132)
#define SOL0 (*(volatile unsigned short *)0xF0134)
#define SOL0L (*(volatile unsigned char *)0xF0134)
#define SSC0 (*(volatile unsigned short *)0xF0138)
#define SSC0L (*(volatile unsigned char *)0xF0138)
+#define SSR10 (*(volatile unsigned short *)0xF0140)
+#define SSR10L (*(volatile unsigned char *)0xF0140)
+#define SSR11 (*(volatile unsigned short *)0xF0142)
+#define SSR11L (*(volatile unsigned char *)0xF0142)
+#define SSR12 (*(volatile unsigned short *)0xF0144)
+#define SSR12L (*(volatile unsigned char *)0xF0144)
+#define SSR13 (*(volatile unsigned short *)0xF0146)
+#define SSR13L (*(volatile unsigned char *)0xF0146)
+#define SIR10 (*(volatile unsigned short *)0xF0148)
+#define SIR10L (*(volatile unsigned char *)0xF0148)
+#define SIR11 (*(volatile unsigned short *)0xF014A)
+#define SIR11L (*(volatile unsigned char *)0xF014A)
+#define SIR12 (*(volatile unsigned short *)0xF014C)
+#define SIR12L (*(volatile unsigned char *)0xF014C)
+#define SIR13 (*(volatile unsigned short *)0xF014E)
+#define SIR13L (*(volatile unsigned char *)0xF014E)
+#define SMR10 (*(volatile unsigned short *)0xF0150)
+#define SMR11 (*(volatile unsigned short *)0xF0152)
+#define SMR12 (*(volatile unsigned short *)0xF0154)
+#define SMR13 (*(volatile unsigned short *)0xF0156)
+#define SCR10 (*(volatile unsigned short *)0xF0158)
+#define SCR11 (*(volatile unsigned short *)0xF015A)
+#define SCR12 (*(volatile unsigned short *)0xF015C)
+#define SCR13 (*(volatile unsigned short *)0xF015E)
+#define SE1 (*(volatile unsigned short *)0xF0160)
+#define SE1L (*(volatile union un_se1l *)0xF0160).se1l
+#define SE1L_bit (*(volatile union un_se1l *)0xF0160).BIT
+#define SS1 (*(volatile unsigned short *)0xF0162)
+#define SS1L (*(volatile union un_ss1l *)0xF0162).ss1l
+#define SS1L_bit (*(volatile union un_ss1l *)0xF0162).BIT
+#define ST1 (*(volatile unsigned short *)0xF0164)
+#define ST1L (*(volatile union un_st1l *)0xF0164).st1l
+#define ST1L_bit (*(volatile union un_st1l *)0xF0164).BIT
+#define SPS1 (*(volatile unsigned short *)0xF0166)
+#define SPS1L (*(volatile unsigned char *)0xF0166)
+#define SO1 (*(volatile unsigned short *)0xF0168)
+#define SOE1 (*(volatile unsigned short *)0xF016A)
+#define SOE1L (*(volatile union un_soe1l *)0xF016A).soe1l
+#define SOE1L_bit (*(volatile union un_soe1l *)0xF016A).BIT
+#define EDR10 (*(volatile unsigned short *)0xF016C)
+#define EDR10L (*(volatile unsigned char *)0xF016C)
+#define EDR11 (*(volatile unsigned short *)0xF016E)
+#define EDR11L (*(volatile unsigned char *)0xF016E)
+#define EDR12 (*(volatile unsigned short *)0xF0170)
+#define EDR12L (*(volatile unsigned char *)0xF0170)
+#define EDR13 (*(volatile unsigned short *)0xF0172)
+#define EDR13L (*(volatile unsigned char *)0xF0172)
+#define SOL1 (*(volatile unsigned short *)0xF0174)
+#define SOL1L (*(volatile unsigned char *)0xF0174)
+#define SSC1 (*(volatile unsigned short *)0xF0178)
+#define SSC1L (*(volatile unsigned char *)0xF0178)
#define TCR00 (*(volatile unsigned short *)0xF0180)
#define TCR01 (*(volatile unsigned short *)0xF0182)
#define TCR02 (*(volatile unsigned short *)0xF0184)
@@ -396,6 +875,41 @@ union un_crc0ctl {
#define TOL0L (*(volatile unsigned char *)0xF01BC)
#define TOM0 (*(volatile unsigned short *)0xF01BE)
#define TOM0L (*(volatile unsigned char *)0xF01BE)
+#define TCR10 (*(volatile unsigned short *)0xF01C0)
+#define TCR11 (*(volatile unsigned short *)0xF01C2)
+#define TCR12 (*(volatile unsigned short *)0xF01C4)
+#define TCR13 (*(volatile unsigned short *)0xF01C6)
+#define TMR10 (*(volatile unsigned short *)0xF01D0)
+#define TMR11 (*(volatile unsigned short *)0xF01D2)
+#define TMR12 (*(volatile unsigned short *)0xF01D4)
+#define TMR13 (*(volatile unsigned short *)0xF01D6)
+#define TSR10 (*(volatile unsigned short *)0xF01E0)
+#define TSR10L (*(volatile unsigned char *)0xF01E0)
+#define TSR11 (*(volatile unsigned short *)0xF01E2)
+#define TSR11L (*(volatile unsigned char *)0xF01E2)
+#define TSR12 (*(volatile unsigned short *)0xF01E4)
+#define TSR12L (*(volatile unsigned char *)0xF01E4)
+#define TSR13 (*(volatile unsigned short *)0xF01E6)
+#define TSR13L (*(volatile unsigned char *)0xF01E6)
+#define TE1 (*(volatile unsigned short *)0xF01F0)
+#define TE1L (*(volatile union un_te1l *)0xF01F0).te1l
+#define TE1L_bit (*(volatile union un_te1l *)0xF01F0).BIT
+#define TS1 (*(volatile unsigned short *)0xF01F2)
+#define TS1L (*(volatile union un_ts1l *)0xF01F2).ts1l
+#define TS1L_bit (*(volatile union un_ts1l *)0xF01F2).BIT
+#define TT1 (*(volatile unsigned short *)0xF01F4)
+#define TT1L (*(volatile union un_tt1l *)0xF01F4).tt1l
+#define TT1L_bit (*(volatile union un_tt1l *)0xF01F4).BIT
+#define TPS1 (*(volatile unsigned short *)0xF01F6)
+#define TO1 (*(volatile unsigned short *)0xF01F8)
+#define TO1L (*(volatile unsigned char *)0xF01F8)
+#define TOE1 (*(volatile unsigned short *)0xF01FA)
+#define TOE1L (*(volatile union un_toe1l *)0xF01FA).toe1l
+#define TOE1L_bit (*(volatile union un_toe1l *)0xF01FA).BIT
+#define TOL1 (*(volatile unsigned short *)0xF01FC)
+#define TOL1L (*(volatile unsigned char *)0xF01FC)
+#define TOM1 (*(volatile unsigned short *)0xF01FE)
+#define TOM1L (*(volatile unsigned char *)0xF01FE)
#define IICCTL00 (*(volatile union un_iicctl00 *)0xF0230).iicctl00
#define IICCTL00_bit (*(volatile union un_iicctl00 *)0xF0230).BIT
#define IICCTL01 (*(volatile union un_iicctl01 *)0xF0231).iicctl01
@@ -404,79 +918,169 @@ union un_crc0ctl {
#define IICWH0 (*(volatile unsigned char *)0xF0233)
#define SVA0 (*(volatile unsigned char *)0xF0234)
#define IICSE0 (*(volatile unsigned char *)0xF0235)
-#define DSCCTL (*(volatile union un_dscctl *)0xF02E5).dscctl
-#define DSCCTL_bit (*(volatile union un_dscctl *)0xF02E5).BIT
-#define MCKC (*(volatile union un_mckc *)0xF02E6).mckc
-#define MCKC_bit (*(volatile union un_mckc *)0xF02E6).BIT
+#define IICCTL10 (*(volatile union un_iicctl10 *)0xF0238).iicctl10
+#define IICCTL10_bit (*(volatile union un_iicctl10 *)0xF0238).BIT
+#define IICCTL11 (*(volatile union un_iicctl11 *)0xF0239).iicctl11
+#define IICCTL11_bit (*(volatile union un_iicctl11 *)0xF0239).BIT
+#define IICWL1 (*(volatile unsigned char *)0xF023A)
+#define IICWH1 (*(volatile unsigned char *)0xF023B)
+#define SVA1 (*(volatile unsigned char *)0xF023C)
+#define IICSE1 (*(volatile unsigned char *)0xF023D)
+#define TRJCR0 (*(volatile unsigned char *)0xF0240)
+#define TRJIOC0 (*(volatile union un_trjioc0 *)0xF0241).trjioc0
+#define TRJIOC0_bit (*(volatile union un_trjioc0 *)0xF0241).BIT
+#define TRJMR0 (*(volatile union un_trjmr0 *)0xF0242).trjmr0
+#define TRJMR0_bit (*(volatile union un_trjmr0 *)0xF0242).BIT
+#define TRJISR0 (*(volatile union un_trjisr0 *)0xF0243).trjisr0
+#define TRJISR0_bit (*(volatile union un_trjisr0 *)0xF0243).BIT
+#define TRGMR (*(volatile union un_trgmr *)0xF0250).trgmr
+#define TRGMR_bit (*(volatile union un_trgmr *)0xF0250).BIT
+#define TRGCNTC (*(volatile union un_trgcntc *)0xF0251).trgcntc
+#define TRGCNTC_bit (*(volatile union un_trgcntc *)0xF0251).BIT
+#define TRGCR (*(volatile union un_trgcr *)0xF0252).trgcr
+#define TRGCR_bit (*(volatile union un_trgcr *)0xF0252).BIT
+#define TRGIER (*(volatile union un_trgier *)0xF0253).trgier
+#define TRGIER_bit (*(volatile union un_trgier *)0xF0253).BIT
+#define TRGSR (*(volatile union un_trgsr *)0xF0254).trgsr
+#define TRGSR_bit (*(volatile union un_trgsr *)0xF0254).BIT
+#define TRGIOR (*(volatile union un_trgior *)0xF0255).trgior
+#define TRGIOR_bit (*(volatile union un_trgior *)0xF0255).BIT
+#define TRG (*(volatile unsigned short *)0xF0256)
+#define TRGGRA (*(volatile unsigned short *)0xF0258)
+#define TRGGRB (*(volatile unsigned short *)0xF025A)
+#define TRGGRCM (*(volatile unsigned short *)0xF025C)
+#define TRGGRDM (*(volatile unsigned short *)0xF025E)
+#define TRDELC (*(volatile union un_trdelc *)0xF0260).trdelc
+#define TRDELC_bit (*(volatile union un_trdelc *)0xF0260).BIT
+#define TRDSTR (*(volatile unsigned char *)0xF0263)
+#define TRDMR (*(volatile union un_trdmr *)0xF0264).trdmr
+#define TRDMR_bit (*(volatile union un_trdmr *)0xF0264).BIT
+#define TRDPMR (*(volatile union un_trdpmr *)0xF0265).trdpmr
+#define TRDPMR_bit (*(volatile union un_trdpmr *)0xF0265).BIT
+#define TRDFCR (*(volatile union un_trdfcr *)0xF0266).trdfcr
+#define TRDFCR_bit (*(volatile union un_trdfcr *)0xF0266).BIT
+#define TRDOER1 (*(volatile union un_trdoer1 *)0xF0267).trdoer1
+#define TRDOER1_bit (*(volatile union un_trdoer1 *)0xF0267).BIT
+#define TRDOER2 (*(volatile union un_trdoer2 *)0xF0268).trdoer2
+#define TRDOER2_bit (*(volatile union un_trdoer2 *)0xF0268).BIT
+#define TRDOCR (*(volatile union un_trdocr *)0xF0269).trdocr
+#define TRDOCR_bit (*(volatile union un_trdocr *)0xF0269).BIT
+#define TRDDF0 (*(volatile union un_trddf0 *)0xF026A).trddf0
+#define TRDDF0_bit (*(volatile union un_trddf0 *)0xF026A).BIT
+#define TRDDF1 (*(volatile union un_trddf1 *)0xF026B).trddf1
+#define TRDDF1_bit (*(volatile union un_trddf1 *)0xF026B).BIT
+#define TRDCR0 (*(volatile union un_trdcr0 *)0xF0270).trdcr0
+#define TRDCR0_bit (*(volatile union un_trdcr0 *)0xF0270).BIT
+#define TRDIORA0 (*(volatile union un_trdiora0 *)0xF0271).trdiora0
+#define TRDIORA0_bit (*(volatile union un_trdiora0 *)0xF0271).BIT
+#define TRDIORC0 (*(volatile union un_trdiorc0 *)0xF0272).trdiorc0
+#define TRDIORC0_bit (*(volatile union un_trdiorc0 *)0xF0272).BIT
+#define TRDSR0 (*(volatile union un_trdsr0 *)0xF0273).trdsr0
+#define TRDSR0_bit (*(volatile union un_trdsr0 *)0xF0273).BIT
+#define TRDIER0 (*(volatile union un_trdier0 *)0xF0274).trdier0
+#define TRDIER0_bit (*(volatile union un_trdier0 *)0xF0274).BIT
+#define TRDPOCR0 (*(volatile union un_trdpocr0 *)0xF0275).trdpocr0
+#define TRDPOCR0_bit (*(volatile union un_trdpocr0 *)0xF0275).BIT
+#define TRD0 (*(volatile unsigned short *)0xF0276)
+#define TRDGRA0 (*(volatile unsigned short *)0xF0278)
+#define TRDGRB0 (*(volatile unsigned short *)0xF027A)
+#define TRDGRC0M (*(volatile unsigned short *)0xF027C)
+#define TRDGRD0M (*(volatile unsigned short *)0xF027E)
+#define TRDCR1 (*(volatile union un_trdcr1 *)0xF0280).trdcr1
+#define TRDCR1_bit (*(volatile union un_trdcr1 *)0xF0280).BIT
+#define TRDIORA1 (*(volatile union un_trdiora1 *)0xF0281).trdiora1
+#define TRDIORA1_bit (*(volatile union un_trdiora1 *)0xF0281).BIT
+#define TRDIORC1 (*(volatile union un_trdiorc1 *)0xF0282).trdiorc1
+#define TRDIORC1_bit (*(volatile union un_trdiorc1 *)0xF0282).BIT
+#define TRDSR1 (*(volatile union un_trdsr1 *)0xF0283).trdsr1
+#define TRDSR1_bit (*(volatile union un_trdsr1 *)0xF0283).BIT
+#define TRDIER1 (*(volatile union un_trdier1 *)0xF0284).trdier1
+#define TRDIER1_bit (*(volatile union un_trdier1 *)0xF0284).BIT
+#define TRDPOCR1 (*(volatile union un_trdpocr1 *)0xF0285).trdpocr1
+#define TRDPOCR1_bit (*(volatile union un_trdpocr1 *)0xF0285).BIT
+#define TRD1 (*(volatile unsigned short *)0xF0286)
+#define TRDGRA1 (*(volatile unsigned short *)0xF0288)
+#define TRDGRB1 (*(volatile unsigned short *)0xF028A)
+#define TRDGRC1M (*(volatile unsigned short *)0xF028C)
+#define TRDGRD1M (*(volatile unsigned short *)0xF028E)
+#define DTCBAR (*(volatile unsigned char *)0xF02E0)
+#define DTCEN0 (*(volatile union un_dtcen0 *)0xF02E8).dtcen0
+#define DTCEN0_bit (*(volatile union un_dtcen0 *)0xF02E8).BIT
+#define DTCEN1 (*(volatile union un_dtcen1 *)0xF02E9).dtcen1
+#define DTCEN1_bit (*(volatile union un_dtcen1 *)0xF02E9).BIT
+#define DTCEN2 (*(volatile union un_dtcen2 *)0xF02EA).dtcen2
+#define DTCEN2_bit (*(volatile union un_dtcen2 *)0xF02EA).BIT
+#define DTCEN3 (*(volatile union un_dtcen3 *)0xF02EB).dtcen3
+#define DTCEN3_bit (*(volatile union un_dtcen3 *)0xF02EB).BIT
+#define DTCEN4 (*(volatile union un_dtcen4 *)0xF02EC).dtcen4
+#define DTCEN4_bit (*(volatile union un_dtcen4 *)0xF02EC).BIT
#define CRC0CTL (*(volatile union un_crc0ctl *)0xF02F0).crc0ctl
#define CRC0CTL_bit (*(volatile union un_crc0ctl *)0xF02F0).BIT
#define PGCRCL (*(volatile unsigned short *)0xF02F2)
#define CRCD (*(volatile unsigned short *)0xF02FA)
-#define SYSCFG (*(volatile unsigned short *)0xF0400)
-#define SYSCFG1 (*(volatile unsigned short *)0xF0402)
-#define SYSSTS0 (*(volatile unsigned short *)0xF0404)
-#define SYSSTS1 (*(volatile unsigned short *)0xF0406)
-#define DVSTCTR0 (*(volatile unsigned short *)0xF0408)
-#define DVSTCTR1 (*(volatile unsigned short *)0xF040A)
-#define DMA0PCFG (*(volatile unsigned short *)0xF0410)
-#define DMA1PCFG (*(volatile unsigned short *)0xF0412)
-#define CFIFOM (*(volatile unsigned short *)0xF0414)
-#define CFIFOML (*(volatile unsigned char *)0xF0414)
-#define D0FIFOM (*(volatile unsigned short *)0xF0418)
-#define D0FIFOML (*(volatile unsigned char *)0xF0418)
-#define D1FIFOM (*(volatile unsigned short *)0xF041C)
-#define D1FIFOML (*(volatile unsigned char *)0xF041C)
-#define CFIFOSEL (*(volatile unsigned short *)0xF0420)
-#define CFIFOCTR (*(volatile unsigned short *)0xF0422)
-#define D0FIFOSEL (*(volatile unsigned short *)0xF0428)
-#define D0FIFOCTR (*(volatile unsigned short *)0xF042A)
-#define D1FIFOSEL (*(volatile unsigned short *)0xF042C)
-#define D1FIFOCTR (*(volatile unsigned short *)0xF042E)
-#define INTENB0 (*(volatile unsigned short *)0xF0430)
-#define INTENB1 (*(volatile unsigned short *)0xF0432)
-#define INTENB2 (*(volatile unsigned short *)0xF0434)
-#define BRDYENB (*(volatile unsigned short *)0xF0436)
-#define NRDYENB (*(volatile unsigned short *)0xF0438)
-#define BEMPENB (*(volatile unsigned short *)0xF043A)
-#define SOFCFG (*(volatile unsigned short *)0xF043C)
-#define INTSTS0 (*(volatile unsigned short *)0xF0440)
-#define INTSTS1 (*(volatile unsigned short *)0xF0442)
-#define INTSTS2 (*(volatile unsigned short *)0xF0444)
-#define BRDYSTS (*(volatile unsigned short *)0xF0446)
-#define NRDYSTS (*(volatile unsigned short *)0xF0448)
-#define BEMPSTS (*(volatile unsigned short *)0xF044A)
-#define FRMNUM (*(volatile unsigned short *)0xF044C)
-#define USBADDR (*(volatile unsigned short *)0xF0450)
-#define USBREQ (*(volatile unsigned short *)0xF0454)
-#define USBVAL (*(volatile unsigned short *)0xF0456)
-#define USBINDX (*(volatile unsigned short *)0xF0458)
-#define USBLENG (*(volatile unsigned short *)0xF045A)
-#define DCPCFG (*(volatile unsigned short *)0xF045C)
-#define DCPMAXP (*(volatile unsigned short *)0xF045E)
-#define DCPCTR (*(volatile unsigned short *)0xF0460)
-#define PIPESEL (*(volatile unsigned short *)0xF0464)
-#define PIPECFG (*(volatile unsigned short *)0xF0468)
-#define PIPEMAXP (*(volatile unsigned short *)0xF046C)
-#define PIPEPERI (*(volatile unsigned short *)0xF046E)
-#define PIPE4CTR (*(volatile unsigned short *)0xF0476)
-#define PIPE5CTR (*(volatile unsigned short *)0xF0478)
-#define PIPE6CTR (*(volatile unsigned short *)0xF047A)
-#define PIPE7CTR (*(volatile unsigned short *)0xF047C)
-#define PIPE4TRE (*(volatile unsigned short *)0xF049C)
-#define PIPE4TRN (*(volatile unsigned short *)0xF049E)
-#define PIPE5TRE (*(volatile unsigned short *)0xF04A0)
-#define PIPE5TRN (*(volatile unsigned short *)0xF04A2)
-#define USBBCCTRL0 (*(volatile unsigned short *)0xF04B0)
-#define USBBCCTRL1 (*(volatile unsigned short *)0xF04B4)
-#define USBBCOPT0 (*(volatile unsigned short *)0xF04B8)
-#define USBBCOPT1 (*(volatile unsigned short *)0xF04BC)
-#define USBMC (*(volatile unsigned short *)0xF04CC)
-#define DEVADD0 (*(volatile unsigned short *)0xF04D0)
-#define DEVADD1 (*(volatile unsigned short *)0xF04D2)
-#define DEVADD2 (*(volatile unsigned short *)0xF04D4)
-#define DEVADD3 (*(volatile unsigned short *)0xF04D6)
-#define DEVADD4 (*(volatile unsigned short *)0xF04D8)
-#define DEVADD5 (*(volatile unsigned short *)0xF04DA)
+#define ELSELR00 (*(volatile union un_elselr00 *)0xF0300).elselr00
+#define ELSELR00_bit (*(volatile union un_elselr00 *)0xF0300).BIT
+#define ELSELR01 (*(volatile union un_elselr01 *)0xF0301).elselr01
+#define ELSELR01_bit (*(volatile union un_elselr01 *)0xF0301).BIT
+#define ELSELR02 (*(volatile union un_elselr02 *)0xF0302).elselr02
+#define ELSELR02_bit (*(volatile union un_elselr02 *)0xF0302).BIT
+#define ELSELR03 (*(volatile union un_elselr03 *)0xF0303).elselr03
+#define ELSELR03_bit (*(volatile union un_elselr03 *)0xF0303).BIT
+#define ELSELR04 (*(volatile union un_elselr04 *)0xF0304).elselr04
+#define ELSELR04_bit (*(volatile union un_elselr04 *)0xF0304).BIT
+#define ELSELR05 (*(volatile union un_elselr05 *)0xF0305).elselr05
+#define ELSELR05_bit (*(volatile union un_elselr05 *)0xF0305).BIT
+#define ELSELR06 (*(volatile union un_elselr06 *)0xF0306).elselr06
+#define ELSELR06_bit (*(volatile union un_elselr06 *)0xF0306).BIT
+#define ELSELR07 (*(volatile union un_elselr07 *)0xF0307).elselr07
+#define ELSELR07_bit (*(volatile union un_elselr07 *)0xF0307).BIT
+#define ELSELR08 (*(volatile union un_elselr08 *)0xF0308).elselr08
+#define ELSELR08_bit (*(volatile union un_elselr08 *)0xF0308).BIT
+#define ELSELR09 (*(volatile union un_elselr09 *)0xF0309).elselr09
+#define ELSELR09_bit (*(volatile union un_elselr09 *)0xF0309).BIT
+#define ELSELR10 (*(volatile union un_elselr10 *)0xF030A).elselr10
+#define ELSELR10_bit (*(volatile union un_elselr10 *)0xF030A).BIT
+#define ELSELR11 (*(volatile union un_elselr11 *)0xF030B).elselr11
+#define ELSELR11_bit (*(volatile union un_elselr11 *)0xF030B).BIT
+#define ELSELR12 (*(volatile union un_elselr12 *)0xF030C).elselr12
+#define ELSELR12_bit (*(volatile union un_elselr12 *)0xF030C).BIT
+#define ELSELR13 (*(volatile union un_elselr13 *)0xF030D).elselr13
+#define ELSELR13_bit (*(volatile union un_elselr13 *)0xF030D).BIT
+#define ELSELR14 (*(volatile union un_elselr14 *)0xF030E).elselr14
+#define ELSELR14_bit (*(volatile union un_elselr14 *)0xF030E).BIT
+#define ELSELR15 (*(volatile union un_elselr15 *)0xF030F).elselr15
+#define ELSELR15_bit (*(volatile union un_elselr15 *)0xF030F).BIT
+#define ELSELR16 (*(volatile union un_elselr16 *)0xF0310).elselr16
+#define ELSELR16_bit (*(volatile union un_elselr16 *)0xF0310).BIT
+#define ELSELR17 (*(volatile union un_elselr17 *)0xF0311).elselr17
+#define ELSELR17_bit (*(volatile union un_elselr17 *)0xF0311).BIT
+#define ELSELR18 (*(volatile union un_elselr18 *)0xF0312).elselr18
+#define ELSELR18_bit (*(volatile union un_elselr18 *)0xF0312).BIT
+#define ELSELR19 (*(volatile union un_elselr19 *)0xF0313).elselr19
+#define ELSELR19_bit (*(volatile union un_elselr19 *)0xF0313).BIT
+#define ELSELR20 (*(volatile union un_elselr20 *)0xF0314).elselr20
+#define ELSELR20_bit (*(volatile union un_elselr20 *)0xF0314).BIT
+#define ELSELR21 (*(volatile union un_elselr21 *)0xF0315).elselr21
+#define ELSELR21_bit (*(volatile union un_elselr21 *)0xF0315).BIT
+#define ELSELR22 (*(volatile union un_elselr22 *)0xF0316).elselr22
+#define ELSELR22_bit (*(volatile union un_elselr22 *)0xF0316).BIT
+#define ELSELR23 (*(volatile union un_elselr23 *)0xF0317).elselr23
+#define ELSELR23_bit (*(volatile union un_elselr23 *)0xF0317).BIT
+#define ELSELR24 (*(volatile union un_elselr24 *)0xF0318).elselr24
+#define ELSELR24_bit (*(volatile union un_elselr24 *)0xF0318).BIT
+#define ELSELR25 (*(volatile union un_elselr25 *)0xF0319).elselr25
+#define ELSELR25_bit (*(volatile union un_elselr25 *)0xF0319).BIT
+#define COMPMDR (*(volatile union un_compmdr *)0xF0340).compmdr
+#define COMPMDR_bit (*(volatile union un_compmdr *)0xF0340).BIT
+#define COMPFIR (*(volatile union un_compfir *)0xF0341).compfir
+#define COMPFIR_bit (*(volatile union un_compfir *)0xF0341).BIT
+#define COMPOCR (*(volatile union un_compocr *)0xF0342).compocr
+#define COMPOCR_bit (*(volatile union un_compocr *)0xF0342).BIT
+#define COMPTCR (*(volatile union un_comptcr *)0xF0343).comptcr
+#define COMPTCR_bit (*(volatile union un_comptcr *)0xF0343).BIT
+#define TRJ0 (*(volatile unsigned short *)0xF0500)
+#define MONMOD1 (*(volatile unsigned char *)0xF0720)
+#define TRCMA (*(volatile unsigned char *)0xF0721)
/*
Sfr bits
@@ -484,19 +1088,23 @@ union un_crc0ctl {
#define ADTYP ADM2_bit.no0
#define AWC ADM2_bit.no2
#define ADRCK ADM2_bit.no3
+#define SSIE00 ISC_bit.no7
+#define TRJ0EN PER1_bit.no0
+#define DTCEN PER1_bit.no3
+#define TRD0EN PER1_bit.no4
+#define CMPEN PER1_bit.no5
+#define TRGEN PER1_bit.no6
+#define DACEN PER1_bit.no7
#define DFLEN DFLCTL_bit.no0
#define BRSAM BECTL_bit.no0
#define ESQST FSSE_bit.no7
-#define DIVST MDUC_bit.no0
-#define MACSF MDUC_bit.no1
-#define MACOF MDUC_bit.no2
-#define MDSM MDUC_bit.no3
-#define MACMODE MDUC_bit.no6
-#define DIVMODE MDUC_bit.no7
#define TAU0EN PER0_bit.no0
+#define TAU1EN PER0_bit.no1
#define SAU0EN PER0_bit.no2
+#define SAU1EN PER0_bit.no3
#define IICA0EN PER0_bit.no4
#define ADCEN PER0_bit.no5
+#define IICA1EN PER0_bit.no6
#define RTCEN PER0_bit.no7
#define PAENB RMC_bit.no0
#define WDVOL RMC_bit.no7
@@ -516,7 +1124,79 @@ union un_crc0ctl {
#define DAD0 IICCTL01_bit.no4
#define CLD0 IICCTL01_bit.no5
#define WUP0 IICCTL01_bit.no7
+#define SPT1 IICCTL10_bit.no0
+#define STT1 IICCTL10_bit.no1
+#define ACKE1 IICCTL10_bit.no2
+#define WTIM1 IICCTL10_bit.no3
+#define SPIE1 IICCTL10_bit.no4
+#define WREL1 IICCTL10_bit.no5
+#define LREL1 IICCTL10_bit.no6
+#define IICE1 IICCTL10_bit.no7
+#define PRS1 IICCTL11_bit.no0
+#define DFC1 IICCTL11_bit.no2
+#define SMC1 IICCTL11_bit.no3
+#define DAD1 IICCTL11_bit.no4
+#define CLD1 IICCTL11_bit.no5
+#define WUP1 IICCTL11_bit.no7
+#define TRGPWM TRGMR_bit.no0
+#define TRGMDF TRGMR_bit.no1
+#define TRGDFA TRGMR_bit.no2
+#define TRGDFB TRGMR_bit.no3
+#define TRGDFCK0 TRGMR_bit.no4
+#define TRGDFCK1 TRGMR_bit.no5
+#define TRGELCICE TRGMR_bit.no6
+#define TRGSTART TRGMR_bit.no7
+#define TRGTCK0 TRGCR_bit.no0
+#define TRGTCK1 TRGCR_bit.no1
+#define TRGTCK2 TRGCR_bit.no2
+#define TRGCKEG0 TRGCR_bit.no3
+#define TRGCKEG1 TRGCR_bit.no4
+#define TRGCCLR0 TRGCR_bit.no5
+#define TRGCCLR1 TRGCR_bit.no6
+#define TRGIMIEA TRGIER_bit.no0
+#define TRGIMIEB TRGIER_bit.no1
+#define TRGUDIE TRGIER_bit.no2
+#define TRGOVIE TRGIER_bit.no3
+#define TRGIMFA TRGSR_bit.no0
+#define TRGIMFB TRGSR_bit.no1
+#define TRGUDF TRGSR_bit.no2
+#define TRGOVF TRGSR_bit.no3
+#define TRGDIRF TRGSR_bit.no4
+#define TRGIOA0 TRGIOR_bit.no0
+#define TRGIOA1 TRGIOR_bit.no1
+#define TRGIOA2 TRGIOR_bit.no2
+#define TRGBUFA TRGIOR_bit.no3
+#define TRGIOB0 TRGIOR_bit.no4
+#define TRGIOB1 TRGIOR_bit.no5
+#define TRGIOB2 TRGIOR_bit.no6
+#define TRGBUFB TRGIOR_bit.no7
+#define TRDSYNC TRDMR_bit.no0
+#define TRDBFC0 TRDMR_bit.no4
+#define TRDBFD0 TRDMR_bit.no5
+#define TRDBFC1 TRDMR_bit.no6
+#define TRDBFD1 TRDMR_bit.no7
+#define TRDPWMB0 TRDPMR_bit.no0
+#define TRDPWMC0 TRDPMR_bit.no1
+#define TRDPWMD0 TRDPMR_bit.no2
+#define TRDPWMB1 TRDPMR_bit.no4
+#define TRDPWMC1 TRDPMR_bit.no5
+#define TRDPWMD1 TRDPMR_bit.no6
+#define TRDSHUTS TRDOER2_bit.no0
+#define TRDPTO TRDOER2_bit.no7
#define CRC0EN CRC0CTL_bit.no7
+#define C0ENB COMPMDR_bit.no0
+#define C0MON COMPMDR_bit.no3
+#define C1ENB COMPMDR_bit.no4
+#define C1MON COMPMDR_bit.no7
+#define C0IE COMPOCR_bit.no0
+#define C0OE COMPOCR_bit.no1
+#define C0OP COMPOCR_bit.no2
+#define C1IE COMPOCR_bit.no4
+#define C1OE COMPOCR_bit.no5
+#define C1OP COMPOCR_bit.no6
+#define SPDMD COMPOCR_bit.no7
+#define TSTMD COMPTCR_bit.no0
+#define TMDWE COMPTCR_bit.no7
/*
Interrupt vector addresses
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c
index 1bba01d7a..4a6e6d1b0 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/main.c
@@ -135,6 +135,8 @@
/* Hardware includes. */
#include "port_iodefine.h"
+#include "port_iodefine_ext.h"
+#include "LED.h"
/* The period at which the check timer will expire, in ms, provided no errors
have been reported by any of the standard demo tasks. ms are converted to the
@@ -154,9 +156,6 @@ its own executions. */
#define mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT ( 100UL )
#define mainDEMO_TIMER_PERIOD_MS ( mainCHECK_TIMER_PERIOD_MS / mainDEMO_TIMER_INCREMENTS_PER_CHECK_TIMER_TIMEOUT )
-/* The LED toggled by the check timer. */
-#define mainLED_0 P1_bit.no0
-
/* A block time of zero simple means "don't block". */
#define mainDONT_BLOCK ( 0U )
@@ -172,12 +171,6 @@ static void prvCheckTimerCallback( xTimerHandle xTimer );
*/
static void prvDemoTimerCallback( xTimerHandle xTimer );
-/*
- * 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.
*/
@@ -201,25 +194,14 @@ static xTimerHandle xDemoTimer = NULL;
/* This variable is incremented each time the demo timer expires. */
static volatile unsigned long ulDemoSoftwareTimerCounter = 0UL;
-/* RL78/G13 Option Byte Definition. Watchdog disabled, LVI enabled, OCD interface
-enabled. */
-#if 0
-__root __far const unsigned char OptionByte[] @ 0x00C0 =
-{
- 0x00U, 0xFFU, 0xF8U, 0x81U
-};
-
-/* Security byte definition */
-__root __far const unsigned char ucSecurityCode[] @ 0x00C4 =
-{
- 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
-};
-#endif
-
/*-----------------------------------------------------------*/
-
+volatile unsigned char ucTemp;
short main( void )
{
+ ucTemp = RESF;
+ ucTemp = sizeof( char* );
+ ucTemp = sizeof( pdTASK_CODE );
+
/* Creates all the tasks and timers, then starts the scheduler. */
/* First create the 'standard demo' tasks. These are used to demonstrate
@@ -349,45 +331,7 @@ static unsigned short usLastRegTest1Counter = 0, usLastRegTest2Counter = 0;
/* 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();
-
- /* Set fMX */
- CMC = 0x00;
- MSTOP = 1U;
-
- /* Set fMAIN */
- MCM0 = 0U;
-
- /* Set fSUB */
- XTSTOP = 1U;
- OSMC = 0x10;
-
- /* Set fCLK */
- CSS = 0U;
-
- /* Set fIH */
- HIOSTOP = 0U;
-
- /* LED port initialization - set port register. */
-// P7 &= 0x7F;
- P1 &= 0xFE;
-
- /* Set port mode register. */
-// PM7 &= 0x7F;
- PM1 &= 0xFE;
-
- /* Switch pin initialization - enable pull-up resistor. */
-// PU12_bit.no0 = 1;
-
- return pdTRUE;
+ LED_BIT = !LED_BIT;
}
/*-----------------------------------------------------------*/
@@ -438,4 +382,5 @@ volatile size_t xFreeHeapSpace;
RAM. */
xFreeHeapSpace = xPortGetFreeHeapSize();
}
+/*-----------------------------------------------------------*/
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm
index d82649f8c..c1c5a46d0 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/reset_program.asm
@@ -3,8 +3,8 @@
/* PROJECT NAME : RTOSDemo */
/* FILE : reset_program.asm */
/* DESCRIPTION : Reset Program */
-/* CPU SERIES : RL78 - G1C */
-/* CPU TYPE : R5F10JBC */
+/* CPU SERIES : RL78 - G14 */
+/* CPU TYPE : R5F104PJ */
/* */
/* This file is generated by e2studio. */
/* */
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/typedefine.h b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/typedefine.h
index e03c149dc..8972f0ea7 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/typedefine.h
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/typedefine.h
@@ -3,8 +3,8 @@
/* PROJECT NAME : RTOSDemo */
/* FILE : typedefine.h */
/* DESCRIPTION : Aliases of Integer Type */
-/* CPU SERIES : RL78 - G1C */
-/* CPU TYPE : R5F10JBC */
+/* CPU SERIES : RL78 - G14 */
+/* CPU TYPE : R5F104PJ */
/* */
/* This file is generated by e2studio. */
/* */
diff --git a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/vector_table.c b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/vector_table.c
index a22a12d8a..e029f61c4 100644
--- a/FreeRTOS/Demo/RL78_E2Studio_GCC/src/vector_table.c
+++ b/FreeRTOS/Demo/RL78_E2Studio_GCC/src/vector_table.c
@@ -1,21 +1,24 @@
/***********************************************************************/
/* */
-/* PROJECT NAME : RTOSDemo */
+/* PROJECT NAME : test */
/* FILE : vector_table.c */
/* DESCRIPTION : Vector Table */
-/* CPU SERIES : RL78 - G1C */
-/* CPU TYPE : R5F10JBC */
+/* CPU SERIES : RL78 - G14 */
+/* CPU TYPE : R5F104PJ */
/* */
/* This file is generated by e2studio. */
/* */
/***********************************************************************/
-
+
#include "interrupt_handlers.h"
-extern void PowerON_Reset (void);
-
+extern void PowerON_Reset( void );
+extern void vPortTickISR( void );
+extern void vPortYield( void );
+
+#warning Check the options bytes.
const unsigned char Option_Bytes[] __attribute__ ((section (".option_bytes"))) = {
- 0xef, 0xff, 0xe8, 0x85
+ 0x6e, 0xff, 0xe8, 0x85 /* 0x00U, 0xFFU, 0xF8U, 0x81U */
};
const unsigned char Security_Id[] __attribute__ ((section (".security_id"))) = {
@@ -46,32 +49,32 @@ const void *Vectors[] VECT_SECT = {
INT_P4,
//INT_P5 (0x12)
INT_P5,
+ //INT_CSI20/INT_IIC20/INT_ST2 (0x14)
+ INT_ST2,
+ //INT_CSI21/INT_IIC21/INT_SR2 (0x16)
+ INT_SR2,
+ //INT_SRE2/INT_TM11H (0x18)
+ INT_TM11H,
// Padding
(void*)0xFFFF,
// Padding
(void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
- //INT_DMA0 (0x1A)
- INT_DMA0,
- //INT_DMA1 (0x1C)
- INT_DMA1,
//INT_CSI00/INT_IIC00/INT_ST0 (0x1E)
INT_ST0,
- //INT_TM00 (0x20)
- INT_TM00,
- //INT_CSI01/INT_IIC01/INT_SR0 (0x22)
+ //INT_CSI01/INT_IIC01/INT_SR0 (0x20)
INT_SR0,
- //INT_SRE0/INT_TM01H (0x24)
+ //INT_SRE0/INT_TM01H (0x22)
INT_TM01H,
- // Padding
- (void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
- //INT_TM03H (0x2A)
+ //INT_CSI10/INT_IIC10/INT_ST1 (0x24)
+ INT_ST1,
+ //INT_CSI11/INT_IIC11/INT_SR1 (0x26)
+ INT_SR1,
+ //INT_SRE1/INT_TM03H (0x28)
INT_TM03H,
- //INT_IICA0 (0x2C)
+ //INT_IICA0 (0x2A)
INT_IICA0,
+ //INT_TM00 (0x2C)
+ INT_TM00,
//INT_TM01 (0x2E)
INT_TM01,
//INT_TM02 (0x30)
@@ -83,47 +86,47 @@ const void *Vectors[] VECT_SECT = {
//INT_RTC (0x36)
INT_RTC,
//INT_IT (0x38)
- INT_IT,
- // Padding
- (void*)0xFFFF,
- //INT_USB (0x3C)
- INT_USB,
- //INT_RSUM (0x3E)
- INT_RSUM,
- // Padding
- (void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
+ vPortTickISR,
+ //INT_KR (0x3A)
+ INT_KR,
+ //INT_CSI30/INT_IIC30/INT_ST3 (0x3C)
+ INT_ST3,
+ //INT_CSI31/INT_IIC31/INT_SR3 (0x3E)
+ INT_SR3,
+ //INT_TRJ0 (0x40)
+ INT_TRJ0,
+ //INT_TM10 (0x42)
+ INT_TM10,
+ //INT_TM11 (0x44)
+ INT_TM11,
+ //INT_TM12 (0x46)
+ INT_TM12,
+ //INT_TM13 (0x48)
+ INT_TM13,
+ //INT_P6 (0x4A)
+ INT_P6,
+ //INT_P7 (0x4C)
+ INT_P7,
//INT_P8 (0x4E)
INT_P8,
//INT_P9 (0x50)
INT_P9,
+ //INT_CMP0/INT_P10 (0x52)
+ INT_P10,
+ //INT_CMP1/INT_P11 (0x54)
+ INT_P11,
+ //INT_TRD0 (0x56)
+ INT_TRD0,
+ //INT_TRD1 (0x58)
+ INT_TRD1,
+ //INT_TRG (0x5A)
+ INT_TRG,
+ //INT_SRE3/INT_TM13H (0x5C)
+ INT_TM13H,
// Padding
(void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
- // Padding
- (void*)0xFFFF,
- //INT_MD (0x5E)
- INT_MD,
- // Padding
- (void*)0xFFFF,
+ //INT_IICA1 (0x60)
+ INT_IICA1,
//INT_FL (0x62)
INT_FL,
// Padding
@@ -153,6 +156,6 @@ const void *Vectors[] VECT_SECT = {
// Padding
(void*)0xFFFF,
//INT_BRK_I (0x7E)
- INT_BRK_I,
+ vPortYield,
};