mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Fix build with modern GCC (#933)
* GCC: MSP430F449: Add missing attributes Apparently at some point in the past, GCC (or TI's GCC) used to define these attributes. Define them ourselves so that we can compile the demo application. * GCC: MSP430F449: Make interrupts return void If a return type of a function is not specified, it defaults to int. Set the return type of interrupts to void to avoid warnings. * GCC: MSP430F449: Define portPOINTER_SIZE_TYPE portPOINTER_SIZE_TYPE defaults to uint32_t if undefined. Define it to uint16_t, which is correct for this port.
This commit is contained in:
parent
4e7ca2d704
commit
ec93432a59
|
@ -296,8 +296,8 @@ static void prvSetupTimerInterrupt( void )
|
||||||
* the context is saved at the start of vPortYieldFromTick(). The tick
|
* the context is saved at the start of vPortYieldFromTick(). The tick
|
||||||
* count is incremented after the context is saved.
|
* count is incremented after the context is saved.
|
||||||
*/
|
*/
|
||||||
interrupt( TIMERA0_VECTOR ) prvTickISR( void ) __attribute__( ( naked ) );
|
interrupt( TIMERA0_VECTOR ) void prvTickISR( void ) __attribute__( ( naked ) );
|
||||||
interrupt( TIMERA0_VECTOR ) prvTickISR( void )
|
interrupt( TIMERA0_VECTOR ) void prvTickISR( void )
|
||||||
{
|
{
|
||||||
/* Save the context of the interrupted task. */
|
/* Save the context of the interrupted task. */
|
||||||
portSAVE_CONTEXT();
|
portSAVE_CONTEXT();
|
||||||
|
@ -320,8 +320,8 @@ static void prvSetupTimerInterrupt( void )
|
||||||
* tick count. We don't need to switch context, this can only be done by
|
* tick count. We don't need to switch context, this can only be done by
|
||||||
* manual calls to taskYIELD();
|
* manual calls to taskYIELD();
|
||||||
*/
|
*/
|
||||||
interrupt( TIMERA0_VECTOR ) prvTickISR( void );
|
interrupt( TIMERA0_VECTOR ) void prvTickISR( void );
|
||||||
interrupt( TIMERA0_VECTOR ) prvTickISR( void )
|
interrupt( TIMERA0_VECTOR ) void prvTickISR( void )
|
||||||
{
|
{
|
||||||
xTaskIncrementTick();
|
xTaskIncrementTick();
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
#define portSHORT int
|
#define portSHORT int
|
||||||
#define portSTACK_TYPE uint16_t
|
#define portSTACK_TYPE uint16_t
|
||||||
#define portBASE_TYPE short
|
#define portBASE_TYPE short
|
||||||
|
#define portPOINTER_SIZE_TYPE uint16_t
|
||||||
|
|
||||||
typedef portSTACK_TYPE StackType_t;
|
typedef portSTACK_TYPE StackType_t;
|
||||||
typedef short BaseType_t;
|
typedef short BaseType_t;
|
||||||
|
@ -118,6 +119,11 @@ extern void vPortYield( void ) __attribute__( ( naked ) );
|
||||||
#define portBYTE_ALIGNMENT 2
|
#define portBYTE_ALIGNMENT 2
|
||||||
#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 )
|
||||||
|
|
||||||
|
/* GCC used to define these but doesn't any more */
|
||||||
|
#define interrupt(vector) __attribute__((__interrupt__(vector)))
|
||||||
|
#define wakeup __attribute__((__wakeup__))
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Task function macros as described on the FreeRTOS.org WEB site. */
|
/* Task function macros as described on the FreeRTOS.org WEB site. */
|
||||||
|
|
Loading…
Reference in a new issue