We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi! I have the lucky task of debugging a C application whose creators have disappeared and left no documentation. When I run the UV3 debugger in simulation mode, I receive an error message : access violation at C:0xFFF0 no execute/read permission This occurs because a subroutine directly calls this area in memory
__API_FLASH_ENTRY_POINT: PUSH AR2 PUSH AR4 PUSH AR6 LCALL 0FFF0h POP AR6 POP AR4 POP AR2 RET
But when I look in the memory map this area is not defined as exec/read. If I reset and then add this area to the memory map manually, and then run, everything works OK. I don't want to have to load this for every run. Why isn't it being loaded into the memory map by the linker? Any idea why they are using address x'FFF0' as the flash entry point? Thanks.
I solved my problem by adding a new line at the end of my initialization file and now it seems to work! I still don't understand why I need to do this at all and will this cause problems when I debug on the target system?
To understand what's happening here, you must do two things:
1) Please read the manual, in particular the datasheet of the chip you're using (but forgot to tell us the name of).
2) Think about the following question: why is that asm function called "__API_FLASH_ENTRY_POINT"? Could that name have some kind of significance?
Why isn't it being loaded into the memory map by the linker?
Because the code at 0xfff0 is neither located by, nor even known to, the linker. The linker has no idea there is any code at that address, or how much code is to be found there.
Hi, Be ensure that the memory region 0x0FFFOh is not in protected area.Could u go through the datasheet and let me know in which region that address presence, it will be helpful to find the cause of the problem.I think even the accessing of the flash protected area will run but the PMI interrupt will occur which is one of the TRAP interrupts.Could you tell me whats the purpose of that asm function in your code.
Regards,Thangadurai.A