我会解释发生了什么。对于这个场景,我使用了Keil 4.74和SDK 3.0.4.0,但使用Keil 5.12和SDK 3.0.8.0时结果相同。在我的第一次尝试中,我遵循了UM-B-014 (SDK专家手册V1.5)中的所有说明。这失败了,所以我决定按原样编译模板,并启动调试器,只是为了检查模板是否实际工作:我复制了SDK并打开了fh_project_template。uvproj < br / > 2。我修正了两个包含路径,因为我把Keil安装在D:\Programs\Keil而不是C:\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