1799 views|1 replies

652

Posts

1

Resources
The OP
 

[Evaluation and experience of Zhongke Yihaiwei EQ6HL45 development platform] + ARM Cortex-M0 soft core processor (Part 3) [Copy link]

 

5. Use Keil to compile and debug the program

Open Keil MDK and open the built-in uvproj project file. This project file is developed using an old version of Keil MDK. For the new version MDK5, messages such as "Unsupported device" and "Old version support files need to be installed" may be prompted.

Then just click Build to complete the compilation-link-file format conversion, and finally get the code.hex file we need. Note: This hex file is in Verilog-hex format, not the Intel-hex format we often use in MCU development.

5.1. Keil Project Settings

Pay attention to the project's setting options, including the ROM and RAM area location settings, file output, and debugging settings, as shown in the figure:

5.2. Keil simulation debugging software code

  1. How to solve the error " ** * error 65: access violation at 0x0000000C : no 'read' permission" during Keil simulation

Solution steps:
  1. Option->Debug->Use_Simulator->CPU.DLL Parameter, change to -REMAP. Phenomenon: Still error, the memory address has changed: ** * error 65: access violation at 0x40023800: no 'read' permission

  2. Option->Debug->Use_Simulator->Initialization_File, open and create a new .ini file, write map 0x40000000, 0x400FFFFF read write in it and save it (MAP is not case sensitive, note that there is a space between read and write, not a comma)

  3. Then enter the Debugger

  4. Alternatively, you can skip the second step and set the map after entering the Debugger: Debug->Memory_map, manually enter 0x40000000, 0x400FFFFF (there is an example of 0x4000FFFF above the input box, but this address value is not large enough, we need a larger 0x400FFFFF). The difference between step 2 and 4 is that every time you exit the Debugger, the settings in step 4 will be lost, which is more troublesome, so generally only use the method in step 2

  5. It seems that this error of STM32F4 cannot be corrected by changing the DLL and its parameters in the settings. This is because there is no corresponding DLL file in the ARMBIN under the keil installation directory (view the file instructions through the "File Description" item~)

———————————————— Copyright Statement: This article is an original article by CSDN blogger "Maple_Leaf_15", which complies with the CC 4.0 BY-SA copyright agreement. Please attach the original source link and this statement for reprinting. Original link: https://blog.csdn.net/Maple_Leaf_15/article/details/51057991

Following the above steps, the screenshot of step 2 is as follows:

The screenshots of step 4 are as follows:

5.3. Debugging process and results

During debugging, you can enter the AHB2LED address 0x50000000 in the Memory window in the Keil Debug interface to view the value there. You can see that after executing the assembly code:

STR R0, [R1]

Afterwards, the value here changes between 0x55 and 0xAA as expected:

This post is from Domestic Chip Exchange

Latest reply

Thanks for sharing, the post has pictures and text, very good!  Details Published on 2022-12-1 17:47
 
 

6818

Posts

11

Resources
2
 
Thanks for sharing, the post has pictures and text, very good!
This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list