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

How to Debug/Simulate an STM32 program from RAM in µVision4

What is necessary to simulate or debug a STM32 program that is intended to run in RAM?

In µVision4 the program is located and loaded in RAM, but start debugging results in a jump to 0x00000000.
Setting the SP and PC registers manually doesn't solve the problem.
Is it necessary to define a minimal vector table that resides at 0x00000000 to make debugging possible?

Parents
  • I know that there is such a possibility using the VTO register. But the problem is startup of the debugging. The program has no chance to modify this register because just the first program step goes wrong.
    I've modified the scatter file to locate the vector table in FLASH starting at 0x08000000 and debugging seems to work fine.
    This workaround could help, but I thought there is a solution to debug or simulate code that completely will run in RAM without extensions that provide a special vector table in FLASH for startup.

Reply
  • I know that there is such a possibility using the VTO register. But the problem is startup of the debugging. The program has no chance to modify this register because just the first program step goes wrong.
    I've modified the scatter file to locate the vector table in FLASH starting at 0x08000000 and debugging seems to work fine.
    This workaround could help, but I thought there is a solution to debug or simulate code that completely will run in RAM without extensions that provide a special vector table in FLASH for startup.

Children