Project

General

Profile

Emulator stops working very often.

Added by Edwin McKay almost 8 years ago

I continually get these sort of messages while I try to step through the DSP code. Some times I can debug for a few minutes, other times it seems only a few instructions. I did figure out that all my breakpoints are being reset whenever these messages appear. So I have to re-enable all of them.

My project is currently fairly small and barely does anything. It is in C++, there are some virtual functions. Although I can not imagine these being the issue. The code base had been running on another platform for many years.

Error initializing emulator:
(Error -2083 @ 0x0)
Unable to communicate with the emulator. Confirm emulator configuration and connections, reset the emulator, and retry the operation.
(Emulation package 5.1.232.0)

Also:
ICEPICK_C : unable to determine target status after 20 attempts
ICEPICK_C : Failed to remove the debug state from the target before disconnecting. There may still be breakpoint op-codes embedded in program memory. It is recommended that you rest the emulator before you connect and reload your program before you continue debugging.


Replies (2)

RE: Emulator stops working very often. - Added by Edwin McKay almost 8 years ago

Is there some sort really basic initialization that I am missing? Are there interrupts occurring that I am suppose to handle even for the most basic "Hello World" type of app. It can not step through something as simple as :
int main(int argc, char *argv[]) {
printf("hello world!");
LOG_printf(&TraceLog, "hello world!");

volatile int bWaitForMe = 1;
if (argc) {
if (!strcmp(argv[0], "1")) {
bWaitForMe = 1;
}
}
int iCounter = 0;
int iCounter2 = 0;
while (bWaitForMe) {
iCounter++; // wait for the debugger here....
if (iCounter > 1000000) {
iCounter2++;
iCounter = 0;
LOG_printf(&TraceLog, "here we are %d\n", iCounter2);
}
}

I can step a few lines and then something crashes, my screen goes grey and the Ubuntu CCS is locked until I reset the Emulator. I'm using the Launcher from the Hello World DSP program.
I have attached screen shot of the ARM launcher and its memory configs.

RE: Emulator stops working very often. - Added by Dave Stehlik almost 8 years ago

We generally try to do as little as possible in main(). It should launch an initialization task and you would work from there.
If you do not need to debug initialization, sometimes it may be beneficial to allow the code to run (not hang waiting for the debugger).
This should allow for peripherals and interfaces to be configured and more predictable.

I would try to minimize anything than may require prossesing, such as:
-interrupts
-watchdogs
-messages (dsplink or other interface)
-other tasks running

Another thing you could try is to set a breakpoint on the next line and run instead of stepping over the code. This seems to work a little better in some cases.

Our primary emulator is the XDS510USB and usually works fairly well. I believe you are using one that we haven't had much experience with.

I do not have insight as to why it would work for minutes sometimes and not others.

    (1-2/2)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)