This post was last edited by Jacktang on 2021-5-30 17:06
1. Development environment and tools
HC32F003 / HC32F005
hc32f005_ddl_Rev1.9.0 Lite
Keil uVision5 V5.33 / IAR For ARM 7.80.4 (J-Link)
2. Project directory structure
Folder directory structure
MDK file directory structure
IAR file directory structure
3. MDK and IAR configuration options
MDK settings:
Note: Add "-diag_suppress=1" to the Misc Controls input box under the C/C++ tab to eliminate the warning of line breaks:
warning: #1-D: last line of file ends without a newline
IAR setting
4. Burn test
Change the system clock to 16Mhz, add basic timer function, and interrupt once every 10ms. Timer interrupt function:
/*******************************************************************************
* TIM0 interrupt service function
**************************************************************************/
void Tim0_IRQHandler(void)
{
if (TRUE == Bt_GetIntFlag(TIM0))
{
Bt_ClearIntFlag(TIM0);
delaytick++;
}
}
Connect J-Link to run the simulation and check the delaytick value changes
In MDK:
In IAR (the window refreshes approximately once a second):
|