2343 views|0 replies

6609

Posts

0

Resources
The OP
 

HuaDa HC32F003 / HC32F005 project template [Copy link]

 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):

This post is from Domestic Chip Exchange
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list