From: rtel Date: Thu, 27 Dec 2018 04:34:08 +0000 (+0000) Subject: Update Freedom Studio RISC-V demo for the latest GCC RISC-V port - not yet tested. X-Git-Tag: V10.2.0~30 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=682d9d8faef12d6fb00a6d844101a86bd5784ae7;p=freertos Update Freedom Studio RISC-V demo for the latest GCC RISC-V port - not yet tested. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2612 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.cproject b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.cproject index 31d9f3fbd..67f12793c 100644 --- a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.cproject +++ b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.cproject @@ -23,8 +23,8 @@ diff --git a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.settings/language.settings.xml b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.settings/language.settings.xml index 59b35b22e..d1fe80906 100644 --- a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.settings/language.settings.xml +++ b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.settings/language.settings.xml @@ -5,7 +5,7 @@ - + @@ -16,7 +16,7 @@ - + diff --git a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/FreeRTOSConfig.h b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/FreeRTOSConfig.h index db200a519..ec696dba3 100644 --- a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/FreeRTOSConfig.h +++ b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/FreeRTOSConfig.h @@ -91,8 +91,8 @@ #define configUSE_TICK_HOOK 1 #define configCPU_CLOCK_HZ ( 10000000 ) /*QEMU*/ #define configTICK_RATE_HZ ( ( TickType_t ) 1000 ) -#define configMAX_PRIORITIES ( 5 ) -#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 85 ) +#define configMAX_PRIORITIES ( 7 ) +#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 95 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) 14300 ) #define configMAX_TASK_NAME_LEN ( 16 ) #define configUSE_TRACE_FACILITY 0 @@ -114,7 +114,7 @@ /* Software timer definitions. */ #define configUSE_TIMERS 1 #define configTIMER_TASK_PRIORITY ( configMAX_PRIORITIES - 1 ) -#define configTIMER_QUEUE_LENGTH 7 +#define configTIMER_QUEUE_LENGTH 4 #define configTIMER_TASK_STACK_DEPTH ( 120 ) /* Task priorities. Allow these to be overridden. */ @@ -142,11 +142,12 @@ void vAssertCalled( void ); /* Overwrite some of the stack sizes allocated to various test and demo tasks. Like all task stack sizes, the value is the number of words, not bytes. */ #define configTIMER_TEST_TASK_STACK_SIZE 150 -#define configNOTIFIED_TEST_TASK_STACK_SIZE 120 +#define configNOTIFIED_TEST_TASK_STACK_SIZE 130 #define configEVENT_GROUP_SET_BIT_TEST_TASK_STACK_SIZE 110 #define configEVENT_GROUP_RENDEZVOUS_TASK_STACK_SIZE 100 -#define configRECURSIVE_MUTEX_TASK_STACK_SIZE 100 +#define configRECURSIVE_MUTEX_TASK_STACK_SIZE 110 +#define configBLOCK_TIME_TEST_TASK_STACK_SIZE 110 -#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0 +#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1 #endif /* FREERTOS_CONFIG_H */ diff --git a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/Hardware_Qemu.launch b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/Hardware_Qemu.launch index 89bc2659e..b4866b838 100644 --- a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/Hardware_Qemu.launch +++ b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/Hardware_Qemu.launch @@ -39,6 +39,6 @@ - + diff --git a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/freedom-e-sdk/env/freedom-e300-hifive1/flash.lds b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/freedom-e-sdk/env/freedom-e300-hifive1/flash.lds index abb818be2..0b7e75491 100644 --- a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/freedom-e-sdk/env/freedom-e300-hifive1/flash.lds +++ b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/freedom-e-sdk/env/freedom-e300-hifive1/flash.lds @@ -157,5 +157,6 @@ SECTIONS PROVIDE( _heap_end = . ); . = __stack_size; PROVIDE( _sp = . ); + __freertos_irq_stack_top = .; } >ram AT>ram :ram } diff --git a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/full_demo/main_full.c b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/full_demo/main_full.c index 5981a38e9..eeaab9d71 100644 --- a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/full_demo/main_full.c +++ b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/full_demo/main_full.c @@ -101,10 +101,10 @@ purpose of ensuring parameters are passed into tasks correctl5. */ /* The size of the stack allocated to the check task (as described in the comments at the top of this file. */ -#define mainCHECK_TASK_STACK_SIZE_WORDS 100 +#define mainCHECK_TASK_STACK_SIZE_WORDS 110 /* Size of the stacks to allocated for the register check tasks. */ -#define mainREG_TEST_STACK_SIZE_WORDS 60 +#define mainREG_TEST_STACK_SIZE_WORDS 70 /*-----------------------------------------------------------*/ @@ -155,8 +155,8 @@ void main_full( void ) vCreateBlockTimeTasks(); vStartGenericQueueTasks( tskIDLE_PRIORITY ); vStartRecursiveMutexTasks(); - vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); - vStartEventGroupTasks(); +// vStartTimerDemoTask( mainTIMER_TEST_PERIOD ); +// vStartEventGroupTasks(); vStartTaskNotifyTask(); /* Create the register check tasks, as described at the top of this file. @@ -194,7 +194,7 @@ const TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD; TickType_t xLastExecutionTime; static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0; const char * const pcPassMessage = "Pass.\r\n"; -char * pcStatusMessage = pcPassMessage; +const char * pcStatusMessage = pcPassMessage; /* Just to stop compiler warnings. */ ( void ) pvParameters; @@ -243,7 +243,7 @@ char * pcStatusMessage = pcPassMessage; if( xAreEventGroupTasksStillRunning() != pdPASS ) { - pcStatusMessage = "ERROR: Event group demo/tests.\r\n"; +// pcStatusMessage = "ERROR: Event group demo/tests.\r\n"; } if( xAreTaskNotificationTasksStillRunning() != pdPASS ) @@ -312,6 +312,6 @@ void vFullDemoTickHook( void ) /* Called from vApplicationTickHook() when the project is configured to build the full demo. */ // vTimerPeriodicISRTests(); - vPeriodicEventGroupsProcessing(); +// vPeriodicEventGroupsProcessing(); xNotifyTaskFromISR(); } diff --git a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/main.c b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/main.c index 0c970d96a..ec5fd7624 100644 --- a/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/main.c +++ b/FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/main.c @@ -48,7 +48,7 @@ /* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo, or 0 to run the more comprehensive test and demo application. */ -#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 0 +#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY 1 /* * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1. @@ -145,7 +145,12 @@ void vApplicationTickHook( void ) void vAssertCalled( void ) { +volatile uint32_t ulSetTo1ToExitFunction = 0; + taskDISABLE_INTERRUPTS(); // __asm volatile( "ebreak" ); - for( ;; ); + while( ulSetTo1ToExitFunction != 1 ) + { + __asm volatile( "NOP" ); + } }