88ee1883 by 张亚玄

add AT system

1 parent bbbcab84
......@@ -28,9 +28,7 @@
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.1032586580" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.558548144" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g3" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths.2084640704" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;F:\IoT\STM32\workspace\STM32Test\Core\Src\LED&quot;"/>
<listOptionValue builtIn="false" value="../Core/Inc/Hardware"/>
<listOptionValue builtIn="false" value="../Core/Inc/LED"/>
</option>
<inputType id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input.119923394" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.input"/>
</tool>
......@@ -117,7 +115,6 @@
<tool id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.59085921" name="MCU GCC Assembler" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler">
<option id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.1981320207" name="Debug level" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel" value="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.debuglevel.value.g0" valueType="enumerated"/>
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths.1229672740" name="Include paths (-I)" superClass="com.st.stm32cube.ide.mcu.gnu.managedbuild.tool.assembler.option.includepaths" valueType="includePath">
<listOptionValue builtIn="false" value="&quot;F:\IoT\STM32\workspace\STM32Test\Core\Src\LED&quot;"/>
<listOptionValue builtIn="false" value="../Core/Inc/Hardware"/>
<listOptionValue builtIn="false" value="../Core/Inc/LED"/>
</option>
......@@ -193,5 +190,12 @@
</scannerConfigBuildInfo>
</storageModule>
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
<storageModule moduleId="refreshScope"/>
<storageModule moduleId="refreshScope" versionNumber="2">
<configuration configurationName="Debug">
<resource resourceType="PROJECT" workspacePath="/STM32Test"/>
</configuration>
<configuration configurationName="Release">
<resource resourceType="PROJECT" workspacePath="/STM32Test"/>
</configuration>
</storageModule>
</cproject>
......
!.c
!.h
Debug
Release
\ No newline at end of file
......
com.st.stm32cube.ide.mcu.ide.oss.source.checker.libnano.problem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Float formatting support\\")"}
eclipse.preferences.version=1
org.eclipse.cdt.codan.checkers.errnoreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return\\")",implicit\=>false}
org.eclipse.cdt.codan.checkers.errreturnvalue.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused return value\\")"}
org.eclipse.cdt.codan.checkers.nocommentinside.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Nesting comments\\")"}
org.eclipse.cdt.codan.checkers.nolinecomment.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Line comments\\")"}
org.eclipse.cdt.codan.checkers.noreturn.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No return value\\")",implicit\=>false}
org.eclipse.cdt.codan.internal.checkers.AbstractClassCreation.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Abstract class cannot be instantiated\\")"}
org.eclipse.cdt.codan.internal.checkers.AmbiguousProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Ambiguous problem\\")"}
org.eclipse.cdt.codan.internal.checkers.AssignmentInConditionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment in condition\\")"}
org.eclipse.cdt.codan.internal.checkers.AssignmentToItselfProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Assignment to itself\\")"}
org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.CStyleCastProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"C-Style cast instead of C++ cast\\")"}
org.eclipse.cdt.codan.internal.checkers.CaseBreakProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"No break at end of case\\")",no_break_comment\=>"no break",last_case_param\=>false,empty_case_param\=>false,enable_fallthrough_quickfix_param\=>false}
org.eclipse.cdt.codan.internal.checkers.CatchByReference.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Catching by reference is recommended\\")",unknown\=>false,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.CircularReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Circular inheritance\\")"}
org.eclipse.cdt.codan.internal.checkers.ClassMembersInitialization.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class members should be properly initialized\\")",skip\=>true}
org.eclipse.cdt.codan.internal.checkers.CopyrightProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.CopyrightProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Lack of copyright information\\")",regex\=>".*Copyright.*"}
org.eclipse.cdt.codan.internal.checkers.DecltypeAutoProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid 'decltype(auto)' specifier\\")"}
org.eclipse.cdt.codan.internal.checkers.FieldResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Field cannot be resolved\\")"}
org.eclipse.cdt.codan.internal.checkers.FunctionResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Function cannot be resolved\\")"}
org.eclipse.cdt.codan.internal.checkers.GotoStatementProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.GotoStatementProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Goto statement used\\")"}
org.eclipse.cdt.codan.internal.checkers.InvalidArguments.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid arguments\\")"}
org.eclipse.cdt.codan.internal.checkers.InvalidTemplateArgumentsProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid template argument\\")"}
org.eclipse.cdt.codan.internal.checkers.LabelStatementNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Label statement not found\\")"}
org.eclipse.cdt.codan.internal.checkers.MemberDeclarationNotFoundProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Member declaration not found\\")"}
org.eclipse.cdt.codan.internal.checkers.MethodResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Method cannot be resolved\\")"}
org.eclipse.cdt.codan.internal.checkers.MissCaseProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.MissCaseProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing cases in switch\\")"}
org.eclipse.cdt.codan.internal.checkers.MissDefaultProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.MissDefaultProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing default in switch\\")",defaultWithAllEnums\=>false}
org.eclipse.cdt.codan.internal.checkers.MissReferenceProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.MissReferenceProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing reference return value in assignment operator\\")"}
org.eclipse.cdt.codan.internal.checkers.MissSelfCheckProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.MissSelfCheckProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Missing self check in assignment operator\\")"}
org.eclipse.cdt.codan.internal.checkers.NamingConventionFunctionChecker.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Name convention for function\\")",pattern\=>"^[a-z]",macro\=>true,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.NonVirtualDestructorProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Class has a virtual method and non-virtual destructor\\")"}
org.eclipse.cdt.codan.internal.checkers.OverloadProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid overload\\")"}
org.eclipse.cdt.codan.internal.checkers.RedeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redeclaration\\")"}
org.eclipse.cdt.codan.internal.checkers.RedefinitionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Invalid redefinition\\")"}
org.eclipse.cdt.codan.internal.checkers.ReturnStyleProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Return with parenthesis\\")"}
org.eclipse.cdt.codan.internal.checkers.ScanfFormatStringSecurityProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Format String Vulnerability\\")"}
org.eclipse.cdt.codan.internal.checkers.StatementHasNoEffectProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Statement has no effect\\")",macro\=>true,exceptions\=>()}
org.eclipse.cdt.codan.internal.checkers.SuggestedParenthesisProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suggested parenthesis around expression\\")",paramNot\=>false}
org.eclipse.cdt.codan.internal.checkers.SuspiciousSemicolonProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Suspicious semicolon\\")",else\=>false,afterelse\=>false}
org.eclipse.cdt.codan.internal.checkers.TypeResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Type cannot be resolved\\")"}
org.eclipse.cdt.codan.internal.checkers.UnusedFunctionDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused function declaration\\")",macro\=>true}
org.eclipse.cdt.codan.internal.checkers.UnusedStaticFunctionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused static function\\")",macro\=>true}
org.eclipse.cdt.codan.internal.checkers.UnusedVariableDeclarationProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Unused variable declaration in file scope\\")",macro\=>true,exceptions\=>("@(\#)","$Id")}
org.eclipse.cdt.codan.internal.checkers.UsingInHeaderProblem=-Warning
org.eclipse.cdt.codan.internal.checkers.UsingInHeaderProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Using directive in header\\")"}
org.eclipse.cdt.codan.internal.checkers.VariableResolutionProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Symbol is not resolved\\")"}
org.eclipse.cdt.codan.internal.checkers.VirtualMethodCallProblem=-Error
org.eclipse.cdt.codan.internal.checkers.VirtualMethodCallProblem.params={launchModes\=>{RUN_ON_FULL_BUILD\=>true,RUN_ON_INC_BUILD\=>true,RUN_ON_FILE_OPEN\=>false,RUN_ON_FILE_SAVE\=>false,RUN_AS_YOU_TYPE\=>true,RUN_ON_DEMAND\=>true},suppression_comment\=>"@suppress(\\"Virtual method call in constructor/destructor\\")"}
/*
* ATSystem.h
*
* Created on: Nov 1, 2019
* Author: Hope
*/
#ifndef INC_ATSYSTEM_H_
#define INC_ATSYSTEM_H_
/* Includes ------------------------------------------------------------------*/
#include "usart.h"
/*****************************
* Private Define
*/
#define TRUE 1
#define FALSE 0
/*****************************************
config
****************************************/
/*********************
* compile options
*/
#define AT_FCS_VERIFY FALSE
#define AT_DEBUG_INF_SHOW FALSE
#define AT_CMD_PATTERN_CHECK TRUE
#define AT_UART_BACKSPACE FALSE
#define AT_SHOW_STATE_CHANGE FALSE
/********************************************************
* define UART message sent
*******************************************************/
#define AT_RESP(str, len) HAL_UART_Transmit(&huart2, (uint8_t*)str, len, 1000)
#define AT_OK() AT_RESP("\r\nOK\r\n", sizeof("\r\nOK\r\n")-1)
#define AT_NEXT_LINE() AT_RESP("\r\n", 2)
#define AT_NEW_LINE() AT_RESP("\r\n", 2)
#define AT_ERROR(x) AT_UARTWriteErrMsg(x)
#if AT_DEBUG_INF_SHOW
#define AT_DEBUG(str, len) AT_RESP(str, len)
#else
#define AT_DEBUG(str, len)
#endif
#if AT_CMD_PATTERN_CHECK
#define AT_PARSE_CMD_PATTERN_ERROR(x,y) \
{uint8_t err; \
err = AT_Pattern_Check(x,y); \
if (err != 0) { AT_ERROR(err); return;} }
#else
#define AT_PARSE_CMD_PATTERN_ERROR(x,y)
#endif
#if AT_CMD_PATTERN_CHECK
#define AT_PARSE_SINGLE_CMD_PATTERN_ERROR(x,y) \
{ if (x[0] != y->symbol) {AT_ERROR(AT_INVALID_PARA); return;}}
#else
#define AT_PARSE_CMD_PATTERN_ERROR(x,y)
#endif
/*********************************************************************
* DATA STRUCTURE
*/
typedef struct {
uint8_t symbol;
uint8_t unitLen;
uint8_t* unit;
} AT_CmdUnit;
typedef void (*AT_CmdFn_t)(uint8_t cmd_ptr, uint8_t* msg_ptr);
typedef struct {
char* AT_Cmd_str;
AT_CmdFn_t AT_CmdFn;
char* ATCmdDescription;
} AT_Cmd_t;
/*********************
* error message
*/
#define AT_NO_ERROR 0x00 // Everything OK - Success
#define AT_FATAL_ERROR 0x01 // Fatal Error
#define AT_UNKNOWN_CMD 0x02 // Unknown command
#define AT_LACK_CMD 0x03 // lack command
#define AT_INVALID_PARA 0x04 // Invalid parameter
#define AT_LACK_OPERATOR 0x05
#define AT_LACK_PARA 0x06
/*********************
* command constants
*/
#define AT_CMD_HELP_DESC_OFFSET 17
/*********************************************************************
* GLOBAL VARIABLES
*/
extern void AT_Process(uint8_t ch);
extern void AT_UARTWriteErrMsg(uint8_t errCode);
#endif /* INC_ATSYSTEM_H_ */
......@@ -39,7 +39,6 @@ extern UART_HandleTypeDef huart2;
extern uint8_t USART1_RingBuff[USART1_BUF_LEN]; // 接收缓冲
#define AT_RESP(str, len) HAL_UART_Transmit(&huart2, (uint8_t*)str, len, 1000)
#define DEBUG_PRINT(str, len) HAL_UART_Transmit(&huart1, (uint8_t*)str, len, 1000)
/* USER CODE END Private defines */
......
/*
* ATSystem.c
*
* Created on: Nov 1, 2019
* Author: Yasin
*/
/*********************************************************************
* INCLUDES
*/
#include "ATSystem.h"
#include <string.h>
/*********************************************************************
* CONSTANTS
*/
#define AT_HEAD_STATE1 0x00
#define AT_HEAD_STATE2 0x01
#define AT_DATA_STATE 0x02
#define AT_FCS_STATE 0x03
#define AT_CMD_BUFF_MAX 150
/*********************************************************************
* LOCAL FUNCTIONS
*/
static void AT_HandleCMD( uint8_t *msg_ptr );
static uint8_t AT_get_next_cmdUnit( AT_CmdUnit* cmdUnit, uint8_t start_point, uint8_t* msg );
static int AT_CmdCmp( AT_CmdUnit* cmdUnit, uint8_t* str2 );
static void AT_UpperCaseCmd( AT_CmdUnit *cmdUnit );
#if AT_FCS_VERIFY
static byte AT_UartCalcFCS( uint8_t *msg_ptr, uint8_t len );
#endif
void AT_Cmd_Help( uint8_t cmd_ptr, uint8_t* msg_ptr );
/*********************************************************************
* LOCAL VARIABLES
*/
uint8_t AT_RxBuffer[AT_CMD_BUFF_MAX]; // UART Rx buffer
uint8_t at_state = AT_HEAD_STATE1; // AT_command_Rx_state
uint8_t AT_templen = 0; // the length of AT_command
const AT_Cmd_t AT_Cmd_Arr[] = {
{"BLOAD", NULL, "Enter The Boot Loader Menu"},
{"HELP", AT_Cmd_Help, "show all the AT commands"},
};
const uint16_t AT_CMD_SZ = sizeof(AT_Cmd_Arr) / sizeof(AT_Cmd_Arr[0]);
/***************************************************************************************************
* @fn AT_Process
*
* @brief | Head | Data | End | FCS |
* | 2 | 0-Len | 1 | 1 |
* | AT | ? | '\r' | verify |
*
* @field processed by AT_HandleCMD() : Data + End('\r')
* @field verified by AT_UartCalcFCS(): Data + End('\r')
*
* Parses the data and send the data to correct place (AT or APP)
*
* @param port - UART port
* @param event - Event that causes the callback
*
*
* @return None
***************************************************************************************************/
void AT_Process(uint8_t ch)
{
/*
* due to the AT_Process may be re-entried during AT_HandleCMD aused by HallUARTPollISR,
* which is denergerous, As a result of some command ERROR, so we prevent the function from being re-entryed
*/
static uint8_t isProcessing = FALSE;
if (isProcessing) return;
isProcessing = TRUE;
switch (at_state) {
case AT_HEAD_STATE1:
if (ch == 'A' || ch == 'a')
at_state = AT_HEAD_STATE2;
break;
case AT_HEAD_STATE2:
if (ch == 'T' || ch == 't')
at_state = AT_DATA_STATE;
else if (ch == 'A' || ch == 'a')
at_state = AT_HEAD_STATE2;
else
at_state = AT_HEAD_STATE1;
break;
case AT_DATA_STATE:
#if AT_UART_BACKSPACE
if (ch == '\b' || ch == '\x7f')
{ // for backspace function, allow user to delete characters
if (AT_templen > 0)
AT_templen--;
break;
}
#endif
if (ch == '\r')
{
AT_RxBuffer[AT_templen++] = '\r';
#if AT_FCS_VERIFY
at_state = AT_FCS_STATE;
break;
#else
AT_HandleCMD(AT_RxBuffer);
memset(AT_RxBuffer, 0x00, AT_templen);
AT_templen = 0;
at_state = AT_HEAD_STATE1;
#endif
}
else
{
if (AT_templen < (AT_CMD_BUFF_MAX - 1)) {
AT_RxBuffer[AT_templen++] = ch;
// still in AT_DATA_STATE;
} else {
memset(AT_RxBuffer, 0, AT_CMD_BUFF_MAX);
AT_templen = 0;
at_state = AT_HEAD_STATE1;
}
}
break;
#if AT_FCS_VERIFY
case AT_FCS_STATE:
/* Make sure it's correct */
if ((AT_UartCalcFCS(AT_RxBuffer, AT_templen) == ch))
{
AT_HandleCMD(AT_RxBuffer);
osal_memset(AT_RxBuffer, 0x00, AT_templen);
AT_templen = 0;
}
else
{
AT_ERROR(AT_FATAL_ERROR); // SEND FCS ERROR MSG AT_FATAL_ERROR
}
/* Reset the state, send or discard the buffers at this point */
at_state = AT_HEAD_STATE1;
break;
#endif
default:
break;
}
isProcessing = FALSE;
}
#if AT_FCS_VERIFY
/***************************************************************************************************
* @fn AT_UartCalcFCS
*
* @brief Calculate the FCS of a message buffer by XOR'ing each byte.
* Remember to NOT include Head fields, so start at the CMD field.
*
* @param byte *msg_ptr - message pointer
* @param byte len - length (in bytes) of message
*
* @return result byte
***************************************************************************************************/
static byte AT_UartCalcFCS( uint8_t *msg_ptr, uint8_t len )
{
byte x;
byte xorResult;
xorResult = 0;
for ( x = 0; x < len; x++, msg_ptr++ )
xorResult = xorResult ^ *msg_ptr;
return ( xorResult );
}
#endif
/***************************************************************************************************
* @fn AT_HandleCMD
*
* @brief Parse the AT_commands and call it's response function
*
* @param byte *msg_ptr - message pointer
*
* @return None
***************************************************************************************************/
static void AT_HandleCMD( uint8_t *msg_ptr )
{
uint8_t cmd_ptr = 0;
uint16_t i;
AT_DEBUG("\r\n", 2);
AT_DEBUG(msg_ptr, getLength(msg_ptr, 0x02));
// Get next cmdUnit and upper case it
AT_CmdUnit cmdUnit;
cmd_ptr = AT_get_next_cmdUnit(&cmdUnit, cmd_ptr, msg_ptr);
AT_UpperCaseCmd(&cmdUnit);
// process the cmdUnit
if (cmdUnit.symbol == '\r') { // which means there is no followed operator or command
AT_OK();
}
else if (cmdUnit.symbol == '\0') {
AT_ERROR(AT_LACK_OPERATOR);
}
else if (cmdUnit.symbol == '+') {
for (i = 0; i < AT_CMD_SZ; i++) {
if (AT_CmdCmp(&cmdUnit, (uint8_t*)AT_Cmd_Arr[i].AT_Cmd_str) == 0) {
#if AT_DEBUG_INF_SHOW
AT_NEXT_LINE();
AT_RESP(AT_Cmd_Arr[i].ATCmdDescription, strlen(AT_Cmd_Arr[i].ATCmdDescription));
#endif
AT_Cmd_Arr[i].AT_CmdFn(cmd_ptr, msg_ptr);
break;
}
}
if (AT_CMD_SZ == i) {
if (AT_CmdCmp(&cmdUnit, (uint8_t*)"") == 0) {
AT_ERROR(AT_LACK_CMD);
} else {
AT_ERROR(AT_UNKNOWN_CMD);
}
}
}
else {
AT_ERROR(AT_INVALID_PARA);
}
}
/***************************************************************************************************
* @fn AT_UARTWriteErrMsg
*
* @brief Send error messages
* Respose :
* ERROR:<error code>
*
*
* @param uint8_t errCode - indicate different error
* @param uint8_t fn - type of error
*
* @return None
***************************************************************************************************/
void AT_UARTWriteErrMsg( uint8_t errCode )
{
uint8_t* errMsg_t = (uint8_t*)"\r\nERROR:XX\r\n";
uint8_t errMsg[sizeof("\r\nERROR:XX\r\n")];
uint8_t ch;
uint8_t* pStr = &errMsg[sizeof("\r\nERROR:")-1];
for (int i = 0; i < sizeof(errMsg); i++) {
errMsg[i] = errMsg_t[i];
}
ch = (errCode >> 4) & 0x0F;
*pStr++ = ch + ((ch < 10) ? '0' : '7');
ch = errCode & 0x0F;
*pStr++ = ch + ((ch < 10) ? '0' : '7');
AT_RESP(errMsg, sizeof("\r\nERROR:XX\r\n")-1);
}
/***************************************************************************************************
* @fn AT_get_next_cmdUnit
*
* @brief The command have servel unit, this funciton get the next unit
* and save it in cmdUnit(type of AT_CmdUnit, see in AT_UART.h)
*
* @param AT_CmdUnit* cmdUnit - the place to save the cmd unit
* @param uint8_t start_point - the point show the place we start scan the command
* @param uint8_t* msg - the command to scan
*
* @return start_point
***************************************************************************************************/
uint8_t AT_get_next_cmdUnit( AT_CmdUnit* cmdUnit, uint8_t start_point, uint8_t* msg )
{
cmdUnit->unitLen=0;
for(;;start_point++){
if(msg[start_point] == ' '|| msg[start_point] == '\0'){
continue;
}
else if((msg[start_point]<='z' && msg[start_point]>='a') ||
(msg[start_point]<='Z' && msg[start_point]>='A') ||
(msg[start_point]<='9' && msg[start_point]>='0')){
cmdUnit->symbol ='\0'; //indicate no operator
break;
}
else if(msg[start_point] == '\r'){ //indicate the end of one command
cmdUnit->symbol =msg[start_point];
return start_point;
}
else {
cmdUnit->symbol =msg[start_point];
start_point++;
break;
}
}
for(;;start_point++){
if(msg[start_point] == ' '|| msg[start_point] == '\0'){
continue;
}
else while((msg[start_point]<='z' && msg[start_point]>='a') ||
(msg[start_point]<='Z' && msg[start_point]>='A') ||
(msg[start_point]<='9' && msg[start_point]>='0') ) {
if(cmdUnit->unitLen==0) cmdUnit->unit = &msg[start_point];
cmdUnit->unitLen++;
start_point++;
}
return start_point;
}
}
/***************************************************************************************************
* @fn AT_CmdCmp
*
* @brief Compare with str2, if equal, return 0; else return cmdUnit.unit[i] - str2[i]
*
* @param AT_CmdUnit* cmdUnit - the cmd unit need to be upper cased
* @param uint8_t* str2 - the string to compare with
*
* @return int8
***************************************************************************************************/
int AT_CmdCmp( AT_CmdUnit* cmdUnit, uint8_t* str2 )
{
int i;
for(i = 0; i < cmdUnit->unitLen; i++) {
if (cmdUnit->unit[i] != str2[i]) {
return cmdUnit->unit[i] - str2[i];
}
}
return 0 - str2[cmdUnit->unitLen];
}
/***************************************************************************************************
* @fn AT_UpperCaseCmd
*
* @brief Upper case the command
*
* @param AT_CmdUnit* cmdUnit - the cmd unit need to be upper cased
*
* @return None
***************************************************************************************************/
void AT_UpperCaseCmd( AT_CmdUnit *cmdUnit )
{
uint8_t i;
for (i = 0; i < cmdUnit->unitLen; i++) {
if (cmdUnit->unit[i] <= 'z' && cmdUnit->unit[i] >= 'a') {
cmdUnit->unit[i] += ('A' - 'a');
}
}
}
#if AT_CMD_PATTERN_CHECK
static uint8_t AT_Pattern_Check( char* pattern, AT_CmdUnit* cmdUnitArr );
/***************************************************************************************************
* @fn AT_Pattern_Check
*
* @brief Check the command pattern
*
* @param char* pattern - the pattern to be checked
* @param AT_CmdUnit* cmdUnitArr - the command unit
*
* @return uint8_t
***************************************************************************************************/
uint8_t AT_Pattern_Check( char* pattern, AT_CmdUnit* cmdUnitArr )
{
uint8_t i=0;
for(;pattern[i+1]!='\0';i++) {
if(pattern[i] != cmdUnitArr[i].symbol){
if(cmdUnitArr[i].symbol =='\0') return AT_LACK_OPERATOR;
else if(cmdUnitArr[i].symbol =='\r') return AT_LACK_PARA;
else return AT_INVALID_PARA;
}
}
if(pattern[i]=='\r') {
if(cmdUnitArr[i].symbol!='\r') return AT_INVALID_PARA;
}
else{
if(pattern[i] != cmdUnitArr[i].symbol){
if(cmdUnitArr[i].symbol =='\0') return AT_LACK_OPERATOR;
else if(cmdUnitArr[i].symbol =='\r') return AT_LACK_PARA;
else return AT_INVALID_PARA;
}
}
return AT_NO_ERROR;
}
#endif
/*******************************************************************************
* @fn AT_Cmd_Help
*
* @brief AT+HELP - show all the AT commands
*
* @param uint8_t cmd_ptr - the point show the place we start scan the command
* @param uint8_t* msg_ptr - the message pointer
*
* @return None
******************************************************************************/
void AT_Cmd_Help( uint8_t cmd_ptr, uint8_t* msg_ptr )
{
AT_CmdUnit cmdUnitArr[1];
cmd_ptr = AT_get_next_cmdUnit(&cmdUnitArr[0], cmd_ptr, msg_ptr);
AT_PARSE_CMD_PATTERN_ERROR("\r",cmdUnitArr);
uint8_t i;
AT_NEW_LINE();
for(i = 0; i < AT_CMD_SZ; i++) {
// uint8_t j;
AT_NEXT_LINE();
AT_RESP("AT+", 3);
AT_RESP(AT_Cmd_Arr[i].AT_Cmd_str, strlen(AT_Cmd_Arr[i].AT_Cmd_str));
AT_RESP(".................", AT_CMD_HELP_DESC_OFFSET - strlen(AT_Cmd_Arr[i].AT_Cmd_str)-3);
AT_RESP(AT_Cmd_Arr[i].ATCmdDescription, strlen(AT_Cmd_Arr[i].ATCmdDescription));
}
AT_NEW_LINE();
AT_OK();
}
......@@ -30,6 +30,7 @@
#include "beep.h"
#include "key.h"
#include "usart.h"
#include "ATSystem.h"
/* USER CODE END Includes */
/* Private typedef -----------------------------------------------------------*/
......@@ -269,6 +270,7 @@ void StartUartTask(void *argument)
{
RINGBUF_READ(&temp, 1);
mprintf("%c", temp);
AT_Process(temp);
}
times++;
......