Hi all, I have a problem when debugging C-code on the DSP and I am wondering if you had the same and know a solution. At start the entire program resides in the external ROM (FLASH). But then I copy several 'program-modules' with often used functions to internal memory and run it from internal DARAM. So e.g. I have program functions F1(), F2(), F3(), F4() in the ROM and first copy F1() to DARAM and call F1(), after F1() has finished executing I copy F2() to DARAM and call F2(). The problem is, that the debugger shows me the source-code of e.g F4() (or any other code but not the correct one) although I called F1() and the DSP is executing F1() (I can see the correct assembler-code when selecting "Mixed Source/ASM". Did you have similar problems and/or know any solution for that ? Any solution / comment would be really welcome. Julien. |
Problem when debugging C-code
Started by ●February 4, 2002
Reply by ●February 5, 20022002-02-05
Yep- I've done the exact same thing! Basically doing overlays where I
specify the same run location for multiple DSP routines and copy them from ROM to DARAM to execute when needed. I've found the same thing as you as far as the mixed Source/ASM view- source is wrong but ASM is correct. Luckily my routines are in assembly and I can just use the dissassembly window which is accurate. The problem is the symbolic debug info is generated for addresses; so when you generate modules with overlapping runtime addressses, this info is based on the last module compiled/linked. Another fundamental problem is since you copy the modules, the debugger has no way of knowing which module is actually resident at a given point. If only there were some C routines for managing virtual memory that could also tell the debugger what's going on... -George > Date: Mon, 4 Feb 2002 10:50:12 +0100 > From: "Julien Boudias" <> > Subject: Problem when debugging C-code > > Hi all, > > I have a problem when debugging C-code on the DSP and I am wondering if you > had the same > and know a solution. > At start the entire program resides in the external ROM (FLASH). But then I > copy several > 'program-modules' with often used functions to internal memory and run it > from internal DARAM. > So e.g. I have program functions F1(), F2(), F3(), F4() in the ROM and first > copy F1() to DARAM and > call F1(), after F1() has finished executing I copy F2() to DARAM and call > F2(). > The problem is, that the debugger shows me the source-code of e.g F4() (or > any other code but not the > correct one) although I called F1() and the DSP is executing F1() (I can see > the correct > assembler-code when selecting "Mixed Source/ASM". > > Did you have similar problems and/or know any solution for that ? > Any solution / comment would be really welcome. > Julien. |