Hi all,
I'm having trouble getting the template as is provided in the SDK to work. I'm using the DA14580 and my PC is running Win8. Configurations I tried without success: Keil 5.12 and Keil 4.74, SDK versions 3.0.8.0 and 3.0.4.0, Expert devkit and Pro devkit.
I'll explain what happens. For this scenario, I've used Keil 4.74 and SDK 3.0.4.0 but equal results when using Keil 5.12 and SDK 3.0.8.0. On my first attempt, I followed all instructions in UM-B-014 (SDK Expert manual V1.5). That failed so I decided to compile the tempate as-is and start the debugger just to check if the template is actually working:
1. I made a copy of the SDK and opened the fh_project_template.uvproj
2. I corrected two of the include paths since I installed Keil in D:\Programs\Keil in stead of C:\Keil.
3. I followed the instructions in paragraphs 4.4.1.5 to 4.4.1.13 in UM-B-014. I did need to patch the uvopt-file as is described in appendix A since Keil crashed when accessing the J-Link settings. I payed extra attention to the memory mapping settings, they are set to the exact values as mentioned in the manual.
4. I compiled the project -> no errors, 2 warnings.
5. I start the debugger. It says I'm running in evaluation mode, OK.
So far, so good. Now for the annoying bit on which I wasted almost two days. I encounter different situations, but the program won't work in any of these.
Situation 1: The Debugger starts and shows the startup-file, program starts at line 146 in the startup file (boot_vextors.s line 146: LDR R0, =SystemInit). When I step through the code, it either steps through SystemInit and never enters the main-function so it seems, looks like it runs in an infinite loop. Stopping execution doesn't give me a clue what it is doing.
Situation 2: As situation 1, but now in stead of running in an infinite loop (or doing something else which is invisible to me), a hard fault occurs :/
Situation 3: On *many* occurrences, the debugger won't even start because Keil _crashes_ when I start the debugger! Sometimes it does start debugging after restarting the program, sometimes it requires deleting the uvopt-file, start Keil, quit it so it generates a new one, patch the uvopt-file so it won't crash when accessing the J-link settings.
The peripheral example does work. The proximity_fh program suffers from the same issues.
有人有没有Clue发生了什么事?我假设我遵循Devkit的手册,内存贴图设置Shpuld是正常的。初始化文件(目标选项 - >调试器)呢?我可以使用devkit上的模板提供sysram_case23.ini吗?
Regards, Jesper
*bump*
Does nobody have an idea on this?
If I remember correctly, the proximity sensor goes into sleep which breaks debugging. You can't debug it without doing some modifications to the source code. You need to enter and exit the debug mode.
我也可能记得错了。
嗨Vesan,
Thanks for your reply. Sounds plausible for the proximity sensor. I checked if the template also has sleep mode enabled, but looks like it isn't (DEEP_SLEEP_ENABLED and EXT_SLEEP_ENABLED are both 0 when compiling). The DEVELOPMENT_DEBUG is also defined. I guess this should enable debugging?
我今天检查了一遍,我设置一个断点set_system_clocks in main_func (located in arch_main.c) but it is never reached. In stead, the disassembly window shows that it hangs in an infinite loop (unconditional branch to 0x00000EEE at 0x00000EEE). Also, I can't step into main when debugging - it shows the startupfile when launched and allows me to step through SystemInit but it enters the infinite loop I mentioned above when it should branch to __main (disassembly window shows it translates __main to address 0x200001FC). Does this incorrect behavior rings a bell?
EDIT: when I use the sysram.ini file mentioned in UM-B-014, a hard fault occurs. Question is, is the sysram_case23.ini file provided by the template suitable when using the devkit?
Jesper.
PS on the positive side: at least Keil didn't crash on me today - knock on wood ;)
Hi JDA,
We are looking into your issue and reply as soon as possible.
最好的问候,RVA
Hi RvA,
Thanks, I appreciate it and I'm looking forward to your reply.
Jesper..
For the record: I've resolved the issue. My Expert devkit is defective (probably some ROM error) - I'm now able to run the template on the PRO devkit.
Thanks everyone :)