mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 09:07:46 -04:00
Use configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H flag RX100, RX200
This commit is contained in:
parent
b4789ca0d2
commit
41b1e126d2
4 changed files with 73 additions and 32 deletions
|
@ -40,12 +40,15 @@
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
|
||||||
/* Hardware specifics. */
|
/* Hardware specifics. */
|
||||||
#if defined(configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H) && (configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1)
|
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
|
||||||
#include "platform.h"
|
|
||||||
#else
|
|
||||||
#include "iodefine.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#include "platform.h"
|
||||||
|
|
||||||
|
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
||||||
|
|
||||||
|
#include "iodefine.h"
|
||||||
|
|
||||||
|
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Tasks should start with interrupts enabled and in Supervisor mode, therefore
|
/* Tasks should start with interrupts enabled and in Supervisor mode, therefore
|
||||||
|
@ -93,21 +96,32 @@ static void prvStartFirstTask( void ) __attribute__((naked));
|
||||||
* restoring of registers). Written in asm code as direct register access is
|
* restoring of registers). Written in asm code as direct register access is
|
||||||
* required.
|
* required.
|
||||||
*/
|
*/
|
||||||
#if defined(configTICK_VECTOR)
|
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
|
||||||
void vPortSoftwareInterruptISR( void ) __attribute__((naked, vector( R_BSP_SECNAME_INTVECTTBL, VECT_ICU_SWINT )));
|
|
||||||
#else
|
R_BSP_PRAGMA_INTERRUPT( vSoftwareInterruptISR, VECT( ICU, SWINT ) )
|
||||||
void vPortSoftwareInterruptISR( void ) __attribute__((naked));
|
R_BSP_ATTRIB_INTERRUPT void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );
|
||||||
#endif
|
|
||||||
|
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
||||||
|
|
||||||
|
void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );
|
||||||
|
|
||||||
|
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The tick interrupt handler.
|
* The tick ISR handler. The peripheral used is configured by the application
|
||||||
|
* via a hook/callback function.
|
||||||
*/
|
*/
|
||||||
|
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
|
||||||
|
|
||||||
|
R_BSP_PRAGMA_INTERRUPT( vTickISR, _VECT( configTICK_VECTOR ) )
|
||||||
|
R_BSP_ATTRIB_INTERRUPT void vTickISR( void ); /* Do not add __attribute__( ( interrupt ) ). */
|
||||||
|
|
||||||
|
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
||||||
|
|
||||||
|
void vTickISR( void ) __attribute__( ( interrupt ) );
|
||||||
|
|
||||||
|
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
||||||
|
|
||||||
#if defined(configTICK_VECTOR)
|
|
||||||
void vPortTickISR( void ) __attribute__((interrupt( R_BSP_SECNAME_INTVECTTBL, _VECT( configTICK_VECTOR ) )));
|
|
||||||
#else
|
|
||||||
void vPortTickISR( void ) __attribute__((interrupt));
|
|
||||||
#endif
|
|
||||||
/*
|
/*
|
||||||
* Sets up the periodic ISR used for the RTOS tick using the CMT.
|
* Sets up the periodic ISR used for the RTOS tick using the CMT.
|
||||||
* The application writer can define configSETUP_TICK_INTERRUPT() (in
|
* The application writer can define configSETUP_TICK_INTERRUPT() (in
|
||||||
|
|
|
@ -42,6 +42,11 @@ extern "C" {
|
||||||
* These settings should not be altered.
|
* These settings should not be altered.
|
||||||
*-----------------------------------------------------------
|
*-----------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
/* When the FIT configurator or the Smart Configurator is used, platform.h has to be
|
||||||
|
* used. */
|
||||||
|
#ifndef configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H
|
||||||
|
#define configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Type definitions - these are a bit legacy and not really used now, other than
|
/* Type definitions - these are a bit legacy and not really used now, other than
|
||||||
portSTACK_TYPE and portBASE_TYPE. */
|
portSTACK_TYPE and portBASE_TYPE. */
|
||||||
|
|
|
@ -37,11 +37,15 @@
|
||||||
#include "string.h"
|
#include "string.h"
|
||||||
|
|
||||||
/* Hardware specifics. */
|
/* Hardware specifics. */
|
||||||
#if defined(configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H) && (configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1)
|
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
|
||||||
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#else
|
|
||||||
|
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
||||||
|
|
||||||
#include "iodefine.h"
|
#include "iodefine.h"
|
||||||
#endif
|
|
||||||
|
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
@ -66,25 +70,37 @@ which would require the old IPL to be read first and stored in a local variable.
|
||||||
*/
|
*/
|
||||||
static void prvStartFirstTask( void ) __attribute__((naked));
|
static void prvStartFirstTask( void ) __attribute__((naked));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Software interrupt handler. Performs the actual context switch (saving and
|
* Software interrupt handler. Performs the actual context switch (saving and
|
||||||
* restoring of registers). Written in asm code as direct register access is
|
* restoring of registers). Written in asm code as direct register access is
|
||||||
* required.
|
* required.
|
||||||
*/
|
*/
|
||||||
#if defined(configTICK_VECTOR)
|
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
|
||||||
void vSoftwareInterruptISR( void ) __attribute__((naked, vector( R_BSP_SECNAME_INTVECTTBL, VECT_ICU_SWINT )));
|
|
||||||
#else
|
R_BSP_PRAGMA_INTERRUPT( vSoftwareInterruptISR, VECT( ICU, SWINT ) )
|
||||||
|
R_BSP_ATTRIB_INTERRUPT void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );
|
||||||
|
|
||||||
|
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
||||||
|
|
||||||
void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );
|
void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );
|
||||||
#endif
|
|
||||||
|
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The tick interrupt handler.
|
* The tick ISR handler. The peripheral used is configured by the application
|
||||||
|
* via a hook/callback function.
|
||||||
*/
|
*/
|
||||||
#if defined(configTICK_VECTOR)
|
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
|
||||||
void vTickISR( void ) __attribute__((interrupt( R_BSP_SECNAME_INTVECTTBL, _VECT( configTICK_VECTOR ) )));
|
|
||||||
#else
|
R_BSP_PRAGMA_INTERRUPT( vTickISR, _VECT( configTICK_VECTOR ) )
|
||||||
|
R_BSP_ATTRIB_INTERRUPT void vTickISR( void ); /* Do not add __attribute__( ( interrupt ) ). */
|
||||||
|
|
||||||
|
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
||||||
|
|
||||||
void vTickISR( void ) __attribute__( ( interrupt ) );
|
void vTickISR( void ) __attribute__( ( interrupt ) );
|
||||||
#endif
|
|
||||||
|
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,12 @@ extern "C" {
|
||||||
*-----------------------------------------------------------
|
*-----------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* When the FIT configurator or the Smart Configurator is used, platform.h has to be
|
||||||
|
* used. */
|
||||||
|
#ifndef configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H
|
||||||
|
#define configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Type definitions - these are a bit legacy and not really used now, other than
|
/* Type definitions - these are a bit legacy and not really used now, other than
|
||||||
portSTACK_TYPE and portBASE_TYPE. */
|
portSTACK_TYPE and portBASE_TYPE. */
|
||||||
#define portCHAR char
|
#define portCHAR char
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue