mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-06-05 20:09:05 -04:00
Synopsys ARC update, with updated BSP support (#99)
Update BSP APIs to latest version Remove unused macro which could have caused warnings (Code Style) Manually align some macros Signed-off-by: Yuguo Zou <yuguo.zou@synopsys.com>
This commit is contained in:
parent
bb56edff2f
commit
5b6c2ab085
|
@ -54,6 +54,7 @@
|
||||||
extern void __mw_run_tls_dtor();
|
extern void __mw_run_tls_dtor();
|
||||||
extern void __mw_run_tls_ctor();
|
extern void __mw_run_tls_ctor();
|
||||||
|
|
||||||
|
extern uint32_t exc_nest_count;
|
||||||
/*
|
/*
|
||||||
* Linker generated symbols to mark .tls section addresses
|
* Linker generated symbols to mark .tls section addresses
|
||||||
* first byte .. last byte
|
* first byte .. last byte
|
||||||
|
@ -184,7 +185,7 @@
|
||||||
executable_requires_tls_section();
|
executable_requires_tls_section();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( exc_sense() ) /* In ISR */
|
if( exc_nest_count > 0 ) /* In ISR */
|
||||||
{
|
{
|
||||||
return get_isr_tls();
|
return get_isr_tls();
|
||||||
}
|
}
|
||||||
|
|
14
portable/ThirdParty/GCC/ARC_EM_HS/port.c
vendored
14
portable/ThirdParty/GCC/ARC_EM_HS/port.c
vendored
|
@ -41,7 +41,13 @@
|
||||||
|
|
||||||
volatile unsigned int ulCriticalNesting = 999UL;
|
volatile unsigned int ulCriticalNesting = 999UL;
|
||||||
volatile unsigned int context_switch_reqflg; /* task context switch request flag in exceptions and interrupts handling */
|
volatile unsigned int context_switch_reqflg; /* task context switch request flag in exceptions and interrupts handling */
|
||||||
|
/**
|
||||||
|
* \var exc_nest_count
|
||||||
|
* \brief the counter for exc/int processing, =0 no int/exc
|
||||||
|
* >1 in int/exc processing
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
uint32_t exc_nest_count;
|
||||||
/* --------------------------------------------------------------------------*/
|
/* --------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -51,7 +57,7 @@ volatile unsigned int context_switch_reqflg; /* task context switch request flag
|
||||||
static void vKernelTick( void * ptr )
|
static void vKernelTick( void * ptr )
|
||||||
{
|
{
|
||||||
/* clear timer interrupt */
|
/* clear timer interrupt */
|
||||||
timer_int_clear( BOARD_OS_TIMER_ID );
|
arc_timer_int_clear( BOARD_OS_TIMER_ID );
|
||||||
board_timer_update( configTICK_RATE_HZ );
|
board_timer_update( configTICK_RATE_HZ );
|
||||||
|
|
||||||
if( xTaskIncrementTick() )
|
if( xTaskIncrementTick() )
|
||||||
|
@ -71,8 +77,8 @@ static void prvSetupTimerInterrupt( void )
|
||||||
unsigned int cyc = configCPU_CLOCK_HZ / configTICK_RATE_HZ;
|
unsigned int cyc = configCPU_CLOCK_HZ / configTICK_RATE_HZ;
|
||||||
|
|
||||||
int_disable( BOARD_OS_TIMER_INTNO ); /* disable os timer interrupt */
|
int_disable( BOARD_OS_TIMER_INTNO ); /* disable os timer interrupt */
|
||||||
timer_stop( BOARD_OS_TIMER_ID );
|
arc_timer_stop( BOARD_OS_TIMER_ID );
|
||||||
timer_start( BOARD_OS_TIMER_ID, TIMER_CTRL_IE | TIMER_CTRL_NH, cyc );
|
arc_timer_start( BOARD_OS_TIMER_ID, TIMER_CTRL_IE | TIMER_CTRL_NH, cyc );
|
||||||
|
|
||||||
int_handler_install( BOARD_OS_TIMER_INTNO, ( INT_HANDLER_T ) vKernelTick );
|
int_handler_install( BOARD_OS_TIMER_INTNO, ( INT_HANDLER_T ) vKernelTick );
|
||||||
int_pri_set( BOARD_OS_TIMER_INTNO, INT_PRI_MIN );
|
int_pri_set( BOARD_OS_TIMER_INTNO, INT_PRI_MIN );
|
||||||
|
|
15
portable/ThirdParty/GCC/ARC_EM_HS/portmacro.h
vendored
15
portable/ThirdParty/GCC/ARC_EM_HS/portmacro.h
vendored
|
@ -56,9 +56,6 @@
|
||||||
#define portSTACK_TYPE unsigned int
|
#define portSTACK_TYPE unsigned int
|
||||||
#define portBASE_TYPE portLONG
|
#define portBASE_TYPE portLONG
|
||||||
|
|
||||||
#ifndef Inline
|
|
||||||
#define Inline static __inline__
|
|
||||||
#endif
|
|
||||||
#ifndef Asm
|
#ifndef Asm
|
||||||
#define Asm __asm__ volatile
|
#define Asm __asm__ volatile
|
||||||
#endif
|
#endif
|
||||||
|
@ -84,21 +81,21 @@
|
||||||
|
|
||||||
#if ( configUSE_16_BIT_TICKS == 1 )
|
#if ( configUSE_16_BIT_TICKS == 1 )
|
||||||
typedef uint16_t TickType_t;
|
typedef uint16_t TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffff
|
#define portMAX_DELAY ( TickType_t ) 0xffff
|
||||||
#else
|
#else
|
||||||
typedef unsigned int TickType_t;
|
typedef unsigned int TickType_t;
|
||||||
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define portNO_CRITICAL_NESTING 0x0
|
#define portNO_CRITICAL_NESTING ( ( uint32_t ) 0 )
|
||||||
#define portSTACK_GROWTH ( -1 )
|
#define portSTACK_GROWTH ( -1 )
|
||||||
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
#define portTICK_PERIOD_MS ( ( TickType_t ) 1000 / configTICK_RATE_HZ )
|
||||||
#define portBYTE_ALIGNMENT 8
|
#define portBYTE_ALIGNMENT 8
|
||||||
#define portNOP() Asm( "nop_s" );
|
#define portNOP() Asm( "nop_s" );
|
||||||
#define IPM_ENABLE_ALL 1
|
#define IPM_ENABLE_ALL 1
|
||||||
|
|
||||||
#define portYIELD_FROM_ISR() vPortYieldFromIsr()
|
#define portYIELD_FROM_ISR() vPortYieldFromIsr()
|
||||||
#define portYIELD() vPortYield()
|
#define portYIELD() vPortYield()
|
||||||
|
|
||||||
/* Critical section management. */
|
/* Critical section management. */
|
||||||
#define portDISABLE_INTERRUPTS() \
|
#define portDISABLE_INTERRUPTS() \
|
||||||
|
|
Loading…
Reference in a new issue