pyocd / pyOCD

Open source Python library for programming and debugging Arm Cortex-M microcontrollers
https://pyocd.io
Apache License 2.0
1.11k stars 477 forks source link

program flash using cmsis fail #924

Closed heartacker closed 4 years ago

heartacker commented 4 years ago

版本: 1.47.3 (system setup) 提交: 91899dcef7b8110878ea59626991a18c8a6a1b3e 日期: 2020-07-23T13:12:49.994Z Electron: 7.3.2 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Windows_NT x64 10.0.19041 python: 64 3.7.8

python -m pyocd flash --config e:\github\AC781X\AC781X\ac7811_eide\.eide\pyocd.yaml -t cortex_m -f 4M e:\github\AC781X\AC781X\ac7811_eide\out\AC5\ac7811_eide.hex
0001100:WARNING:file_programmer:Failed to add data chunk: no memory region defined for address 0x08000000
0001101:INFO:loader:Erased 0 bytes (0 sectors), programmed 0 bytes (0 pages), skipped 0 bytes (0 pages) at 0.00 kB/s
flit commented 4 years ago

Hi @heartacker,

The problem is that you are specifying the target type to be "cortex_m" (the -t cortex_m argument). This target is generic and doesn't have any memory regions defined.

Instead, set the target type to one matching your chip. In your case, you will be using a target defined in the AC781x_DFP CMSIS pack. To see which targets are available, you can run pyocd list --targets --config e:\github\AC781X\AC781X\ac7811_eide\.eide\pyocd.yaml --name ac781. It will look into the pack you have set in your config file.

heartacker commented 4 years ago

Hi @heartacker,

The problem is that you are specifying the target type to be "cortex_m" (the -t cortex_m argument). This target is generic and doesn't have any memory regions defined.

Instead, set the target type to one matching your chip. In your case, you will be using a target defined in the AC781x_DFP CMSIS pack. To see which targets are available, you can run pyocd list --targets --config e:\github\AC781X\AC781X\ac7811_eide\.eide\pyocd.yaml --name ac781. It will look into the pack you have set in your config file.

thanks for help