Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
qitas committed Nov 1, 2021
1 parent 1abefd6 commit dda8ca3
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 169 deletions.
16 changes: 8 additions & 8 deletions project/IAP/MDK-ARM/IAP.uvoptx
Original file line number Diff line number Diff line change
Expand Up @@ -674,8 +674,8 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\User\Src\port.c</PathWithFileName>
<FilenameWithoutPath>port.c</FilenameWithoutPath>
<PathWithFileName>..\User\Src\uart.c</PathWithFileName>
<FilenameWithoutPath>uart.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
Expand All @@ -698,8 +698,8 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\User\Src\ymodem.c</PathWithFileName>
<FilenameWithoutPath>ymodem.c</FilenameWithoutPath>
<PathWithFileName>..\User\Src\common.c</PathWithFileName>
<FilenameWithoutPath>common.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
Expand All @@ -710,8 +710,8 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\User\Src\bootloader.c</PathWithFileName>
<FilenameWithoutPath>bootloader.c</FilenameWithoutPath>
<PathWithFileName>..\User\Src\ymodem.c</PathWithFileName>
<FilenameWithoutPath>ymodem.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
Expand All @@ -722,8 +722,8 @@
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>..\User\Src\common.c</PathWithFileName>
<FilenameWithoutPath>common.c</FilenameWithoutPath>
<PathWithFileName>..\User\Src\bootloader.c</PathWithFileName>
<FilenameWithoutPath>bootloader.c</FilenameWithoutPath>
<RteFlg>0</RteFlg>
<bShared>0</bShared>
</File>
Expand Down
170 changes: 34 additions & 136 deletions project/IAP/MDK-ARM/IAP.uvprojx
Original file line number Diff line number Diff line change
Expand Up @@ -384,15 +384,20 @@
<GroupName>USER</GroupName>
<Files>
<File>
<FileName>port.c</FileName>
<FileName>uart.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\port.c</FilePath>
<FilePath>..\User\Src\uart.c</FilePath>
</File>
<File>
<FileName>flash.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\flash.c</FilePath>
</File>
<File>
<FileName>common.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\common.c</FilePath>
</File>
<File>
<FileName>ymodem.c</FileName>
<FileType>1</FileType>
Expand All @@ -403,11 +408,6 @@
<FileType>1</FileType>
<FilePath>..\User\Src\bootloader.c</FilePath>
</File>
<File>
<FileName>common.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\common.c</FilePath>
</File>
</Files>
</Group>
<Group>
Expand Down Expand Up @@ -943,15 +943,20 @@
<GroupName>USER</GroupName>
<Files>
<File>
<FileName>port.c</FileName>
<FileName>uart.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\port.c</FilePath>
<FilePath>..\User\Src\uart.c</FilePath>
</File>
<File>
<FileName>flash.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\flash.c</FilePath>
</File>
<File>
<FileName>common.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\common.c</FilePath>
</File>
<File>
<FileName>ymodem.c</FileName>
<FileType>1</FileType>
Expand All @@ -962,11 +967,6 @@
<FileType>1</FileType>
<FilePath>..\User\Src\bootloader.c</FilePath>
</File>
<File>
<FileName>common.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\common.c</FilePath>
</File>
</Files>
</Group>
<Group>
Expand Down Expand Up @@ -1571,60 +1571,9 @@
</GroupOption>
<Files>
<File>
<FileName>port.c</FileName>
<FileName>uart.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\port.c</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>1</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>
<Cads>
<interw>2</interw>
<Optim>0</Optim>
<oTime>2</oTime>
<SplitLS>2</SplitLS>
<OneElfS>2</OneElfS>
<Strict>2</Strict>
<EnumInt>2</EnumInt>
<PlainCh>2</PlainCh>
<Ropi>2</Ropi>
<Rwpi>2</Rwpi>
<wLevel>0</wLevel>
<uThumb>2</uThumb>
<uSurpInc>2</uSurpInc>
<uC99>2</uC99>
<uGnu>2</uGnu>
<useXO>2</useXO>
<v6Lang>0</v6Lang>
<v6LangP>0</v6LangP>
<vShortEn>2</vShortEn>
<vShortWch>2</vShortWch>
<v6Lto>2</v6Lto>
<v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads>
</FileArmAds>
</FileOption>
<FilePath>..\User\Src\uart.c</FilePath>
</File>
<File>
<FileName>flash.c</FileName>
Expand Down Expand Up @@ -1683,17 +1632,17 @@
</FileOption>
</File>
<File>
<FileName>ymodem.c</FileName>
<FileName>common.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\ymodem.c</FilePath>
<FilePath>..\User\Src\common.c</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>0</IncludeInBuild>
<IncludeInBuild>1</IncludeInBuild>
<AlwaysBuild>2</AlwaysBuild>
<GenerateAssemblyFile>2</GenerateAssemblyFile>
<AssembleAssemblyFile>2</AssembleAssemblyFile>
Expand Down Expand Up @@ -1739,9 +1688,9 @@
</FileOption>
</File>
<File>
<FileName>bootloader.c</FileName>
<FileName>ymodem.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\bootloader.c</FilePath>
<FilePath>..\User\Src\ymodem.c</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
Expand Down Expand Up @@ -1795,17 +1744,17 @@
</FileOption>
</File>
<File>
<FileName>common.c</FileName>
<FileName>bootloader.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\common.c</FilePath>
<FilePath>..\User\Src\bootloader.c</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>1</IncludeInBuild>
<IncludeInBuild>0</IncludeInBuild>
<AlwaysBuild>2</AlwaysBuild>
<GenerateAssemblyFile>2</GenerateAssemblyFile>
<AssembleAssemblyFile>2</AssembleAssemblyFile>
Expand Down Expand Up @@ -2523,60 +2472,9 @@
</GroupOption>
<Files>
<File>
<FileName>port.c</FileName>
<FileName>uart.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\port.c</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>1</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>
<Cads>
<interw>2</interw>
<Optim>0</Optim>
<oTime>2</oTime>
<SplitLS>2</SplitLS>
<OneElfS>2</OneElfS>
<Strict>2</Strict>
<EnumInt>2</EnumInt>
<PlainCh>2</PlainCh>
<Ropi>2</Ropi>
<Rwpi>2</Rwpi>
<wLevel>0</wLevel>
<uThumb>2</uThumb>
<uSurpInc>2</uSurpInc>
<uC99>2</uC99>
<uGnu>2</uGnu>
<useXO>2</useXO>
<v6Lang>0</v6Lang>
<v6LangP>0</v6LangP>
<vShortEn>2</vShortEn>
<vShortWch>2</vShortWch>
<v6Lto>2</v6Lto>
<v6WtE>2</v6WtE>
<v6Rtti>2</v6Rtti>
<VariousControls>
<MiscControls></MiscControls>
<Define></Define>
<Undefine></Undefine>
<IncludePath></IncludePath>
</VariousControls>
</Cads>
</FileArmAds>
</FileOption>
<FilePath>..\User\Src\uart.c</FilePath>
</File>
<File>
<FileName>flash.c</FileName>
Expand Down Expand Up @@ -2635,17 +2533,17 @@
</FileOption>
</File>
<File>
<FileName>ymodem.c</FileName>
<FileName>common.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\ymodem.c</FilePath>
<FilePath>..\User\Src\common.c</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>0</IncludeInBuild>
<IncludeInBuild>1</IncludeInBuild>
<AlwaysBuild>2</AlwaysBuild>
<GenerateAssemblyFile>2</GenerateAssemblyFile>
<AssembleAssemblyFile>2</AssembleAssemblyFile>
Expand Down Expand Up @@ -2691,9 +2589,9 @@
</FileOption>
</File>
<File>
<FileName>bootloader.c</FileName>
<FileName>ymodem.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\bootloader.c</FilePath>
<FilePath>..\User\Src\ymodem.c</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
Expand Down Expand Up @@ -2747,17 +2645,17 @@
</FileOption>
</File>
<File>
<FileName>common.c</FileName>
<FileName>bootloader.c</FileName>
<FileType>1</FileType>
<FilePath>..\User\Src\common.c</FilePath>
<FilePath>..\User\Src\bootloader.c</FilePath>
<FileOption>
<CommonProperty>
<UseCPPCompiler>2</UseCPPCompiler>
<RVCTCodeConst>0</RVCTCodeConst>
<RVCTZI>0</RVCTZI>
<RVCTOtherData>0</RVCTOtherData>
<ModuleSelection>0</ModuleSelection>
<IncludeInBuild>1</IncludeInBuild>
<IncludeInBuild>0</IncludeInBuild>
<AlwaysBuild>2</AlwaysBuild>
<GenerateAssemblyFile>2</GenerateAssemblyFile>
<AssembleAssemblyFile>2</AssembleAssemblyFile>
Expand Down
2 changes: 1 addition & 1 deletion project/IAP/User/Inc/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ extern "C" {
#endif

#include "main.h"
#include "port.h"
#include "uart.h"

#define USER_APP1_ADDRESS 0x08004000
#define USER_APP2_ADDRESS 0x08008000
Expand Down
File renamed without changes.
25 changes: 1 addition & 24 deletions project/IAP/User/Src/port.c → project/IAP/User/Src/uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,13 @@
****作者:Qitas
****版权:
*******************************************************************************/
#include "port.h"
#include "uart.h"

uint16_t u16Uart1RxIndex;
uint8_t u8UartRxBuf[UART1BUF_SIZE];
uint8_t u8CntUart1Timer1ms;
uint8_t Uart1Rxing;

/******************************************************************************
**函数信息 :
**功能描述 :
**输入参数 :无
**输出参数 :无
*******************************************************************************/
//static uint8_t u8UartRxChar;
//void HAL_UART_RxCpltCallback(UART_HandleTypeDef *uartHandle)
//{
// if(uartHandle == &huart1)
// {
// // __HAL_UART_GET_FLAG(&huart1, UART_FLAG_RXNE | UART_FLAG_RXFNE);
// // __HAL_UART_GET_IT_SOURCE(&huart1, UART_IT_RXNE | UART_IT_RXFNE);
// // __HAL_UART_GET_IT(&huart1, UART_IT_RXNE | UART_IT_RXFNE);
// if(u16Uart1RxIndex >= UART1BUF_SIZE) u16Uart1RxIndex = 0;
// u8UartRxBuf[u16Uart1RxIndex++] = huart1.Instance->RDR;//u8Uart1RxBuf;
// Uart1Rxing = 1;
// u8CntUart1Timer1ms = 0;
// // BootPortInterrupt();
// HAL_UART_Receive_IT(&huart1, &u8UartRxChar, 1);
// }
//}

/******************************************************************************
**函数信息 :
**功能描述 :
Expand Down

0 comments on commit dda8ca3

Please sign in to comment.