Fix IAR GCC buid not to use trace (#895)

* Fix IAR GCC build for Qemu MPS2

* Add removed file

* set trace facility to none
pull/896/head
alfred gedeon 2 years ago committed by GitHub
parent 101c263371
commit db1ac5f63f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 !!!!

@ -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;
}

Loading…
Cancel
Save