加载和运行DSPS HEX文件

17 posts / 0 new
Last post
Chui
Offline
最后一次露面:10个月前1年
Joined:2015-12-08 16:57
加载和运行DSPS HEX文件

大家好,

我刚收到一个DA14580基本演示套件,并有一些问题激活BT。

成功安装了Keil V5,并按照UM-B-048入门文档中所述进行闪烁测试。
Then tried to run the DSPS (DA14580_DSPS_3.150.2___13_2_2015), got the application note (v1.3) from my distributor.

然后遇到麻烦,当我试图遵循§8.4的步骤:

编译SPS_DEVICE项目:OK(0错误,3个警告)
连接FTDI RS232电缆,加上§8.1指示的常规USB电缆
启动调试会话时,会弹出“未找到Cortex-M个SW设备”
和日志:
加载“... \\ da14580_dsps_3.150.2 \\ dk_apps \\ keil_projects \\ sps \\ sps_device_k5 \\对象\\ sps_device.axf”
* JLink Info: Device "DA14580" selected.
将JLink项目文件设置为“... \ DA14580_DSPS_3.150.2 \ dk_apps \ keil_projects \ sps \ sps_device_k5 \ jlinksettings.ini”
* JLink Info: Device "DA14580" selected.

JLink info:
------------
DLL:v5.02f,编译2015年10月2日20:51:34
Firmware: J-Link OB-SAM3U128 V1 compiled Aug 28 2015 19:26:23
Hardware: V1.00
S/N : 480055335

Error: Flash Download failed - Target DLL has been cancelled
Flash Load finished at 10:39:47

问题:有些我没有找到的东西:
如果我在图14中更改跳线,则SAM和DA之间没有任何连接,因此如何通过串行链路而不是jlink下载的十六进制文件?或许我错过了什么?

所以我也试过SmartSnippets:
这次打开的COM端口是串行链路,但重置按钮没有效果!!

[信息@ 15-12-09 10:50:41]从文件中读取19480年字节... \ da14580_dsps_3.150.2 \ dk_apps \ keil_projects \ sps \ sps_device_k5 \ objects \ sps_device.hex。
[INFO @15-12-09 10:50:41] Connection to COM40 port has successfully opened.
[info @ 15-12-09 10:50:41]开始下载程序...
[动作@ 15-12-09 10:50:42]请按电路板上的硬件重置按钮开始下载过程。
[错误@ 15-12-09 10:50:57]超时:重置信号未检测到超过16000毫秒。
[信息@ 15-12-09 10:50:57]成功断开了COM40端口。
[信息@ 15-12-09 10:50:57]将固件文件下载到电路板上失败。

下一步是什么?我经历了多个论坛线程,发现了几个能够连接的客户,有些不是,但无法弄清楚右/差的条件。
BTW, I modified nothing in the original source code, and da14580_config.h defines CFG_UART_HW_FLOW_CTRL. Should I change that?

Thanks.

PS:
SmartSnippets v3.9 32b.
And Keil Info:
IDE版本:
µVision V5.17.0.0
Copyright (C) 2015 ARM Ltd and ARM Germany GmbH. All rights reserved.

Tool Version Numbers:
Toolchain:MDK-Lite版本:5.17
Toolchain Path: C:\Keil\ARM\ARMCC\Bin
C Compiler: Armcc.exe V5.06 update 1 (build 61)
Assembler: Armasm.exe V5.06 update 1 (build 61)
Linker/Locator: ArmLink.exe V5.06 update 1 (build 61)
图书馆管理器:Armar.exe V5.06更新1(Build 61)
Hex Converter: FromElf.exe V5.06 update 1 (build 61)
CPU DLL:SARMCM3.dll v5.17
对话框DLL:darmcm1.dll v1.12.0.0
目标dll:segger \ jl2cm3.dll v2.99.16.0
Dialog DLL: TARMCM1.DLL V1.9.0.0

关键词:
设备:
mt_dialog.
Offline
最后一次露面:2 months 4 days ago
Staff
Joined:2015-06-08 11:34
嗨Chui,

嗨Chui,

For downloading your code through the jlink have you configured your target option -> Settings -> Debug -> to be in the SW and not in the JTAG option, additionally check in the Utilities that the use external tool for Flash programming to be selected. There is no need for code modifications to download code to your da. Most probably is the UART connections. Can you please try to donwload code with the default UART jumpers in order to check the reset functionallity and also chek the board setup (the configuration of the pins) in smart snippets.

谢谢mt_dialog.

Chui
Offline
最后一次露面:10个月前1年
Joined:2015-12-08 16:57
Hi,

Hi,

Yes it is in SW mode, and I can see the SN in the window. And External tool is selected, with blank values (this trick was not obvious and tough to find, I previously had the issue while trying to run the blink example)
Unmodified code loaded.
In the quick start guide, Rx/Tx jumpers are to be on P0_4, P0_5 and Baud rate to 115k, but in smartsnippets, P0_4, P0_5 point to 57k.
在115K和57K中,我得到了虚假的流量(见附件),但在115K外部串行端子I中,我有一系列“[00] [00] [00] [00] [02]”在115K中

Good news, the reset button stops the flow
Definitively an UART issue, I believe. But where is my fault?
And what about my initial question of SAM/DA link when the jumpers are as indicated in the DSPS application note?

Thanks a lot.

Attachment:
mt_dialog.
Offline
最后一次露面:2 months 4 days ago
Staff
Joined:2015-06-08 11:34
嗨Chui,

嗨Chui,

I suppose that you mean if you remove the jumpers that connect the TMS and the TCK (the basic configuretion oin figure 14), those are the jlink's connections. The version of the basic kit in the picture is a bit outdated. Just place those two jumpers and you will be able to program your board. The data you see in the terminal is the bootloader of the da running, in 57k. The da follows a specific procedure when booting from different interfaces including uart in different pins with different baud rates. Since you want to donwload the DSPS just place the TMS and TCK pins connect through jlink and connect the ftdi as indicated in the app note.

谢谢mt_dialog.

mt_dialog.
Offline
最后一次露面:2 months 4 days ago
Staff
Joined:2015-06-08 11:34
嗨Chui,

嗨Chui,

我在使用DSP项目时附上了基本开发套件的图片和正确的配置。

FTDI电缆的线条和着色是DSPS应用笔记中描述的线条和着色。尝试使用keil下载项目。在“调试”选项卡 - >“设置”中,在项目选项中(如果基本套件被Keil正确识别),则应查看此(附图)。如果您没有得到SW设备IDcode和Name,请按Dev套件上的重置按钮,然后重试。之后,您必须能够在Dev套件中下载该软件。

谢谢mt_dialog.

Attachment:
Chui
Offline
最后一次露面:10个月前1年
Joined:2015-12-08 16:57
Hi,

Hi,
我花了一些时间继续在装备上。
有some differences found between the pictures you sent and the instructions I followed.
在驱动程序设置中,最大时钟在我的侧面而不是2。
In the UART pinout, CTS (brown) was on P0_3 as indicated in the "DA14580 Serial Port Service reference application_v1 3" but your snapshot says P0_7

I changed the config accordingly, no change in the result.
请注意,由于我再次返回TMS TCK,因此我能够通过柔软的步骤启动和调试。实际上它看起来像是在启动阶段骑自行车,而不是广告。

Attachment:
mt_dialog.
Offline
最后一次露面:2 months 4 days ago
Staff
Joined:2015-06-08 11:34
嗨Chui,

嗨Chui,

The invalid FTDI connection is in the attachement i have sent, the valid is the one in the application note (i ve used a IO modified code when running the example and taking the pictures).

我猜软件卡在wher()中,在附件中,等待在调试器被禁用之前。

由于您有您的TMS和TCK,并且您能够在DA中下载代码,以便查看设备广告,因此您必须在进入睡眠模式时退出调试模式。如果您要在操作时调试您必须禁用睡眠模式,可以通过转到da14580_config.h和#undef cfg_ext_sleep来执行此操作。

谢谢mt_dialog.

Chui
Offline
最后一次露面:10个月前1年
Joined:2015-12-08 16:57
嗨MT,

嗨MT,
I didn't really want to debug it, I just wanted to know where it was stuck. When I undef CFG_EXT_SLEEP, the execution fails in a hardware fault due to the UART, apparently, and when I put it back (and don't debug) I still have no advertising.
我的配置或HW中肯定存在一些基本缺失,但我仔细遵循(纠正的)指令,并没有取得进展。

mt_dialog.
Offline
最后一次露面:2 months 4 days ago
Staff
Joined:2015-06-08 11:34
嗨Chui,

嗨Chui,

即使没有任何UART连接,您应该能够在基本套件中的Donwload代码运行并运行并可正确宣传DSP项目。现在我可以考虑在硬盘处理程序中导致的唯一原因没有选择芯片的适当项目。在每个文件夹(设备/主机)中的DSP应用程序中,有两个.uvProj文件,一个用于不同的芯片。

sps_device.uvproj -> is for the 580

sps_device_581.uvproj - >是581

If you open, compile and download the sps_device_581.uvproj into a 580 chip this will result to a Hardfault Handler and the otherway around of course.

谢谢mt_dialog.

Chui
Offline
最后一次露面:10个月前1年
Joined:2015-12-08 16:57
Hi,

Hi,
其实我14580的工具。我有h的区别ere wrt the doc is that I'm running UV5, as said in my first post (v5.17, windows 7)
Any way to have a direct call? It's been a month since I started now...
Thanks.

mt_dialog.
Offline
最后一次露面:2 months 4 days ago
Staff
Joined:2015-06-08 11:34
嗨Chui,

嗨Chui,

That sounds very weird, at least are you able to download and properly run any other example from the SDK and check if its advertising properly, the app_ble_barebone or the app_ble_peripheral from the new SDK. Can you please try that ?

谢谢mt_dialog.

Chui
Offline
最后一次露面:10个月前1年
Joined:2015-12-08 16:57
Tried ble_app_barebone in

Tried ble_app_barebone in Keil_5, worked seamlessly, no modification of any sort, just compile and go (selected Dialog/DA14580 component); it advertised.
So it is somewhere in the settings. For the DSPS, I had to open and port in UV5 the original UV4 projet, is that where it failed?

mt_dialog.
Offline
最后一次露面:2 months 4 days ago
Staff
Joined:2015-06-08 11:34
嗨Chui,

嗨Chui,

I 've attached a .hex file of the DSPS application tested on my basic kit and compiled with keil5.14. can you please use the smart snippets tool to download the file into your basic kit and let me know if you can see it advertising. I have also attached the target option -> Device that you should have when migrating from keil4 to keil5.

谢谢mt_dialog.

Attachment:
Chui
Offline
最后一次露面:10个月前1年
Joined:2015-12-08 16:57
ble_app_barebone之间

ble_app_barebone之间DSPS, scatterfiles are different, and ROM areas as well (attached). Should I change the ROM area, and what to? Once the startup radio button is selected, I can't unselect it.

mt_dialog.
Offline
最后一次露面:2 months 4 days ago
Staff
Joined:2015-06-08 11:34
嗨Chui,

嗨Chui,

The DSPS project should run as is, you dont have to change or alter anything in the source code or in the ROM configuration. The only thing that you might want to change is to undefine the CFG_EXT_SLEEP in order for the code to execute while you are in debug mode otherwise you will have to exit the debug mode in order to see it advertising. Please try to run the .hex file just to make a simple test. Also can you please upload either your .hex file or your project to test it on my basic kit. You can find you .hex file in the \DA14580_DSPS_3.150.2\dk_apps\keil_projects\sps\sps_device\out directory.

谢谢mt_dialog.

Chui
Offline
最后一次露面:10个月前1年
Joined:2015-12-08 16:57
Hi,

Hi,
你的.hex工作,而不是我的。

Attachment:
mt_dialog.
Offline
最后一次露面:2 months 4 days ago
Staff
Joined:2015-06-08 11:34
嗨Chui,

嗨Chui,

In the file you have uploaded you haven't icluded your configuration files da14580_config.h, da14580_scatter_config.h, da14580_stack_config.h can you please upload those as well, i was able to complile and run the project with my configuration files. Also i was able to run the .hex you ve sent me, downloading it via UART, when downloading it via the JTAG you wont be able to see it advertising (it advertises only for a couple of seconds and then waits to detach the debugger - if you have your phone scanning while downloading the code you can pick up the first two seconds of advertising) because the debbuger stays attached to it since you have the CFG_EXT_SLEEP. In order to download firmware via uart you have to set the pins in the UART configuration (right next to the j4 header), open the smart snippets and select the UART (only) option, go to the booter and download th e.hex file. My project was able to run on your board because the sleep mode was undefined.

I have attached the files i ve used and your project as well, in order to test them you can place the folder as is under this directory DSPS\DA14580_DSPS_3.150.2___13_2_2015_keil5\DA14580_DSPS_3.150.2\dk_apps\keil_projects\sps compile and execute, i ve also included in the .zip file the produced sps_device.hex file from the project and your .hex file.

谢谢mt_dialog.

Attachment: