📄 probe_rs232.lst
字号:
##############################################################################
# #
# IAR ARM ANSI C/C++ Compiler V4.42A/W32 KICKSTART 13/Mar/2009 16:01:06 #
# Copyright 1999-2005 IAR Systems. All rights reserved. #
# #
# Cpu mode = thumb #
# Endian = little #
# Stack alignment = 4 #
# Source file = E:\UC_OS\Micrium\Software\uC-Probe\Target\Communicat #
# ion\Generic\RS-232\Source\probe_rs232.c #
# Command line = E:\UC_OS\Micrium\Software\uC-Probe\Target\Communicat #
# ion\Generic\RS-232\Source\probe_rs232.c -lCN #
# E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\Flash\List\ -o #
# E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\Flash\Obj\ -z6 --no_unroll #
# --no_inline --no_tbaa --no_scheduling --debug #
# --cpu_mode thumb --endian little --cpu cortex-M3 #
# --stack_align 4 -e --fpu None --dlib_config #
# "C:\Program Files\IAR Systems\Embedded Workbench #
# 4.0 Kickstart\arm\LIB\dl7mptnnl8n.h" -I #
# E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\ -I E:\UC_OS\Micrium\Software\EvalBoa #
# rds\ST\STM3210B-EVAL\IAR\OS-Probe\..\..\..\..\..\uco #
# s-ii\ports\arm-cortex-m3\generic\iar\ -I #
# E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\..\..\..\..\..\ucos-ii\source\ -I #
# E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\..\..\..\..\..\uc-lib\ -I #
# E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\..\..\..\..\..\uc-cpu\ -I #
# E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\..\..\..\..\..\uc-cpu\ARM-Cortex-M3\I #
# AR\ -I E:\UC_OS\Micrium\Software\EvalBoards\ST\STM32 #
# 10B-EVAL\IAR\OS-Probe\..\..\..\..\..\cpu\st\stm32\in #
# c\ -I E:\UC_OS\Micrium\Software\EvalBoards\ST\STM321 #
# 0B-EVAL\IAR\OS-Probe\..\BSP\ -I #
# E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\..\..\..\..\..\uC-Probe\Target\Commun #
# ication\Generic\RS-232\Source\ -I #
# E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\..\..\..\..\..\uC-Probe\Target\Commun #
# ication\Generic\RS-232\Ports\ST\STM32\ -I #
# E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\..\..\..\..\..\uC-Probe\Target\Commun #
# ication\Generic\Source\ -I #
# E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\..\..\..\..\..\uC-Probe\Target\Plugin #
# s\uCOS-II\ -I "C:\Program Files\IAR #
# Systems\Embedded Workbench 4.0 Kickstart\arm\INC\" #
# List file = E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\Flash\List\probe_rs232.lst #
# Object file = E:\UC_OS\Micrium\Software\EvalBoards\ST\STM3210B-EVA #
# L\IAR\OS-Probe\Flash\Obj\probe_rs232.r79 #
# #
# #
##############################################################################
E:\UC_OS\Micrium\Software\uC-Probe\Target\Communication\Generic\RS-232\Source\probe_rs232.c
1 /*
2 *********************************************************************************************************
3 * uC/Probe Communication
4 *
5 * (c) Copyright 2007; Micrium, Inc.; Weston, FL
6 *
7 * All rights reserved. Protected by international copyright laws.
8 * Knowledge of the source code may NOT be used to develop a similar product.
9 * Please help us continue to provide the Embedded community with the finest
10 * software available. Your honesty is greatly appreciated.
11 *********************************************************************************************************
12 */
13
14 /*
15 *********************************************************************************************************
16 *
17 * uC/Probe
18 *
19 * Communication: RS-232
20 *
21 * Filename : probe_rs232.c
22 * Version : V1.20
23 * Programmer(s) : Brian Nagel
24 * Note(s) : (1) The abbreviations RX and TX refer to communication from the target's perspective.
25 *
26 * (2) The abbreviations RD and WR refer to reading data from the target memory and
27 * writing data to the target memory, respectively.
28 *********************************************************************************************************
29 */
30
31 /*
32 *********************************************************************************************************
33 * INCLUDE FILES
34 *********************************************************************************************************
35 */
36
37 #define PROBE_RS232_GLOBALS
38 #include <probe_rs232.h>
\ In segment DATA_Z, align 4, align-sorted
39
40
41 /*
42 *********************************************************************************************************
43 * LOCAL DEFINES
44 *********************************************************************************************************
45 */
46
47 /*
48 *********************************************************************************************************
49 * RS-232 PACKET FORMAT
50 *
51 * Note(s): (1) All packets include the following parts:
52 *
53 * (A) 4 1-byte start delimiters, forming the ASCII representation of "uCPr". These
54 * are the constants PROBE_RS232_PROTOCOL_RX_SD0-PROBE_RS232_PROTOCOL_?X_SD4;
55 * (B) 1 2-byte length, the length of the data segment;
56 * (C) 1 2-byte padding, unused;
57 * (D) n bytes of data; and
58 * (E) 1 1-byte checksum; and
59 * (F) 1 1-byte end delimiter, the character '/', which is the constant PROBE_RS232_PROTOCOL_?X_ED.
60 *
61 * +-------------------+-------------------+
62 * | 'u' | 'C' | 'P' | 'r' |
63 * +-------------------+-------------------+
64 * | Length | Padding |
65 * +-------------------+-------------------+
66 * | Data | The data segment does not need to end on
67 * | . | a four-byte boundary, as might be inferred
68 * | . | from this diagram.
69 * | . |
70 * +-------------------+-------------------+
71 * | Checksum| '/' |
72 * +-------------------+
73 *********************************************************************************************************
74 */
75
76 /* ------------- INBOUND PACKET DELIMITERS ------------ */
77 #define PROBE_RS232_PROTOCOL_RX_SD0 0x75 /* (A) Start delimiters */
78 #define PROBE_RS232_PROTOCOL_RX_SD1 0x43
79 #define PROBE_RS232_PROTOCOL_RX_SD2 0x50
80 #define PROBE_RS232_PROTOCOL_RX_SD3 0x72
81 #define PROBE_RS232_PROTOCOL_RX_ED 0x2F /* (E) End delimiter */
82
83 /* ------------ OUTBOUND PACKET DELIMITERS ------------ */
84 #define PROBE_RS232_PROTOCOL_TX_SD0 0x75 /* (A) Start delimiters */
85 #define PROBE_RS232_PROTOCOL_TX_SD1 0x43
86 #define PROBE_RS232_PROTOCOL_TX_SD2 0x50
87 #define PROBE_RS232_PROTOCOL_TX_SD3 0x72
88 #define PROBE_RS232_PROTOCOL_TX_ED 0x2F /* (E) End delimiter */
89
90 /* ----------- RECEIVE STATE MACHINE STATES ----------- */
91 #define PROBE_RS232_RX_STATE_SD0 0 /* (0) waiting for start first start delimiter (SD0) */
92 #define PROBE_RS232_RX_STATE_SD1 1 /* (1) waiting for start second start delimiter (SD1) */
93 #define PROBE_RS232_RX_STATE_SD2 2 /* (2) waiting for start third start delimiter (SD2) */
94 #define PROBE_RS232_RX_STATE_SD3 3 /* (3) waiting for start fourth start delimiter (SD3) */
95 #define PROBE_RS232_RX_STATE_LEN1 4 /* (4) waiting for length, first byte */
96 #define PROBE_RS232_RX_STATE_LEN2 5 /* (5) waiting for length, second byte */
97 #define PROBE_RS232_RX_STATE_PAD1 6 /* (6) waiting for padding, first byte */
98 #define PROBE_RS232_RX_STATE_PAD2 7 /* (6) waiting for padding, second byte */
99 #define PROBE_RS232_RX_STATE_DATA 8 /* (6) waiting for data */
100 #define PROBE_RS232_RX_STATE_CHKSUM 9 /* (7) waiting for checksum */
101 #define PROBE_RS232_RX_STATE_ED 10 /* (8) waiting for end delimiter */
102
103 /* ---------- TRANSMIT STATE MACHINE STATES ----------- */
104 #define PROBE_RS232_TX_STATE_SD0 0 /* (0) waiting to send start first start delim. (SD0) */
105 #define PROBE_RS232_TX_STATE_SD1 1 /* (1) waiting to send start second start delim. (SD1) */
106 #define PROBE_RS232_TX_STATE_SD2 2 /* (2) waiting to send start third start delim. (SD2) */
107 #define PROBE_RS232_TX_STATE_SD3 3 /* (3) waiting to send start fourth start delim. (SD3) */
108 #define PROBE_RS232_TX_STATE_LEN1 4 /* (4) waiting to send length, first byte */
109 #define PROBE_RS232_TX_STATE_LEN2 5 /* (5) waiting to send length, second byte */
110 #define PROBE_RS232_TX_STATE_PAD1 6 /* (6) waiting to send padding, first byte */
111 #define PROBE_RS232_TX_STATE_PAD2 7 /* (7) waiting to send padding, second byte */
112 #define PROBE_RS232_TX_STATE_DATA 8 /* (8) waiting to send data */
113 #define PROBE_RS232_TX_STATE_CHKSUM 9 /* (9) waiting to send checksum */
114 #define PROBE_RS232_TX_STATE_ED 10 /* (10) waiting to send end delimiter */
115
116
117 /*
118 *********************************************************************************************************
119 * LOCAL CONSTANTS
120 *********************************************************************************************************
121 */
122
123
124 /*
125 *********************************************************************************************************
126 * LOCAL DATA TYPES
127 *********************************************************************************************************
128 */
129
130
131 /*
132 *********************************************************************************************************
133 * LOCAL TABLES
134 *********************************************************************************************************
135 */
136
137
138 /*
139 *********************************************************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -