Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d64379caf7 | |||
| 725e9ce1f2 | |||
| 6be01d6032 | |||
| 3faf9baf67 | |||
| 2efab2862f | |||
| cd594e3d69 | |||
| f3205e1cf7 | |||
| 9b06145341 |
@@ -0,0 +1,3 @@
|
||||
[submodule "Module/LaserTracing_Debug"]
|
||||
path = Module/LaserTracing_Debug
|
||||
url = http://192.168.2.47:8418/YuanHongbin/LaserTracing_Debug.git
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
/*
|
||||
* Auto generated Run-Time-Environment Configuration File
|
||||
* *** Do not modify ! ***
|
||||
*
|
||||
* Project: 'hc32l17x'
|
||||
* Target: 'HC32L17X_boot'
|
||||
*/
|
||||
|
||||
#ifndef RTE_COMPONENTS_H
|
||||
#define RTE_COMPONENTS_H
|
||||
|
||||
|
||||
/*
|
||||
* Define the Device Header File:
|
||||
*/
|
||||
#define CMSIS_device_header "HC32L170JATA.h"
|
||||
|
||||
|
||||
|
||||
#endif /* RTE_COMPONENTS_H */
|
||||
@@ -0,0 +1,21 @@
|
||||
|
||||
/*
|
||||
* Auto generated Run-Time-Environment Configuration File
|
||||
* *** Do not modify ! ***
|
||||
*
|
||||
* Project: 'hc32l17x'
|
||||
* Target: 'HC32L17X_debug'
|
||||
*/
|
||||
|
||||
#ifndef RTE_COMPONENTS_H
|
||||
#define RTE_COMPONENTS_H
|
||||
|
||||
|
||||
/*
|
||||
* Define the Device Header File:
|
||||
*/
|
||||
#define CMSIS_device_header "HC32L170JATA.h"
|
||||
|
||||
|
||||
|
||||
#endif /* RTE_COMPONENTS_H */
|
||||
+251
-8
@@ -22,7 +22,7 @@
|
||||
</DaveTm>
|
||||
|
||||
<Target>
|
||||
<TargetName>HC32L17X</TargetName>
|
||||
<TargetName>HC32L17X_debug</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<TargetOption>
|
||||
@@ -75,7 +75,7 @@
|
||||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
<IsCurrentTarget>0</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>255</CpuCode>
|
||||
<DebugOpt>
|
||||
@@ -125,7 +125,7 @@
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>CMSIS_AGDI</Key>
|
||||
<Name>-X"Any" -UAny -O206 -S8 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0FlashHC32L17X_128K.FLM -FS00 -FL020000 -FP0($$Device:HC32L170JATA$Flash\FlashHC32L17X_128K.FLM)</Name>
|
||||
<Name>-X"Any" -UAny -O206 -S8 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO31 -FD20000000 -FC1000 -FN1 -FF0FlashHC32L17X_128K.FLM -FS00 -FL020000 -FP0($$Device:HC32L170JATA$Flash\FlashHC32L17X_128K.FLM)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
@@ -250,6 +250,249 @@
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>App.LaserFlag,0x0A</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>19</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>BLPara,0x10</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>20</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>argv1,0x10</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<MemoryWindow1>
|
||||
<Mm>
|
||||
<WinNumber>1</WinNumber>
|
||||
<SubType>0</SubType>
|
||||
<ItemText>0x1fe00</ItemText>
|
||||
<AccSizeX>0</AccSizeX>
|
||||
</Mm>
|
||||
</MemoryWindow1>
|
||||
<MemoryWindow2>
|
||||
<Mm>
|
||||
<WinNumber>2</WinNumber>
|
||||
<SubType>2</SubType>
|
||||
<ItemText>0x20000f35</ItemText>
|
||||
<AccSizeX>0</AccSizeX>
|
||||
</Mm>
|
||||
</MemoryWindow2>
|
||||
<Tracepoint>
|
||||
<THDelay>0</THDelay>
|
||||
</Tracepoint>
|
||||
<DebugFlag>
|
||||
<trace>0</trace>
|
||||
<periodic>1</periodic>
|
||||
<aLwin>1</aLwin>
|
||||
<aCover>0</aCover>
|
||||
<aSer1>0</aSer1>
|
||||
<aSer2>0</aSer2>
|
||||
<aPa>0</aPa>
|
||||
<viewmode>1</viewmode>
|
||||
<vrSel>0</vrSel>
|
||||
<aSym>0</aSym>
|
||||
<aTbox>0</aTbox>
|
||||
<AscS1>0</AscS1>
|
||||
<AscS2>0</AscS2>
|
||||
<AscS3>0</AscS3>
|
||||
<aSer3>0</aSer3>
|
||||
<eProf>0</eProf>
|
||||
<aLa>0</aLa>
|
||||
<aPa1>0</aPa1>
|
||||
<AscS4>0</AscS4>
|
||||
<aSer4>0</aSer4>
|
||||
<StkLoc>0</StkLoc>
|
||||
<TrcWin>0</TrcWin>
|
||||
<newCpu>0</newCpu>
|
||||
<uProt>0</uProt>
|
||||
</DebugFlag>
|
||||
<LintExecutable></LintExecutable>
|
||||
<LintConfigFile></LintConfigFile>
|
||||
<bLintAuto>0</bLintAuto>
|
||||
<bAutoGenD>0</bAutoGenD>
|
||||
<LntExFlags>0</LntExFlags>
|
||||
<pMisraName></pMisraName>
|
||||
<pszMrule></pszMrule>
|
||||
<pSingCmds></pSingCmds>
|
||||
<pMultCmds></pMultCmds>
|
||||
<pMisraNamep></pMisraNamep>
|
||||
<pszMrulep></pszMrulep>
|
||||
<pSingCmdsp></pSingCmdsp>
|
||||
<pMultCmdsp></pMultCmdsp>
|
||||
<DebugDescription>
|
||||
<Enable>1</Enable>
|
||||
<EnableFlashSeq>0</EnableFlashSeq>
|
||||
<EnableLog>0</EnableLog>
|
||||
<Protocol>2</Protocol>
|
||||
<DbgClock>10000000</DbgClock>
|
||||
</DebugDescription>
|
||||
</TargetOption>
|
||||
</Target>
|
||||
|
||||
<Target>
|
||||
<TargetName>HC32L17X_boot</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<TargetOption>
|
||||
<CLKADS>12000000</CLKADS>
|
||||
<OPTTT>
|
||||
<gFlags>1</gFlags>
|
||||
<BeepAtEnd>1</BeepAtEnd>
|
||||
<RunSim>0</RunSim>
|
||||
<RunTarget>1</RunTarget>
|
||||
<RunAbUc>0</RunAbUc>
|
||||
</OPTTT>
|
||||
<OPTHX>
|
||||
<HexSelection>1</HexSelection>
|
||||
<FlashByte>65535</FlashByte>
|
||||
<HexRangeLowAddress>0</HexRangeLowAddress>
|
||||
<HexRangeHighAddress>0</HexRangeHighAddress>
|
||||
<HexOffset>0</HexOffset>
|
||||
</OPTHX>
|
||||
<OPTLEX>
|
||||
<PageWidth>79</PageWidth>
|
||||
<PageLength>66</PageLength>
|
||||
<TabStop>8</TabStop>
|
||||
<ListingPath>.\output\release\</ListingPath>
|
||||
</OPTLEX>
|
||||
<ListingPage>
|
||||
<CreateCListing>1</CreateCListing>
|
||||
<CreateAListing>1</CreateAListing>
|
||||
<CreateLListing>1</CreateLListing>
|
||||
<CreateIListing>0</CreateIListing>
|
||||
<AsmCond>1</AsmCond>
|
||||
<AsmSymb>1</AsmSymb>
|
||||
<AsmXref>0</AsmXref>
|
||||
<CCond>1</CCond>
|
||||
<CCode>0</CCode>
|
||||
<CListInc>0</CListInc>
|
||||
<CSymb>0</CSymb>
|
||||
<LinkerCodeListing>0</LinkerCodeListing>
|
||||
</ListingPage>
|
||||
<OPTXL>
|
||||
<LMap>1</LMap>
|
||||
<LComments>1</LComments>
|
||||
<LGenerateSymbols>1</LGenerateSymbols>
|
||||
<LLibSym>1</LLibSym>
|
||||
<LLines>1</LLines>
|
||||
<LLocSym>1</LLocSym>
|
||||
<LPubSym>1</LPubSym>
|
||||
<LXref>0</LXref>
|
||||
<LExpSel>0</LExpSel>
|
||||
</OPTXL>
|
||||
<OPTFL>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<IsCurrentTarget>1</IsCurrentTarget>
|
||||
</OPTFL>
|
||||
<CpuCode>255</CpuCode>
|
||||
<DebugOpt>
|
||||
<uSim>0</uSim>
|
||||
<uTrg>1</uTrg>
|
||||
<sLdApp>1</sLdApp>
|
||||
<sGomain>1</sGomain>
|
||||
<sRbreak>1</sRbreak>
|
||||
<sRwatch>1</sRwatch>
|
||||
<sRmem>1</sRmem>
|
||||
<sRfunc>1</sRfunc>
|
||||
<sRbox>1</sRbox>
|
||||
<tLdApp>1</tLdApp>
|
||||
<tGomain>1</tGomain>
|
||||
<tRbreak>1</tRbreak>
|
||||
<tRwatch>1</tRwatch>
|
||||
<tRmem>1</tRmem>
|
||||
<tRfunc>0</tRfunc>
|
||||
<tRbox>1</tRbox>
|
||||
<tRtrace>1</tRtrace>
|
||||
<sRSysVw>1</sRSysVw>
|
||||
<tRSysVw>1</tRSysVw>
|
||||
<sRunDeb>0</sRunDeb>
|
||||
<sLrtime>0</sLrtime>
|
||||
<bEvRecOn>1</bEvRecOn>
|
||||
<bSchkAxf>0</bSchkAxf>
|
||||
<bTchkAxf>0</bTchkAxf>
|
||||
<nTsel>12</nTsel>
|
||||
<sDll></sDll>
|
||||
<sDllPa></sDllPa>
|
||||
<sDlgDll></sDlgDll>
|
||||
<sDlgPa></sDlgPa>
|
||||
<sIfile></sIfile>
|
||||
<tDll></tDll>
|
||||
<tDllPa></tDllPa>
|
||||
<tDlgDll></tDlgDll>
|
||||
<tDlgPa></tDlgPa>
|
||||
<tIfile></tIfile>
|
||||
<pMon>BIN\CMSIS_AGDI.dll</pMon>
|
||||
</DebugOpt>
|
||||
<TargetDriverDllRegistry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGUARM</Key>
|
||||
<Name></Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>CMSIS_AGDI</Key>
|
||||
<Name>-X"Any" -UAny -O206 -S9 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(0BC11477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO14 -FD20000000 -FC1000 -FN1 -FF0FlashHC32L17X_128K.FLM -FS00 -FL020000 -FP0($$Device:HC32L170JATA$Flash\FlashHC32L17X_128K.FLM)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>UL2CM3</Key>
|
||||
<Name>UL2CM3(-S0 -C0 -P0 ) -FN1 -FC1000 -FD20000000 -FF0FlashHC32L17X_128K -FL020000 -FS00 -FP0($$Device:HC32L170JATA$Flash\FlashHC32L17X_128K.FLM)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>JL2CM3</Key>
|
||||
<Name>-U4294967295 -O78 -S1 -ZTIFSpeedSel10000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BC11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8027 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC1000 -FN1 -FF0FlashHC32L17X_128K.FLM -FS00 -FL020000 -FP0($$Device:HC32L170JATA$Flash\FlashHC32L17X_128K.FLM)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>ARMRTXEVENTFLAGS</Key>
|
||||
<Name>-L70 -Z18 -C0 -M0 -T1</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>DLGTARM</Key>
|
||||
<Name>(1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)</Name>
|
||||
</SetRegEntry>
|
||||
<SetRegEntry>
|
||||
<Number>0</Number>
|
||||
<Key>ARMDBGFLAGS</Key>
|
||||
<Name></Name>
|
||||
</SetRegEntry>
|
||||
</TargetDriverDllRegistry>
|
||||
<Breakpoint/>
|
||||
<WatchWindow1>
|
||||
<Ww>
|
||||
<count>0</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>App,0x0A</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>1</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>LocalMAC</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>2</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>SGCP.LoginOk</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>3</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>SGCP.UploadOk</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>4</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>App.Login_LPTimer0</ItemText>
|
||||
</Ww>
|
||||
<Ww>
|
||||
<count>5</count>
|
||||
<WinNumber>1</WinNumber>
|
||||
<ItemText>App.Upload_LPTimer0</ItemText>
|
||||
</Ww>
|
||||
</WatchWindow1>
|
||||
<MemoryWindow1>
|
||||
<Mm>
|
||||
@@ -314,7 +557,7 @@
|
||||
<EnableFlashSeq>0</EnableFlashSeq>
|
||||
<EnableLog>0</EnableLog>
|
||||
<Protocol>2</Protocol>
|
||||
<DbgClock>10000000</DbgClock>
|
||||
<DbgClock>5000000</DbgClock>
|
||||
</DebugDescription>
|
||||
</TargetOption>
|
||||
</Target>
|
||||
@@ -657,7 +900,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>Debug</GroupName>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@@ -668,7 +911,7 @@
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\Module\Debug\UartDebug.c</PathWithFileName>
|
||||
<PathWithFileName>..\Module\LaserTracing_Debug\UartDebug.c</PathWithFileName>
|
||||
<FilenameWithoutPath>UartDebug.c</FilenameWithoutPath>
|
||||
<RteFlg>0</RteFlg>
|
||||
<bShared>0</bShared>
|
||||
@@ -729,7 +972,7 @@
|
||||
|
||||
<Group>
|
||||
<GroupName>LORA</GroupName>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<cbSel>0</cbSel>
|
||||
<RteFlg>0</RteFlg>
|
||||
@@ -737,7 +980,7 @@
|
||||
<GroupNumber>7</GroupNumber>
|
||||
<FileNumber>31</FileNumber>
|
||||
<FileType>1</FileType>
|
||||
<tvExp>0</tvExp>
|
||||
<tvExp>1</tvExp>
|
||||
<tvExpOptDlg>0</tvExpOptDlg>
|
||||
<bDave2>0</bDave2>
|
||||
<PathWithFileName>..\Module\LORA\sx127x.c</PathWithFileName>
|
||||
|
||||
+636
-6
@@ -7,7 +7,598 @@
|
||||
|
||||
<Targets>
|
||||
<Target>
|
||||
<TargetName>HC32L17X</TargetName>
|
||||
<TargetName>HC32L17X_debug</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pArmCC>6160000::V6.16::ARMCLANG</pArmCC>
|
||||
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
|
||||
<uAC6>1</uAC6>
|
||||
<TargetOption>
|
||||
<TargetCommonOption>
|
||||
<Device>HC32L170JATA</Device>
|
||||
<Vendor>HDSC</Vendor>
|
||||
<PackID>HDSC.HC32L17X.1.0.1</PackID>
|
||||
<PackURL>https://raw.githubusercontent.com/hdscmcu/pack/master/</PackURL>
|
||||
<Cpu>IRAM(0x20000000,0x4000) IROM(0x00000000,0x20000) CPUTYPE("Cortex-M0+") CLOCK(12000000) ELITTLE</Cpu>
|
||||
<FlashUtilSpec></FlashUtilSpec>
|
||||
<StartupFile></StartupFile>
|
||||
<FlashDriverDll>UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0FlashHC32L17X_128K -FS00 -FL020000 -FP0($$Device:HC32L170JATA$Flash\FlashHC32L17X_128K.FLM))</FlashDriverDll>
|
||||
<DeviceId>0</DeviceId>
|
||||
<RegisterFile>$$Device:HC32L170JATA$Device\Include\HC32L170JATA.h</RegisterFile>
|
||||
<MemoryEnv></MemoryEnv>
|
||||
<Cmp></Cmp>
|
||||
<Asm></Asm>
|
||||
<Linker></Linker>
|
||||
<OHString></OHString>
|
||||
<InfinionOptionDll></InfinionOptionDll>
|
||||
<SLE66CMisc></SLE66CMisc>
|
||||
<SLE66AMisc></SLE66AMisc>
|
||||
<SLE66LinkerMisc></SLE66LinkerMisc>
|
||||
<SFDFile>$$Device:HC32L170JATA$SVD\HC32L170JATA.sfr</SFDFile>
|
||||
<bCustSvd>1</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>.\output\</OutputDirectory>
|
||||
<OutputName>hc32l17x</OutputName>
|
||||
<CreateExecutable>1</CreateExecutable>
|
||||
<CreateLib>0</CreateLib>
|
||||
<CreateHexFile>1</CreateHexFile>
|
||||
<DebugInformation>1</DebugInformation>
|
||||
<BrowseInformation>1</BrowseInformation>
|
||||
<ListingPath>.\output\release\</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>1</RunUserProg2>
|
||||
<UserProg1Name></UserProg1Name>
|
||||
<UserProg2Name>D:\Keil5\ARM\ARMCC\bin\fromelf.exe --bin -o .\output\app.bin .\output\hc32l17x.axf</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>1</ComprImg>
|
||||
</CommonProperty>
|
||||
<DllOption>
|
||||
<SimDllName>SARMCM3.DLL</SimDllName>
|
||||
<SimDllArguments> </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>0</AdsALst>
|
||||
<AdsACrf>0</AdsACrf>
|
||||
<AdsANop>0</AdsANop>
|
||||
<AdsANot>0</AdsANot>
|
||||
<AdsLLst>1</AdsLLst>
|
||||
<AdsLmap>1</AdsLmap>
|
||||
<AdsLcgr>0</AdsLcgr>
|
||||
<AdsLsym>1</AdsLsym>
|
||||
<AdsLszi>1</AdsLszi>
|
||||
<AdsLtoi>1</AdsLtoi>
|
||||
<AdsLsun>0</AdsLsun>
|
||||
<AdsLven>0</AdsLven>
|
||||
<AdsLsxf>0</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>
|
||||
<RvdsMve>0</RvdsMve>
|
||||
<RvdsCdeCp>0</RvdsCdeCp>
|
||||
<nBranchProt>0</nBranchProt>
|
||||
<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>0x4000</Size>
|
||||
</IRAM>
|
||||
<IROM>
|
||||
<Type>1</Type>
|
||||
<StartAddress>0x0</StartAddress>
|
||||
<Size>0x20000</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>0x0</StartAddress>
|
||||
<Size>0x20000</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>0x4000</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>1</Optim>
|
||||
<oTime>0</oTime>
|
||||
<SplitLS>0</SplitLS>
|
||||
<OneElfS>1</OneElfS>
|
||||
<Strict>0</Strict>
|
||||
<EnumInt>1</EnumInt>
|
||||
<PlainCh>0</PlainCh>
|
||||
<Ropi>0</Ropi>
|
||||
<Rwpi>0</Rwpi>
|
||||
<wLevel>3</wLevel>
|
||||
<uThumb>0</uThumb>
|
||||
<uSurpInc>0</uSurpInc>
|
||||
<uC99>1</uC99>
|
||||
<uGnu>1</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>4</v6Lang>
|
||||
<v6LangP>5</v6LangP>
|
||||
<vShortEn>0</vShortEn>
|
||||
<vShortWch>0</vShortWch>
|
||||
<v6Lto>0</v6Lto>
|
||||
<v6WtE>0</v6WtE>
|
||||
<v6Rtti>0</v6Rtti>
|
||||
<VariousControls>
|
||||
<MiscControls></MiscControls>
|
||||
<Define></Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath>..\mcu\common;..\source;..\driver\inc;..\source\inc;..\Module\LaserTracing_Debug;..\Module\lsm6dsl;..\Module\MMC5983;..\Module\LORA;..\Module\Imu</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>
|
||||
<ClangAsOpt>4</ClangAsOpt>
|
||||
<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>0x00000000</TextAddressRange>
|
||||
<DataAddressRange>0x20000000</DataAddressRange>
|
||||
<pXoBase></pXoBase>
|
||||
<ScatterFile>template.sct</ScatterFile>
|
||||
<IncludeLibs></IncludeLibs>
|
||||
<IncludeLibsPath></IncludeLibsPath>
|
||||
<Misc>--keep=*Handler</Misc>
|
||||
<LinkerInputFile></LinkerInputFile>
|
||||
<DisabledWarnings></DisabledWarnings>
|
||||
</LDads>
|
||||
</TargetArmAds>
|
||||
</TargetOption>
|
||||
<Groups>
|
||||
<Group>
|
||||
<GroupName>common</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>startup_hc32l17x.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>.\startup_hc32l17x.s</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>system_hc32l17x.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\mcu\common\system_hc32l17x.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>interrupts_hc32l17x.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\mcu\common\interrupts_hc32l17x.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>source</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>main.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\source\Src\main.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>bsp.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\source\src\bsp.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Algorithm.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\source\src\Algorithm.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>SGCP.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\source\src\SGCP.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>Update.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\source\src\Update.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>driver</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>dmac.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\dmac.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>flash.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\flash.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>gpio.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\gpio.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>lpm.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\lpm.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>lpuart.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\lpuart.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>spi.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\spi.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>uart.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\uart.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>wdt.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\wdt.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>ddl.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\ddl.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>sysctrl.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\sysctrl.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>reset.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\reset.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>lptim.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\lptim.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>rtc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\rtc.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>trim.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\trim.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>i2c.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\i2c.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>bt.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\bt.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>adc.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\adc.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>bgr.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\driver\src\bgr.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>Debug</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>UartDebug.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Module\LaserTracing_Debug\UartDebug.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>LSM6DSL</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>lsm6dsl_reg.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Module\lsm6dsl\lsm6dsl_reg.c</FilePath>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>lsm6dsl_app.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Module\lsm6dsl\lsm6dsl_app.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>MMC5893</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>mmc5983.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Module\MMC5983\mmc5983.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>LORA</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>sx127x.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Module\LORA\sx127x.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>Imu</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>Imu.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Module\Imu\Imu.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>ReadMe</GroupName>
|
||||
<Files>
|
||||
<File>
|
||||
<FileName>ReadMe.txt</FileName>
|
||||
<FileType>5</FileType>
|
||||
<FilePath>..\ReadMe.txt</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
<Group>
|
||||
<GroupName>::CMSIS</GroupName>
|
||||
</Group>
|
||||
</Groups>
|
||||
</Target>
|
||||
<Target>
|
||||
<TargetName>HC32L17X_boot</TargetName>
|
||||
<ToolsetNumber>0x4</ToolsetNumber>
|
||||
<ToolsetName>ARM-ADS</ToolsetName>
|
||||
<pArmCC>6160000::V6.16::ARMCLANG</pArmCC>
|
||||
@@ -330,7 +921,7 @@
|
||||
<uC99>1</uC99>
|
||||
<uGnu>0</uGnu>
|
||||
<useXO>0</useXO>
|
||||
<v6Lang>3</v6Lang>
|
||||
<v6Lang>4</v6Lang>
|
||||
<v6LangP>5</v6LangP>
|
||||
<vShortEn>0</vShortEn>
|
||||
<vShortWch>0</vShortWch>
|
||||
@@ -339,9 +930,9 @@
|
||||
<v6Rtti>0</v6Rtti>
|
||||
<VariousControls>
|
||||
<MiscControls></MiscControls>
|
||||
<Define></Define>
|
||||
<Define>USE_BOOTLOADER,</Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath>..\mcu\common;..\source;..\driver\inc;..\source\inc;..\Module\Debug;..\Module\lsm6dsl;..\Module\MMC5983;..\Module\LORA;..\Module\Imu</IncludePath>
|
||||
<IncludePath>..\mcu\common;..\source;..\driver\inc;..\source\inc;..\Module\LaserTracing_Debug;..\Module\lsm6dsl;..\Module\MMC5983;..\Module\LORA;..\Module\Imu</IncludePath>
|
||||
</VariousControls>
|
||||
</Cads>
|
||||
<Aads>
|
||||
@@ -389,6 +980,44 @@
|
||||
<FileName>startup_hc32l17x.s</FileName>
|
||||
<FileType>2</FileType>
|
||||
<FilePath>.\startup_hc32l17x.s</FilePath>
|
||||
<FileOption>
|
||||
<CommonProperty>
|
||||
<UseCPPCompiler>2</UseCPPCompiler>
|
||||
<RVCTCodeConst>0</RVCTCodeConst>
|
||||
<RVCTZI>0</RVCTZI>
|
||||
<RVCTOtherData>0</RVCTOtherData>
|
||||
<ModuleSelection>0</ModuleSelection>
|
||||
<IncludeInBuild>2</IncludeInBuild>
|
||||
<AlwaysBuild>2</AlwaysBuild>
|
||||
<GenerateAssemblyFile>2</GenerateAssemblyFile>
|
||||
<AssembleAssemblyFile>2</AssembleAssemblyFile>
|
||||
<PublicsOnly>2</PublicsOnly>
|
||||
<StopOnExitCode>11</StopOnExitCode>
|
||||
<CustomArgument></CustomArgument>
|
||||
<IncludeLibraryModules></IncludeLibraryModules>
|
||||
<ComprImg>1</ComprImg>
|
||||
</CommonProperty>
|
||||
<FileArmAds>
|
||||
<Aads>
|
||||
<interw>2</interw>
|
||||
<Ropi>2</Ropi>
|
||||
<Rwpi>2</Rwpi>
|
||||
<thumb>2</thumb>
|
||||
<SplitLS>2</SplitLS>
|
||||
<SwStkChk>2</SwStkChk>
|
||||
<NoWarn>2</NoWarn>
|
||||
<uSurpInc>2</uSurpInc>
|
||||
<useXO>2</useXO>
|
||||
<ClangAsOpt>0</ClangAsOpt>
|
||||
<VariousControls>
|
||||
<MiscControls></MiscControls>
|
||||
<Define>USE_BOOTLOADER</Define>
|
||||
<Undefine></Undefine>
|
||||
<IncludePath></IncludePath>
|
||||
</VariousControls>
|
||||
</Aads>
|
||||
</FileArmAds>
|
||||
</FileOption>
|
||||
</File>
|
||||
<File>
|
||||
<FileName>system_hc32l17x.c</FileName>
|
||||
@@ -533,7 +1162,7 @@
|
||||
<File>
|
||||
<FileName>UartDebug.c</FileName>
|
||||
<FileType>1</FileType>
|
||||
<FilePath>..\Module\Debug\UartDebug.c</FilePath>
|
||||
<FilePath>..\Module\LaserTracing_Debug\UartDebug.c</FilePath>
|
||||
</File>
|
||||
</Files>
|
||||
</Group>
|
||||
@@ -605,7 +1234,8 @@
|
||||
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM" Cversion="5.5.0" condition="ARMv6_7_8-M Device">
|
||||
<package name="CMSIS" schemaVersion="1.3" url="http://www.keil.com/pack/" vendor="ARM" version="5.8.0"/>
|
||||
<targetInfos>
|
||||
<targetInfo name="HC32L17X"/>
|
||||
<targetInfo name="HC32L17X_boot"/>
|
||||
<targetInfo name="HC32L17X_debug"/>
|
||||
</targetInfos>
|
||||
</component>
|
||||
</components>
|
||||
|
||||
@@ -162,7 +162,11 @@ Reset_Handler PROC
|
||||
RAMCODE
|
||||
; reset Vector table address.
|
||||
LDR R0, =0xE000ED08
|
||||
LDR R2, =new_vect_table ;升级时打开
|
||||
|
||||
IF :DEF:USE_BOOTLOADER
|
||||
LDR R2, =new_vect_table ;使用boot程序时
|
||||
ENDIF
|
||||
|
||||
STR R2, [R0]
|
||||
|
||||
LDR R0, =SystemInit
|
||||
|
||||
+87
-19
@@ -1,22 +1,16 @@
|
||||
#include "sx127x.h"
|
||||
#include "ddl.h"
|
||||
#include "Debug.h"
|
||||
#include "spi.h"
|
||||
#include "bsp.h"
|
||||
|
||||
|
||||
#define LORAChannel 8
|
||||
#define LORARegPreamble 10
|
||||
#include "UartDebug.h"
|
||||
|
||||
#if (LORA_MODULE == SX1278W1)
|
||||
Sx1276Type_t LoRaPara = {
|
||||
.ucChannel = LORAChannel, //4 or 12
|
||||
.ucChannel = 8, //4 or 12
|
||||
.dwFreqHz = FREQ_CENT,
|
||||
.ucPower = 20,
|
||||
.SignalBw = SX1276_BW_250K,
|
||||
.SpreadFactor = SX1276_SF_512,
|
||||
.ErrorCoding = SX1276_EC_4_6,
|
||||
.RegPreamble = LORARegPreamble,//10 or 16
|
||||
.RegPreamble = 10,//10 or 16
|
||||
.ucOpModePrev = RFLR_OPMODE_STANDBY,
|
||||
.bAntSwPrev = RF_ANT_RECEIVER,
|
||||
.RegBuff = 0,
|
||||
@@ -70,6 +64,7 @@ void SX1276WriteBuffer(uint8_t ucAddr, uint8_t *pucBuff, uint8_t ucLen)
|
||||
}
|
||||
LORA_SPI_NSS_SET();
|
||||
}
|
||||
|
||||
void SX1276Write(uint8_t ucAddr, uint8_t ucData)
|
||||
{
|
||||
SX1276WriteBuffer(ucAddr, &ucData, 1);
|
||||
@@ -229,20 +224,18 @@ void SX1276LoRaSetOpMode(Sx1276OpModeType ucOpMode)
|
||||
LoRaPara.ucOpModePrev = LoRaPara.RegBuff.RegOpMode & ~RFLR_OPMODE_MASK;
|
||||
if( ucOpMode != LoRaPara.ucOpModePrev){
|
||||
if(ucOpMode == RFLR_OPMODE_TRANSMITTER){
|
||||
|
||||
//CLR_LORA_RXEN();
|
||||
//SET_LORA_TXEN();
|
||||
|
||||
|
||||
bAntSwStatus = RF_ANT_TRANSMITTER;
|
||||
}
|
||||
else if(ucOpMode == RFLR_OPMODE_RECEIVER){
|
||||
bAntSwStatus = RF_ANT_RECEIVER;
|
||||
|
||||
//CLR_LORA_TXEN();
|
||||
//SET_LORA_RXEN();
|
||||
bAntSwStatus = RF_ANT_RECEIVER;
|
||||
}
|
||||
else {
|
||||
//CLR_LORA_TXEN();
|
||||
//CLR_LORA_RXEN();
|
||||
bAntSwStatus = RF_ANT_CLOSE;
|
||||
}
|
||||
if( bAntSwStatus != LoRaPara.bAntSwPrev ){
|
||||
@@ -305,8 +298,8 @@ void Sx1276LoRaInit(void (*RxCallBack)(uint8_t *rBuff, uint8_t rlen))
|
||||
LoRaPara.RegBuff.RegLna = RFLR_LNA_GAIN_G1;
|
||||
SX1276WriteBuffer(REG_LR_OPMODE, (uint8_t*)&(LoRaPara.RegBuff) + 1, SIZE_OF_REGISTERS);
|
||||
//set the RF settings
|
||||
SX1276LoRaWriteChannel(LoRaPara.ucChannel);
|
||||
//SX1276LoRaSetFreqHz(LoRaPara.dwFreqHz);
|
||||
//SX1276LoRaWriteChannel(LoRaPara.ucChannel);
|
||||
SX1276LoRaSetFreqHz(LoRaPara.dwFreqHz);
|
||||
//REG_LR_MODEMCONFIG1
|
||||
SX1276Read(REG_LR_MODEMCONFIG1, &(LoRaPara.RegBuff.RegModemConfig1));
|
||||
//SignalBandwidth
|
||||
@@ -333,8 +326,14 @@ void Sx1276LoRaInit(void (*RxCallBack)(uint8_t *rBuff, uint8_t rlen))
|
||||
|
||||
//验证寄存器操作是否成功
|
||||
SX1276Write(REG_LR_MODEMCONFIG2, LoRaPara.RegBuff.RegModemConfig2);
|
||||
LoRaPara.RegBuff.RegModemConfig2 = 0;
|
||||
SX1276Read(REG_LR_MODEMCONFIG2, &(LoRaPara.RegBuff.RegModemConfig2));
|
||||
uint8_t Config2 = 0;
|
||||
SX1276Read(REG_LR_MODEMCONFIG2, &Config2);
|
||||
if(LoRaPara.RegBuff.RegModemConfig2 == Config2) {
|
||||
DBG_LOG("Lora OK!\r\n");
|
||||
}
|
||||
else {
|
||||
DBG_LOG("Lora Error!\r\n");
|
||||
}
|
||||
|
||||
SX1276LoRaSetSymbTimeout(0x3FF);
|
||||
LoRaPara.RegBuff.RegPreambleMsb= (LoRaPara.RegPreamble >> 8) & 0x00ff;
|
||||
@@ -363,7 +362,8 @@ void Sx1276LoRaInit(void (*RxCallBack)(uint8_t *rBuff, uint8_t rlen))
|
||||
Sx1276LoRaEnterRx();
|
||||
}
|
||||
|
||||
void IsrSx1276LoRaTxRx(void){
|
||||
void IsrSx1276LoRaTxRx(void)
|
||||
{
|
||||
switch (LoRaPara.State){
|
||||
case SX1276_IDLE:
|
||||
case SX1276_RX:
|
||||
@@ -610,4 +610,72 @@ void SX1276LoCalcRssiSnr(int8_t *pswRssi, int8_t *psbSnr)
|
||||
}
|
||||
*psbSnr= sbSnr;
|
||||
}
|
||||
int GetSx1276RxRetValue(void)
|
||||
{
|
||||
return LoRaPara.RxRet;
|
||||
}
|
||||
|
||||
void Sx1276RxRetValue(void)
|
||||
{
|
||||
LoRaPara.RxRet = -1;
|
||||
}
|
||||
|
||||
bool LoraSetChannel(uint8_t Channel)
|
||||
{
|
||||
if(Channel > 16)
|
||||
return false;
|
||||
LoRaPara.ucChannel = Channel;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LoraSetPower(uint8_t Power)
|
||||
{
|
||||
if(Power > 20)
|
||||
return false;
|
||||
LoRaPara.ucPower = Power;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LoraSetSignalBw(uint8_t SignalBw)
|
||||
{
|
||||
if(SignalBw > 9)
|
||||
return false;
|
||||
LoRaPara.SignalBw = (SignalBw << 4);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LoraSetSpreadFactor(uint8_t SpreadFactor)
|
||||
{
|
||||
if(SpreadFactor < 4 || SpreadFactor > 12)
|
||||
return false;
|
||||
LoRaPara.SpreadFactor = (SpreadFactor << 4);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LoraSetErrorCoding(uint8_t ErrorCoding)
|
||||
{
|
||||
if(ErrorCoding == 0 || ErrorCoding > 4)
|
||||
return false;
|
||||
LoRaPara.ErrorCoding = ErrorCoding << 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LoraSetRegPreamble(uint8_t RegPreamble)
|
||||
{
|
||||
LoRaPara.RegPreamble = RegPreamble;
|
||||
return true;
|
||||
}
|
||||
bool LoraSetFreqCent(uint32_t FreqCent)
|
||||
{
|
||||
if(FreqCent < 410000000 || FreqCent > 525000000)
|
||||
return false;
|
||||
LoRaPara.dwFreqHz = FreqCent;
|
||||
return true;
|
||||
}
|
||||
void LoraInit(void)
|
||||
{
|
||||
Sx1276LoRaInit(LORA_RxCallBack);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define __SX127X_H
|
||||
|
||||
#include "bsp.h"
|
||||
#include "main.h"
|
||||
|
||||
//Constant values need to compute the RSSI value
|
||||
#define RSSI_OFFSET_LF -155
|
||||
@@ -733,6 +734,7 @@ typedef struct {
|
||||
uint8_t ucTxPacketSize;
|
||||
uint8_t RxTxBuff[LORA_BUFF_SIZE];
|
||||
void (*RxCallBack)(uint8_t *rBuff, uint8_t rlen);
|
||||
int RxRet;
|
||||
}Sx1276Type_t, *pSx1276Type;
|
||||
|
||||
//ISM Freq In China
|
||||
@@ -822,5 +824,14 @@ Sx1276StateType_t SX1276LoRaReadStatus(void);
|
||||
void SX1276LoCalcRssiSnr(int8_t *pswRssi, int8_t *psbSnr);
|
||||
void Sx1276LoRaSleep(void);
|
||||
void Sx1276LoRaWakeup(void);
|
||||
|
||||
void LoraInit(void);
|
||||
bool LoraSetChannel(uint8_t Channel);
|
||||
bool LoraSetPower(uint8_t Power);
|
||||
bool LoraSetSignalBw(uint8_t SignalBw);
|
||||
bool LoraSetSpreadFactor(uint8_t SpreadFactor);
|
||||
bool LoraSetErrorCoding(uint8_t ErrorCoding);
|
||||
bool LoraSetRegPreamble(uint8_t RegPreamble);
|
||||
bool LoraSetFreqCent(uint32_t FreqCent);
|
||||
#endif
|
||||
|
||||
|
||||
Submodule
+1
Submodule Module/LaserTracing_Debug added at 5915837afb
@@ -48,7 +48,7 @@ bool count_greater(int32_t *arr, uint8_t size, int32_t target);
|
||||
bool count_smaller(int32_t *arr, uint8_t size, int32_t target);
|
||||
uint16_t CRC_Modbus(uint16_t wBase, uint8_t *para, uint16_t length);
|
||||
uint8_t CRC_Sum(uint8_t *_pbuff, uint16_t _cmdLen);
|
||||
bool isAllZero(uint8_t *arr, int size);
|
||||
bool is_all_byte(const uint8_t *data, size_t len, uint8_t val);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+3
-9
@@ -4,14 +4,8 @@
|
||||
#define __SGCP_H
|
||||
#include "bsp.h"
|
||||
|
||||
#define WORK_MODE 1 //工作模式选择,0、本机为查询模式,1、本机为上报模式(低功耗)
|
||||
#define SGCP_SELECT 1 //协议选择,0、本机为单个主设备接多个子设备,1、本机为单个主设备不接子设备,2、本机为单个子设备
|
||||
#define LocalDataLen sizeof(SGCP.DevData.LaserTracing)//本机设备数据长度
|
||||
#define LocalType LASER_TRACING //本机设备类型
|
||||
#define CommWay LORA //本机通讯方式
|
||||
#define DeviceSign MASTER //本机设备标志
|
||||
#define AddNumber (0x000017 + DeviceSign)//本机地址编号,数字部分对应唯一地址编号
|
||||
//09 00 01 00 00 00
|
||||
#define WORK_MODE 1 //工作模式选择,0、本机为查询模式,1、本机为上报模式(低功耗)
|
||||
#define SGCP_SELECT 1 //协议选择,0、本机为单个主设备接多个子设备,1、本机为单个主设备不接子设备,2、本机为单个子设备
|
||||
|
||||
typedef struct {//网关与主设备固定帧
|
||||
uint8_t Header;
|
||||
@@ -179,7 +173,7 @@ typedef enum {
|
||||
RS485 = 0x02, //0x02 RS485通讯
|
||||
RS232 = 0x03, //0x03 RS232通讯
|
||||
CAN = 0x04, //0x04 CAN通讯
|
||||
_4G = 0x05, //0x05 _4G通讯
|
||||
CATONE = 0x05, //0x05 _4G通讯
|
||||
BLE = 0x06, //0x06 BLE通讯
|
||||
WIFI = 0x07, //0x07 WIFI通讯
|
||||
UART = 0x08, //0x08 UART通讯
|
||||
|
||||
+2
-11
@@ -3,7 +3,6 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include "bsp.h"
|
||||
#include "UartDebug.h"
|
||||
|
||||
#define APP_START_FLAG 0x55AA5A5A
|
||||
#define APP_UPDATE_FLAG 0xA5A5AA55
|
||||
@@ -23,14 +22,6 @@
|
||||
|
||||
#define BOOT_PARA_ADDRESS (0x0001FC00)//(FLASH_BASE + BOOT_SIZE)
|
||||
#define BOOT_PARA_SIZE (FLASH_SECTOR_SIZE)
|
||||
|
||||
typedef struct {
|
||||
uint32_t AppFlag;
|
||||
uint32_t UpdateFlag;
|
||||
uint32_t PackageCnt;
|
||||
uint32_t AppSize;
|
||||
uint32_t Crc32Check;
|
||||
}BootPara_t, *BootPara;
|
||||
|
||||
//主机下发升级请求载荷结构体
|
||||
typedef struct {
|
||||
@@ -52,8 +43,8 @@ typedef struct {
|
||||
#define U_DBG_LOG(...) DBG_LOG(__VA_ARGS__)
|
||||
#define U_DELAY_MS(x) delay_ms(x)
|
||||
#define U_SYSTEM_TESET() SystemReset()
|
||||
#define SAVE_BOOT_PARA(addr) FlashWrite(BOOT_PARA_ADDRESS, addr, sizeof(BLPara) / 4)
|
||||
#define READ_BOOT_PARA(addr) FlashRead(BOOT_PARA_ADDRESS, addr, sizeof(BLPara) / 4)
|
||||
#define SAVE_BOOT_PARA(addr) SAVE_APP_PARA(addr)
|
||||
#define READ_BOOT_PARA(addr) READ_APP_PARA(addr)
|
||||
|
||||
//输出接口
|
||||
void Update(uint8_t *PayLoad);
|
||||
|
||||
+44
-10
@@ -6,6 +6,7 @@
|
||||
#include <time.h>
|
||||
#include "gpio.h"
|
||||
#include "spi.h"
|
||||
#include "Update.h"
|
||||
|
||||
/*模块启用与关闭*/
|
||||
#define USE_DEBUG 1 //调试串口选择,0、关闭,1、启用
|
||||
@@ -23,8 +24,7 @@
|
||||
#define USE_SPI0 1 //SPI1开关,0、关闭,1、启用
|
||||
#define USE_SPI1 0 //SPI1开关,0、关闭,1、启用
|
||||
|
||||
#define USE_BOOTLOADER 1 //BOOTLOADER开关,0、关闭,1、启用
|
||||
#define USE_LORA_CH 1 //0为测试通道
|
||||
//#define USE_BOOTLOADER 1 //BOOTLOADER开关,0、关闭,1、启用
|
||||
|
||||
//<<---------------------------- MCU -------------------------------->>
|
||||
//< UART0
|
||||
@@ -209,12 +209,22 @@
|
||||
extern float VBAT_8V4;
|
||||
extern uint8_t VBAT_Percentage;
|
||||
|
||||
typedef struct {
|
||||
uint32_t AppFlag;
|
||||
uint32_t UpdateFlag;
|
||||
uint32_t PackageCnt;
|
||||
uint32_t AppSize;
|
||||
uint32_t Crc32Check;
|
||||
uint32_t FirstRunFlag;//第一次运行
|
||||
uint8_t DevMac[6];//设备MAC
|
||||
uint32_t LoraFreq;//Lora频率
|
||||
}BootPara_t, *BootPara;
|
||||
|
||||
typedef struct {
|
||||
uint16_t CollectTime; //数据采集时间间隔,设置范围30*N秒,1<=N<=240,(默认5分钟,N=10)
|
||||
uint16_t ReportInterval; //上报时间间隔,设置范围,30*N秒,10<=N<=1440(默认20分钟,N=40)
|
||||
uint8_t ERInterval; //紧急上报时间间隔,设置范围,30*N秒,2<=N<=10(默认2分钟,N=4)
|
||||
uint8_t ERTime; //紧急上报时长,设置范围,30*N秒,20<=N<=240(默认20分钟,N=40)
|
||||
uint16_t CollectTime; //数据采集时间间隔,设置范围30*N秒,1<=N<=240,(默认300秒,N=10)
|
||||
uint16_t ReportInterval; //上报时间间隔,设置范围,30*N秒,10<=N<=1440(默认1200秒,N=40)
|
||||
uint8_t ERInterval; //紧急上报时间间隔,设置范围,30*N秒,2<=N<=10(默认120秒,N=4)
|
||||
uint8_t ERTime; //紧急上报时长,设置范围,30*N秒,20<=N<=240(默认1200秒,N=40)
|
||||
uint32_t TimeStamp; //网关返回RTC时间戳
|
||||
}__attribute__((packed))LayoutPara_t,*LayoutPara;//上位机下发的配置参数
|
||||
|
||||
@@ -225,16 +235,39 @@ typedef struct {
|
||||
}__attribute__ ((packed))CalibratePara_t, *CalibratePara;
|
||||
|
||||
typedef struct {
|
||||
bool OnOff;
|
||||
uint8_t ucChannel;
|
||||
int8_t ucPower;
|
||||
uint8_t SignalBw;
|
||||
uint8_t SpreadFactor;
|
||||
uint8_t ErrorCoding;
|
||||
uint8_t RegPreamble;
|
||||
uint32_t FreqCent;
|
||||
}__attribute__ ((packed))LoraPara_t, *pLoraPara;
|
||||
|
||||
typedef struct {
|
||||
bool Enable; //串口使能
|
||||
bool UpgradeEnable;//升级功能使能
|
||||
uint32_t Addr; //本机485地址
|
||||
uint32_t BaudRate;
|
||||
}__attribute__((packed))RS485Para_t, *RS485Para;
|
||||
|
||||
typedef struct {
|
||||
BootPara_t BLPara;
|
||||
LayoutPara_t Layout;
|
||||
CalibratePara_t CaliPara;
|
||||
uint32_t RS485Addr; //本机485地址
|
||||
RS485Para_t Rs485Ch1;
|
||||
RS485Para_t Rs485Ch2;
|
||||
uint32_t FactoryFlag;//出厂标志位
|
||||
LoraPara_t Lora;
|
||||
}AppPara_T, *pAppPara;
|
||||
#define APP_PARA_ADDRESS (0x0001FE00)
|
||||
#define SAVE_APP_PARA(addr) FlashWrite(APP_PARA_ADDRESS, addr, sizeof(App.Para) / 4)
|
||||
#define READ_APP_PARA(addr) FlashRead(APP_PARA_ADDRESS, addr, sizeof(App.Para) / 4)
|
||||
//#define APP_PARA_ADDRESS (0x0001FC00)
|
||||
#define SAVE_APP_PARA(addr) FlashWrite(BOOT_PARA_ADDRESS, addr, sizeof(App.Para) / 4)
|
||||
#define READ_APP_PARA(addr) FlashRead(BOOT_PARA_ADDRESS, addr, sizeof(App.Para) / 4)
|
||||
|
||||
void BspInit(void);
|
||||
void LpUart0Init(uint32_t Baud);
|
||||
void Uart0Init(uint32_t Baud);
|
||||
void EnterDeepSleep(void);
|
||||
void DBGUartSendByte(uint8_t sData);
|
||||
void DBGUartSend(uint8_t *sData, int sLen);
|
||||
@@ -269,3 +302,4 @@ void LORAIntDisable(void);
|
||||
void ACCandMMCIntEnable(void);
|
||||
void ACCandMMCIntDisable(void);
|
||||
#endif
|
||||
|
||||
|
||||
+13
-5
@@ -2,8 +2,16 @@
|
||||
#define __MAIN_H
|
||||
#include "bsp.h"
|
||||
#include "UartDebug.h"
|
||||
#include "Update.h"
|
||||
#include "Imu.h"
|
||||
|
||||
#define SOFTWARE_VERSION 12 //软件版本
|
||||
#define HARDWARE_VERSION 11 //硬件版本
|
||||
|
||||
#define MAIN_DBG_LOG(...) { if(MainDispEn) DBG_LOG(__VA_ARGS__);}
|
||||
#define DATA_DBG_LOG(...) { if(DataDispEn) DBG_LOG(__VA_ARGS__);}
|
||||
|
||||
|
||||
#define X 0
|
||||
#define Y 1
|
||||
#define Z 2
|
||||
@@ -93,15 +101,15 @@ typedef struct {
|
||||
bool CaliFlag; //标校标志位
|
||||
|
||||
int16_t Nonce; //随机数
|
||||
|
||||
uint32_t TestTimeCnt;
|
||||
uint8_t Tcnt;
|
||||
bool LaserFlag;
|
||||
}AppDetect_t;
|
||||
|
||||
extern AppDetect_t App;
|
||||
|
||||
void MainDBGOnOff(bool OnOff);
|
||||
void DataDBGOnOff(bool OnOff);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+13
-13
@@ -729,23 +729,23 @@ uint8_t CRC_Sum(uint8_t *_pbuff, uint16_t _cmdLen)
|
||||
|
||||
return cmd_sum;
|
||||
}
|
||||
/*****************************************************************************************
|
||||
* 函数名称: isAllZero
|
||||
* 功能描述: 判断一个数组的值是否全部为0
|
||||
* 参 数: arr,数组
|
||||
size,长度
|
||||
* 返 回 值: true或false
|
||||
*****************************************************************************************/
|
||||
bool isAllZero(uint8_t *arr, int size)
|
||||
/**
|
||||
* @brief 检查缓冲区是否全部等于指定字节值
|
||||
* @param data : 待检查的数据指针
|
||||
* @param len : 数据长度(字节数)
|
||||
* @param val : 期望的字节值 (0x00 ~ 0xFF)
|
||||
* @return true : 全部等于 val
|
||||
* false: 存在不等于 val 的字节
|
||||
*/
|
||||
bool is_all_byte(const uint8_t *data, size_t len, uint8_t val)
|
||||
{
|
||||
for (int i = 0; i < size; i++) {
|
||||
if (arr[i] != 0) {
|
||||
return false; // 如果数组中有一个元素不为0,则返回false
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
if (data[i] != val) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true; // 遍历完数组后,若所有元素都为0,则返回true
|
||||
return true;
|
||||
}
|
||||
|
||||
/*****************************************************************************************
|
||||
* 函数名称: HexToAscii
|
||||
* 功能描述: 16进制转ASCII码
|
||||
|
||||
+19
-11
@@ -11,11 +11,15 @@ IROM1
|
||||
串口升级打开USE_BOOTLOADER和点s文件中的LDR R2, =new_vect_table ;升级时打开
|
||||
*/
|
||||
|
||||
uint32_t LocalType; //本机设备类型
|
||||
uint32_t CommWay; //本机通讯方式
|
||||
uint32_t DeviceSign; //本机设备标志
|
||||
uint32_t AddNumber; //本机地址编号,数字部分对应唯一地址编号
|
||||
//09 00 01 00 00 00
|
||||
uint8_t LocalMAC[6] = {LocalType & 0xFF, (LocalType >> 8) & 0xFF, CommWay, (AddNumber >> 16) & 0xFF, (AddNumber >> 8) & 0xFF, AddNumber & 0xFF}; //本机MAC地址
|
||||
uint8_t LocalMAC[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};//本机MAC地址
|
||||
uint8_t GatewayMAC[6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; //网关MAC地址,注册时全为0
|
||||
uint8_t LocalDataPack[LocalDataLen]; //本机数据包
|
||||
|
||||
uint8_t LocalDataPack[sizeof(SGCP.DevData.LaserTracing)]; //本机数据包
|
||||
uint8_t LocalDataLen = sizeof(SGCP.DevData.LaserTracing); //本机设备数据长度
|
||||
|
||||
SGCP_t SGCP;
|
||||
|
||||
@@ -754,7 +758,7 @@ static void MasRevHandler(void)
|
||||
return;
|
||||
}
|
||||
|
||||
if(SFHeader->Addr != App.Para.RS485Addr)
|
||||
if(SFHeader->Addr != App.Para.Rs485Ch1.Addr)
|
||||
{
|
||||
if(SFHeader->Addr != 0x00)
|
||||
{
|
||||
@@ -877,7 +881,7 @@ static void GWRevHandler(void)
|
||||
|
||||
if(memcmp(GFHeader->MDAddr, LocalMAC, sizeof(GFHeader->MDAddr)) != false)
|
||||
{
|
||||
if(isAllZero(GFHeader->MDAddr, sizeof(GFHeader->MDAddr)) != true)
|
||||
if(is_all_byte(GFHeader->MDAddr, sizeof(GFHeader->MDAddr), 0x00) != true)
|
||||
{
|
||||
DBG_LOG("Gateway Master Device MAC Err...\r\n");
|
||||
return;
|
||||
@@ -1116,7 +1120,7 @@ static void InRevHandler(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
App.Para.RS485Addr = temp;
|
||||
App.Para.Rs485Ch1.Addr = temp;
|
||||
SAVE_APP_PARA((uint32_t *)&App.Para);
|
||||
if(SGCP.InStatus == IN_STATUS_IDLE)
|
||||
{
|
||||
@@ -1721,7 +1725,7 @@ void GwRevLoopHandler(void)
|
||||
memcpy(&SGCP.DeviceData[SGCP.DeviceDataLen], &SGCP.DevData.LaserTracing.MasterDev, sizeof(SGCP.DevData.LaserTracing.MasterDev));
|
||||
SGCP.DeviceDataLen += sizeof(SGCP.DevData.LaserTracing.MasterDev);
|
||||
|
||||
if(isAllZero(LocalDataPack, LocalDataLen) == false)
|
||||
if(is_all_byte(LocalDataPack, LocalDataLen, 0x00) == false)
|
||||
{
|
||||
memcpy(&SGCP.DeviceData[SGCP.DeviceDataLen], LocalDataPack, sizeof(LocalDataPack));
|
||||
SGCP.DeviceDataLen = SGCP.DeviceDataLen + DevGetDataMess(LocalType, LocalDataPack);;
|
||||
@@ -1774,7 +1778,7 @@ void GwRevLoopHandler(void)
|
||||
SGCP.DeviceMAC[SGCP.ReadDataAdd][0],SGCP.DeviceMAC[SGCP.ReadDataAdd][1],SGCP.DeviceMAC[SGCP.ReadDataAdd][2],
|
||||
SGCP.DeviceMAC[SGCP.ReadDataAdd][3],SGCP.DeviceMAC[SGCP.ReadDataAdd][4],SGCP.DeviceMAC[SGCP.ReadDataAdd][5]);
|
||||
|
||||
if(isAllZero(LocalDataPack, LocalDataLen) == false)
|
||||
if(is_all_byte(LocalDataPack, LocalDataLen, 0x00) == false)
|
||||
{
|
||||
memcpy(&SGCP.DeviceData[SGCP.DeviceDataLen], LocalDataPack, sizeof(LocalDataPack));
|
||||
SGCP.DeviceDataLen = DevGetDataMess(LocalType, LocalDataPack);
|
||||
@@ -1817,12 +1821,16 @@ void GwRevLoopHandler(void)
|
||||
PrintfMess();
|
||||
if(SGCP.LaserOnOff == true)
|
||||
{
|
||||
ToGWLaserRes(SGCP.LaserOnOff);
|
||||
LASER1_ON();
|
||||
if(SGCP.LoginOk == true)
|
||||
ToGWLaserRes(SGCP.LaserOnOff);
|
||||
DBG_LOG("The laser has been activated!\r\n");
|
||||
}
|
||||
else if(SGCP.LaserOnOff == false)
|
||||
{
|
||||
ToGWLaserRes(SGCP.LaserOnOff);
|
||||
LASER1_OFF();
|
||||
if(SGCP.LoginOk == true)
|
||||
ToGWLaserRes(SGCP.LaserOnOff);
|
||||
DBG_LOG("The laser has been turned off!\r\n");
|
||||
}
|
||||
SGCP.GWStatus = GW_STATUS_IDLE;
|
||||
@@ -2191,7 +2199,7 @@ void InRevLoopHandler(void)
|
||||
case IN_STATUS_ALTER_485ADDR:{
|
||||
PrintfMess();
|
||||
Alter485AddrRes(LocalMAC, true);
|
||||
DBG_LOG("Alter RS485Addr:%X\r\n", App.Para.RS485Addr);
|
||||
DBG_LOG("Alter RS485Addr:%X\r\n", App.Para.Rs485Ch1.Addr);
|
||||
SGCP.InStatus = IN_STATUS_IDLE;
|
||||
break;}
|
||||
|
||||
|
||||
+15
-15
@@ -1,7 +1,7 @@
|
||||
#include "Update.h"
|
||||
#include "UartDebug.h"
|
||||
|
||||
static BootPara_t BLPara;
|
||||
#include "main.h"
|
||||
#include "bsp.h"
|
||||
|
||||
/*****************************************************************************************
|
||||
* 函数名称: Update
|
||||
@@ -14,19 +14,19 @@ void Update(uint8_t *PayLoad)
|
||||
UpDataRequset_t Req;
|
||||
|
||||
memcpy(&Req, PayLoad, sizeof(UpDataRequset_t));
|
||||
BLPara.AppSize = Req.AppSize;
|
||||
BLPara.Crc32Check = Req.AppCrc32;
|
||||
BLPara.PackageCnt = Req.PackageNum;
|
||||
BLPara.AppFlag = 0;
|
||||
BLPara.UpdateFlag = APP_UPDATE_FLAG;
|
||||
App.Para.BLPara.AppSize = Req.AppSize;
|
||||
App.Para.BLPara.Crc32Check = Req.AppCrc32;
|
||||
App.Para.BLPara.PackageCnt = Req.PackageNum;
|
||||
App.Para.BLPara.AppFlag = 0;
|
||||
App.Para.BLPara.UpdateFlag = APP_UPDATE_FLAG;
|
||||
|
||||
U_DBG_LOG("Receive upgrade command:\r\n");
|
||||
U_DBG_LOG("PackageNum: %d\r\n", BLPara.PackageCnt);
|
||||
U_DBG_LOG("AppSize: %d\r\n", BLPara.AppSize);
|
||||
U_DBG_LOG("AppCrc32: 0x%08x\r\n", BLPara.Crc32Check);
|
||||
U_DBG_LOG("PackageNum: %d\r\n", App.Para.BLPara.PackageCnt);
|
||||
U_DBG_LOG("AppSize: %d\r\n", App.Para.BLPara.AppSize);
|
||||
U_DBG_LOG("AppCrc32: 0x%08x\r\n", App.Para.BLPara.Crc32Check);
|
||||
U_DBG_LOG("System Reset!\r\n");
|
||||
|
||||
SAVE_BOOT_PARA((uint32_t *)&BLPara);
|
||||
SAVE_BOOT_PARA((uint32_t *)&App.Para);
|
||||
U_DELAY_MS(200);
|
||||
U_SYSTEM_TESET();
|
||||
}
|
||||
@@ -39,10 +39,10 @@ void Update(uint8_t *PayLoad)
|
||||
*****************************************************************************************/
|
||||
void UpdateInit(void)
|
||||
{
|
||||
READ_BOOT_PARA((uint32_t *)&BLPara);
|
||||
if(BLPara.AppFlag != APP_START_FLAG) {
|
||||
BLPara.AppFlag = APP_START_FLAG;
|
||||
SAVE_BOOT_PARA((uint32_t *)&BLPara);
|
||||
READ_BOOT_PARA((uint32_t *)&App.Para);
|
||||
if(App.Para.BLPara.AppFlag != APP_START_FLAG) {
|
||||
App.Para.BLPara.AppFlag = APP_START_FLAG;
|
||||
SAVE_BOOT_PARA((uint32_t *)&App.Para);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+23
-9
@@ -89,7 +89,7 @@ static void SystemRCLInit(void)
|
||||
Sysctrl_ClkSourceEnable(SysctrlClkRCL, TRUE); ///< 使能RCL时钟
|
||||
}
|
||||
|
||||
static void Uart0Init(void)
|
||||
void Uart0Init(uint32_t Baud)
|
||||
{
|
||||
stc_gpio_cfg_t stcGpioCfg;
|
||||
stc_uart_cfg_t stcCfg;
|
||||
@@ -116,7 +116,7 @@ static void Uart0Init(void)
|
||||
stcCfg.enMmdorCk = UartMskEven; ///<偶校验
|
||||
stcCfg.stcBaud.u32Pclk = Sysctrl_GetPClkFreq(); ///<PCLK获取
|
||||
stcCfg.stcBaud.enClkDiv = UartMsk8Or16Div; ///<采样分频
|
||||
stcCfg.stcBaud.u32Baud = 500000; ///<波特率
|
||||
stcCfg.stcBaud.u32Baud = Baud; ///<波特率
|
||||
stcCfg.enRunMode = UartMskMode1; ///<工作模式
|
||||
Uart_Init(M0P_UART0, &stcCfg);
|
||||
|
||||
@@ -166,7 +166,7 @@ static void Uart1Init(void)
|
||||
Uart_EnableIrq(M0P_UART1, UartRxIrq); ///<使能接收中断
|
||||
EnableNvic(UART1_3_IRQn, IrqLevel3, TRUE); ///<系统中断使能
|
||||
}
|
||||
static void LpUart0Init(void)
|
||||
void LpUart0Init(uint32_t Baud)
|
||||
{
|
||||
stc_gpio_cfg_t stcGpioCfg;
|
||||
stc_lpuart_cfg_t stcCfg;
|
||||
@@ -193,7 +193,7 @@ static void LpUart0Init(void)
|
||||
stcCfg.stcBaud.enSclkSel = LPUartMskRcl; ///<传输时钟源
|
||||
stcCfg.stcBaud.u32Sclk = 38400; ///<PCLK获取
|
||||
stcCfg.stcBaud.enSclkDiv = LPUartMsk4Or8Div; ///<采样分频
|
||||
stcCfg.stcBaud.u32Baud = 9600; ///<波特率
|
||||
stcCfg.stcBaud.u32Baud = Baud; ///<波特率
|
||||
stcCfg.enRunMode = LPUartMskMode1; ///<工作模式
|
||||
LPUart_Init(M0P_LPUART0, &stcCfg);
|
||||
|
||||
@@ -703,9 +703,22 @@ void PrintfMess(void)
|
||||
}
|
||||
void DBGUartSendByte(uint8_t sData)
|
||||
{
|
||||
#if USE_BOOTLOADER
|
||||
LPUart_SendData(M0P_LPUART0, sData);
|
||||
#else
|
||||
Uart_SendDataPoll(M0P_UART0, sData);
|
||||
#endif
|
||||
}
|
||||
void DBGUartSend(uint8_t *sData, int sLen)
|
||||
{
|
||||
#if USE_BOOTLOADER
|
||||
LPUart0SendArray(sData, sLen);
|
||||
#else
|
||||
for(int i = 0; i < sLen; i++) {
|
||||
Uart_SendDataPoll(M0P_UART0, sData[i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void LPUart0SendArray(uint8_t *sData, uint8_t sLen)
|
||||
{
|
||||
RS485_CTRL_TX();
|
||||
@@ -783,6 +796,7 @@ void LpUart0_IRQHandler(void)
|
||||
LPUart_ClrStatus(M0P_LPUART0, LPUartRC); ///<清接收中断请求
|
||||
uint8_t u8RxData = LPUart_ReceiveData(M0P_LPUART0); ///读取数据
|
||||
LPUartRx_CallBack(u8RxData);
|
||||
DebugUartIRQ(u8RxData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -791,7 +805,7 @@ void Uart0_IRQHandler(void)
|
||||
if(Uart_GetStatus(M0P_UART0, UartRC)) { ///接收数据
|
||||
Uart_ClrStatus(M0P_UART0, UartRC); ///<清接收中断请求
|
||||
uint8_t u8RxData = Uart_ReceiveData(M0P_UART0); ///读取数据
|
||||
DebugUartIRQ(u8RxData);
|
||||
//DebugUartIRQ(u8RxData);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -876,7 +890,7 @@ void WakeUpInit(void)
|
||||
AdcInit();
|
||||
#endif
|
||||
#if (USE_UART0 == 1)
|
||||
Uart0Init();
|
||||
Uart0Init(500000);
|
||||
#endif
|
||||
#if (USE_SPI0 == 1)
|
||||
SPI0Init();
|
||||
@@ -908,7 +922,7 @@ void BspInit(void)
|
||||
AdcInit();
|
||||
#endif
|
||||
#if (USE_UART0 == 1)//< DEBUG
|
||||
Uart0Init();
|
||||
Uart0Init(500000);
|
||||
#endif
|
||||
#if (USE_RTC == 1)//< RTC
|
||||
RTCInit(30);
|
||||
@@ -923,7 +937,7 @@ void BspInit(void)
|
||||
SPI1Init();
|
||||
#endif
|
||||
#if (USE_LPUART0 == 1)//< LPUART0
|
||||
LpUart0Init();
|
||||
LpUart0Init(9600);
|
||||
#endif
|
||||
#if(USE_I2C0 == 1)
|
||||
I2C0Init();
|
||||
|
||||
+178
-118
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user