Cannot debug demo project

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.wsdof.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
5 posts / 0 new
Last post
akroizer
Offline
Last seen:3 years 9 months ago
Joined:2017-05-23 10:16
Cannot debug demo project

Hello,
I have the DA14585 board and I'm trying to run the "blinky" test app with Keil MDK.
I am running into the following issue:
When trying to debug the program, I am getting a dialog saying
"BP could not be set!
Expr: ,
Address: 0x20000af8
Probably too many Breakpoints defined?"

This is although no breakpoint has been defined. 0x20000af8 is the address of the first line of main().

The command window looks like this:
--------------------------------------------------------------
Running with Code Size Limit: 32K
Set JLink Project File to "C:\Dialog\SDK 5.0.4\DA1458x_SDK_5.0.4\DA1458x_SDK\5.0.4\projects\target_apps\peripheral_examples\blinky\Keil_5\JLinkSettings.ini"* JLink Info: Device "CORTEX-M0" selected.

JLink info:
------------
DLL: V6.14h, compiled May 10 2017 18:22:45
Firmware: J-Link OB-SAM3U128 V1 compiled Jan 31 2017 09:46:32
Hardware: V1.00
S/N : 480067086

* JLink Info: Found SW-DP with ID 0x0BB11477
* JLink Info: No AP preselected. Assuming that AP[0] is the AHB-AP
* JLink Info: AP-IDR: 0x04770021, Type: AHB-AP
* JLink Info: AHB-AP ROM: 0xE00FF000 (Base addr. of first ROM table)
* JLink Info: Found Cortex-M0 r0p0, Little endian.
* 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

Target info:
------------
Device: ARMCM0
VTarget = 3.300V
State of Pins: TCK: 0, TDI: 1, TDO: 1, TMS: 1, TRES: 1, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints: 2
JTAG speed: 2000 kHz

Load "C:\\Dialog\\SDK 5.0.4\\DA1458x_SDK_5.0.4\\DA1458x_SDK\\5.0.4\\projects\\target_apps\\peripheral_examples\\blinky\\Keil_5\\out\\blinky.axf"

* * * 32768字节码尺寸L限制版本imit
*** Currently used: 3276 Bytes (9%)

Include "C:\\Dialog\\SDK 5.0.4\\DA1458x_SDK_5.0.4\\DA1458x_SDK\\5.0.4\\projects\\target_apps\\peripheral_examples\\blinky\\Keil_5\\..\\..\\shared\\sysram.ini"
RESET
E long 0x50000012 = 0xa4
E long 0x50003308 = 0x2e
LOAD %L

* * * 32768字节码尺寸L限制版本imit
*** Currently used: 3276 Bytes (9%)

SP = _RDWORD (0x20000000)
_____^
*** error 122, line 5: AGDI: memory read failed (0x20000000)
$ = _RDWORD (0x20000004)
____^
*** error 122, line 6: AGDI: memory read failed (0x20000004)
------------------------------------------

Thanks in advance.

Device:
MT_dialog
Offline
Last seen:2 months 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi akroizer,

Hi akroizer,

Since its a 585, you will need the SDK6 and not the SDK5.0.4 (which i can tell that you are using from the paths in your error log) since this SDK is only for the the 580/581/583 SoC.

Thanks MT_dialog

akroizer
Offline
Last seen:3 years 9 months ago
Joined:2017-05-23 10:16
Thanks. You are right and I

Thanks. You are right and I realized that after posting the question. However, I am still getting similar errors with SDK6.

I think I understand more now, the debugger is trying to run from flash and the project options were to use an external tool for flashing and no external tool was provided. so since the flash isn’t programmed it fails. What should be the setting there?
When I changed the setting to use external tool, I got a different error on load:
加载对话框" C: \ \ \ \ DA14585_SDK_6.0.2.243 \ \ DA14585_SDK\\6.0.2.243\\projects\\target_apps\\peripheral_examples\\blinky\\Keil_5\\out\\blinky.axf"
Set JLink Project File to "C:\Dialog\DA14585_SDK_6.0.2.243\DA14585_SDK\6.0.2.243\projects\target_apps\peripheral_examples\blinky\Keil_5\JLinkSettings.ini"
* JLink Info: Device "CORTEX-M0" selected.

JLink info:
------------
DLL: V6.14h, compiled May 10 2017 18:22:45
Firmware: J-Link OB-SAM3U128 V1 compiled Jan 31 2017 09:46:32
Hardware: V1.00
S/N : 480066885

* JLink Info: Found SW-DP with ID 0x0BB11477
* JLink Info: No AP preselected. Assuming that AP[0] is the AHB-AP
* JLink Info: AP-IDR: 0x04770021, Type: AHB-AP
* JLink Info: AHB-AP ROM: 0xE00FF000 (Base addr. of first ROM table)
* JLink Info: Found Cortex-M0 r0p0, Little endian.
* 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

Target info:
------------
Device: ARMCM0
VTarget = 3.300V
State of Pins:
TCK: 0, TDI: 1, TDO: 1, TMS: 1, TRES: 1, TRST: 1
Hardware-Breakpoints: 4
Software-Breakpoints: 8192
Watchpoints: 2
JTAG speed: 5000 kHz

No Algorithm found for: 07FC0000H - 07FC0D7FH
Erase skipped!
Error: Flash Download failed - "Cortex-M0"
Flash Load finished at 19:48:37

In the program options there’s a way to add flash programming algorithms, maybe something needs to be configured there? Alternatively there’s an .ini file that can be loaded but I didn’t find anything appropriate in the SDK.
Thanks in advance.

MT_dialog
Offline
Last seen:2 months 3 weeks ago
Staff
Joined:2015-06-08 11:34
Hi Akroizer,

Hi Akroizer,

Open your keil IDE and navigate to the "Options for Target" in the dialog box you should see a utilities tab, in the "Utilities" tab make sure that the available radio button "Use External Tool for Flash Programming" is selected, if the "Use Target Driver for Flash Programming" is selected you will get the error that you ve posted above.

Thanks MT_dialog

erichn
Offline
Last seen:3 years 1 month ago
Joined:2017-09-20 20:46
I think this should be added

I think this should be added to the "Getting Started" document for the Pro development kit. I was getting this same error, and I believe the default option in Keil was the incorrect one. Things like this can take a long time to track down if you aren't familiar with Keil.