]> rtime.felk.cvut.cz Git - jenkicar/rpp-simulink.git/commitdiff
Changed configuration to match old FreeRTOS settings and some bugs fixed.
authorCarlos Jenkins <carlos@jenkins.co.cr>
Thu, 16 May 2013 14:31:35 +0000 (16:31 +0200)
committerCarlos Jenkins <carlos@jenkins.co.cr>
Thu, 16 May 2013 14:31:35 +0000 (16:31 +0200)
rpp/lib/os/README.txt
rpp/lib/os/include/FreeRTOSConfig.h
rpp/lib/os/include/portable.h
rpp/rpp/rpp_srmain.tlc

index a890c9c3c38f592af8724f9e7163754d4e578cd1..2fe451464a6180c87389883326b177570dfe51e5 100644 (file)
@@ -42,7 +42,7 @@ where they come from.
             <FreeRTOSRoot>/FreeRTOS/Source/portable/MemMang (renamed from heap_4.c)
 
     port.c
-    portASM.c
+    portASM.asm
     include/portmacro.h
 
         -> Originally found in:
index defc010f11f8c7ce79296badb22465f5a0d8939b..5bd4c60bfa82b5f84a9dfd34d120bda30a1c7170 100644 (file)
@@ -89,8 +89,8 @@
 \r
 #define configUSE_PREEMPTION                    1\r
 #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1\r
-#define configUSE_IDLE_HOOK                     1\r
-#define configUSE_TICK_HOOK                     1\r
+#define configUSE_IDLE_HOOK                     0\r
+#define configUSE_TICK_HOOK                     0\r
 #define configUSE_TRACE_FACILITY                0\r
 #define configUSE_16_BIT_TICKS                  0\r
 #define configCPU_CLOCK_HZ                      ( ( unsigned portLONG ) 16000000 ) /* Timer clock. */\r
 #define configMAX_TASK_NAME_LEN                 ( 16 )\r
 #define configIDLE_SHOULD_YIELD                 1\r
 #define configGENERATE_RUN_TIME_STATS           0\r
-#define configUSE_MALLOC_FAILED_HOOK            1\r
-#define configCHECK_FOR_STACK_OVERFLOW          2\r
+#define configUSE_MALLOC_FAILED_HOOK            0\r
+#define configCHECK_FOR_STACK_OVERFLOW          0\r
 \r
 /* Co-routine definitions. */\r
 #define configUSE_CO_ROUTINES                   0\r
 \r
 /* Mutexes */\r
 #define configUSE_MUTEXES                       1\r
-#define configUSE_RECURSIVE_MUTEXES             1\r
+#define configUSE_RECURSIVE_MUTEXES             0\r
 \r
 /* Semaphores */\r
 #define configUSE_COUNTING_SEMAPHORES           1\r
 \r
 /* Timers */\r
-#define configUSE_TIMERS                        1\r
+#define configUSE_TIMERS                        0\r
 #define configTIMER_TASK_PRIORITY               ( 2 )\r
 #define configTIMER_QUEUE_LENGTH                10\r
 #define configTIMER_TASK_STACK_DEPTH            ( 128 )\r
 #define INCLUDE_vTaskDelete                     1\r
 #define INCLUDE_vTaskCleanUpResources           0\r
 #define INCLUDE_vTaskSuspend                    1\r
-#define INCLUDE_xTaskResumeFromISR              1\r
+#define INCLUDE_xTaskResumeFromISR              0\r
 #define INCLUDE_vTaskDelayUntil                 1\r
 #define INCLUDE_vTaskDelay                      1\r
 #define INCLUDE_xTaskGetSchedulerState          1\r
index cd4fa3b523a3f6963d4adcd1cd617bc5f7620b57..43a54598fb3e969b8b62d16f970b1a81eaa3f453 100644 (file)
     ***************************************************************************\r
 \r
 \r
-    http://www.FreeRTOS.org - Documentation, books, training, latest versions, \r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
     license and Real Time Engineers Ltd. contact details.\r
 \r
     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
     including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
     fully thread aware and reentrant UDP/IP stack.\r
 \r
-    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High \r
-    Integrity Systems, who sell the code with commercial support, \r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems, who sell the code with commercial support,\r
     indemnification and middleware, under the OpenRTOS brand.\r
-    \r
-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety \r
-    engineered and independently SIL3 certified version for use in safety and \r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
     mission critical applications that require provable dependability.\r
 */\r
 \r
 \r
 /* Include the macro file relevant to the port being used. */\r
 \r
-#ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT\r
-       #include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"\r
-       typedef void ( __interrupt __far *pxISR )();\r
-#endif\r
-\r
-#ifdef OPEN_WATCOM_FLASH_LITE_186_PORT\r
-       #include "..\..\Source\portable\owatcom\16bitdos\flsh186\portmacro.h"\r
-       typedef void ( __interrupt __far *pxISR )();\r
-#endif\r
-\r
-#ifdef GCC_MEGA_AVR\r
-       #include "../portable/GCC/ATMega323/portmacro.h"\r
-#endif\r
-\r
-#ifdef IAR_MEGA_AVR\r
-       #include "../portable/IAR/ATMega323/portmacro.h"\r
-#endif\r
-\r
-#ifdef MPLAB_PIC24_PORT\r
-       #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
-#endif\r
-\r
-#ifdef MPLAB_DSPIC_PORT\r
-       #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
-#endif\r
-\r
-#ifdef MPLAB_PIC18F_PORT\r
-       #include "..\..\Source\portable\MPLAB\PIC18F\portmacro.h"\r
-#endif\r
-\r
-#ifdef MPLAB_PIC32MX_PORT\r
-       #include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h"\r
-#endif\r
-\r
-#ifdef _FEDPICC\r
-       #include "libFreeRTOS/Include/portmacro.h"\r
-#endif\r
-\r
-#ifdef SDCC_CYGNAL\r
-       #include "../../Source/portable/SDCC/Cygnal/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_ARM7\r
-       #include "../../Source/portable/GCC/ARM7_LPC2000/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_ARM7_ECLIPSE\r
-       #include "portmacro.h"\r
-#endif\r
-\r
-#ifdef ROWLEY_LPC23xx\r
-       #include "../../Source/portable/GCC/ARM7_LPC23xx/portmacro.h"\r
-#endif\r
-\r
-#ifdef IAR_MSP430\r
-       #include "..\..\Source\portable\IAR\MSP430\portmacro.h" \r
-#endif\r
-       \r
-#ifdef GCC_MSP430\r
-       #include "../../Source/portable/GCC/MSP430F449/portmacro.h"\r
-#endif\r
-\r
-#ifdef ROWLEY_MSP430\r
-       #include "../../Source/portable/Rowley/MSP430F449/portmacro.h"\r
-#endif\r
-\r
-#ifdef ARM7_LPC21xx_KEIL_RVDS\r
-       #include "..\..\Source\portable\RVDS\ARM7_LPC21xx\portmacro.h"\r
-#endif\r
-\r
-#ifdef SAM7_GCC\r
-       #include "../../Source/portable/GCC/ARM7_AT91SAM7S/portmacro.h"\r
-#endif\r
-\r
-#ifdef SAM7_IAR\r
-       #include "..\..\Source\portable\IAR\AtmelSAM7S64\portmacro.h"\r
-#endif\r
-\r
-#ifdef SAM9XE_IAR\r
-       #include "..\..\Source\portable\IAR\AtmelSAM9XE\portmacro.h"\r
-#endif\r
-\r
-#ifdef LPC2000_IAR\r
-       #include "..\..\Source\portable\IAR\LPC2000\portmacro.h"\r
-#endif\r
-\r
-#ifdef STR71X_IAR\r
-       #include "..\..\Source\portable\IAR\STR71x\portmacro.h"\r
-#endif\r
-\r
-#ifdef STR75X_IAR\r
-       #include "..\..\Source\portable\IAR\STR75x\portmacro.h"\r
-#endif\r
-       \r
-#ifdef STR75X_GCC\r
-       #include "..\..\Source\portable\GCC\STR75x\portmacro.h"\r
-#endif\r
-\r
-#ifdef STR91X_IAR\r
-       #include "..\..\Source\portable\IAR\STR91x\portmacro.h"\r
-#endif\r
-       \r
-#ifdef GCC_H8S\r
-       #include "../../Source/portable/GCC/H8S2329/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_AT91FR40008\r
-       #include "../../Source/portable/GCC/ARM7_AT91FR40008/portmacro.h"\r
-#endif\r
-\r
-#ifdef RVDS_ARMCM3_LM3S102\r
-       #include "../../Source/portable/RVDS/ARM_CM3/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_ARMCM3_LM3S102\r
-       #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_ARMCM3\r
-       #include "../../Source/portable/GCC/ARM_CM3/portmacro.h"\r
-#endif\r
-\r
-#ifdef IAR_ARM_CM3\r
-       #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
-#endif\r
-\r
-#ifdef IAR_ARMCM3_LM\r
-       #include "../../Source/portable/IAR/ARM_CM3/portmacro.h"\r
-#endif\r
-       \r
-#ifdef HCS12_CODE_WARRIOR\r
-       #include "../../Source/portable/CodeWarrior/HCS12/portmacro.h"\r
-#endif \r
-\r
-#ifdef MICROBLAZE_GCC\r
-       #include "../../Source/portable/GCC/MicroBlaze/portmacro.h"\r
-#endif\r
-\r
-#ifdef TERN_EE\r
-       #include "..\..\Source\portable\Paradigm\Tern_EE\small\portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_HCS12\r
-       #include "../../Source/portable/GCC/HCS12/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_MCF5235\r
-    #include "../../Source/portable/GCC/MCF5235/portmacro.h"\r
-#endif\r
-\r
-#ifdef COLDFIRE_V2_GCC\r
-       #include "../../../Source/portable/GCC/ColdFire_V2/portmacro.h"\r
-#endif\r
-\r
-#ifdef COLDFIRE_V2_CODEWARRIOR\r
-       #include "../../Source/portable/CodeWarrior/ColdFire_V2/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_PPC405\r
-       #include "../../Source/portable/GCC/PPC405_Xilinx/portmacro.h"\r
-#endif\r
-\r
-#ifdef GCC_PPC440\r
-       #include "../../Source/portable/GCC/PPC440_Xilinx/portmacro.h"\r
-#endif\r
-\r
-#ifdef _16FX_SOFTUNE\r
-       #include "..\..\Source\portable\Softune\MB96340\portmacro.h"\r
-#endif\r
-\r
-#ifdef BCC_INDUSTRIAL_PC_PORT\r
-       /* A short file name has to be used in place of the normal\r
-       FreeRTOSConfig.h when using the Borland compiler. */\r
-       #include "frconfig.h"\r
-       #include "..\portable\BCC\16BitDOS\PC\prtmacro.h"\r
-    typedef void ( __interrupt __far *pxISR )();\r
-#endif\r
-\r
-#ifdef BCC_FLASH_LITE_186_PORT\r
-       /* A short file name has to be used in place of the normal\r
-       FreeRTOSConfig.h when using the Borland compiler. */\r
-       #include "frconfig.h"\r
-       #include "..\portable\BCC\16BitDOS\flsh186\prtmacro.h"\r
-    typedef void ( __interrupt __far *pxISR )();\r
-#endif\r
-\r
-#ifdef __GNUC__\r
-   #ifdef __AVR32_AVR32A__\r
-          #include "portmacro.h"\r
-   #endif\r
-#endif\r
-\r
-#ifdef __ICCAVR32__\r
-   #ifdef __CORE__\r
-      #if __CORE__ == __AVR32A__\r
-             #include "portmacro.h"\r
-      #endif\r
-   #endif\r
-#endif\r
+#include "portmacro.h"\r
 \r
-#ifdef __91467D\r
-       #include "portmacro.h"\r
-#endif\r
-\r
-#ifdef __96340\r
+#ifndef portENTER_CRITICAL\r
        #include "portmacro.h"\r
 #endif\r
 \r
-\r
-#ifdef __IAR_V850ES_Fx3__\r
-       #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
-#endif\r
-\r
-#ifdef __IAR_V850ES_Jx3__\r
-       #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
-#endif\r
-\r
-#ifdef __IAR_V850ES_Jx3_L__\r
-       #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
-#endif\r
-\r
-#ifdef __IAR_V850ES_Jx2__\r
-       #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
-#endif\r
-\r
-#ifdef __IAR_V850ES_Hx2__\r
-       #include "../../Source/portable/IAR/V850ES/portmacro.h"\r
-#endif\r
-\r
-#ifdef __IAR_78K0R_Kx3__\r
-       #include "../../Source/portable/IAR/78K0R/portmacro.h"\r
-#endif\r
-       \r
-#ifdef __IAR_78K0R_Kx3L__\r
-       #include "../../Source/portable/IAR/78K0R/portmacro.h"\r
-#endif\r
-       \r
-/* Catch all to ensure portmacro.h is included in the build.  Newer demos\r
-have the path as part of the project options, rather than as relative from\r
-the project location.  If portENTER_CRITICAL() has not been defined then\r
-portmacro.h has not yet been included - as every portmacro.h provides a\r
-portENTER_CRITICAL() definition.  Check the demo application for your demo\r
-to find the path to the correct portmacro.h file. */\r
-#ifndef portENTER_CRITICAL\r
-       #include "portmacro.h"  \r
-#endif\r
-       \r
 #if portBYTE_ALIGNMENT == 8\r
        #define portBYTE_ALIGNMENT_MASK ( 0x0007 )\r
 #endif\r
@@ -398,7 +157,7 @@ void vPortEndScheduler( void ) PRIVILEGED_FUNCTION;
  * Fills the xMPUSettings structure with the memory region information\r
  * contained in xRegions.\r
  */\r
-#if( portUSING_MPU_WRAPPERS == 1 ) \r
+#if( portUSING_MPU_WRAPPERS == 1 )\r
        struct xMEMORY_REGION;\r
        void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned short usStackDepth ) PRIVILEGED_FUNCTION;\r
 #endif\r
index 5fc1dd1d4bd2d6ef82a00fde8c211f251218148b..028a398f05c58331d054ac0ea2f1da874e224352 100644 (file)
      */
     void main(void)
     {
-
-        /* Initialize peripherals */
-        // FIXME: Implement conditional init()'s
-        _enable_IRQ();
-
         /* Initialize model */
         %<LibCallModelInitialize()>\
+        _enable_IRQ();
 
         /* Create and lock semaphore */
         vSemaphoreCreateBinary(step_signal);