lib_math.lst
来自「stm32+ucos-ii」· LST 代码 · 共 424 行 · 第 1/2 页
LST
424 行
###############################################################################
# #
# IAR ANSI C/C++ Compiler V6.10.2.52244/W32 for ARM 07/Aug/2011 12:10:25 #
# Copyright 1999-2010 IAR Systems AB. #
# #
# Cpu mode = thumb #
# Endian = little #
# Source file = F:\stm32\我的程序\Micrium\Software\uC-LIB\lib_math.c #
# Command line = F:\stm32\我的程序\Micrium\Software\uC-LIB\lib_math.c -D #
# USE_STDPERIPH_DRIVER -D STM32F10X_CL -lCN #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Flash\Lis #
# t\ -o F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Fla #
# sh\Obj\ --no_cse --no_unroll --no_inline #
# --no_code_motion --no_tbaa --no_clustering #
# --no_scheduling --debug --endian=little --cpu=Cortex-M3 #
# -e --fpu=None --dlib_config #
# D:\arm\INC\c\DLib_Config_Normal.h -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\APP\ -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP\ #
# -I F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP #
# \ST\CMSIS\CM3\CoreSupport\ -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP\ST #
# \CMSIS\CM3\DeviceSupport\ST\STM32F10x\ -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP\ST #
# \STM32F10x_StdPeriph_Driver\inc\ -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\BSP\uC #
# OS-II\ -I F:\stm32\我的程序\Micrium\Software\EWARM\OS-II #
# \..\..\uCOS-II\Ports\ARM-Cortex-M3\Generic\IAR\ -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\..\uCO #
# S-II\Source\ -I F:\stm32\我的程序\Micrium\Software\EWARM #
# \OS-II\..\..\uC-LIB\ -I F:\stm32\我的程序\Micrium\Softwa #
# re\EWARM\OS-II\..\..\uC-LIB\Ports\ARM-Cortex-M3\IAR\ -I #
# F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\..\..\uC- #
# CPU\ -I F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\. #
# .\..\uC-CPU\ARM-Cortex-M3\IAR\ -On --use_c++_inline #
# List file = F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Flash\Lis #
# t\lib_math.lst #
# Object file = F:\stm32\我的程序\Micrium\Software\EWARM\OS-II\Flash\Obj #
# \lib_math.o #
# #
# #
###############################################################################
F:\stm32\我的程序\Micrium\Software\uC-LIB\lib_math.c
1 /*
2 *********************************************************************************************************
3 * uC/LIB
4 * CUSTOM LIBRARY MODULES
5 *
6 * (c) Copyright 2004-2011; Micrium, Inc.; Weston, FL
7 *
8 * All rights reserved. Protected by international copyright laws.
9 *
10 * uC/LIB is provided in source form to registered licensees ONLY. It is
11 * illegal to distribute this source code to any third party unless you receive
12 * written permission by an authorized Micrium representative. Knowledge of
13 * the source code may NOT be used to develop a similar product.
14 *
15 * Please help us continue to provide the Embedded community with the finest
16 * software available. Your honesty is greatly appreciated.
17 *
18 * You can contact us at www.micrium.com.
19 *********************************************************************************************************
20 */
21
22 /*
23 *********************************************************************************************************
24 *
25 * MATHEMATIC OPERATIONS
26 *
27 * Filename : lib_math.c
28 * Version : V1.35.00
29 * Programmer(s) : SR
30 * ITJ
31 *********************************************************************************************************
32 * Note(s) : (1) NO compiler-supplied standard library functions are used in library or product software.
33 *
34 * (a) ALL standard library functions are implemented in the custom library modules :
35 *
36 * (1) \<Custom Library Directory>\lib_*.*
37 *
38 * (2) \<Custom Library Directory>\Ports\<cpu>\<compiler>\lib*_a.*
39 *
40 * where
41 * <Custom Library Directory> directory path for custom library software
42 * <cpu> directory name for specific processor (CPU)
43 * <compiler> directory name for specific compiler
44 *
45 * (b) Product-specific library functions are implemented in individual products.
46 *
47 *********************************************************************************************************
48 * Notice(s) : (1) The Institute of Electrical and Electronics Engineers and The Open Group, have given
49 * us permission to reprint portions of their documentation. Portions of this text are
50 * reprinted and reproduced in electronic form from the IEEE Std 1003.1, 2004 Edition,
51 * Standard for Information Technology -- Portable Operating System Interface (POSIX),
52 * The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute
53 * of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any
54 * discrepancy between these versions and the original IEEE and The Open Group Standard,
55 * the original IEEE and The Open Group Standard is the referee document. The original
56 * Standard can be obtained online at http://www.opengroup.org/unix/online.html.
57 *********************************************************************************************************
58 */
59
60
61 /*
62 *********************************************************************************************************
63 * INCLUDE FILES
64 *********************************************************************************************************
65 */
66
67 #define LIB_MATH_MODULE
68 #include <lib_math.h>
69
70
71 /*$PAGE*/
72 /*
73 *********************************************************************************************************
74 * LOCAL DEFINES
75 *********************************************************************************************************
76 */
77
78
79 /*
80 *********************************************************************************************************
81 * LOCAL CONSTANTS
82 *********************************************************************************************************
83 */
84
85
86 /*
87 *********************************************************************************************************
88 * LOCAL DATA TYPES
89 *********************************************************************************************************
90 */
91
92
93 /*
94 *********************************************************************************************************
95 * LOCAL TABLES
96 *********************************************************************************************************
97 */
98
99
100 /*
101 *********************************************************************************************************
102 * LOCAL GLOBAL VARIABLES
103 *********************************************************************************************************
104 */
105
\ In section .bss, align 4
106 RAND_NBR Math_RandSeedCur; /* Cur rand nbr seed. */
\ Math_RandSeedCur:
\ 00000000 DS8 4
107
108
109 /*
110 *********************************************************************************************************
111 * LOCAL FUNCTION PROTOTYPES
112 *********************************************************************************************************
113 */
114
115
116 /*
117 *********************************************************************************************************
118 * LOCAL CONFIGURATION ERRORS
119 *********************************************************************************************************
120 */
121
122
123 /*$PAGE*/
124 /*
125 *********************************************************************************************************
126 * Math_Init()
127 *
128 * Description : (1) Initialize Mathematic Module :
129 *
130 * (a) Initialize random number seed value
131 *
132 *
133 * Argument(s) : none.
134 *
135 * Return(s) : none.
136 *
137 * Caller(s) : Application.
138 *
139 * Note(s) : (2) IEEE Std 1003.1, 2004 Edition, Section 'rand() : DESCRIPTION' states that "if rand()
140 * is called before any calls to srand() are made, the same sequence shall be generated
141 * as when srand() is first called with a seed value of 1".
142 *********************************************************************************************************
143 */
144
\ In section .text, align 2, keep-with-next
145 void Math_Init (void)
146 {
\ Math_Init:
\ 00000000 80B5 PUSH {R7,LR}
147 Math_RandSetSeed((RAND_NBR)RAND_SEED_INIT_VAL); /* See Note #2. */
\ 00000002 0120 MOVS R0,#+1
\ 00000004 ........ BL Math_RandSetSeed
148 }
\ 00000008 01BD POP {R0,PC} ;; return
149
150
151 /*$PAGE*/
152 /*
153 *********************************************************************************************************
154 * Math_RandSetSeed()
155 *
156 * Description : Set the current pseudo-random number generator seed.
157 *
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?