mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Add Source/portable/ARMClang file that directs users to the GCC port if they which to use the ARMClang compiler.
This commit is contained in:
parent
881958514b
commit
eaf9318df8
2
FreeRTOS/Source/portable/ARMClang/Use-the-GCC-ports.txt
Normal file
2
FreeRTOS/Source/portable/ARMClang/Use-the-GCC-ports.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
The FreeRTOS GCC port layer also builds and works with the ARMClang compiler.
|
||||||
|
To use the ARMClang compiler build the port files from FreeRTOS/Source/portable/GCC.
|
|
@ -166,6 +166,8 @@ not necessary for to use this port. They are defined so the common demo files
|
||||||
#define portFORCE_INLINE inline __attribute__(( always_inline))
|
#define portFORCE_INLINE inline __attribute__(( always_inline))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
portFORCE_INLINE static BaseType_t xPortIsInsideInterrupt( void )
|
portFORCE_INLINE static BaseType_t xPortIsInsideInterrupt( void )
|
||||||
{
|
{
|
||||||
uint32_t ulCurrentInterrupt;
|
uint32_t ulCurrentInterrupt;
|
||||||
|
|
|
@ -82,9 +82,9 @@ void vPortSetupTimerInterrupt( void ) __attribute__(( weak ));
|
||||||
/* Used to program the machine timer compare register. */
|
/* Used to program the machine timer compare register. */
|
||||||
uint64_t ullNextTime = 0ULL;
|
uint64_t ullNextTime = 0ULL;
|
||||||
const uint64_t *pullNextTime = &ullNextTime;
|
const uint64_t *pullNextTime = &ullNextTime;
|
||||||
const size_t uxTimerIncrementsForOneTick = ( size_t ) ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ); /* Assumes increment won't go over 32-bits. */
|
const size_t uxTimerIncrementsForOneTick = ( size_t ) ( ( configCPU_CLOCK_HZ ) / ( configTICK_RATE_HZ ) ); /* Assumes increment won't go over 32-bits. */
|
||||||
volatile uint64_t * const pullMachineTimerCompareRegisterBase = ( volatile uint64_t * const ) ( configCLINT_BASE_ADDRESS + 0x4000 );
|
uint32_t const ullMachineTimerCompareRegisterBase = ( uint64_t const ) ( ( configCLINT_BASE_ADDRESS ) + 0x4000 );
|
||||||
volatile uint64_t * pullMachineTimerCompareRegister = 0;
|
volatile uint64_t * pullMachineTimerCompareRegister = NULL;
|
||||||
|
|
||||||
/* Set configCHECK_FOR_STACK_OVERFLOW to 3 to add ISR stack checking to task
|
/* Set configCHECK_FOR_STACK_OVERFLOW to 3 to add ISR stack checking to task
|
||||||
stack checking. A problem in the ISR stack will trigger an assert, not call the
|
stack checking. A problem in the ISR stack will trigger an assert, not call the
|
||||||
|
@ -115,10 +115,10 @@ task stack, not the ISR stack). */
|
||||||
uint32_t ulCurrentTimeHigh, ulCurrentTimeLow;
|
uint32_t ulCurrentTimeHigh, ulCurrentTimeLow;
|
||||||
volatile uint32_t * const pulTimeHigh = ( volatile uint32_t * const ) ( configCLINT_BASE_ADDRESS + 0xBFFC );
|
volatile uint32_t * const pulTimeHigh = ( volatile uint32_t * const ) ( configCLINT_BASE_ADDRESS + 0xBFFC );
|
||||||
volatile uint32_t * const pulTimeLow = ( volatile uint32_t * const ) ( configCLINT_BASE_ADDRESS + 0xBFF8 );
|
volatile uint32_t * const pulTimeLow = ( volatile uint32_t * const ) ( configCLINT_BASE_ADDRESS + 0xBFF8 );
|
||||||
volatile uint32_t ulHartId = 0;
|
volatile uint32_t ulHartId;
|
||||||
|
|
||||||
__asm volatile( "csrr %0, mhartid" : "=r"( ulHartId ) );
|
__asm volatile( "csrr %0, mhartid" : "=r"( ulHartId ) );
|
||||||
pullMachineTimerCompareRegister = &( pullMachineTimerCompareRegisterBase[ ulHartId ] );
|
pullMachineTimerCompareRegister = ( volatile uint64_t * ) ( ullMachineTimerCompareRegisterBase + ( ulHartId * sizeof( uint64_t ) ) );
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue