This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MCBSTM32 + ULINK2 Debug Problem

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

Parents
  • 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

Reply
  • 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

Children
  • 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"

  • Hi!

    @ 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!

    best regards
    Mathias