Skip to content

Commit 1d8df47

Browse files
Update Renesas GCC compiler ports (#135)
* Add RX200 GCC compiler Signed-off-by: Dinh Van Nam <vannam.dinh.xt@renesas.com> * Update GCC compiler for: * RX600v2 * RX600 * RX100 Signed-off-by: Dinh Van Nam <vannam.dinh.xt@renesas.com> * Use configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H flag * Use configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H flag RX100, RX200 Co-authored-by: Dinh Van Nam <vannam.dinh.xt@renesas.com>
1 parent 0afc048 commit 1d8df47

File tree

8 files changed

+689
-12
lines changed

8 files changed

+689
-12
lines changed

portable/GCC/RX100/port.c

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,15 @@
4040
#include "string.h"
4141

4242
/* Hardware specifics. */
43-
#include "iodefine.h"
43+
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
4444

45+
#include "platform.h"
46+
47+
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
48+
49+
#include "iodefine.h"
50+
51+
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
4552
/*-----------------------------------------------------------*/
4653

4754
/* Tasks should start with interrupts enabled and in Supervisor mode, therefore
@@ -89,12 +96,31 @@ static void prvStartFirstTask( void ) __attribute__((naked));
8996
* restoring of registers). Written in asm code as direct register access is
9097
* required.
9198
*/
92-
void vPortSoftwareInterruptISR( void ) __attribute__((naked));
99+
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
100+
101+
R_BSP_PRAGMA_INTERRUPT( vSoftwareInterruptISR, VECT( ICU, SWINT ) )
102+
R_BSP_ATTRIB_INTERRUPT void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );
103+
104+
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
105+
106+
void vSoftwareInterruptISR( void ) __attribute__( ( naked ) );
107+
108+
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
93109

94110
/*
95-
* The tick interrupt handler.
111+
* The tick ISR handler. The peripheral used is configured by the application
112+
* via a hook/callback function.
96113
*/
97-
void vPortTickISR( void ) __attribute__((interrupt));
114+
#if ( configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H == 1 )
115+
116+
R_BSP_PRAGMA_INTERRUPT( vTickISR, _VECT( configTICK_VECTOR ) )
117+
R_BSP_ATTRIB_INTERRUPT void vTickISR( void ); /* Do not add __attribute__( ( interrupt ) ). */
118+
119+
#else /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
120+
121+
void vTickISR( void ) __attribute__( ( interrupt ) );
122+
123+
#endif /* configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H */
98124

99125
/*
100126
* Sets up the periodic ISR used for the RTOS tick using the CMT.

portable/GCC/RX100/portmacro.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ extern "C" {
4242
* These settings should not be altered.
4343
*-----------------------------------------------------------
4444
*/
45+
/* When the FIT configurator or the Smart Configurator is used, platform.h has to be
46+
* used. */
47+
#ifndef configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H
48+
#define configINCLUDE_PLATFORM_H_INSTEAD_OF_IODEFINE_H 0
49+
#endif
4550

4651
/* Type definitions - these are a bit legacy and not really used now, other than
4752
portSTACK_TYPE and portBASE_TYPE. */

0 commit comments

Comments
 (0)