summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralfred gedeon <28123637+alfred2g@users.noreply.github.com>2022-12-06 10:37:23 -0800
committerGitHub <noreply@github.com>2022-12-06 10:37:23 -0800
commitdb1ac5f63f0ff58c2c25aa49077272cc23d7fc52 (patch)
tree92703f56ef7fd6cfe6520d9dd88ef596ab43b3da
parent101c263371f5e062d52b8fae5abfb65633ecb32d (diff)
downloadfreertos-git-db1ac5f63f0ff58c2c25aa49077272cc23d7fc52.tar.gz
Fix IAR GCC buid not to use trace (#895)
* Fix IAR GCC build for Qemu MPS2 * Add removed file * set trace facility to none
-rw-r--r--FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/FreeRTOSConfig.h12
-rw-r--r--FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/main.c41
2 files changed, 3 insertions, 50 deletions
diff --git a/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/FreeRTOSConfig.h b/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/FreeRTOSConfig.h
index ed8471da2..0972b7773 100644
--- a/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/FreeRTOSConfig.h
+++ b/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/FreeRTOSConfig.h
@@ -39,14 +39,8 @@
* See http://www.freertos.org/a00110.html
*----------------------------------------------------------*/
-#define configUSE_TRACE_FACILITY 1
-#define configGENERATE_RUN_TIME_STATS 1
-
-void vConfigureTimerForRunTimeStats( void );
-unsigned long ulGetRunTimeCounterValue( void );
-
-#define portCONFIGURE_TIMER_FOR_RUN_TIME_STATS() vConfigureTimerForRunTimeStats( )
-#define portGET_RUN_TIME_COUNTER_VALUE() ulGetRunTimeCounterValue()
+#define configUSE_TRACE_FACILITY 0
+#define configGENERATE_RUN_TIME_STATS 0
#define configUSE_TICKLESS_IDLE 0
#define configUSE_PREEMPTION 1
@@ -103,7 +97,7 @@ to exclude the API function. */
format the raw data provided by the uxTaskGetSystemState() function in to human
readable ASCII form. See the notes in the implementation of vTaskList() within
FreeRTOS/Source/tasks.c for limitations. */
-#define configUSE_STATS_FORMATTING_FUNCTIONS 1
+#define configUSE_STATS_FORMATTING_FUNCTIONS 0
#define configKERNEL_INTERRUPT_PRIORITY ( 255 ) /* All eight bits as QEMU doesn't model the priority bits. */
/* !!!! configMAX_SYSCALL_INTERRUPT_PRIORITY must not be set to zero !!!!
diff --git a/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/main.c b/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/main.c
index d27e53f19..c53fe00c6 100644
--- a/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/main.c
+++ b/FreeRTOS/Demo/CORTEX_MPS2_QEMU_IAR_GCC/main.c
@@ -50,8 +50,6 @@
#include "FreeRTOS.h"
#include "task.h"
-#include "CMSDK_CM3.h"
-
/* Standard includes. */
#include <stdio.h>
#include <string.h>
@@ -77,11 +75,6 @@ required UART registers. */
#define UART0_BAUDDIV ( * ( ( ( volatile uint32_t * )( UART0_ADDRESS + 16UL ) ) ) )
#define TX_BUFFER_MASK ( 1UL )
-#define TIMER_POSTSCALER ( 8UL )
-
-/* Time at start of day (in ns). */
-static volatile unsigned long ulRunTimeOverflowCount = 0U;
-
/*
* main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.
* main_full() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 0.
@@ -108,7 +101,6 @@ void main( void )
/* See https://www.freertos.org/freertos-on-qemu-mps2-an385-model.html for
instructions. */
-
/* Hardware initialisation. printf() output uses the UART for IO. */
prvUARTInit();
@@ -314,37 +306,4 @@ void *malloc( size_t size )
for( ;; );
}
-/*-----------------------------------------------------------*/
-
-void vConfigureTimerForRunTimeStats( void )
-{
- /* PCLK / SystemCoreClock is 25MHz, Timer clock is always PCLK */
-
- CMSDK_TIMER0->CTRL &= ~( CMSDK_TIMER_CTRL_EN_Msk );
-
- CMSDK_TIMER0->RELOAD = 0xFFFFFFFF;
-
- /* Enable overflow interrupt and start the timer */
- CMSDK_TIMER0->CTRL |= CMSDK_TIMER_CTRL_IRQEN_Msk;
- CMSDK_TIMER0->CTRL |= CMSDK_TIMER_CTRL_EN_Msk;
-
-}
-/*-----------------------------------------------------------*/
-
-unsigned long ulGetRunTimeCounterValue( void )
-{
- unsigned long ulTimerValue = CMSDK_TIMER0->RELOAD - CMSDK_TIMER0->VALUE;
-
- /*
- * 32 bits will overflow after ~ ( 2**32 / 25000000 ) == 171 seconds,
- * So we remove the lower 8 bits and borrow 8 bits from the overflow counter.
- */
-
- ulTimerValue = ( ulTimerValue >> TIMER_POSTSCALER );
-
- /* Add remaining 8 bits from ulRunTimeOverflowCount */
- ulTimerValue |= ( ulRunTimeOverflowCount << ( 32UL - TIMER_POSTSCALER ) );
-
- return ulTimerValue;
-}