Hackaday 在三月份的时候介绍了一款最小的MCU NEW PART DAY: SMALLEST ARM MCU UPROOTS COMPETITION, NEEDS RESEARCH, 华大的 HC32L110B6YA-CSP16TR, CSP16封装, 尺寸有只1.6mm x 1.4mm, 还不及一粒米大, 从这几张图可以对比看看实物大小
硬件大佬Jeroen Domburg的手工焊接尝试
有没有点赛博朋克的感觉?
HC32L110 (以及其他的Cortex M0华大MCU) 在 Windows 下可以选择的烧录选项比较多, 以下说明如何配置 DAP-Link, ST-Link, J-Link 的烧录环境
开发板, 可以用泽耀的2.4G模块开发板AS06-VTB07H, 这个开发板最早的版本使用的是STM8S, 现在都改成 HC32L110C4UA 了
CMSIS DAP-Link 或 J-Link 或 ST-Link 都已经验证可以烧录
HC32L110_DDL_Rev1.1.4.zip 这个是带项目模板和例子的程序包
HC32L110_IDE_Rev1.0.3.zip IDE开发的型号支持
将 HC32L110_IDE_Rev1.0.3.zip 解压, MDK_IDE下的 HDSC.HC32L110.1.0.3.pack 就是给 Keil MDK 用的芯片型号库, 双击导入, 或者通过 Keil MDK 的 Package Installer 导入. 导入之后, 在 Keil MDK 中新建项目选择芯片时, 就能看到 HC32L110 系列芯片, 选择芯片型号后, 在Debug Download下面就有对应的算法文件. 算法文件的默认路径是 C:\Keil_v5\ARM\PACK\HDSC\HC32L110\1.0.3\Flash
之后F7编译, F8下载, 设置正确的话就能看到烧录校验完成的信息
如果DAP-Link已经设置正确, ST-Link可以直接使用,
也是 F8 下载. 输出记录:
Build started: Project: x
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'x'
".\Objects\1101_tx.axf" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:00
Load "D:\\WorkMDK\\WorkHC32\\hc32l110_prj\\Objects\\1101_tx.axf"
Erase Done.
Programming Done.
Verify OK.
Application running ...
Flash Load finished at 20:46:34
J-Link 使用方式和 DAP-Link 基本一致, 如果DAP-Link已经设置正确, J-Link可以直接使用, 在Debug中切换设备为J-Link, 打开 Settings 能看到识别出的设备 0x0BC11477 Arm Core Sight SW-DP. Port 如果设成了JTAG需要改为SW, Clock设为5MHz
Flash Download 勾选 Reset and Run, F8烧录, 输出记录为
Build started: Project: x
*** Using Compiler 'V5.06 update 6 (build 750)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'x'
".\Objects\1101_tx.axf" - 0 Error(s), 0 Warning(s).
Build Time Elapsed: 00:00:00
Load "D:\\WorkMDK\\WorkHC32\\hc32l110_prj\\Objects\\1101_tx.axf"
* JLink Info: Device "CORTEX-M3" selected.
* JLink Info: Device "CORTEX-M3" selected.
Set JLink Project File to "D:\WorkMDK\WorkHC32\hc32l110_prj\JLinkSettings.ini"
* JLink Info: Device "CORTEX-M3" selected.
JLink info:
------------
DLL: V6.30h, compiled Mar 16 2018 18:02:51
Firmware: J-Link ARM-OB STM32 compiled Aug 22 2012 19:52:04
Hardware: V7.00
S/N : 20090928
Feature(s) : RDI,FlashDL,FlashBP,JFlash,GDB
* JLink Info: Found SW-DP with ID 0x0BC11477
* JLink Info: Scanning AP map to find all available APs
* JLink Info: AP[1]: Stopped AP scan as end of AP map has been reached
* JLink Info: AP[0]: AHB-AP (IDR: 0x04770031)
* JLink Info: Iterating through AP map to find AHB-AP to use
* JLink Info: AP[0]: Core found
* JLink Info: AP[0]: AHB-AP ROM base: 0xE00FF000
* JLink Info: CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
* JLink Info: Found Cortex-M0 r0p1, Little endian.
**JLink Warning: Identified core does not match configuration. (Found: Cortex-M0, Configured: Cortex-M3)
* JLink Info: FPUnit: 4 code (BP) slots and 0 literal slots
* JLink Info: CoreSight components:
* JLink Info: ROMTbl[0] @ E00FF000
* JLink Info: ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
* JLink Info: ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
* JLink Info: ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
ROMTableAddr = 0xE00FF000
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.
Target info:
------------
Device: HC32L110C4UA
VTarget = 3.300V
State of Pins:
TCK: 0, TDI: 0, TDO: 1, TMS: 0, TRES: 1, TRST: 0
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints: 2
JTAG speed: 4000 kHz
Erase Done.
Programming Done.
Verify OK.
* JLink Info: Reset: Halt core after reset via DEMCR.VC_CORERESET.
* JLink Info: Reset: Reset device via AIRCR.SYSRESETREQ.
Application running ...
Flash Load finished at 19:21:41
从 segger 官网 https://www.segger.com/ 下载 JLink 整合安装包 JLink_Windows_V770a_i386.exe, 安装完是不带 HC32L110 系列型号的, 需要单独添加
先添加设备, 将 C:\Keil_v5\ARM\PACK\HDSC\HC32L110\1.0.3\Flash 下面的两个算法文件, HC32L110B4_C4.FLM 和 HC32L110B6_C6.FLM 复制到
C:\Program Files (x86)\SEGGER\JLink\Devices\HDSC ,
修改 C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml
在结尾的</DataBase>
之前增加这几行
<Device>
<ChipInfo Vendor="HDSC" Name="HC32L110x4" WorkRAMAddr="0x20000000" WorkRAMSize="0x800" Core="JLINK_CORE_CORTEX_M0"/>
<FlashBankInfo Name="Flash_16K" BaseAddr="0x0" MaxSize="0x4000" Loader="Devices/HDSC/HC32L110B4_C4.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
</Device>
<Device>
<ChipInfo Vendor="HDSC" Name="HC32L110x6" WorkRAMAddr="0x20000000" WorkRAMSize="0x1000" Core="JLINK_CORE_CORTEX_M0"/>
<FlashBankInfo Name="Flash_32K" BaseAddr="0x0" MaxSize="0x8000" Loader="Devices/HDSC/HC32L110B6_C6.FLM" LoaderType="FLASH_ALGO_TYPE_OPEN" AlwaysPresent="1"/>
</Device>
然后打开J-Flash, 在设备列表里就能找到 HC32L110了, 连接后打开要烧录的hex, F7就可以烧录了
手机扫一扫
移动阅读更方便
你可能感兴趣的文章