1. 硬件使用利尔达的CC3200模块,仿真下载器使用利尔达的FTDI仿真器,硬件完全兼容官方的仿真器。仿真器支持IAR的调试,单步运行等操作。
2. 硬件连接接线说明: RXD, TXD, GNG, VCC, RESET, SOP2,下载的时候SOP2引脚需要拉高,正常运行悬空。在左边的板子,上面焊接了复位按键和一个电阻,所以RESET引脚可以不练。
3. 驱动安装,理论上使用其他的USB转串口也可以,但是有些山寨版的USB转串口芯片烧写会失败,推荐使用FT232。上图的板子是同时具有仿真器和USB转串口功能。
4. 安装uniflash_cc3xxx_setup_3.2.0.00123.exe,然后Url选择要烧写的.bin文件,勾选下面3个复选框。CC3200内部是没有Flash的,所以所有的程序都是烧写到外部的SPI FLASH里面的。
5. 选择串口105,点击Program,等待提示复位板子,按下板子的复位按键,即可成功烧写,由于CC3200是双核的,cortex M4内核叫一个NTP网络处理器,Service Pack Programming就是烧写网络处理器的,安装CC31xx_CC32xx_ServicePack-1.0.0.10.0-windows-installer.exe,然后在安装目录里面就可以找到servicepack_1.0.0.10.0.bin,烧写方法基本一致(注意版本问题)。这个网络处理器烧写一次就可以了,但是如果你点击了Format格式化的话,那就也需要再烧写了。里面的/cert/ca.pem的3个文件是证书,如果用到TLS传输加密的话,用到的证书就是用它去烧写,烧写方法都是一样的。
6. 正常烧写的log输出
[14:36:57] Begin Program operation.
[14:36:58] INFO: Checked for update config groups: []
[14:36:58] INFO: List of files to be generated: []
[14:36:58] INFO: > Executing Operation: Connect
[14:37:00] INFO: setting break signal
[14:37:00] INFO: --- please restart the device ---
[14:37:00] INFO: connection succeeded
[14:37:00] INFO: getting storage list
[14:37:00] INFO: > Executing Operation: Init
[14:37:00] INFO: reading version info
[14:37:00] INFO: DEVICE CC3200 ES1.33
[14:37:00] INFO: reading version info
[14:37:01] INFO: reading version info
[14:37:03] INFO: > Executing Operation: Program
[14:37:03] INFO: > File name: /sys/mcuimg.bin, Update: true, Erase: true
[14:37:03] INFO: > Erase File: /sys/mcuimg.bin
[14:37:03] INFO: erasing file "/sys/mcuimg.bin"
[14:37:03] INFO: deleting file "/sys/mcuimg.bin"
[14:37:04] INFO: erase file completed
[14:37:04] INFO: > Size of file = 18872
[14:37:04] INFO: > Update File: /sys/mcuimg.bin
[14:37:04] INFO: Downloading file "/sys/mcuimg.bin" with size 18872
[14:37:05] INFO:
New Token is 0x0
[14:37:05] INFO: Download complete
[14:37:05] INFO: Verifying Data...
[14:37:05] INFO: get file
[14:37:05] INFO: Done. Reading 18872 bytes
[14:37:05] INFO:
Verification OK
[14:37:06] INFO: > Updated Token value: 0x0
[14:37:06] INFO: > File name: /cert/ca.pem, Update: false, Erase: false
[14:37:06] INFO: > File name: /cert/client.pem, Update: false, Erase: false
[14:37:06] INFO: > File name: /cert/private.key, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/macadd.bin, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/mode.cfg, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/ipcfg.ini, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/ap.cfg, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/devname.cfg, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/mdns.cfg, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/dhcpsrv.cfg, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/httpsrv.cfg, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/pref.net, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/smartconfigkeys.cfg, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/stacfg.ini, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/p2p.cfg, Update: false, Erase: false
[14:37:06] INFO: > File name: /sys/pmcfg.ini, Update: false, Erase: false
[14:37:06] INFO: > Executing Operation: Disconnect
[14:37:07] Operation Program returned.
7. 断开SOP2的上来,使其悬空,按下复位按键,程序开始运行。
8. 假设程序没运行,需要看下烧写的.bin工程的配置选项里面的程序起始地址对不对,一般直接用TI的工程,都是OK的。但是在一些工程里面,由于用到了bootloadr,所以还需要烧写bootloader,这个以后再讲。