first commit v2.0.1

This commit is contained in:
hulk
2024-08-08 19:18:16 +08:00
commit f526aa2b8f
159 changed files with 43838 additions and 0 deletions

View File

@@ -0,0 +1,793 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<ProjectOpt xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="project_optx.xsd">
<SchemaVersion>1.0</SchemaVersion>
<Header>### uVision Project, (C) Keil Software</Header>
<Extensions>
<cExt>*.c</cExt>
<aExt>*.s*; *.src; *.a*</aExt>
<oExt>*.obj; *.o</oExt>
<lExt>*.lib</lExt>
<tExt>*.txt; *.h; *.inc; *.md</tExt>
<pExt>*.plm</pExt>
<CppX>*.cpp</CppX>
<nMigrate>0</nMigrate>
</Extensions>
<DaveTm>
<dwLowDateTime>0</dwLowDateTime>
<dwHighDateTime>0</dwHighDateTime>
</DaveTm>
<Target>
<TargetName>XLSW_SONIC</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>.\list\</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>0</tRtrace>
<sRSysVw>1</sRSysVw>
<tRSysVw>1</tRSysVw>
<sRunDeb>0</sRunDeb>
<sLrtime>0</sLrtime>
<bEvRecOn>1</bEvRecOn>
<bSchkAxf>0</bSchkAxf>
<bTchkAxf>0</bTchkAxf>
<nTsel>4</nTsel>
<sDll></sDll>
<sDllPa></sDllPa>
<sDlgDll></sDlgDll>
<sDlgPa></sDlgPa>
<sIfile></sIfile>
<tDll></tDll>
<tDllPa></tDllPa>
<tDlgDll></tDlgDll>
<tDlgPa></tDlgPa>
<tIfile></tIfile>
<pMon>Segger\JL2CM3.dll</pMon>
</DebugOpt>
<TargetDriverDllRegistry>
<SetRegEntry>
<Number>0</Number>
<Key>JL2CM3</Key>
<Name>-U602712363 -O206 -S2 -ZTIFSpeedSel5000 -A0 -C0 -JU1 -JI127.0.0.1 -JP0 -RST0 -N00("ARM CoreSight SW-DP") -D00(0BF11477) -L00(0) -TO0 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -TB1 -TFE0 -FO15 -FD20000000 -FC1000 -FN1 -FF0GD32E23x.FLM -FS08000000 -FL010000 -FP0($$Device:GD32E230F8$Flash\GD32E23x.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>UL2V8M</Key>
<Name>-UAny -O206 -S0 -C0 -P00 -N00("ARM CoreSight SW-DP") -D00(0BF11477) -L00(0) -TO0 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FN1 -FC1000 -FD20000000 -FF0GD32E23x -FL010000 -FS08000000 -FP0($$Device:GD32E230F8$Flash\GD32E23x.FLM)</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>PWSTATINFO</Key>
<Name>200,50,700</Name>
</SetRegEntry>
<SetRegEntry>
<Number>0</Number>
<Key>DLGUARM</Key>
<Name></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>(6010=-1,-1,-1,-1,0)(6018=-1,-1,-1,-1,0)(6019=-1,-1,-1,-1,0)(6008=-1,-1,-1,-1,0)(6009=-1,-1,-1,-1,0)(6014=-1,-1,-1,-1,0)(6015=-1,-1,-1,-1,0)(6003=-1,-1,-1,-1,0)(6000=-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>chirp_error</ItemText>
</Ww>
<Ww>
<count>1</count>
<WinNumber>1</WinNumber>
<ItemText>ret_val</ItemText>
</Ww>
<Ww>
<count>2</count>
<WinNumber>1</WinNumber>
<ItemText>info_ptr-&gt;address</ItemText>
</Ww>
<Ww>
<count>3</count>
<WinNumber>1</WinNumber>
<ItemText>info_ptr-&gt;bus_num</ItemText>
</Ww>
<Ww>
<count>4</count>
<WinNumber>1</WinNumber>
<ItemText>grp_ptr-&gt;i2c_drv_flags</ItemText>
</Ww>
<Ww>
<count>5</count>
<WinNumber>1</WinNumber>
<ItemText>test_Val</ItemText>
</Ww>
<Ww>
<count>6</count>
<WinNumber>1</WinNumber>
<ItemText>pulselength</ItemText>
</Ww>
<Ww>
<count>7</count>
<WinNumber>1</WinNumber>
<ItemText>DATA_READY_FLAG</ItemText>
</Ww>
<Ww>
<count>8</count>
<WinNumber>1</WinNumber>
<ItemText>taskflags</ItemText>
</Ww>
</WatchWindow1>
<MemoryWindow1>
<Mm>
<WinNumber>1</WinNumber>
<SubType>0</SubType>
<ItemText>40015804</ItemText>
<AccSizeX>0</AccSizeX>
</Mm>
</MemoryWindow1>
<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>
</TargetOption>
</Target>
<Group>
<GroupName>Application</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>1</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\gd32e23x_it.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_it.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>2</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\main.c</PathWithFileName>
<FilenameWithoutPath>main.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>3</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\systick.c</PathWithFileName>
<FilenameWithoutPath>systick.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>1</GroupNumber>
<FileNumber>4</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\board_init.c</PathWithFileName>
<FilenameWithoutPath>board_init.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>CMSIS</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>2</GroupNumber>
<FileNumber>5</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\CMSIS\GD\GD32E23x\Source\system_gd32e23x.c</PathWithFileName>
<FilenameWithoutPath>system_gd32e23x.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Peripherals</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>6</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_adc.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_adc.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>7</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_cmp.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_cmp.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>8</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_crc.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_crc.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_dbg.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_dbg.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>10</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_dma.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_dma.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>11</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_exti.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_exti.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>12</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_fmc.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_fmc.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>13</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_fwdgt.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_fwdgt.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>14</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_gpio.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_gpio.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>15</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_i2c.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_i2c.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>16</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_misc.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_misc.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>17</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_pmu.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_pmu.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>18</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_rcu.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_rcu.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>19</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_rtc.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_rtc.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>20</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_spi.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_spi.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>21</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_syscfg.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_syscfg.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>22</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_timer.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_timer.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>23</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_usart.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_usart.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>3</GroupNumber>
<FileNumber>24</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_wwdgt.c</PathWithFileName>
<FilenameWithoutPath>gd32e23x_wwdgt.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Startup</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>4</GroupNumber>
<FileNumber>25</FileNumber>
<FileType>2</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Firmware\CMSIS\GD\GD32E23x\Source\ARM\startup_gd32e23x.s</PathWithFileName>
<FilenameWithoutPath>startup_gd32e23x.s</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Utilities</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>5</GroupNumber>
<FileNumber>26</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\Utilities\gd32e230c_eval.c</PathWithFileName>
<FilenameWithoutPath>gd32e230c_eval.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>Doc</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>6</GroupNumber>
<FileNumber>27</FileNumber>
<FileType>5</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\readme.txt</PathWithFileName>
<FilenameWithoutPath>readme.txt</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>BSP</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>28</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\CHIRP\board\chbsp_chirp_gd32e230f4.c</PathWithFileName>
<FilenameWithoutPath>chbsp_chirp_gd32e230f4.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>29</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\CHIRP\board\bsp_misc_gd32e230.c</PathWithFileName>
<FilenameWithoutPath>bsp_misc_gd32e230.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>7</GroupNumber>
<FileNumber>30</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\CHIRP\board\i2c.c</PathWithFileName>
<FilenameWithoutPath>i2c.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>CH_Driver</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>8</GroupNumber>
<FileNumber>31</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\CHIRP\drivers\src\ch_api.c</PathWithFileName>
<FilenameWithoutPath>ch_api.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>8</GroupNumber>
<FileNumber>32</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\CHIRP\drivers\src\ch_math_utils.c</PathWithFileName>
<FilenameWithoutPath>ch_math_utils.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>8</GroupNumber>
<FileNumber>33</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\CHIRP\drivers\src\ch101_gpr.c</PathWithFileName>
<FilenameWithoutPath>ch101_gpr.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>8</GroupNumber>
<FileNumber>34</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\CHIRP\drivers\src\ch101_gpr_fw.c</PathWithFileName>
<FilenameWithoutPath>ch101_gpr_fw.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>8</GroupNumber>
<FileNumber>35</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\CHIRP\drivers\src\ch_driver.c</PathWithFileName>
<FilenameWithoutPath>ch_driver.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>8</GroupNumber>
<FileNumber>36</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\CHIRP\drivers\src\ch_common.c</PathWithFileName>
<FilenameWithoutPath>ch_common.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
<File>
<GroupNumber>8</GroupNumber>
<FileNumber>37</FileNumber>
<FileType>1</FileType>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\CHIRP\drivers\src\chbsp_dummy.c</PathWithFileName>
<FilenameWithoutPath>chbsp_dummy.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>UltraSonic</GroupName>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>0</RteFlg>
<File>
<GroupNumber>9</GroupNumber>
<FileNumber>38</FileNumber>
<FileType>1</FileType>
<tvExp>1</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\..\CHIRP\ultrasound\src\ultrasound_display_config_info.c</PathWithFileName>
<FilenameWithoutPath>ultrasound_display_config_info.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
</Group>
<Group>
<GroupName>::CMSIS</GroupName>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<cbSel>0</cbSel>
<RteFlg>1</RteFlg>
</Group>
</ProjectOpt>

View File

@@ -0,0 +1,647 @@
<?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>XLSW_SONIC</TargetName>
<ToolsetNumber>0x4</ToolsetNumber>
<ToolsetName>ARM-ADS</ToolsetName>
<pCCUsed>6160000::V6.16::ARMCLANG</pCCUsed>
<uAC6>1</uAC6>
<TargetOption>
<TargetCommonOption>
<Device>GD32E230F8</Device>
<Vendor>GigaDevice</Vendor>
<PackID>GigaDevice.GD32E23x_DFP.1.1.0</PackID>
<PackURL>http://gd32mcu.com/data/documents/pack/</PackURL>
<Cpu>IRAM(0x20000000,0x0002000) IROM(0x08000000,0x0010000) CPUTYPE("Cortex-M23") CLOCK(12000000) ELITTLE</Cpu>
<FlashUtilSpec></FlashUtilSpec>
<StartupFile></StartupFile>
<FlashDriverDll>UL2V8M(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0GD32E23x -FS08000000 -FL010000 -FP0($$Device:GD32E230F8$Flash\GD32E23x.FLM))</FlashDriverDll>
<DeviceId>0</DeviceId>
<RegisterFile>$$Device:GD32E230F8$Device\Include\gd32e23x.h</RegisterFile>
<MemoryEnv></MemoryEnv>
<Cmp></Cmp>
<Asm></Asm>
<Linker></Linker>
<OHString></OHString>
<InfinionOptionDll></InfinionOptionDll>
<SLE66CMisc></SLE66CMisc>
<SLE66AMisc></SLE66AMisc>
<SLE66LinkerMisc></SLE66LinkerMisc>
<SFDFile>$$Device:GD32E230F8$SVD\GD32E230.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>.\output\</OutputDirectory>
<OutputName>XLSW_SONIC</OutputName>
<CreateExecutable>1</CreateExecutable>
<CreateLib>0</CreateLib>
<CreateHexFile>0</CreateHexFile>
<DebugInformation>1</DebugInformation>
<BrowseInformation>1</BrowseInformation>
<ListingPath>.\list\</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>1</ComprImg>
</CommonProperty>
<DllOption>
<SimDllName></SimDllName>
<SimDllArguments></SimDllArguments>
<SimDlgDll></SimDlgDll>
<SimDlgDllArguments></SimDlgDllArguments>
<TargetDllName>SARMV8M.DLL</TargetDllName>
<TargetDllArguments></TargetDllArguments>
<TargetDlgDll>TCM.DLL</TargetDlgDll>
<TargetDlgDllArguments>-pCM23</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>4102</DriverSelection>
</Flash1>
<bUseTDR>1</bUseTDR>
<Flash2>BIN\UL2V8M.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-M23"</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>
<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>1</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>3</wLevel>
<uThumb>0</uThumb>
<uSurpInc>0</uSurpInc>
<uC99>0</uC99>
<uGnu>0</uGnu>
<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>GD32E230</Define>
<Undefine></Undefine>
<IncludePath>..\..\Firmware\CMSIS;..\..\Utilities;..\;..\..\Utilities\LCD_Commom;..\..\Firmware\GD32E23x_standard_peripheral\Include;..\..\Firmware\CMSIS\GD\GD32E23x\Include;..\..\CHIRP\board;..\..\CHIRP\drivers\inc;..\..\CHIRP\ultrasound\inc</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>0x08000000</TextAddressRange>
<DataAddressRange>0x20000000</DataAddressRange>
<pXoBase></pXoBase>
<ScatterFile>.\output\Project.sct</ScatterFile>
<IncludeLibs></IncludeLibs>
<IncludeLibsPath></IncludeLibsPath>
<Misc></Misc>
<LinkerInputFile></LinkerInputFile>
<DisabledWarnings></DisabledWarnings>
</LDads>
</TargetArmAds>
</TargetOption>
<Groups>
<Group>
<GroupName>Application</GroupName>
<Files>
<File>
<FileName>gd32e23x_it.c</FileName>
<FileType>1</FileType>
<FilePath>..\gd32e23x_it.c</FilePath>
</File>
<File>
<FileName>main.c</FileName>
<FileType>1</FileType>
<FilePath>..\main.c</FilePath>
</File>
<File>
<FileName>systick.c</FileName>
<FileType>1</FileType>
<FilePath>..\systick.c</FilePath>
</File>
<File>
<FileName>board_init.c</FileName>
<FileType>1</FileType>
<FilePath>..\board_init.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>CMSIS</GroupName>
<Files>
<File>
<FileName>system_gd32e23x.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\CMSIS\GD\GD32E23x\Source\system_gd32e23x.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Peripherals</GroupName>
<Files>
<File>
<FileName>gd32e23x_adc.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_adc.c</FilePath>
</File>
<File>
<FileName>gd32e23x_cmp.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_cmp.c</FilePath>
</File>
<File>
<FileName>gd32e23x_crc.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_crc.c</FilePath>
</File>
<File>
<FileName>gd32e23x_dbg.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_dbg.c</FilePath>
</File>
<File>
<FileName>gd32e23x_dma.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_dma.c</FilePath>
</File>
<File>
<FileName>gd32e23x_exti.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_exti.c</FilePath>
</File>
<File>
<FileName>gd32e23x_fmc.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_fmc.c</FilePath>
</File>
<File>
<FileName>gd32e23x_fwdgt.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_fwdgt.c</FilePath>
</File>
<File>
<FileName>gd32e23x_gpio.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_gpio.c</FilePath>
</File>
<File>
<FileName>gd32e23x_i2c.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_i2c.c</FilePath>
</File>
<File>
<FileName>gd32e23x_misc.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_misc.c</FilePath>
</File>
<File>
<FileName>gd32e23x_pmu.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_pmu.c</FilePath>
</File>
<File>
<FileName>gd32e23x_rcu.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_rcu.c</FilePath>
</File>
<File>
<FileName>gd32e23x_rtc.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_rtc.c</FilePath>
</File>
<File>
<FileName>gd32e23x_spi.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_spi.c</FilePath>
</File>
<File>
<FileName>gd32e23x_syscfg.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_syscfg.c</FilePath>
</File>
<File>
<FileName>gd32e23x_timer.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_timer.c</FilePath>
</File>
<File>
<FileName>gd32e23x_usart.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_usart.c</FilePath>
</File>
<File>
<FileName>gd32e23x_wwdgt.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Firmware\GD32E23x_standard_peripheral\Source\gd32e23x_wwdgt.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Startup</GroupName>
<Files>
<File>
<FileName>startup_gd32e23x.s</FileName>
<FileType>2</FileType>
<FilePath>..\..\Firmware\CMSIS\GD\GD32E23x\Source\ARM\startup_gd32e23x.s</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Utilities</GroupName>
<Files>
<File>
<FileName>gd32e230c_eval.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\Utilities\gd32e230c_eval.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>Doc</GroupName>
<Files>
<File>
<FileName>readme.txt</FileName>
<FileType>5</FileType>
<FilePath>..\readme.txt</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>BSP</GroupName>
<Files>
<File>
<FileName>chbsp_chirp_gd32e230f4.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\CHIRP\board\chbsp_chirp_gd32e230f4.c</FilePath>
</File>
<File>
<FileName>bsp_misc_gd32e230.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\CHIRP\board\bsp_misc_gd32e230.c</FilePath>
</File>
<File>
<FileName>i2c.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\CHIRP\board\i2c.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>CH_Driver</GroupName>
<Files>
<File>
<FileName>ch_api.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\CHIRP\drivers\src\ch_api.c</FilePath>
</File>
<File>
<FileName>ch_math_utils.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\CHIRP\drivers\src\ch_math_utils.c</FilePath>
</File>
<File>
<FileName>ch101_gpr.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\CHIRP\drivers\src\ch101_gpr.c</FilePath>
</File>
<File>
<FileName>ch101_gpr_fw.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\CHIRP\drivers\src\ch101_gpr_fw.c</FilePath>
</File>
<File>
<FileName>ch_driver.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\CHIRP\drivers\src\ch_driver.c</FilePath>
</File>
<File>
<FileName>ch_common.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\CHIRP\drivers\src\ch_common.c</FilePath>
</File>
<File>
<FileName>chbsp_dummy.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\CHIRP\drivers\src\chbsp_dummy.c</FilePath>
</File>
</Files>
</Group>
<Group>
<GroupName>UltraSonic</GroupName>
<Files>
<File>
<FileName>ultrasound_display_config_info.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\CHIRP\ultrasound\src\ultrasound_display_config_info.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.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="XLSW_SONIC"/>
</targetInfos>
</component>
</components>
<files/>
</RTE>
<LayerInfo>
<Layers>
<Layer>
<LayName>Project</LayName>
<LayPrjMark>1</LayPrjMark>
</Layer>
</Layers>
</LayerInfo>
</Project>

95
XLSW_SONIC/board_init.c Normal file
View File

@@ -0,0 +1,95 @@
#include "gd32e23x.h"
#include "board_init.h"
#include "chirp_board_config.h"
#include "i2c.h"
/*!
\brief Init LED & IIC Pin
\param[in] none
\param[out] none
\retval none
\note LED Pin: GPIOB-01 Output - None PUPD - OD - 50MHz - Default Low
\note SDA Pin: GPIOF-00 Output - PU - OD - 50MHz - Default None
\note SCL Pin: GPIOF-01 Output - PU - OD - 50MHz - Default None
*/
void board_init_I2C(void)
{
/* Init LED, turned off */
rcu_periph_clock_enable(CHIRP_PIN_LED_CLK);
gpio_mode_set(CHIRP_PIN_LED_PORT, GPIO_MODE_OUTPUT, GPIO_PUPD_NONE, CHIRP_PIN_LED_PIN);
gpio_output_options_set(CHIRP_PIN_LED_PORT, GPIO_OTYPE_OD, GPIO_OSPEED_50MHZ, CHIRP_PIN_LED_PIN);
gpio_bit_reset(CHIRP_PIN_LED_PORT, CHIRP_PIN_LED_PIN);
/* Enable clock, RCU_GPIOF RCU_I2C0 RCU_DMA */
rcu_periph_clock_enable(CHIRP_PIN_IIC_PIN_CLK);
rcu_periph_clock_enable(CHIRP_PIN_IIC_CLK);
rcu_periph_clock_enable(CHIRP_PIN_IIC_DMA_CLK);
/* config IIC0(AF_1) GPIOF:PF0/PF1 */
gpio_af_set(CHIRP_PIN_IIC_PORT, GPIO_AF_1, CHIRP_PIN_IIC_SDA_PIN | CHIRP_PIN_IIC_SCL_PIN);
gpio_mode_set(CHIRP_PIN_IIC_PORT, GPIO_MODE_AF, GPIO_PUPD_PULLUP, CHIRP_PIN_IIC_SDA_PIN | CHIRP_PIN_IIC_SCL_PIN);
gpio_output_options_set(CHIRP_PIN_IIC_PORT, GPIO_OTYPE_OD, GPIO_OSPEED_50MHZ, CHIRP_PIN_IIC_SDA_PIN | CHIRP_PIN_IIC_SCL_PIN);
}
/*!
\brief Init & Enable USART0
\param[in] none
\param[out] none
\retval none
\note TXD Pin: GPIOA-09 Output - PU - PP - 10MHz - Default None
\note RXD Pin: GPIOA-10 Output - PU - PP - 10MHz - Default None
\note USART: USART0 - 115200 - 8 - N - 1
*/
void configure_console(void)
{
/* enable GPIOA clock */
rcu_periph_clock_enable(RCU_GPIOA);
/* enable USART clock */
rcu_periph_clock_enable(RCU_USART0);
/* connect port to USARTx_Tx */
gpio_af_set(GPIOA, GPIO_AF_1, GPIO_PIN_9 | GPIO_PIN_10);
/* configure USART Tx as alternate function push-pull */
gpio_mode_set(GPIOA, GPIO_MODE_AF, GPIO_PUPD_PULLUP, GPIO_PIN_9 | GPIO_PIN_10);
gpio_output_options_set(GPIOA, GPIO_OTYPE_PP, GPIO_OSPEED_10MHZ, GPIO_PIN_9 | GPIO_PIN_10);
/* USART configure */
usart_deinit(USART0);
usart_baudrate_set(USART0, USART0_BAUDRATE);
usart_receive_config(USART0, USART_RECEIVE_ENABLE);
usart_transmit_config(USART0, USART_TRANSMIT_ENABLE);
/* enable USART */
usart_enable(USART0);
}
/*!
\brief Reset IIC0
\param[in] none
\param[out] none
\retval none
*/
void i2c_bus_reset(void)
{
i2c_deinit(I2C0);
/* configure SDA/SCL for GPIO */
GPIO_BC(CHIRP_PIN_IIC_PORT) |= CHIRP_PIN_IIC_SDA_PIN;
GPIO_BC(CHIRP_PIN_IIC_PORT) |= CHIRP_PIN_IIC_SCL_PIN;
gpio_output_options_set(CHIRP_PIN_IIC_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, CHIRP_PIN_IIC_SDA_PIN);
gpio_output_options_set(CHIRP_PIN_IIC_PORT, GPIO_OTYPE_PP, GPIO_OSPEED_50MHZ, CHIRP_PIN_IIC_SCL_PIN);
__NOP();
__NOP();
__NOP();
__NOP();
__NOP();
GPIO_BOP(CHIRP_PIN_IIC_PORT) |= CHIRP_PIN_IIC_SCL_PIN;
__NOP();
__NOP();
__NOP();
__NOP();
__NOP();
GPIO_BOP(CHIRP_PIN_IIC_PORT) |= CHIRP_PIN_IIC_SDA_PIN;
/* connect I2C_SCL_PIN to I2C_SCL */
/* connect I2C_SDA_PIN to I2C_SDA */
gpio_output_options_set(CHIRP_PIN_IIC_PORT, GPIO_OTYPE_OD, GPIO_OSPEED_50MHZ, CHIRP_PIN_IIC_SCL_PIN);
gpio_output_options_set(CHIRP_PIN_IIC_PORT, GPIO_OTYPE_OD, GPIO_OSPEED_50MHZ, CHIRP_PIN_IIC_SDA_PIN);
/* configure the I2CX interface */
i2c_master_init();
}

10
XLSW_SONIC/board_init.h Normal file
View File

@@ -0,0 +1,10 @@
#ifndef BOARD_INIT_H
#define BOARD_INIT_H
#define USART0_BAUDRATE 115200U
void board_init_I2C(void);
void configure_console(void);
void i2c_bus_reset(void);
#endif /* BOARD_INIT_H */

107
XLSW_SONIC/gd32e23x_it.c Normal file
View File

@@ -0,0 +1,107 @@
/*!
\file gd32e23x_it.c
\brief interrupt service routines
\version 2023-02-27, V1.2.0, firmware for GD32E23x
*/
/*
Copyright (c) 2023, GigaDevice Semiconductor Inc.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/
#include "gd32e23x_it.h"
#include "main.h"
#include "systick.h"
/*!
\brief this function handles NMI exception
\param[in] none
\param[out] none
\retval none
*/
void NMI_Handler(void)
{
}
/*!
\brief this function handles HardFault exception
\param[in] none
\param[out] none
\retval none
*/
void HardFault_Handler(void)
{
/* if Hard Fault exception occurs, go to infinite loop */
while(1){
}
}
/*!
\brief this function handles SVC exception
\param[in] none
\param[out] none
\retval none
*/
void SVC_Handler(void)
{
}
/*!
\brief this function handles PendSV exception
\param[in] none
\param[out] none
\retval none
*/
void PendSV_Handler(void)
{
}
/*!
\brief this function handles SysTick exception
\param[in] none
\param[out] none
\retval none
*/
void SysTick_Handler(void)
{
// /* system delay Handler IMPORTANT!!! */
// delay_decrement();
}
/*!
\brief this function handles EXTI4 to EXTI15
\param[in] none
\param[out] none
\retval none
*/
void EXTI4_15_IRQHandler(void){
if (exti_interrupt_flag_get(EXTI_7) == SET)
{
// user code
exti_interrupt_flag_clear(EXTI_7);
}
}

62
XLSW_SONIC/gd32e23x_it.h Normal file
View File

@@ -0,0 +1,62 @@
/*!
\file gd32e23x_it.h
\brief the header file of the ISR
\version 2023-02-27, V1.2.0, firmware for GD32E23x
*/
/*
Copyright (c) 2023, GigaDevice Semiconductor Inc.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/
#ifndef GD32E23X_IT_H
#define GD32E23X_IT_H
#include "gd32e23x.h"
/* function declarations */
/* this function handles NMI exception */
void NMI_Handler(void);
/* this function handles HardFault exception */
void HardFault_Handler(void);
/* this function handles MemManage exception */
void MemManage_Handler(void);
/* this function handles BusFault exception */
void BusFault_Handler(void);
/* this function handles UsageFault exception */
void UsageFault_Handler(void);
/* this function handles SVC exception */
void SVC_Handler(void);
/* this function handles DebugMon exception */
void DebugMon_Handler(void);
/* this function handles PendSV exception */
void PendSV_Handler(void);
/* this function handles SysTick exception */
void SysTick_Handler(void);
/* this function handles EXTI4 to EXTI15 */
void EXTI4_15_IRQHandler(void);
#endif /* GD32E23X_IT_H */

View File

@@ -0,0 +1,58 @@
/*!
\file gd32e23x_libopt.h
\brief library optional for gd32e23x
\version 2023-02-27, V1.2.0, firmware for GD32E23x
*/
/*
Copyright (c) 2023, GigaDevice Semiconductor Inc.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/
#ifndef GD32E23X_LIBOPT_H
#define GD32E23X_LIBOPT_H
#include "gd32e23x_adc.h"
#include "gd32e23x_crc.h"
#include "gd32e23x_dbg.h"
#include "gd32e23x_dma.h"
#include "gd32e23x_exti.h"
#include "gd32e23x_fmc.h"
#include "gd32e23x_gpio.h"
#include "gd32e23x_syscfg.h"
#include "gd32e23x_i2c.h"
#include "gd32e23x_fwdgt.h"
#include "gd32e23x_pmu.h"
#include "gd32e23x_rcu.h"
#include "gd32e23x_rtc.h"
#include "gd32e23x_spi.h"
#include "gd32e23x_timer.h"
#include "gd32e23x_usart.h"
#include "gd32e23x_wwdgt.h"
#include "gd32e23x_misc.h"
#include "gd32e23x_cmp.h"
#endif /* GD32E23X_LIBOPT_H */

470
XLSW_SONIC/main.c Normal file
View File

@@ -0,0 +1,470 @@
/*!
\file main.c
\brief led spark with systick, USART print and key example
\version 2023-02-27, V1.2.0, firmware for GD32E23x
*/
/*
Copyright (c) 2023, GigaDevice Semiconductor Inc.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/
#include "gd32e23x.h"
#include "systick.h"
#include <stdio.h>
#include "main.h"
// #include "gd32e230c_eval.h"
#include "board_init.h"
#include "chirp_board_config.h"
#include "chirp_bsp.h"
#include "chirp_smartsonic.h"
#include "app_version.h"
#include "app_config.h"
#include "ultrasound_display_config_info.h"
/* Bit flags used in main loop to check for completion of sensor I/O. */
#define DATA_READY_FLAG (1 << 0)
#define IQ_READY_FLAG (1 << 1)
#define TestDelayTime 200
/* chirp_data_t - Structure to hold measurement data for one sensor
* This structure is used to hold the data from one measurement cycle from
* a sensor. The data values include the measured range, the ultrasonic
* signal amplitude, the number of valid samples (I/Q data pairs) in the
* measurement, and (optionally) the full amplitude data and/or raw I/Q data
* from the measurement.
*
* The format of this data structure is specific to this application, so
* you may change it as desired.
*
* A "chirp_data[]" array of these structures, one for each possible sensor,
* is declared in the main.c file. The sensor's device number is
* used to index the array.
*/
typedef struct {
uint32_t range; // from ch_get_range()
uint16_t amplitude; // from ch_get_amplitude()
uint16_t num_samples; // from ch_get_num_samples()
#ifdef READ_AMPLITUDE_DATA
uint16_t amp_data[DATA_MAX_NUM_SAMPLES];
// from ch_get_amplitude_data()
#endif
#ifdef READ_IQ_DATA
ch_iq_sample_t iq_data[DATA_MAX_NUM_SAMPLES];
// from ch_get_iq_data()
#endif
} chirp_data_t;
/* Array of structs to hold measurement data, one for each possible device */
chirp_data_t chirp_data[CHIRP_MAX_NUM_SENSORS];
/* Array of ch_dev_t device descriptors, one for each possible device */
ch_dev_t chirp_devices[CHIRP_MAX_NUM_SENSORS];
/* Configuration structure for group of sensors */
ch_group_t chirp_group;
/* Task flag word
* This variable contains the DATA_READY_FLAG and IQ_READY_FLAG bit flags
* that are set in I/O processing routines. The flags are checked in the
* main() loop and, if set, will cause an appropriate handler function to
* be called to process sensor data.
*/
volatile uint32_t taskflags = 0;
/* Device tracking variables
* These are bit-field variables which contain a separate bit assigned to
* each (possible) sensor, indexed by the device number. The active_devices
* variable contains the bit pattern describing which ports have active
* sensors connected. The data_ready_devices variable is set bit-by-bit
* as sensors interrupt, indicating they have completed a measurement
* cycle. The two variables are compared to determine when all active
* devices have interrupted.
*/
static uint32_t active_devices;
static uint32_t data_ready_devices;
/* Number of connected sensors */
static uint8_t num_connected_sensors = 0;
/* Number of sensors that use h/w triggering to start measurement */
static uint8_t num_triggered_devices = 0;
/* Forward declarations */
static void sensor_int_callback(ch_group_t *grp_ptr, uint8_t dev_num);
static void io_complete_callback(ch_group_t *grp_ptr);
static uint8_t handle_data_ready(ch_group_t *grp_ptr);
/*!
\brief main function
\param[in] none
\param[out] none
\retval none
*/
int main(void)
{
ch_group_t *grp_ptr = &chirp_group;
uint8_t chirp_error = 0;
uint8_t num_ports;
uint8_t dev_num;
/* configure systick */
systick_config();
chbsp_board_init(grp_ptr);
printf("\n\nXLSW UltraSonic Example Application\n");
printf(" Compile time: %s %s\n", __DATE__, __TIME__);
printf(" Version: %u.%u.%u", APP_VERSION_MAJOR, APP_VERSION_MINOR, APP_VERSION_REV);
printf(" SonicLib version: %u.%u.%u\n", SONICLIB_VER_MAJOR, SONICLIB_VER_MINOR, SONICLIB_VER_REV);
printf("\n");
/* print out the clock frequency of system, AHB, APB1 and APB2 */
printf("\r\nCK_SYS is %d", rcu_clock_freq_get(CK_SYS));
printf("\r\nCK_AHB is %d", rcu_clock_freq_get(CK_AHB));
printf("\r\nCK_APB1 is %d", rcu_clock_freq_get(CK_APB1));
printf("\r\nCK_APB2 is %d", rcu_clock_freq_get(CK_APB2));
printf("\r\n");
/* Get the number of sensor devices on the board*/
num_ports = ch_get_num_ports(grp_ptr);
/* Initialize sensor descriptors. */
printf("Initializing sensor(s)... ");
for (dev_num = 0; dev_num < num_ports; dev_num++) {
ch_dev_t *dev_ptr = &(chirp_devices[dev_num]);
chirp_error |= ch_init(dev_ptr, grp_ptr, dev_num, CHIRP_SENSOR_FW_INIT_FUNC);
}
if (chirp_error == 0) {
printf("starting group... ");
chirp_error = ch_group_start(grp_ptr);
}
if (chirp_error == 0) {
printf("OK\n");
} else {
printf("FAILED: %d\n", chirp_error);
}
printf("\n");
printf("Sensor\tType \t Freq\t\t RTC Cal \tFirmware\n");
for (dev_num = 0; dev_num < num_ports; dev_num++) {
ch_dev_t *dev_ptr = ch_get_dev_ptr(grp_ptr, dev_num);
if (ch_sensor_is_connected(dev_ptr)) {
printf("%d\tCH%d\t %u Hz\t%u@%ums\t%s\n", dev_num,ch_get_part_number(dev_ptr), (unsigned int) ch_get_frequency(dev_ptr), ch_get_rtc_cal_result(dev_ptr), ch_get_rtc_cal_pulselength(dev_ptr), ch_get_fw_version_string(dev_ptr));
}
}
printf("\n");
/* Register callback function to be called when Chirp sensor interrupts */
// ch_io_int_callback_set(grp_ptr, sensor_int_callback);
/* Register callback function called when non-blocking I/Q readout completes
* Note, this callback will only be used if READ_IQ_DATA_NONBLOCK is
* defined to enable non-blocking I/Q readout in this application.
*/
// ch_io_complete_callback_set(grp_ptr, io_complete_callback);
/* Configure each sensor with its operating parameters
* Initialize a ch_config_t structure with values defined in the
* app_config.h header file, then write the configuration to the
* sensor using ch_set_config().
*/
printf ("Configuring sensor(s)...\n");
for (dev_num = 0; dev_num < num_ports; dev_num++) {
ch_config_t dev_config;
ch_dev_t *dev_ptr = ch_get_dev_ptr(grp_ptr, dev_num);
if (ch_sensor_is_connected(dev_ptr)) {
num_connected_sensors++; // count one more connected
active_devices |= (1 << dev_num); // add to active device bit mask
if (num_connected_sensors == 1) { // if this is the first sensor
dev_config.mode = CH_MODE_FREERUN;
}
/* Init config structure with values from app_config.h */
dev_config.max_range = CHIRP_SENSOR_MAX_RANGE_MM;
dev_config.static_range = CHIRP_SENSOR_STATIC_RANGE;
/* If sensor will be free-running, set internal sample interval */
if (dev_config.mode == CH_MODE_FREERUN) {
dev_config.sample_interval = MEASUREMENT_INTERVAL_MS;
}
/* Apply sensor configuration */
chirp_error = ch_set_config(dev_ptr, &dev_config);
/* Enable sensor interrupt if using free-running mode
* Note that interrupt is automatically enabled if using
* triggered modes.
*/
if ((!chirp_error) && (dev_config.mode == CH_MODE_FREERUN)) {
chbsp_set_io_dir_in(dev_ptr);
chbsp_io_interrupt_enable(dev_ptr);
}
/* Read back and display config settings */
if (!chirp_error) {
ultrasound_display_config_info(dev_ptr);
} else {
printf("Device %d: Error during ch_set_config()\n", dev_num);
}
/* Turn on an LED to indicate device connected */
if (!chirp_error) {
chbsp_led_on(dev_num);
}
}
}
printf("\n");
// /* Enable receive sensor pre-triggering, if specified */
// ch_set_rx_pretrigger(grp_ptr, RX_PRETRIGGER_ENABLE);
// /* Initialize the periodic timer we'll use to trigger the measurements.
// * This function initializes a timer that will interrupt every time it
// * expires, after the specified measurement interval. The function also
// * registers a callback function that will be called from the timer
// * handler when the interrupt occurs. The callback function will be
// * used to trigger a measurement cycle on the group of sensors.
// */
// if (num_triggered_devices > 0) {
// printf("Initializing sample timer for %dms interval... ", MEASUREMENT_INTERVAL_MS);
// chbsp_periodic_timer_init(MEASUREMENT_INTERVAL_MS, periodic_timer_callback);
// /* Enable interrupt and start timer to trigger sensor sampling */
// chbsp_periodic_timer_irq_enable();
// chbsp_periodic_timer_start();
// printf("OK\n");
// }
printf("Starting measurements\n");
while (1)
{
handle_data_ready(grp_ptr);
gpio_bit_toggle(CHIRP_PIN_LED_PORT, CHIRP_PIN_LED_PIN);
delay_ms(TestDelayTime);
}
}
/*
* periodic_timer_callback() - periodic timer callback routine
*
* This function is called by the periodic timer interrupt when the timer
* expires. Because the periodic timer is used to initiate a new measurement
* cycle on a group of sensors, this function calls ch_group_trigger() during
* each execution.
*
* This function is registered by the call to chbsp_periodic_timer_init()
* in main().
*/
void periodic_timer_callback(void) {
if (num_triggered_devices > 0) {
ch_group_trigger(&chirp_group);
}
}
/*
* sensor_int_callback() - sensor interrupt callback routine
*
* This function is called by the board support package's interrupt handler for
* the sensor's INT line every time that the sensor interrupts. The device
* number parameter, dev_num, is used to identify the interrupting device
* within the sensor group. (Generally the device number is same as the port
* number used in the BSP to manage I/O pins, etc.)
*
* Each time this function is called, a bit is set in the data_ready_devices
* variable to identify the interrupting device. When all active sensors have
* interrupted (found by comparing with the active_devices variable), the
* DATA_READY_FLAG is set. That flag will be detected in the main() loop.
*
* This callback function is registered by the call to ch_io_int_callback_set()
* in main().
*/
static void sensor_int_callback(ch_group_t *grp_ptr, uint8_t dev_num) {
ch_dev_t *dev_ptr = ch_get_dev_ptr(grp_ptr, dev_num);
data_ready_devices |= (1 << dev_num); // add to data-ready bit mask
if (data_ready_devices == active_devices) {
/* All active sensors have interrupted after performing a measurement */
data_ready_devices = 0;
/* Set data-ready flag - it will be checked in main() loop */
taskflags |= DATA_READY_FLAG;
/* Disable interrupt unless in free-running mode
* It will automatically be re-enabled by the next ch_group_trigger()
*/
if (ch_get_mode(dev_ptr) == CH_MODE_FREERUN) {
chbsp_set_io_dir_in(dev_ptr); // set INT line as input
chbsp_group_io_interrupt_enable(grp_ptr);
} else {
chbsp_group_io_interrupt_disable(grp_ptr);
}
}
}
/*
* io_complete_callback() - non-blocking I/O complete callback routine
*
* This function is called by SonicLib's I2C DMA handling function when all
* outstanding non-blocking I/Q readouts have completed. It simply sets a flag
* that will be detected and handled in the main() loop.
*
* This callback function is registered by the call to
* ch_io_complete_callback_set() in main().
*
* Note: This callback is only used if READ_IQ_NONBLOCKING is defined to
* select non-blocking I/Q readout in this application.
*/
static void io_complete_callback(ch_group_t __attribute__((unused)) *grp_ptr) {
taskflags |= IQ_READY_FLAG;
}
/* retarget the C library printf function to the USART */
int fputc(int ch, FILE *f)
{
usart_data_transmit(USART0, (uint8_t)ch);
while (RESET == usart_flag_get(USART0, USART_FLAG_TBE));
return ch;
}
/*
* handle_data_ready() - get and display data from all sensors
*
* This routine is called from the main() loop after all sensors have
* interrupted. It shows how to read the sensor data once a measurement is
* complete. This routine always reads out the range and amplitude, and
* optionally will read out the amplitude data or raw I/Q for all samples
* in the measurement.
*
* See the comments in app_config.h for information about the amplitude data
* and I/Q readout build options.
*
*/
static uint8_t handle_data_ready(ch_group_t *grp_ptr) {
uint8_t dev_num;
int num_samples = 0;
uint8_t ret_val = 0;
/* Read and display data from each connected sensor
* This loop will write the sensor data to this application's "chirp_data"
* array. Each sensor has a separate chirp_data_t structure in that
* array, so the device number is used as an index.
*/
for (dev_num = 0; dev_num < ch_get_num_ports(grp_ptr); dev_num++) {
ch_dev_t *dev_ptr = ch_get_dev_ptr(grp_ptr, dev_num);
if (ch_sensor_is_connected(dev_ptr)) {
/* Get measurement results from each connected sensor
* For sensor in transmit/receive mode, report one-way echo
* distance, For sensor(s) in receive-only mode, report direct
* one-way distance from transmitting sensor
*/
if (ch_get_mode(dev_ptr) == CH_MODE_TRIGGERED_RX_ONLY) {
chirp_data[dev_num].range = ch_get_range(dev_ptr,
CH_RANGE_DIRECT);
} else {
chirp_data[dev_num].range = ch_get_range(dev_ptr,
CH_RANGE_ECHO_ONE_WAY);
}
if (chirp_data[dev_num].range == CH_NO_TARGET) {
/* No target object was detected - no range value */
chirp_data[dev_num].amplitude = 0; /* no updated amplitude */
printf("Port %d: no target found ", dev_num);
} else {
/* Target object was successfully detected (range available) */
/* Get the new amplitude value - it's only updated if range
* was successfully measured. */
chirp_data[dev_num].amplitude = ch_get_amplitude(dev_ptr);
printf("Port %d: Range: %0.1f mm Amp: %u ", dev_num,
(float) chirp_data[dev_num].range/32.0f,
chirp_data[dev_num].amplitude);
}
/* Store number of active samples in this measurement */
num_samples = ch_get_num_samples(dev_ptr);
chirp_data[dev_num].num_samples = num_samples;
/* Optionally read amplitude values for all samples */
#ifdef READ_AMPLITUDE_DATA
uint16_t start_sample = 0;
ch_get_amplitude_data(dev_ptr, chirp_data[dev_num].amp_data,
start_sample, num_samples, CH_IO_MODE_BLOCK);
#ifdef OUTPUT_AMPLITUDE_DATA
printf("\n");
for (uint8_t count = 0; count < num_samples; count++) {
printf("%d\n", chirp_data[dev_num].amp_data[count]);
}
#endif
#endif
/* Optionally read raw I/Q values for all samples */
#ifdef READ_IQ_DATA
display_iq_data(dev_ptr);
#endif
/* If more than 2 sensors, put each on its own line */
if (num_connected_sensors > 2) {
printf("\n");
}
}
}
printf("\n");
return ret_val;
}

39
XLSW_SONIC/main.h Normal file
View File

@@ -0,0 +1,39 @@
/*!
\file main.h
\brief the header file of main
\version 2023-02-27, V1.2.0, firmware for GD32E23x
*/
/*
Copyright (c) 2023, GigaDevice Semiconductor Inc.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/
#ifndef MAIN_H
#define MAIN_H
#endif /* MAIN_H */

36
XLSW_SONIC/readme.txt Normal file
View File

@@ -0,0 +1,36 @@
/*!
\file readme.txt
\brief description of led spark with systick, USART print and key example
\version 2023-02-27, V1.2.0, firmware for GD32E23x
*/
/*
Copyright (c) 2023, GigaDevice Semiconductor Inc.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGE.
*/
This example is based on the GD32E230C-EVAL-V1.1 board, it provides a
description of SysTick configuration, use of EVAL_COM and key.

94
XLSW_SONIC/systick.c Normal file
View File

@@ -0,0 +1,94 @@
/**
* ************************************************************************
*
* @file systick.c
* @author GD32
* @brief 通过 SysTick 定时器进行微秒级别和毫秒级别的延时函数
*
* ************************************************************************
* @copyright Copyright (c) 2024 GD32
* ************************************************************************
*/
#include "gd32e23x.h"
#include "systick.h"
volatile static float count_1us = 0;
volatile static float count_1ms = 0;
/**
* ************************************************************************
* @brief 配置 SysTick 定时器
*
*
* ************************************************************************
*/
void systick_config(void)
{
//设置了 SysTick 定时器的时钟源为 HCLK/8
systick_clksource_set(SYSTICK_CLKSOURCE_HCLK_DIV8);
//计算了每微秒所需的 SysTick 计数值
count_1us = (float)SystemCoreClock/8000000;
//计算了每毫秒所需的 SysTick 计数值
count_1ms = (float)count_1us * 1000;
}
/**
* ************************************************************************
* @brief delay_us 微秒延时函数
*
* @param[in] count 微秒值
*
* ************************************************************************
*/
void delay_us(uint32_t count)
{
uint32_t ctl;
//设置 SysTick 计数器的装载值
SysTick->LOAD = (uint32_t)(count * count_1us);
//清零 SysTick 计数器,以确保计数器从零开始计数
SysTick->VAL = 0x0000U;
//使能 SysTick 定时器,开始进行计数
SysTick->CTRL = SysTick_CTRL_ENABLE_Msk;
//等待 SysTick 计数器的计数值达到装载值时退出
do
{
ctl = SysTick->CTRL; //读取 CTRL 寄存器的值
}while((ctl & SysTick_CTRL_ENABLE_Msk)&&!(ctl & SysTick_CTRL_COUNTFLAG_Msk));
//循环退出,禁用 SysTick 定时器
SysTick->CTRL &= ~SysTick_CTRL_ENABLE_Msk;
//将 SysTick 计数器的当前值清零,以便下次使用
SysTick->VAL = 0x0000U;
}
/**
* ************************************************************************
* @brief delay_ms 毫秒延时函数
*
* @param[in] count 毫秒值
*
* ************************************************************************
*/
void delay_ms(uint32_t count)
{
uint32_t ctl;
//设置 SysTick 计数器的装载值
SysTick->LOAD = (uint32_t)(count * count_1ms);
//清零 SysTick 计数器,以确保计数器从零开始计数
SysTick->VAL = 0x0000U;
//使能 SysTick 定时器,开始进行计数
SysTick->CTRL = SysTick_CTRL_ENABLE_Msk;
//等待 SysTick 计数器的计数值达到装载值时退出
do
{
ctl = SysTick->CTRL; //读取 CTRL 寄存器的值
}while((ctl&SysTick_CTRL_ENABLE_Msk)&&!(ctl & SysTick_CTRL_COUNTFLAG_Msk));
//循环退出,禁用 SysTick 定时器
SysTick->CTRL &= ~SysTick_CTRL_ENABLE_Msk;
//将 SysTick 计数器的当前值清零,以便下次使用
SysTick->VAL = 0x0000U;
}

27
XLSW_SONIC/systick.h Normal file
View File

@@ -0,0 +1,27 @@
/**
* ************************************************************************
*
* @file systick.h
* @author GD32
* @brief
*
* ************************************************************************
* @copyright Copyright (c) 2024 GD32
* ************************************************************************
*/
#ifndef SYS_TICK_H
#define SYS_TICK_H
#include <stdint.h>
/* function declarations */
/* configure systick */
void systick_config(void);
/* delay a time in milliseconds */
void delay_ms(uint32_t count);
/* delay a time in microseconds */
void delay_us(uint32_t count);
#endif /* SYS_TICK_H */