]> git.sur5r.net Git - freertos/commitdiff
Add Source/portable/ARMClang file that directs users to the GCC port if they which...
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sat, 4 Jan 2020 00:14:18 +0000 (00:14 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Sat, 4 Jan 2020 00:14:18 +0000 (00:14 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2797 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Source/portable/ARMClang/Use-the-GCC-ports.txt [new file with mode: 0644]
FreeRTOS/Source/portable/GCC/ARM_CM3/portmacro.h
FreeRTOS/Source/portable/GCC/RISC-V/port.c

diff --git a/FreeRTOS/Source/portable/ARMClang/Use-the-GCC-ports.txt b/FreeRTOS/Source/portable/ARMClang/Use-the-GCC-ports.txt
new file mode 100644 (file)
index 0000000..4a23ecd
--- /dev/null
@@ -0,0 +1,2 @@
+The FreeRTOS GCC port layer also builds and works with the ARMClang compiler.\r
+To use the ARMClang compiler build the port files from FreeRTOS/Source/portable/GCC.
\ No newline at end of file
index a2462273b684cce54db923703a48ae4a2128eedb..dae91427ba8295077c67546c18ea9b7faa75e0a2 100644 (file)
@@ -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))\r
 #endif\r
 \r
        #define portFORCE_INLINE inline __attribute__(( always_inline))\r
 #endif\r
 \r
+/*-----------------------------------------------------------*/\r
+\r
 portFORCE_INLINE static BaseType_t xPortIsInsideInterrupt( void )\r
 {\r
 uint32_t ulCurrentInterrupt;\r
 portFORCE_INLINE static BaseType_t xPortIsInsideInterrupt( void )\r
 {\r
 uint32_t ulCurrentInterrupt;\r
index 652a8071ec036fbe9d7f08fc4279cd8d4f06d55a..ff72e4755388a5ad9a03356db106c38dad0a04f6 100644 (file)
@@ -82,9 +82,9 @@ void vPortSetupTimerInterrupt( void ) __attribute__(( weak ));
 /* Used to program the machine timer compare register. */\r
 uint64_t ullNextTime = 0ULL;\r
 const uint64_t *pullNextTime = &ullNextTime;\r
 /* Used to program the machine timer compare register. */\r
 uint64_t ullNextTime = 0ULL;\r
 const uint64_t *pullNextTime = &ullNextTime;\r
-const size_t uxTimerIncrementsForOneTick = ( size_t ) ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ); /* Assumes increment won't go over 32-bits. */\r
-volatile uint64_t * const pullMachineTimerCompareRegisterBase = ( volatile uint64_t * const ) ( configCLINT_BASE_ADDRESS + 0x4000 );\r
-volatile uint64_t * pullMachineTimerCompareRegister = 0;\r
+const size_t uxTimerIncrementsForOneTick = ( size_t ) ( ( configCPU_CLOCK_HZ ) / ( configTICK_RATE_HZ ) ); /* Assumes increment won't go over 32-bits. */\r
+uint32_t const ullMachineTimerCompareRegisterBase = ( uint64_t const ) ( ( configCLINT_BASE_ADDRESS ) + 0x4000 );\r
+volatile uint64_t * pullMachineTimerCompareRegister = NULL;\r
 \r
 /* Set configCHECK_FOR_STACK_OVERFLOW to 3 to add ISR stack checking to task\r
 stack checking.  A problem in the ISR stack will trigger an assert, not call the\r
 \r
 /* Set configCHECK_FOR_STACK_OVERFLOW to 3 to add ISR stack checking to task\r
 stack checking.  A problem in the ISR stack will trigger an assert, not call the\r
@@ -115,10 +115,10 @@ task stack, not the ISR stack). */
        uint32_t ulCurrentTimeHigh, ulCurrentTimeLow;\r
        volatile uint32_t * const pulTimeHigh = ( volatile uint32_t * const ) ( configCLINT_BASE_ADDRESS + 0xBFFC );\r
        volatile uint32_t * const pulTimeLow = ( volatile uint32_t * const ) ( configCLINT_BASE_ADDRESS + 0xBFF8 );\r
        uint32_t ulCurrentTimeHigh, ulCurrentTimeLow;\r
        volatile uint32_t * const pulTimeHigh = ( volatile uint32_t * const ) ( configCLINT_BASE_ADDRESS + 0xBFFC );\r
        volatile uint32_t * const pulTimeLow = ( volatile uint32_t * const ) ( configCLINT_BASE_ADDRESS + 0xBFF8 );\r
-       volatile uint32_t ulHartId = 0;\r
+       volatile uint32_t ulHartId;\r
 \r
                __asm volatile( "csrr %0, mhartid" : "=r"( ulHartId ) );\r
 \r
                __asm volatile( "csrr %0, mhartid" : "=r"( ulHartId ) );\r
-               pullMachineTimerCompareRegister  = &( pullMachineTimerCompareRegisterBase[ ulHartId ] );\r
+               pullMachineTimerCompareRegister  = ( volatile uint64_t * ) ( ullMachineTimerCompareRegisterBase + ( ulHartId * sizeof( uint64_t ) ) );\r
 \r
                do\r
                {\r
 \r
                do\r
                {\r