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 a program spawned by another program?

I have one program which spawns a second program.

Due to how this stuff all works, running the second program manually is impossible. Is there a way I can load the second program into uvision, run the first program and somehow stop on the second program's entry point or something so I can apply breakpoionts and let it continue?

Or is that not possible?

Peter Lamberherst BEng(Hons)

  • Sounds like you have a boot loader that loads/starts an application.

    Note that you can use debugger scripts to pretend to be the boot loader - initializing memory addresses, setting PC etc.

  • You can load more than one binary file into a single debugger session, e.g. by putting something like this:

    load "some/where/bootloader.hex"
    load "main_application.axf"
    

    into your debugger initialization file, along with further commands that install a breakpoint at entry to main(). "Load application at Startup" and "run to main()" are best disabled then.

    This way your boot loader should run just like it does on real hardware, and therefore the application should see the same situation it always does.