我会解释发生了什么。在这个场景中,我使用了Keil 4.74和SDK 3.0.4.0,但是在使用Keil 5.12和SDK 3.0.8.0时结果相同。在我的第一次尝试中,我遵循了UM-B-014 (SDK Expert manual V1.5)中的所有说明。这失败了,所以我决定按原样编译模板,并启动调试器来检查模板是否真的在工作:我制作了一个SDK的副本,打开了fh_project_template。uvproj < br / > 2。自从我在D:\Programs\Keil中安装Keil而不是在C:\Keil中安装Keil以来,我纠正了两个包含路径。< br / > 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.
Does somebody have a clue what is going on? Memory Map settings shpuld be OK since I followed the devkit's manual, I presume. What about the initialization file (target options ->debugger), can I use the sysram_case23.ini provided with the template on the devkit?
Regards, Jesper