⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 main.s43

📁 MSP430 IAR project with FreeRTOS port.
💻 S43
📖 第 1 页 / 共 3 页
字号:
//////////////////////////////////////////////////////////////////////////////
//                                                                           /
// IAR MSP430 C/C++ Compiler V3.41A/W32                22/Apr/2006  00:25:15 /
// Copyright 1996-2006 IAR Systems. All rights reserved.                     /
//                                                                           /
//    __rt_version  =  2                                                     /
//    __double_size =  32                                                    /
//    __reg_r4      =  free                                                  /
//    __reg_r5      =  free                                                  /
//    __pic         =  no                                                    /
//    __core        =  64kb                                                  /
//    Source file   =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\msp430_IAR\ /
//                     main.c                                                /
//    Command line  =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\msp430_IAR\ /
//                     main.c -D ROWLEY_MSP430 -D IAR_MSP430 -lC             /
//                     C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\List\ -lA  /
//                     C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\List\      /
//                     --remarks -o C:\MSP430F169_Eval_Port\FreeRTOSv401\Deb /
//                     ug\Obj\ -s2 --no_cse --no_unroll --no_inline          /
//                     --no_code_motion --no_tbaa --debug -e                 /
//                     --migration_preprocessor_extensions --double=32 -I    /
//                     C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Incl /
//                     ude\ -I C:\MSP430F169_Eval_Port\FreeRTOSv401\Source\I /
//                     nclude\ -I C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\ /
//                     MSP430_IAR\ -I C:\MSP430F169_Eval_Port\FreeRTOSv401\S /
//                     ource\portable\msp430f1611\ -I "C:\Program Files\IAR  /
//                     Systems\Embedded Workbench 4.0\430\INC\" -I           /
//                     "C:\Program Files\IAR Systems\Embedded Workbench      /
//                     4.0\430\INC\CLIB\"                                    /
//    List file     =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Debug\List\main. /
//                     s43                                                   /
//                                                                           /
//                                                                           /
//////////////////////////////////////////////////////////////////////////////

        NAME main

        RTMODEL "__core", "64kb"
        RTMODEL "__double_size", "32"
        RTMODEL "__pic", "no"
        RTMODEL "__reg_r4", "free"
        RTMODEL "__reg_r5", "free"
        RTMODEL "__rt_version", "2"

        RSEG CSTACK:DATA:SORT:NOROOT(1)

        EXTERN ?Mul32
        EXTERN ?DivMod32s
        EXTERN ?cstart_init_copy
        EXTERN ?cstart_init_zero
        EXTERN ?longjmp_r4
        EXTERN ?longjmp_r5
        EXTERN ?setjmp_r4
        EXTERN ?setjmp_r5

        PUBWEAK ?setjmp_save_r4
        PUBWEAK ?setjmp_save_r5
        PUBWEAK _A_BCSCTL1
        PUBWEAK _A_BCSCTL2
        PUBWEAK _A_IFG1
        PUBWEAK _A_P1DIR
        PUBWEAK _A_P1SEL
        PUBWEAK _A_P2DIR
        PUBWEAK _A_P2SEL
        PUBWEAK _A_P3DIR
        PUBWEAK _A_P3SEL
        PUBWEAK _A_P4DIR
        PUBWEAK _A_P4SEL
        PUBWEAK _A_P5DIR
        PUBWEAK _A_P5SEL
        PUBWEAK _A_P6DIR
        PUBWEAK _A_P6SEL
        PUBWEAK _A_WDTCTL
        PUBLIC main
        FUNCTION main,021a03H
        LOCFRAME CSTACK, 12, STACK
        FUNCTION prvCheckOtherTasksAreStillRunning,021203H
        LOCFRAME CSTACK, 2, STACK
        FUNCTION prvSetupHardware,0203H
        LOCFRAME CSTACK, 2, STACK
        PUBLIC vApplicationIdleHook
        FUNCTION vApplicationIdleHook,0203H
        LOCFRAME CSTACK, 8, STACK
        FUNCTION vErrorChecks,021603H
        LOCFRAME CSTACK, 6, STACK
        PUBLIC xLocalError
        
        CFI Names cfiNames0
        CFI StackFrame CFA SP DATA
        CFI Resource PC:16, SP:16, SR:16, R4:16, R5:16, R6:16, R7:16, R8:16
        CFI Resource R9:16, R10:16, R11:16, R12:16, R13:16, R14:16, R15:16
        CFI EndNames cfiNames0
        
        CFI Common cfiCommon0 Using cfiNames0
        CFI CodeAlign 2
        CFI DataAlign 2
        CFI ReturnAddress PC CODE
        CFI CFA SP+2
        CFI PC Frame(CFA, -2)
        CFI SR Undefined
        CFI R4 SameValue
        CFI R5 SameValue
        CFI R6 SameValue
        CFI R7 SameValue
        CFI R8 SameValue
        CFI R9 SameValue
        CFI R10 SameValue
        CFI R11 SameValue
        CFI R12 Undefined
        CFI R13 Undefined
        CFI R14 Undefined
        CFI R15 Undefined
        CFI EndCommon cfiCommon0
        
        EXTERN xAreIntegerMathsTaskStillRunning
        FUNCTION xAreIntegerMathsTaskStillRunning,0202H
        EXTERN xAreComTestTasksStillRunning
        FUNCTION xAreComTestTasksStillRunning,0202H
        EXTERN xArePollingQueuesStillRunning
        FUNCTION xArePollingQueuesStillRunning,0202H
        EXTERN vTaskDelay
        FUNCTION vTaskDelay,0202H
        EXTERN vParTestInitialise
        FUNCTION vParTestInitialise,0202H
        EXTERN vStartLEDFlashTasks
        FUNCTION vStartLEDFlashTasks,0202H
        EXTERN vStartMathTasks
        FUNCTION vStartMathTasks,0200H
        EXTERN vStartIntegerMathTasks
        FUNCTION vStartIntegerMathTasks,0202H
        EXTERN vAltStartComTestTasks
        FUNCTION vAltStartComTestTasks,0202H
        EXTERN vStartPolledQueueTasks
        FUNCTION vStartPolledQueueTasks,0202H
        EXTERN vStartBlockingQueueTasks
        FUNCTION vStartBlockingQueueTasks,0200H
        EXTERN vStartDynamicPriorityTasks
        FUNCTION vStartDynamicPriorityTasks,0202H
        EXTERN xTaskCreate
        FUNCTION xTaskCreate,0202H
        EXTERN vTaskStartScheduler
        FUNCTION vTaskStartScheduler,0202H

// C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\msp430_IAR\main.c
//    1 /*
//    2 	FreeRTOS V4.0.1 - Copyright (C) 2003 - 2006 Richard Barry.
//    3 
//    4 	This file is part of the FreeRTOS distribution.
//    5 
//    6 	FreeRTOS is free software; you can redistribute it and/or modify
//    7 	it under the terms of the GNU General Public License as published by
//    8 	the Free Software Foundation; either version 2 of the License, or
//    9 	(at your option) any later version.
//   10 
//   11 	FreeRTOS is distributed in the hope that it will be useful,
//   12 	but WITHOUT ANY WARRANTY; without even the implied warranty of
//   13 	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//   14 	GNU General Public License for more details.
//   15 
//   16 	You should have received a copy of the GNU General Public License
//   17 	along with FreeRTOS; if not, write to the Free Software
//   18 	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//   19 
//   20 	A special exception to the GPL can be applied should you wish to distribute
//   21 	a combined work that includes FreeRTOS, without being obliged to provide
//   22 	the source code for any proprietary components.  See the licensing section
//   23 	of http://www.FreeRTOS.org for full details of how and when the exception
//   24 	can be applied.
//   25 
//   26 	***************************************************************************
//   27 	See http://www.FreeRTOS.org for documentation, latest information, license
//   28 	and contact details.  Please ensure to read the configuration and relevant
//   29 	port sections of the online documentation.
//   30 	***************************************************************************
//   31 */
//   32 
//   33 // TODO - Par & Serial Tests need to be ripped out - maybe go ahead and
//   34 // modify ser test for uart....
//   35 // note that flash is for flashing leds...
//   36 
//   37 /*
//   38  * Creates all the demo application tasks, then starts the scheduler.  The WEB
//   39  * documentation provides more details of the demo application tasks.
//   40  *
//   41  * This demo is configured to execute on the ES449 prototyping board from
//   42  * SoftBaugh. The ES449 has a built in LCD display and a single built in user
//   43  * LED.  Therefore, in place of flashing an LED, the 'flash' and 'check' tasks
//   44  * toggle '*' characters on the LCD.  The left most '*' represents LED 0, the
//   45  * next LED 1, etc.
//   46  *
//   47  * Main. c also creates a task called 'Check'.  This only executes every three
//   48  * seconds but has the highest priority so is guaranteed to get processor time.
//   49  * Its main function is to check that all the other tasks are still operational.
//   50  * Each task that does not flash an LED maintains a unique count that is
//   51  * incremented each time the task successfully completes its function.  Should
//   52  * any error occur within such a task the count is permanently halted.  The
//   53  * 'check' task inspects the count of each task to ensure it has changed since
//   54  * the last time the check task executed.  If all the count variables have
//   55  * changed all the tasks are still executing error free, and the check task
//   56  * toggles an LED with a three second period.  Should any task contain an error
//   57  * at any time the LED toggle rate will increase to 500ms.
//   58  *
//   59  * Please read the documentation for the MSP430 port available on
//   60  * http://www.FreeRTOS.org.
//   61  */
//   62 
//   63 /* Standard includes. */
//   64 #include <stdlib.h>
//   65 
//   66 /* Scheduler includes. */
//   67 #include "FreeRTOS.h"

        ASEGN DATA16_AN:DATA:NOROOT,02H
// union <unnamed> volatile __data16 _A_IFG1
_A_IFG1:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,0120H
// union <unnamed> volatile __data16 _A_WDTCTL
_A_WDTCTL:
        DS8 2

        ASEGN DATA16_AN:DATA:NOROOT,022H
// union <unnamed> volatile __data16 _A_P1DIR
_A_P1DIR:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,026H
// union <unnamed> volatile __data16 _A_P1SEL
_A_P1SEL:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,02aH
// union <unnamed> volatile __data16 _A_P2DIR
_A_P2DIR:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,02eH
// union <unnamed> volatile __data16 _A_P2SEL
_A_P2SEL:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,01aH
// union <unnamed> volatile __data16 _A_P3DIR
_A_P3DIR:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,01bH
// union <unnamed> volatile __data16 _A_P3SEL
_A_P3SEL:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,01eH
// union <unnamed> volatile __data16 _A_P4DIR
_A_P4DIR:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,01fH
// union <unnamed> volatile __data16 _A_P4SEL
_A_P4SEL:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,032H
// union <unnamed> volatile __data16 _A_P5DIR
_A_P5DIR:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,033H
// union <unnamed> volatile __data16 _A_P5SEL
_A_P5SEL:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,036H
// union <unnamed> volatile __data16 _A_P6DIR
_A_P6DIR:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,037H
// union <unnamed> volatile __data16 _A_P6SEL
_A_P6SEL:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,057H
// union <unnamed> volatile __data16 _A_BCSCTL1
_A_BCSCTL1:
        DS8 1

        ASEGN DATA16_AN:DATA:NOROOT,058H
// union <unnamed> volatile __data16 _A_BCSCTL2
_A_BCSCTL2:
        DS8 1
//   68 #include "task.h"
//   69 
//   70 /* Demo application includes. */
//   71 #include "partest.h"
//   72 #include "flash.h"
//   73 #include "integer.h"
//   74 #include "comtest2.h"
//   75 #include "PollQ.h"
//   76 #include "dynamic.h"
//   77 
//   78 /* Constants required for hardware setup. */
//   79 #define mainALL_BITS_OUTPUT		( ( unsigned portCHAR ) 0xff )
//   80 #define mainMAX_FREQUENCY		( ( unsigned portCHAR ) 121 )
//   81 
//   82 /* Constants that define the LED's used by the various tasks. [in this case
//   83 the '*' characters on the LCD represent LED's] */
//   84 #define mainCHECK_LED			( 4 )
//   85 #define mainCOM_TEST_LED		( 10 )
//   86 
//   87 /* Demo task priorities. */
//   88 #define mainCHECK_TASK_PRIORITY			( tskIDLE_PRIORITY + 3 )
//   89 #define mainCOM_TEST_PRIORITY			( tskIDLE_PRIORITY + 2 )
//   90 #define mainQUEUE_POLL_PRIORITY			( tskIDLE_PRIORITY + 2 )
//   91 #define mainLED_TASK_PRIORITY			( tskIDLE_PRIORITY + 1 )
//   92 
//   93 /* Baud rate used by the COM test tasks. */
//   94 #define mainCOM_TEST_BAUD_RATE			( ( unsigned portLONG ) 115200L )
//   95 
//   96 /* The frequency at which the 'Check' tasks executes.  See the comments at the
//   97 top of the page.  When the system is operating error free the 'Check' task
//   98 toggles an LED every three seconds.  If an error is discovered in any task the
//   99 rate is increased to 500 milliseconds.  [in this case the '*' characters on the
//  100 LCD represent LED's]*/
//  101 #define mainNO_ERROR_CHECK_DELAY		( ( portTickType ) 3000 / portTICK_RATE_MS  )
//  102 #define mainERROR_CHECK_DELAY			( ( portTickType ) 500 / portTICK_RATE_MS  )
//  103 
//  104 /* The constants used in the calculation. */
//  105 #define intgCONST1				( ( portLONG ) 123 )
//  106 #define intgCONST2				( ( portLONG ) 234567 )
//  107 #define intgCONST3				( ( portLONG ) -3 )
//  108 #define intgCONST4				( ( portLONG ) 7 )
//  109 #define intgEXPECTED_ANSWER		( ( ( intgCONST1 + intgCONST2 ) * intgCONST3 ) / intgCONST4 )
//  110 
//  111 /*
//  112  * The function that implements the Check task.  See the comments at the head
//  113  * of the page for implementation details.
//  114  */
//  115 static void vErrorChecks( void *pvParameters );
//  116 
//  117 /*
//  118  * Called by the Check task.  Returns pdPASS if all the other tasks are found
//  119  * to be operating without error - otherwise returns pdFAIL.
//  120  */
//  121 static portSHORT prvCheckOtherTasksAreStillRunning( void );
//  122 
//  123 /*
//  124  * Perform the hardware setup required by the ES449 in order to run the demo
//  125  * application.
//  126  */
//  127 static void prvSetupHardware( void );
//  128 
//  129 

        RSEG DATA16_Z:DATA:SORT:NOROOT(1)
        REQUIRE ?cstart_init_zero
//  130 portBASE_TYPE xLocalError = pdFALSE;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -