Dear friends,
I have been learning CORTEX-M4 based microcontrollers lately, I use KEIL-5 for developing the software. But I have a problem when I am trying to debug any program (even ready programs which I have downloaded from TEXAS INSTRUMENT website or other sources). It seems that a lot of people have this problem:
*** error 65: access violation at 0xA0033000 : no 'read' permission
The solution which I found is to use memory map while debugging (or initializing ini file) to give the appropriate permissions for all the addresses which I use in my code! But actually it is not easy and not logical to read an old code and search for the used addresses and rearrange them in memory map!!!
Could anybody help me please cuz I stopped developing my apps because of this error!
regards.
Probably because you are simulating, and not using real hardware, and the simulator only supports a subset of peripherals.
It is definitely because of simulation (as I read that in all other websites). Can't I get rid of this problem? I mean isn't there anyway to set the permissions automatically or something like that?
You can write an INI file to set up the permissions, and have that run "automatically" each time you start a simulation.
http://www.keil.com/support/man/docs/uv4/uv4_db_cmd_input_file.htm
You still have to create the INI file manually, though.
I could write that for the software which I develop from the beginning. But the big problem is in the already built software I could not definitely read the whole program and write the ini file.
Anyway thank you very much for your reply :-)
just the last question, When I use the real hardware, I won't get this problem right?
You'll probably encounter different problems, Error 65 is something that shows up in the simulator as you hit the limits of the peripherals being emulated.
Ponder what it is you need the simulation to do, and if, perhaps, you can develop and test C code on a PC with some thin hardware abstraction layer.
Actually there is still something not clear for me .. how could the reason to be hitting the boundary of memory while I'm using a specific MC type and I'm really working in an available address in that MC?
Anyway I will go and test deeper to get a closer understanding for that.
Thank's a lot
If you use the simulator and it doesn't support all peripherials, then that is like simulate the day for a school teacher by standing in front of an empty classroom. Code that expects responses from non-simulated peripherials will either never run, or will do wrong things.
Another thing. You plan to do software work on someone else's program? And you think the program is too big for you to scan the code to figure out what memory regions you need to map? I'd say you need to spend a significant amount of time reading through that code anyway before you start to make any changes.
Another thing - just because Keil can emulate the M4 processor instructions doesn't mean that it has full emulation of serial ports, DMA transfers etc. And all the peripherial hardware has extra memory regions. And if Keil doesn't support your processor fully, then it doesn't know what to do when your program tries to access the memory regions that corresponds to unsupported peripherial hardware.
clear!
Thank you alot! :-)
You're suffering from a fundamental misunderstanding there. Memory mappings are not really specific to any particular software. They're specific to a given hardware. I.e. you don't really have to know what that software does, you only have to know what hardware it runs on.