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!
First I have to say everything worked fine till now!
Now I get the error: "cannot access memory"
When debugging a sample project like "Blinky" I get the error when starting, but debugging seems to work fine.
When debugging my own project it depends on the CPU Speed (PLL Multiplier) if debugging works or not. But everytime I get the error "cannot access memory"!!
So my question is if the ulink2 or the mcbstm32 causes the problem?
best regards Mathias
Dear Mathias,
have you closed uVision and reopened it again after removing the address in the memory window 2?? This is required! I don't know which MDK-ARM Tool Chain version you are using but maybe this could be a problem in uVision itself...
Regarding the other problem with your ULINK2 please contact support.intl@keil.com before sending your ULINK2 back to Keil!
Regards Alex
Dear Alexander,
yes I have restarted uVision4!
I updated MDK-ARM from 4.02 to 4.03a:
IDE-Version: µVision V4.00u Copyright (c) Keil Elektronik GmbH / Keil Software, Inc. 1995 - 2009
Tool Version Numbers: Toolchain: RealView MDK-ARM Version: 4.03a Middleware: RL-ARM Real-Time Library Version V4.05 Toolchain Path: BIN40\ C Compiler: Armcc.Exe V4.0.0.524 Assembler: Armasm.Exe V4.0.0.524 Linker/Locator: ArmLink.Exe V4.0.0.524 Librarian: ArmAr.Exe V4.0.0.524 Hex Converter: FromElf.Exe V4.0.0.524 CPU DLL: SARMCM3.DLL V4.03a Dialog DLL: DARMSTM.DLL V1.45b Target DLL: BIN\UL2CM3.DLL V1.62 Dialog DLL: TARMSTM.DLL V1.43
Thx I will get in contact with support!
Regards Mathias
Try the following:
- go to the Blinky example for MCBSTM32 in folder \Keil\ARM\Boards\Keil\MCBSTM32\Blinky and open the Blinky.Opt file with a text editor
- remove lines with text "OPTMM 2,8,(0x10000000)" (should exist 3 times) and save the file
- open the Blinky project in uVision and start the debug session and check if you still get the error message "Cannot access Memory"
@ Robert: OPTMM Lines didn't exist, I think this is a result of deactivating Memory Window 2?
Today I got a second ulink2 but surprisingly I got the same error! So it was clear that there must be an error in the project settings!
After checking I saw that memory window 1 was also initialised with 0x10000000! After deactivating or changing it to 0x8000000 it seemed to work because there were no Error messages left!
But there was another problem, which I described above: The debugger failed when initialising the PLL with a multiplier of 9 to get 72MHz but worked with a multiplier of 3!
I compared my project with Blinky and found out that in my project I didn't enable "Embedded Flash Configuration" in STM32_Init.c!
After enabling everything works fine!
But why do I have to enable this for a higher PLL multiplier?
So the solutions for my problem is following:
* disable memory windows or initialise them with correct values (0x8000000 instead of 0x10000000)
* enable "Embedded Flash Configuration" in STM32_Init.c
Thanks for your help!