]> git.sur5r.net Git - freertos/commitdiff
Update Freedom Studio RISC-V demo for the latest GCC RISC-V port - not yet tested.
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 27 Dec 2018 04:34:08 +0000 (04:34 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Thu, 27 Dec 2018 04:34:08 +0000 (04:34 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2612 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.cproject
FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/.settings/language.settings.xml
FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/FreeRTOSConfig.h
FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/Hardware_Qemu.launch
FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/freedom-e-sdk/env/freedom-e300-hifive1/flash.lds
FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/full_demo/main_full.c
FreeRTOS/Demo/RISC-V-Qemu-sifive_e-FreedomStudio/main.c

index 31d9f3fbd35ef1c3cd54f071ca428ed09d558f9d..67f12793c5bcb80314d172a0f1cffe728a21105e 100644 (file)
@@ -23,8 +23,8 @@
                                                        <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.383399415" name="Optimization Level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level" useByScannerDiscovery="true" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.none" valueType="enumerated"/>\r
                                                        <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength.178339006" name="Message length (-fmessage-length=0)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength" useByScannerDiscovery="true" value="false" valueType="boolean"/>\r
                                                        <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar.119459497" name="'char' is signed (-fsigned-char)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar" useByScannerDiscovery="true" value="false" valueType="boolean"/>\r
-                                                       <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections.735578493" name="Function sections (-ffunction-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections" useByScannerDiscovery="true" value="false" valueType="boolean"/>\r
-                                                       <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections.663648478" name="Data sections (-fdata-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections" useByScannerDiscovery="true" value="false" valueType="boolean"/>\r
+                                                       <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections.735578493" name="Function sections (-ffunction-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections" useByScannerDiscovery="true" value="true" valueType="boolean"/>\r
+                                                       <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections.663648478" name="Data sections (-fdata-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections" useByScannerDiscovery="true" value="true" valueType="boolean"/>\r
                                                        <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level.33211902" name="Debug level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level" useByScannerDiscovery="true" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level.max" valueType="enumerated"/>\r
                                                        <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format.1212459035" name="Debug format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format" useByScannerDiscovery="true"/>\r
                                                        <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name.2118228106" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name" useByScannerDiscovery="false" value="RISC-V GCC/Newlib" valueType="string"/>\r
                                                                <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor.874608690" name="Use preprocessor" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor" useByScannerDiscovery="false" value="true" valueType="boolean"/>\r
                                                                <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.include.paths.545620458" name="Include paths (-I)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.include.paths" useByScannerDiscovery="true" valueType="includePath">\r
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freedom-e-sdk/env}&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/FreeRTOS_Source/portable/GCC/RISC-V-RV32/CLINT_no_extensions}&quot;"/>\r
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freedom-e-sdk/include}&quot;"/>\r
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freedom-e-sdk/env/freedom-e300-hifive1}&quot;"/>\r
                                                                        <listOptionValue builtIn="false" value="&quot;${workspace_loc:/${ProjName}/freedom-e-sdk/drivers}&quot;"/>\r
                                                                </option>\r
                                                                <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.other.855588508" name="Other assembler flags" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.other" useByScannerDiscovery="false" value="-c" valueType="string"/>\r
+                                                               <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.flags.179185022" name="Assembler flags" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.flags" useByScannerDiscovery="false" valueType="stringList"/>\r
+                                                               <option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.defs.1636772541" name="Defined symbols (-D)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.defs" useByScannerDiscovery="true" valueType="definedSymbols">\r
+                                                                       <listOptionValue builtIn="false" value="portasmHANDLE_INTERRUPT=handle_trap"/>\r
+                                                               </option>\r
                                                                <inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input.1208356864" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input"/>\r
                                                        </tool>\r
                                                        <tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.1632260763" name="GNU RISC-V Cross C Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler">\r
index 59b35b22e24bff2dd7b6eb8115cc38fcc8748dae..d1fe8090645b01119060c98fcd0590df39f390c8 100644 (file)
@@ -5,7 +5,7 @@
                        <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>\r
                        <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>\r
                        <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
-                       <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1662098508467853022" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">\r
+                       <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1445704774232250253" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">\r
                                <language-scope id="org.eclipse.cdt.core.gcc"/>\r
                                <language-scope id="org.eclipse.cdt.core.g++"/>\r
                        </provider>\r
@@ -16,7 +16,7 @@
                        <provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>\r
                        <provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>\r
                        <provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>\r
-                       <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="-1671468065510502376" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">\r
+                       <provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuiltinSpecsDetector" console="false" env-hash="1449619206437459651" id="ilg.gnumcueclipse.managedbuild.cross.riscv.GCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT RISC-V Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} ${cross_toolchain_flags} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">\r
                                <language-scope id="org.eclipse.cdt.core.gcc"/>\r
                                <language-scope id="org.eclipse.cdt.core.g++"/>\r
                        </provider>\r
index db200a51997b465239404ce8baf090871759623a..ec696dba37d74752c55792a9f431c20f1d2fea83 100644 (file)
@@ -91,8 +91,8 @@
 #define configUSE_TICK_HOOK                            1\r
 #define configCPU_CLOCK_HZ                             ( 10000000 ) /*QEMU*/\r
 #define configTICK_RATE_HZ                             ( ( TickType_t ) 1000 )\r
-#define configMAX_PRIORITIES                   ( 5 )\r
-#define configMINIMAL_STACK_SIZE               ( ( unsigned short ) 85 )\r
+#define configMAX_PRIORITIES                   ( 7 )\r
+#define configMINIMAL_STACK_SIZE               ( ( unsigned short ) 95 )\r
 #define configTOTAL_HEAP_SIZE                  ( ( size_t ) 14300 )\r
 #define configMAX_TASK_NAME_LEN                        ( 16 )\r
 #define configUSE_TRACE_FACILITY               0\r
 /* Software timer definitions. */\r
 #define configUSE_TIMERS                               1\r
 #define configTIMER_TASK_PRIORITY              ( configMAX_PRIORITIES - 1 )\r
-#define configTIMER_QUEUE_LENGTH               7\r
+#define configTIMER_QUEUE_LENGTH               4\r
 #define configTIMER_TASK_STACK_DEPTH   ( 120 )\r
 \r
 /* Task priorities.  Allow these to be overridden. */\r
@@ -142,11 +142,12 @@ void vAssertCalled( void );
 /* Overwrite some of the stack sizes allocated to various test and demo tasks.\r
 Like all task stack sizes, the value is the number of words, not bytes. */\r
 #define configTIMER_TEST_TASK_STACK_SIZE 150\r
-#define configNOTIFIED_TEST_TASK_STACK_SIZE 120\r
+#define configNOTIFIED_TEST_TASK_STACK_SIZE 130\r
 #define configEVENT_GROUP_SET_BIT_TEST_TASK_STACK_SIZE 110\r
 #define configEVENT_GROUP_RENDEZVOUS_TASK_STACK_SIZE 100\r
-#define configRECURSIVE_MUTEX_TASK_STACK_SIZE 100\r
+#define configRECURSIVE_MUTEX_TASK_STACK_SIZE 110\r
+#define configBLOCK_TIME_TEST_TASK_STACK_SIZE 110\r
 \r
-#define configUSE_PORT_OPTIMISED_TASK_SELECTION 0\r
+#define configUSE_PORT_OPTIMISED_TASK_SELECTION 1\r
 \r
 #endif /* FREERTOS_CONFIG_H */\r
index 89bc2659e2e105a21f7f894efc346e056eca02f0..b4866b838449b1fad2ad6d17eb40782f47773ace 100644 (file)
@@ -39,6 +39,6 @@
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">\r
 <listEntry value="4"/>\r
 </listAttribute>\r
-<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;/&gt;&#13;&#10;"/>\r
+<stringAttribute key="org.eclipse.dsf.launch.MEMORY_BLOCKS" value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;no&quot;?&gt;&#13;&#10;&lt;memoryBlockExpressionList context=&quot;reserved-for-future-use&quot;&gt;&#13;&#10;&lt;gdbmemoryBlockExpression address=&quot;2147486760&quot; label=&quot;0x80000c28&quot;/&gt;&#13;&#10;&lt;/memoryBlockExpressionList&gt;&#13;&#10;"/>\r
 <stringAttribute key="process_factory_id" value="org.eclipse.cdt.dsf.gdb.GdbProcessFactory"/>\r
 </launchConfiguration>\r
index abb818be24cea0b553df0c6134420e7953e1403b..0b7e75491c4b4bd6a295c6266169840dbf35fce1 100644 (file)
@@ -157,5 +157,6 @@ SECTIONS
     PROVIDE( _heap_end = . );\r
     . = __stack_size;\r
     PROVIDE( _sp = . );\r
+    __freertos_irq_stack_top = .;\r
   } >ram AT>ram :ram\r
 }\r
index 5981a38e9f425204006f66d7ba3d6924054dfa08..eeaab9d7154bc7876b19db00668561a2caa45965 100644 (file)
@@ -101,10 +101,10 @@ purpose of ensuring parameters are passed into tasks correctl5. */
 \r
 /* The size of the stack allocated to the check task (as described in the\r
 comments at the top of this file. */\r
-#define mainCHECK_TASK_STACK_SIZE_WORDS 100\r
+#define mainCHECK_TASK_STACK_SIZE_WORDS 110\r
 \r
 /* Size of the stacks to allocated for the register check tasks. */\r
-#define mainREG_TEST_STACK_SIZE_WORDS 60\r
+#define mainREG_TEST_STACK_SIZE_WORDS 70\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -155,8 +155,8 @@ void main_full( void )
        vCreateBlockTimeTasks();\r
        vStartGenericQueueTasks( tskIDLE_PRIORITY );\r
        vStartRecursiveMutexTasks();\r
-       vStartTimerDemoTask( mainTIMER_TEST_PERIOD );\r
-       vStartEventGroupTasks();\r
+//     vStartTimerDemoTask( mainTIMER_TEST_PERIOD );\r
+//     vStartEventGroupTasks();\r
        vStartTaskNotifyTask();\r
 \r
        /* Create the register check tasks, as described at the top of this     file.\r
@@ -194,7 +194,7 @@ const TickType_t xDelayPeriod = mainNO_ERROR_CHECK_TASK_PERIOD;
 TickType_t xLastExecutionTime;\r
 static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
 const char * const pcPassMessage = "Pass.\r\n";\r
-char * pcStatusMessage = pcPassMessage;\r
+const char * pcStatusMessage = pcPassMessage;\r
 \r
        /* Just to stop compiler warnings. */\r
        ( void ) pvParameters;\r
@@ -243,7 +243,7 @@ char * pcStatusMessage = pcPassMessage;
 \r
                if( xAreEventGroupTasksStillRunning() != pdPASS )\r
                {\r
-                       pcStatusMessage = "ERROR: Event group demo/tests.\r\n";\r
+//                     pcStatusMessage = "ERROR: Event group demo/tests.\r\n";\r
                }\r
 \r
                if( xAreTaskNotificationTasksStillRunning() != pdPASS )\r
@@ -312,6 +312,6 @@ void vFullDemoTickHook( void )
        /* Called from vApplicationTickHook() when the project is configured to\r
        build the full demo. */\r
 //     vTimerPeriodicISRTests();\r
-       vPeriodicEventGroupsProcessing();\r
+//     vPeriodicEventGroupsProcessing();\r
        xNotifyTaskFromISR();\r
 }\r
index 0c970d96a30dd4d236ebdfd88784fbede180c7be..ec5fd76245c68d0af7ec17ac82cf93d24bd6e421 100644 (file)
@@ -48,7 +48,7 @@
 \r
 /* Set mainCREATE_SIMPLE_BLINKY_DEMO_ONLY to one to run the simple blinky demo,\r
 or 0 to run the more comprehensive test and demo application. */\r
-#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY     0\r
+#define mainCREATE_SIMPLE_BLINKY_DEMO_ONLY     1\r
 \r
 /*\r
  * main_blinky() is used when mainCREATE_SIMPLE_BLINKY_DEMO_ONLY is set to 1.\r
@@ -145,7 +145,12 @@ void vApplicationTickHook( void )
 \r
 void vAssertCalled( void )\r
 {\r
+volatile uint32_t ulSetTo1ToExitFunction = 0;\r
+\r
        taskDISABLE_INTERRUPTS();\r
 //     __asm volatile( "ebreak" );\r
-       for( ;; );\r
+       while( ulSetTo1ToExitFunction != 1 )\r
+       {\r
+               __asm volatile( "NOP" );\r
+       }\r
 }\r