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

📄 blockq.s43

📁 MSP430 IAR project with FreeRTOS port.
💻 S43
📖 第 1 页 / 共 3 页
字号:
//////////////////////////////////////////////////////////////////////////////
//                                                                           /
// IAR MSP430 C/C++ Compiler V3.41A/W32                22/Apr/2006  00:25:12 /
// 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\Common\Mini /
//                     mal\BlockQ.c                                          /
//    Command line  =  C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Mini /
//                     mal\BlockQ.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\Block /
//                     Q.s43                                                 /
//                                                                           /
//                                                                           /
//////////////////////////////////////////////////////////////////////////////

        NAME BlockQ

        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 ?Epilogue4
        EXTERN ?Epilogue3
        EXTERN ?Epilogue8
        EXTERN ?cstart_init_zero
        EXTERN ?longjmp_r4
        EXTERN ?longjmp_r5
        EXTERN ?setjmp_r4
        EXTERN ?setjmp_r5

        PUBWEAK ?setjmp_save_r4
        PUBWEAK ?setjmp_save_r5
        FUNCTION vBlockingQueueConsumer,021603H
        LOCFRAME CSTACK, 14, STACK
        FUNCTION vBlockingQueueProducer,021603H
        LOCFRAME CSTACK, 12, STACK
        PUBLIC vStartBlockingQueueTasks
        FUNCTION vStartBlockingQueueTasks,021203H
        LOCFRAME CSTACK, 72, STACK
        PUBLIC xAreBlockingQueuesStillRunning
        FUNCTION xAreBlockingQueuesStillRunning,0203H
        LOCFRAME CSTACK, 4, STACK
        
        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 xQueueReceive
        FUNCTION xQueueReceive,0202H
        EXTERN xQueueSend
        FUNCTION xQueueSend,0202H
        EXTERN pvPortMalloc
        FUNCTION pvPortMalloc,0202H
        EXTERN xQueueCreate
        FUNCTION xQueueCreate,0202H
        EXTERN xTaskCreate
        FUNCTION xTaskCreate,0202H

// C:\MSP430F169_Eval_Port\FreeRTOSv401\Demo\Common\Minimal\BlockQ.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 /*
//   34  * Creates six tasks that operate on three queues as follows:
//   35  *
//   36  * The first two tasks send and receive an incrementing number to/from a queue.
//   37  * One task acts as a producer and the other as the consumer.  The consumer is a
//   38  * higher priority than the producer and is set to block on queue reads.  The queue
//   39  * only has space for one item - as soon as the producer posts a message on the
//   40  * queue the consumer will unblock, pre-empt the producer, and remove the item.
//   41  *
//   42  * The second two tasks work the other way around.  Again the queue used only has
//   43  * enough space for one item.  This time the consumer has a lower priority than the
//   44  * producer.  The producer will try to post on the queue blocking when the queue is
//   45  * full.  When the consumer wakes it will remove the item from the queue, causing
//   46  * the producer to unblock, pre-empt the consumer, and immediately re-fill the
//   47  * queue.
//   48  *
//   49  * The last two tasks use the same queue producer and consumer functions.  This time the queue has
//   50  * enough space for lots of items and the tasks operate at the same priority.  The
//   51  * producer will execute, placing items into the queue.  The consumer will start
//   52  * executing when either the queue becomes full (causing the producer to block) or
//   53  * a context switch occurs (tasks of the same priority will time slice).
//   54  *
//   55  */
//   56 
//   57 
//   58 
//   59 #include <stdlib.h>
//   60 
//   61 /* Scheduler include files. */
//   62 #include "FreeRTOS.h"
//   63 #include "task.h"
//   64 #include "queue.h"
//   65 
//   66 /* Demo program include files. */
//   67 #include "BlockQ.h"
//   68 
//   69 #define blckqSTACK_SIZE		configMINIMAL_STACK_SIZE
//   70 #define blckqNUM_TASK_SETS	( 3 )
//   71 
//   72 /* Structure used to pass parameters to the blocking queue tasks. */
//   73 typedef struct BLOCKING_QUEUE_PARAMETERS
//   74 {
//   75 	xQueueHandle xQueue;					/*< The queue to be used by the task. */
//   76 	portTickType xBlockTime;				/*< The block time to use on queue reads/writes. */
//   77 	volatile portSHORT *psCheckVariable;	/*< Incremented on each successful cycle to check the task is still running. */
//   78 } xBlockingQueueParameters;
//   79 
//   80 /* Task function that creates an incrementing number and posts it on a queue. */
//   81 static portTASK_FUNCTION_PROTO( vBlockingQueueProducer, pvParameters );
//   82 
//   83 /* Task function that removes the incrementing number from a queue and checks that
//   84 it is the expected number. */
//   85 static portTASK_FUNCTION_PROTO( vBlockingQueueConsumer, pvParameters );
//   86 
//   87 /* Variables which are incremented each time an item is removed from a queue, and
//   88 found to be the expected value.
//   89 These are used to check that the tasks are still running. */

        RSEG DATA16_Z:DATA:SORT:NOROOT(1)
        REQUIRE ?cstart_init_zero
//   90 static volatile portSHORT sBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0 };
sBlockingConsumerCount:
        DS8 6
//   91 
//   92 /* Variable which are incremented each time an item is posted on a queue.   These
//   93 are used to check that the tasks are still running. */

        RSEG DATA16_Z:DATA:SORT:NOROOT(1)
        REQUIRE ?cstart_init_zero
//   94 static volatile portSHORT sBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0 };
sBlockingProducerCount:
        DS8 6
//   95 
//   96 /*-----------------------------------------------------------*/
//   97 

        RSEG CODE:CODE:REORDER:NOROOT(1)
//   98 void vStartBlockingQueueTasks( unsigned portBASE_TYPE uxPriority )
vStartBlockingQueueTasks:
        CFI Block cfiBlock0 Using cfiCommon0
        CFI Function vStartBlockingQueueTasks
//   99 {
        FUNCALL vStartBlockingQueueTasks, pvPortMalloc
        LOCFRAME CSTACK, 24, STACK
        FUNCALL vStartBlockingQueueTasks, xQueueCreate
        LOCFRAME CSTACK, 24, STACK
        FUNCALL vStartBlockingQueueTasks, pvPortMalloc
        LOCFRAME CSTACK, 24, STACK
        FUNCALL vStartBlockingQueueTasks, xTaskCreate
        LOCFRAME CSTACK, 32, STACK
        FUNCALL vStartBlockingQueueTasks, xTaskCreate
        LOCFRAME CSTACK, 40, STACK
        FUNCALL vStartBlockingQueueTasks, pvPortMalloc
        LOCFRAME CSTACK, 40, STACK
        FUNCALL vStartBlockingQueueTasks, xQueueCreate
        LOCFRAME CSTACK, 40, STACK
        FUNCALL vStartBlockingQueueTasks, pvPortMalloc
        LOCFRAME CSTACK, 40, STACK
        FUNCALL vStartBlockingQueueTasks, xTaskCreate
        LOCFRAME CSTACK, 48, STACK
        FUNCALL vStartBlockingQueueTasks, xTaskCreate
        LOCFRAME CSTACK, 56, STACK
        FUNCALL vStartBlockingQueueTasks, pvPortMalloc
        LOCFRAME CSTACK, 56, STACK
        FUNCALL vStartBlockingQueueTasks, xQueueCreate
        LOCFRAME CSTACK, 56, STACK
        FUNCALL vStartBlockingQueueTasks, pvPortMalloc
        LOCFRAME CSTACK, 56, STACK
        FUNCALL vStartBlockingQueueTasks, xTaskCreate
        LOCFRAME CSTACK, 64, STACK
        FUNCALL vStartBlockingQueueTasks, xTaskCreate
        LOCFRAME CSTACK, 72, STACK
        PUSH.W  R10
        CFI R10 Frame(CFA, -4)
        CFI CFA SP+4
        PUSH.W  R11
        CFI R11 Frame(CFA, -6)
        CFI CFA SP+6
        PUSH.W  R8
        CFI R8 Frame(CFA, -8)
        CFI CFA SP+8

⌨️ 快捷键说明

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