Skip navigation

This Question is Assumed Answered

1 "correct" answer available (4 pts) 1 "helpful" answer available (2 pts)
5,121 Views 16 Replies Last post: Oct 1, 2009 9:59 AM by MikeSmithCanada RSS 1 2 Previous Next
MikeSmithCanada Regular Contributor 141 posts since
Mar 27, 2009
Currently Being Moderated

Sep 26, 2009 3:07 PM

Causing message on VDSP screen and then pausing

I thought the following would put out a message and cause VDSP to pause till the gets was completed

-- but it does not.  I would prefer not to have to use break points

 

I used to pop up some sort of response window in VDSP -- just can't remember syntax -- any body help. Not sure what to look for under "help"

 

#include <stdio.h>

 

void GetBuffer(char *buff) {

 

    puts("If gets( ) is not waiting --  then set a break point at this line of code\n");
     puts("Waiting for you to hold the switches down and then press return");

 
      gets(buff);
}

 

Thanks

CraigG Analog Employee 444 posts since
Jan 29, 2009
Currently Being Moderated
1. Sep 28, 2009 5:26 AM in response to: Michael Smith
Re: Causing message on VDSP screen and then pausing

Hi Mike,

 

in a trivial example (e.g. 'do something'... GetBuffer()... 'Do something else'), the code you have posted below does cause an "stdin" pop-up that 'pauses' the application while it waits for input. This wouldn't occur if you have redirected STDIO in your application away from the default PrimIO device - is this possibly the case? Also note that such a 'halt' will only halt the core, while peripherals and DMA operations will continue to function.

CraigG Analog Employee 444 posts since
Jan 29, 2009
Currently Being Moderated
6. Sep 28, 2009 10:30 AM in response to: Michael Smith
Re: Has a change occurred in HPPC-ICE Driver

Hi Mike.

 

sorry for the delay in getting back to you. Firstly, regarding redirecting STDIO; this is something that you would know you have done. It requires that you register a new DevEntry structure device driver using add_devtab_entry. It's explained in full detail in the Compiler and Libraries Manual under 'C and C++ Run-Time Library Guide'->'File I/O Support'. But it's something that you have to explicitly do in your application, rather than being an IDDE option for example.

 

I tried the DXE you provided in your previous post, and it produces a pop-up stdin window. I always use an HPPCI-ICE too, but also tested with HPUSB-ICE and Simulator and saw the expected pop-up on all three.

 

One thing that now occurs to me, is that you mentioned you are trying to avoid using breakpoints, are you removing the breakpoints from the Active/Automatic list in the IDDE? If this is the case, the required __primIO breakpoint may be getting removed, which could cause the problem. Can you please check under 'Settings'->'Breakpoints'->'Automatic' to see if this breakpoint is enabled or disabled.

 

thanks,

Craig

GlenA Analog Employee 10 posts since
Mar 12, 2009
Currently Being Moderated
10. Sep 29, 2009 10:20 AM in response to: Michael Smith
Re: 'Print' I/O breakpoints work -- but not 'get' I/O breakpoints

Hi Mike,

 

Just a shot in the dark here but from prior posts I know that you tend to use .vbs scripts for various purposes in your environment. Is it possible that in one of your scripts you have set the ADspApplication::Interactive flag to False? This would have the effect of disabling the popup while still allowing other non-blocking STDIO operations such as puts() or printf() to continue to function.

 

Glen

NormY Analog Employee 3 posts since
Jun 23, 2009
Currently Being Moderated
12. Sep 30, 2009 4:29 PM in response to: Michael Smith
Re: 'Print' I/O breakpoints work -- but not 'get' I/O breakpoints

How did you change your JTAG settings?  With a Python script?  If a script is still running in the background, the stdin dialog won't be displayed.  A quick way to check if a script is still running is to look at the Debug/Halt Script menu item.  If it's enabled, then a script is still running.

More Like This

  • Retrieving data ...

Bookmarked By (0)