I've been using MicroVision IDE and debugging STM32 successfully, until recently.
When starting the debugging, after loading the software the debugger gives the following:
Cannot access Memory *** error 57: illegal address (0x08000000)
This has not happened before, and now it happens all the time. After this message I can only debug by looking at disassembly window, the C source code is not tracked anymore.
The address is the starting address of on-chip flash, so it is valid.
"The address is the starting address of on-chip flash, so it is valid."
Not necessarily: that just indicates that memory physically exists at the address - it does not confirm that the specific access attempt (Read/Write/Execute) was valid for that address...
Check your pointers...
But it fails immediately, without running any code.
The reset vector at 0x08000004 points to 0x08000165, which is not on word or doubleword boundary.
The program counter however sets to 0x08000164 on reset.
Should it be on word or doubleword boundary?
The code runs perfectly on target system though.
So what is wrong here, as I don't believe this has anything to do with my code, just some settings maybe.
without any knowledge of your processor, I would suggest lowering the speed of your JTAG?
STM32 like the topic says, STM32F101RBT6 to be exact. Do you need any other info?
The core starts with internal oscillator, because no user or startup library code has a chance to run before the error.
JTAG clock is at 500kHz at the moment. It has been working correctly before at 1MHz, and I've tried as slow as 5kHz - slow as a snail but the problem still persists.
Problem seems to be solved.
Upgrading to latest ARM developement package did not help, but..
I disabled three flags from the debugger settings: -caching of code memory -caching of data memory -download code to flash
I don't know how the flags turned on anyway.
It seems it still downloads code to flash, as the code cannot possibly fit into sram, but it works.