QuakeGod
2023-02-01 828d914304e29f5d8202df87393ce6744e528fdd
Merge remote-tracking branch 'origin/klink' into kNet
1个文件已添加
9个文件已修改
5529 ■■■■■ 已修改文件
Inc/KBus.h 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Inc/KLink.h 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Inc/ModbusRTU.h 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Inc/functions.h 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
MDK-ARM/F030C8T6_KLink.uvprojx 659 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
MDK-ARM/JLinkLog.txt 4764 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Src/FP0.c 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Src/ModbusRTU.c 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Src/functions.c 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Src/main.c 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Inc/KBus.h
@@ -190,13 +190,13 @@
typedef struct tagPacket
    {
        unsigned char Sign;        //起始标记
        unsigned char DstHost;    //目标地址
        unsigned char SrcAddr;    //源地址
        unsigned char nCMD;        //命令
        unsigned char nSEQ;        //序列号
        unsigned char PacketLen;    //数据载荷长度    不包括头部5个字节,不包括尾部BCC。
        unsigned char data[1];        //数据载荷,最末尾是BCC,数据长度为0时,实际也有一个数据。
        unsigned char Sign;        //起始标记
        unsigned char DstHost;    //目标地址
        unsigned char SrcAddr;    //源地址
        unsigned char nCMD;        //命令
        unsigned char nSEQ;        //序列号
        unsigned char PacketLen;    //数据载荷长度    不包括头部5个字节,不包括尾部BCC。
        unsigned char data[1];        //数据载荷,最末尾是BCC,数据长度为0时,实际也有一个数据。
    }stPacket,* pPacket;    
enum eResult
Inc/KLink.h
@@ -189,20 +189,20 @@
/*
typedef struct tagKLPktHdr
{
        unsigned char StSign;        //起始标记
        unsigned char SrcAddr;    //源地址
        unsigned char DstHost;    //目标地址
        unsigned char nCMD;        //命令
        unsigned char StSign;        //起始标记
        unsigned char SrcAddr;    //源地址
        unsigned char DstHost;    //目标地址
        unsigned char nCMD;        //命令
    
}stKLPtHdr, * pKLPktHdr;
*/
/*
typedef struct tagKLRdPkt
{
        unsigned char StSign;        //起始标记
        unsigned char SrcAddr;    //源地址
        unsigned char DstHost;    //目标地址
        unsigned char nCMD;        //命令
        unsigned char StSign;        //起始标记
        unsigned char SrcAddr;    //源地址
        unsigned char DstHost;    //目标地址
        unsigned char nCMD;        //命令
        unsigned char nType;
        unsigned char nAddr;    //
}stKLRdPkt,* pKLRdKpt;
@@ -210,13 +210,13 @@
/*
typedef struct tagKLPacket
    {
        unsigned char StSign;        //起始标记
        unsigned char SrcAddr;    //源地址
        unsigned char DstHost;    //目标地址
        unsigned char nCMD;        //命令
        unsigned char nSEQ;        //序列号
        unsigned char LoadLen;    //数据载荷长度    不包括头部5个字节,不包括尾部BCC。
        unsigned char data[1];        //数据载荷,最末尾是BCC,数据长度为0时,实际也有一个数据。
        unsigned char StSign;        //起始标记
        unsigned char SrcAddr;    //源地址
        unsigned char DstHost;    //目标地址
        unsigned char nCMD;        //命令
        unsigned char nSEQ;        //序列号
        unsigned char LoadLen;    //数据载荷长度    不包括头部5个字节,不包括尾部BCC。
        unsigned char data[1];        //数据载荷,最末尾是BCC,数据长度为0时,实际也有一个数据。
    }stKLPacket,* pKLPacket;    
*/
Inc/ModbusRTU.h
@@ -24,18 +24,18 @@
enum enModbusRTUCmd
{
    None =0,
    ReadCoils =1, //读线圈
    ReadInputs =2,  //读离散量输入
    ReadKeepRegs =3,    //读保持寄存器
    ReadInputRegs =4,    //读输入寄存器
    WriteCoil = 5,        //写单个线圈
    WriteReg =6,        //写单个寄存器
    ReadExptStat = 7,  //读取异常状态
    ReadCoils =1, //读线圈
    ReadInputs =2,  //读离散量输入
    ReadKeepRegs =3,    //读保持寄存器
    ReadInputRegs =4,    //读输入寄存器
    WriteCoil = 5,        //写单个线圈
    WriteReg =6,        //写单个寄存器
    ReadExptStat = 7,  //读取异常状态
    FetchCommEventCtr =11,   //Fetch Comm Event Ctr
                                                     // 12 Fetch Comm Event Log
                                                    
    WriteCoils =15,                //写多个线圈
    WriteRegs = 16,        //写多个寄存器
    WriteCoils =15,                //写多个线圈
    WriteRegs = 16,        //写多个寄存器
                                        //17 Report Slave ID
                                        //20 Read General Reference
                                        //21 Write General Reference
Inc/functions.h
@@ -21,7 +21,7 @@
extern volatile unsigned int CurTickuS;    
//extern volatile unsigned int ThisRunTime;    
//extern volatile unsigned int TotalRunTime;
//extern volatile unsigned int PwrCount;                //开机次数
//extern volatile unsigned int PwrCount;                //开机次数
typedef unsigned char uint8_t;
typedef unsigned char uchar;
MDK-ARM/F030C8T6_KLink.uvprojx
New file
@@ -0,0 +1,659 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_projx.xsd">
  <SchemaVersion>2.1</SchemaVersion>
  <Header>### uVision Project, (C) Keil Software</Header>
  <Targets>
    <Target>
      <TargetName>F030C8T6_Test2</TargetName>
      <ToolsetNumber>0x4</ToolsetNumber>
      <ToolsetName>ARM-ADS</ToolsetName>
      <pCCUsed>5060422::V5.06 update 4 (build 422)::ARMCC</pCCUsed>
      <TargetOption>
        <TargetCommonOption>
          <Device>STM32F030C8Tx</Device>
          <Vendor>STMicroelectronics</Vendor>
          <PackID>Keil.STM32F0xx_DFP.2.1.0</PackID>
          <PackURL>http://www.keil.com/pack/</PackURL>
          <Cpu>IRAM(0x20000000,0x00002000) IROM(0x08000000,0x00010000) CPUTYPE("Cortex-M0") CLOCK(12000000) ELITTLE</Cpu>
          <FlashUtilSpec></FlashUtilSpec>
          <StartupFile></StartupFile>
          <FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32F0xx_64 -FS08000000 -FL010000 -FP0($$Device:STM32F030C8Tx$CMSIS\Flash\STM32F0xx_64.FLM))</FlashDriverDll>
          <DeviceId>0</DeviceId>
          <RegisterFile>$$Device:STM32F030C8Tx$Drivers\CMSIS\Device\ST\STM32F0xx\Include\stm32f0xx.h</RegisterFile>
          <MemoryEnv></MemoryEnv>
          <Cmp></Cmp>
          <Asm></Asm>
          <Linker></Linker>
          <OHString></OHString>
          <InfinionOptionDll></InfinionOptionDll>
          <SLE66CMisc></SLE66CMisc>
          <SLE66AMisc></SLE66AMisc>
          <SLE66LinkerMisc></SLE66LinkerMisc>
          <SFDFile>$$Device:STM32F030C8Tx$CMSIS\SVD\STM32F0x0.svd</SFDFile>
          <bCustSvd>0</bCustSvd>
          <UseEnv>0</UseEnv>
          <BinPath></BinPath>
          <IncludePath></IncludePath>
          <LibPath></LibPath>
          <RegisterFilePath></RegisterFilePath>
          <DBRegisterFilePath></DBRegisterFilePath>
          <TargetStatus>
            <Error>0</Error>
            <ExitCodeStop>0</ExitCodeStop>
            <ButtonStop>0</ButtonStop>
            <NotGenerated>0</NotGenerated>
            <InvalidFlash>1</InvalidFlash>
          </TargetStatus>
          <OutputDirectory>F030C8T6_Test2\</OutputDirectory>
          <OutputName>F030C8T6_Test2</OutputName>
          <CreateExecutable>1</CreateExecutable>
          <CreateLib>0</CreateLib>
          <CreateHexFile>1</CreateHexFile>
          <DebugInformation>1</DebugInformation>
          <BrowseInformation>1</BrowseInformation>
          <ListingPath>.\F030C8T6_Test2\</ListingPath>
          <HexFormatSelection>1</HexFormatSelection>
          <Merge32K>0</Merge32K>
          <CreateBatchFile>0</CreateBatchFile>
          <BeforeCompile>
            <RunUserProg1>0</RunUserProg1>
            <RunUserProg2>0</RunUserProg2>
            <UserProg1Name></UserProg1Name>
            <UserProg2Name></UserProg2Name>
            <UserProg1Dos16Mode>0</UserProg1Dos16Mode>
            <UserProg2Dos16Mode>0</UserProg2Dos16Mode>
            <nStopU1X>0</nStopU1X>
            <nStopU2X>0</nStopU2X>
          </BeforeCompile>
          <BeforeMake>
            <RunUserProg1>0</RunUserProg1>
            <RunUserProg2>0</RunUserProg2>
            <UserProg1Name></UserProg1Name>
            <UserProg2Name></UserProg2Name>
            <UserProg1Dos16Mode>0</UserProg1Dos16Mode>
            <UserProg2Dos16Mode>0</UserProg2Dos16Mode>
            <nStopB1X>0</nStopB1X>
            <nStopB2X>0</nStopB2X>
          </BeforeMake>
          <AfterMake>
            <RunUserProg1>0</RunUserProg1>
            <RunUserProg2>0</RunUserProg2>
            <UserProg1Name></UserProg1Name>
            <UserProg2Name></UserProg2Name>
            <UserProg1Dos16Mode>0</UserProg1Dos16Mode>
            <UserProg2Dos16Mode>0</UserProg2Dos16Mode>
            <nStopA1X>0</nStopA1X>
            <nStopA2X>0</nStopA2X>
          </AfterMake>
          <SelectedForBatchBuild>0</SelectedForBatchBuild>
          <SVCSIdString></SVCSIdString>
        </TargetCommonOption>
        <CommonProperty>
          <UseCPPCompiler>0</UseCPPCompiler>
          <RVCTCodeConst>0</RVCTCodeConst>
          <RVCTZI>0</RVCTZI>
          <RVCTOtherData>0</RVCTOtherData>
          <ModuleSelection>0</ModuleSelection>
          <IncludeInBuild>1</IncludeInBuild>
          <AlwaysBuild>0</AlwaysBuild>
          <GenerateAssemblyFile>0</GenerateAssemblyFile>
          <AssembleAssemblyFile>0</AssembleAssemblyFile>
          <PublicsOnly>0</PublicsOnly>
          <StopOnExitCode>3</StopOnExitCode>
          <CustomArgument></CustomArgument>
          <IncludeLibraryModules></IncludeLibraryModules>
          <ComprImg>0</ComprImg>
        </CommonProperty>
        <DllOption>
          <SimDllName>SARMCM3.DLL</SimDllName>
          <SimDllArguments> -REMAP </SimDllArguments>
          <SimDlgDll>DARMCM1.DLL</SimDlgDll>
          <SimDlgDllArguments>-pCM0</SimDlgDllArguments>
          <TargetDllName>SARMCM3.DLL</TargetDllName>
          <TargetDllArguments> </TargetDllArguments>
          <TargetDlgDll>TARMCM1.DLL</TargetDlgDll>
          <TargetDlgDllArguments>-pCM0</TargetDlgDllArguments>
        </DllOption>
        <DebugOption>
          <OPTHX>
            <HexSelection>1</HexSelection>
            <HexRangeLowAddress>0</HexRangeLowAddress>
            <HexRangeHighAddress>0</HexRangeHighAddress>
            <HexOffset>0</HexOffset>
            <Oh166RecLen>16</Oh166RecLen>
          </OPTHX>
        </DebugOption>
        <Utilities>
          <Flash1>
            <UseTargetDll>1</UseTargetDll>
            <UseExternalTool>0</UseExternalTool>
            <RunIndependent>0</RunIndependent>
            <UpdateFlashBeforeDebugging>1</UpdateFlashBeforeDebugging>
            <Capability>1</Capability>
            <DriverSelection>4096</DriverSelection>
          </Flash1>
          <bUseTDR>1</bUseTDR>
          <Flash2>BIN\UL2CM3.DLL</Flash2>
          <Flash3>"" ()</Flash3>
          <Flash4></Flash4>
          <pFcarmOut></pFcarmOut>
          <pFcarmGrp></pFcarmGrp>
          <pFcArmRoot></pFcArmRoot>
          <FcArmLst>0</FcArmLst>
        </Utilities>
        <TargetArmAds>
          <ArmAdsMisc>
            <GenerateListings>0</GenerateListings>
            <asHll>1</asHll>
            <asAsm>1</asAsm>
            <asMacX>1</asMacX>
            <asSyms>1</asSyms>
            <asFals>1</asFals>
            <asDbgD>1</asDbgD>
            <asForm>1</asForm>
            <ldLst>0</ldLst>
            <ldmm>1</ldmm>
            <ldXref>1</ldXref>
            <BigEnd>0</BigEnd>
            <AdsALst>1</AdsALst>
            <AdsACrf>1</AdsACrf>
            <AdsANop>0</AdsANop>
            <AdsANot>0</AdsANot>
            <AdsLLst>1</AdsLLst>
            <AdsLmap>1</AdsLmap>
            <AdsLcgr>1</AdsLcgr>
            <AdsLsym>1</AdsLsym>
            <AdsLszi>1</AdsLszi>
            <AdsLtoi>1</AdsLtoi>
            <AdsLsun>1</AdsLsun>
            <AdsLven>1</AdsLven>
            <AdsLsxf>1</AdsLsxf>
            <RvctClst>0</RvctClst>
            <GenPPlst>0</GenPPlst>
            <AdsCpuType>"Cortex-M0"</AdsCpuType>
            <RvctDeviceName></RvctDeviceName>
            <mOS>0</mOS>
            <uocRom>0</uocRom>
            <uocRam>0</uocRam>
            <hadIROM>1</hadIROM>
            <hadIRAM>1</hadIRAM>
            <hadXRAM>0</hadXRAM>
            <uocXRam>0</uocXRam>
            <RvdsVP>0</RvdsVP>
            <hadIRAM2>0</hadIRAM2>
            <hadIROM2>0</hadIROM2>
            <StupSel>8</StupSel>
            <useUlib>1</useUlib>
            <EndSel>0</EndSel>
            <uLtcg>0</uLtcg>
            <nSecure>0</nSecure>
            <RoSelD>3</RoSelD>
            <RwSelD>3</RwSelD>
            <CodeSel>0</CodeSel>
            <OptFeed>0</OptFeed>
            <NoZi1>0</NoZi1>
            <NoZi2>0</NoZi2>
            <NoZi3>0</NoZi3>
            <NoZi4>0</NoZi4>
            <NoZi5>0</NoZi5>
            <Ro1Chk>0</Ro1Chk>
            <Ro2Chk>0</Ro2Chk>
            <Ro3Chk>0</Ro3Chk>
            <Ir1Chk>1</Ir1Chk>
            <Ir2Chk>0</Ir2Chk>
            <Ra1Chk>0</Ra1Chk>
            <Ra2Chk>0</Ra2Chk>
            <Ra3Chk>0</Ra3Chk>
            <Im1Chk>1</Im1Chk>
            <Im2Chk>0</Im2Chk>
            <OnChipMemories>
              <Ocm1>
                <Type>0</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </Ocm1>
              <Ocm2>
                <Type>0</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </Ocm2>
              <Ocm3>
                <Type>0</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </Ocm3>
              <Ocm4>
                <Type>0</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </Ocm4>
              <Ocm5>
                <Type>0</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </Ocm5>
              <Ocm6>
                <Type>0</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </Ocm6>
              <IRAM>
                <Type>0</Type>
                <StartAddress>0x20000000</StartAddress>
                <Size>0x2000</Size>
              </IRAM>
              <IROM>
                <Type>1</Type>
                <StartAddress>0x8000000</StartAddress>
                <Size>0x10000</Size>
              </IROM>
              <XRAM>
                <Type>0</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </XRAM>
              <OCR_RVCT1>
                <Type>1</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </OCR_RVCT1>
              <OCR_RVCT2>
                <Type>1</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </OCR_RVCT2>
              <OCR_RVCT3>
                <Type>1</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </OCR_RVCT3>
              <OCR_RVCT4>
                <Type>1</Type>
                <StartAddress>0x8000000</StartAddress>
                <Size>0x10000</Size>
              </OCR_RVCT4>
              <OCR_RVCT5>
                <Type>1</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </OCR_RVCT5>
              <OCR_RVCT6>
                <Type>0</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </OCR_RVCT6>
              <OCR_RVCT7>
                <Type>0</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </OCR_RVCT7>
              <OCR_RVCT8>
                <Type>0</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </OCR_RVCT8>
              <OCR_RVCT9>
                <Type>0</Type>
                <StartAddress>0x20000000</StartAddress>
                <Size>0x2000</Size>
              </OCR_RVCT9>
              <OCR_RVCT10>
                <Type>0</Type>
                <StartAddress>0x0</StartAddress>
                <Size>0x0</Size>
              </OCR_RVCT10>
            </OnChipMemories>
            <RvctStartVector></RvctStartVector>
          </ArmAdsMisc>
          <Cads>
            <interw>1</interw>
            <Optim>7</Optim>
            <oTime>0</oTime>
            <SplitLS>0</SplitLS>
            <OneElfS>1</OneElfS>
            <Strict>0</Strict>
            <EnumInt>0</EnumInt>
            <PlainCh>0</PlainCh>
            <Ropi>0</Ropi>
            <Rwpi>0</Rwpi>
            <wLevel>2</wLevel>
            <uThumb>0</uThumb>
            <uSurpInc>0</uSurpInc>
            <uC99>1</uC99>
            <useXO>0</useXO>
            <v6Lang>3</v6Lang>
            <v6LangP>3</v6LangP>
            <vShortEn>1</vShortEn>
            <vShortWch>1</vShortWch>
            <v6Lto>0</v6Lto>
            <v6WtE>0</v6WtE>
            <v6Rtti>0</v6Rtti>
            <VariousControls>
              <MiscControls></MiscControls>
              <Define>USE_FULL_LL_DRIVER,USE_HAL_DRIVER</Define>
              <Undefine></Undefine>
              <IncludePath>../Inc;../Src;           ../Drivers/STM32F0xx_HAL_Driver/Inc;           ../Drivers/CMSIS/Device/ST/STM32F0xx/Include;           ../Drivers/CMSIS/Include;    ../Drivers/STM32F0xx_HAL_Driver/Inc/Legacy</IncludePath>
            </VariousControls>
          </Cads>
          <Aads>
            <interw>1</interw>
            <Ropi>0</Ropi>
            <Rwpi>0</Rwpi>
            <thumb>0</thumb>
            <SplitLS>0</SplitLS>
            <SwStkChk>0</SwStkChk>
            <NoWarn>0</NoWarn>
            <uSurpInc>0</uSurpInc>
            <useXO>0</useXO>
            <uClangAs>0</uClangAs>
            <VariousControls>
              <MiscControls></MiscControls>
              <Define></Define>
              <Undefine></Undefine>
              <IncludePath></IncludePath>
            </VariousControls>
          </Aads>
          <LDads>
            <umfTarg>1</umfTarg>
            <Ropi>0</Ropi>
            <Rwpi>0</Rwpi>
            <noStLib>0</noStLib>
            <RepFail>1</RepFail>
            <useFile>0</useFile>
            <TextAddressRange>0x08000000</TextAddressRange>
            <DataAddressRange>0x20000000</DataAddressRange>
            <pXoBase></pXoBase>
            <ScatterFile></ScatterFile>
            <IncludeLibs></IncludeLibs>
            <IncludeLibsPath></IncludeLibsPath>
            <Misc></Misc>
            <LinkerInputFile></LinkerInputFile>
            <DisabledWarnings></DisabledWarnings>
          </LDads>
        </TargetArmAds>
      </TargetOption>
      <Groups>
        <Group>
          <GroupName>Application/MDK-ARM</GroupName>
          <Files>
            <File>
              <FileName>startup_stm32f030x8.s</FileName>
              <FileType>2</FileType>
              <FilePath>.\startup_stm32f030x8.s</FilePath>
            </File>
          </Files>
        </Group>
        <Group>
          <GroupName>Application/User</GroupName>
          <Files>
            <File>
              <FileName>functions.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\functions.c</FilePath>
            </File>
            <File>
              <FileName>GlobalDef.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\GlobalDef.c</FilePath>
            </File>
            <File>
              <FileName>MyQueue.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\MyQueue.c</FilePath>
            </File>
            <File>
              <FileName>shell.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\shell.c</FilePath>
            </File>
            <File>
              <FileName>main.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Src/main.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_it.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Src/stm32f0xx_it.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_msp.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Src/stm32f0xx_hal_msp.c</FilePath>
            </File>
            <File>
              <FileName>BSP.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\BSP.c</FilePath>
            </File>
            <File>
              <FileName>PLCfunctions.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\PLCfunctions.c</FilePath>
            </File>
            <File>
              <FileName>KMachine.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\KMachine.c</FilePath>
            </File>
            <File>
              <FileName>KBus.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\KBus.c</FilePath>
            </File>
            <File>
              <FileName>KLink.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\KLink.c</FilePath>
            </File>
            <File>
              <FileName>ModbusRTU.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\ModbusRTU.c</FilePath>
            </File>
            <File>
              <FileName>FP0.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\FP0.c</FilePath>
            </File>
            <File>
              <FileName>debug.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\debug.c</FilePath>
            </File>
          </Files>
        </Group>
        <Group>
          <GroupName>Drivers/CMSIS</GroupName>
          <Files>
            <File>
              <FileName>system_stm32f0xx.c</FileName>
              <FileType>1</FileType>
              <FilePath>..//Src/system_stm32f0xx.c</FilePath>
            </File>
          </Files>
        </Group>
        <Group>
          <GroupName>Drivers/STM32F0xx_HAL_Driver</GroupName>
          <Files>
            <File>
              <FileName>stm32f0xx_ll_gpio.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_gpio.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_ll_exti.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_exti.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_ll_adc.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_adc.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_ll_dma.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_dma.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_ll_spi.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_spi.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_tim.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_tim_ex.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_tim_ex.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_ll_usart.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_usart.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_ll_rcc.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_rcc.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_rcc.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_rcc_ex.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_rcc_ex.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_i2c.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_i2c_ex.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_i2c_ex.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_gpio.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_gpio.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_dma.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_dma.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_cortex.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_cortex.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_pwr.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_pwr_ex.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_pwr_ex.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_flash.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_hal_flash_ex.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_hal_flash_ex.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_ll_utils.c</FileName>
              <FileType>1</FileType>
              <FilePath>../Drivers/STM32F0xx_HAL_Driver/Src/stm32f0xx_ll_utils.c</FilePath>
            </File>
            <File>
              <FileName>stm32f0xx_ll_tim.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_ll_tim.c</FilePath>
            </File>
          </Files>
        </Group>
        <Group>
          <GroupName>Drivers/W5500</GroupName>
          <Files>
            <File>
              <FileName>socket.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\Ethernet\socket.c</FilePath>
            </File>
            <File>
              <FileName>wizchip_conf.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\Ethernet\wizchip_conf.c</FilePath>
            </File>
            <File>
              <FileName>dns.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\Internet\DNS\dns.c</FilePath>
            </File>
            <File>
              <FileName>dhcp.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\Internet\DHCP\dhcp.c</FilePath>
            </File>
            <File>
              <FileName>w5500.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\Ethernet\W5500\w5500.c</FilePath>
            </File>
            <File>
              <FileName>w5500_port.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\w5500_port.c</FilePath>
            </File>
            <File>
              <FileName>loopback.c</FileName>
              <FileType>1</FileType>
              <FilePath>..\Src\Ethernet\loopback.c</FilePath>
            </File>
          </Files>
        </Group>
        <Group>
          <GroupName>::CMSIS</GroupName>
        </Group>
      </Groups>
    </Target>
  </Targets>
  <RTE>
    <apis/>
    <components>
      <component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.4.0" condition="ARMv6_7_8-M Device">
        <package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.7.0"/>
        <targetInfos>
          <targetInfo name="F030C8T6_Test2"/>
        </targetInfos>
      </component>
    </components>
    <files/>
  </RTE>
</Project>
MDK-ARM/JLinkLog.txt
Diff too large
Src/FP0.c
@@ -53,11 +53,11 @@
    bSPI1Sending=0;
    bSPI1Recving=0;
    if (nChilds==0) {
    nInputBytes=1;        //根据子机数量,报告扩展容量
    nInputBytes=1;        //根据子机数量,报告扩展容量
    nOutputBytes=1;
    } else
    {
        nInputBytes=nChilds;        //根据子机数量,报告扩展容量
        nInputBytes=nChilds;        //根据子机数量,报告扩展容量
        nOutputBytes=nChilds;
    }
    SetACKPin_0();
Src/ModbusRTU.c
@@ -86,12 +86,12 @@
int ModBusSlaveCheckPkg(int nChn, void *ptr, uint16_t len1)
{
    if (len1 <=4) return -1;        //包长
    if (len1 <=4) return -1;        //包长
    pModBusRTUReqPkg pPkg = (pModBusRTUReqPkg) ptr;
    if (pPkg->Dst >127) return -2;   //地址码
    if ((pPkg->Cmd&0x7f) > 0x1f) return -3;  //功能码
    uint16_t crc = crc16tablefast(ptr,len1);   //CRC 校验
    if (crc != 0 ) return 4;        //CRC 校验错误
    if (pPkg->Dst >127) return -2;   //地址码
    if ((pPkg->Cmd&0x7f) > 0x1f) return -3;  //功能码
    uint16_t crc = crc16tablefast(ptr,len1);   //CRC 校验
    if (crc != 0 ) return 4;        //CRC 校验错误
    return S_OK;
}
Src/functions.c
@@ -19,16 +19,16 @@
unsigned int TickPrioduS;    //
volatile unsigned int nCurTick=0;
volatile unsigned int CurTickuS=0;
//volatile unsigned int ThisRunTime=0;        //开机时间
//volatile unsigned int TotalRunTime=0;     //总开机时间
//volatile unsigned int PwrCount=0;                //开机次数
unsigned short ClkuS;                //每个Clk的nS数,
//volatile unsigned int ThisRunTime=0;        //开机时间
//volatile unsigned int TotalRunTime=0;     //总开机时间
//volatile unsigned int PwrCount=0;                //开机次数
unsigned short ClkuS;                //每个Clk的nS数,
int InituS(int TickFreq1)
{
        TickPrioduS=1000000/TickFreq1;    //每个SysTick的微秒数
        CoreClkMHz=HAL_RCC_GetHCLKFreq()/1000000;        //=SystemCoreClock/1000000;每uS的时钟数
        TickPriodClk=SystemCoreClock/TickFreq1;            //每个SysTick的时钟数
        TickPrioduS=1000000/TickFreq1;    //每个SysTick的微秒数
        CoreClkMHz=HAL_RCC_GetHCLKFreq()/1000000;        //=SystemCoreClock/1000000;每uS的时钟数
        TickPriodClk=SystemCoreClock/TickFreq1;            //每个SysTick的时钟数
        ClkuS=(1000000LL*65536)/SystemCoreClock;
        CurTickuS=TickPrioduS+100u;
    return 0;
@@ -732,7 +732,7 @@
void Output595_8(unsigned int cc)
{
//unsigned char i;
;//        74HC595输出程序,输出8位
;//        74HC595输出程序,输出8位
//    cc=~0x3f;
    __disable_irq();
    STRCLK2_1();
@@ -758,7 +758,7 @@
void Output595_16(unsigned int cc)
{
//unsigned char i;
;//        74HC595输出程序,输出8位
;//        74HC595输出程序,输出8位
//    cc=~0x3f;
    __disable_irq();
    STRCLK2_1();
@@ -860,7 +860,7 @@
#if (BOARD_TYPE == 9 || BOARD_TYPE == 10 || BOARD_TYPE == 15 )
//#pragma message("9,10")
    // V4.2 管脚排列向右移动了一位。
    // V4.2 管脚排列向右移动了一位。
#define SRCLK1_0() LL_GPIO_ResetOutputPin(GPIOB,LL_GPIO_PIN_1)
#define SRCLK1_1() LL_GPIO_SetOutputPin(GPIOB,LL_GPIO_PIN_1)
#define STRCLK1_0() LL_GPIO_ResetOutputPin(GPIOB,LL_GPIO_PIN_2)
@@ -869,7 +869,7 @@
#define OE1_1() LL_GPIO_SetOutputPin(GPIOB,LL_GPIO_PIN_10)
#define SER1_0() LL_GPIO_ResetOutputPin(GPIOB,LL_GPIO_PIN_11)
#define SER1_1() LL_GPIO_SetOutputPin(GPIOB,LL_GPIO_PIN_11)
#else        //按照原来的管脚排列
#else        //按照原来的管脚排列
#define SRCLK1_0() LL_GPIO_ResetOutputPin(GPIOB,LL_GPIO_PIN_0)
#define SRCLK1_1() LL_GPIO_SetOutputPin(GPIOB,LL_GPIO_PIN_0)
#define STRCLK1_0() LL_GPIO_ResetOutputPin(GPIOB,LL_GPIO_PIN_1)
@@ -890,7 +890,7 @@
void displayInput(unsigned int cc)
{
//unsigned char i;
;//        74HC595输出程序,输出8位
;//        74HC595输出程序,输出8位
//    cc=~0x3f;
    __disable_irq();
    STRCLK1_1();
Src/main.c
@@ -188,9 +188,9 @@
  SystemClock_Config();
  /* USER CODE BEGIN SysInit */
    TickFreq=10000;        //Tick频率
    TickFreq=10000;        //Tick频率
    InituS(TickFreq);    
 // HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/TickFreq);    //ÖØж¨ÒåSysTickµÄƵÂÊÎ
 // HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/TickFreq);    //重新定义SysTick的频率�
  /* USER CODE END SysInit */