Technical discussions about the TI C54x DSPs (including the c5401, c5402, c5402a, c5404, c5407, c5409, c5409a, c5410, c5410a, c5416, c5420, c5421, c5441, c549, c5470 and c5471).
|
Is there a way to get input into a program in CCS? What I want to do is a scanf in my program and input the data using CCS. Thanks. |
|
|
|
It is indeed possible to get input from CCS into your program. The only thing your have to do is to include standard libraries like stdio.h or stdlib.h depending on what you need. for example when the program executes a gets a small input window pops up and asks you to enter the value. The window is modal, i.e. you don't have any access to CCS until you have entered a value Good Luck, Laurent >From: "ajmassa" <> >To: >Subject: [c54x] CCS Input >Date: Thu, 17 Oct 2002 23:40:56 -0000 > >Is there a way to get input into a program in CCS? What I want to do >is a scanf in my program and input the data using CCS. > >Thanks. > >_____________________________________ _________________________________________________________________ MSN Search, le moteur de recherche qui pense comme vous ! http://search.msn.fr/worldwide.asp |
|
|
|
I noticed something similar to what you are saying in the help. However, when I ran my program (included below) I didn't get any such window to pop up. Is there something that I need to enable in CCS? Have you gotten this to work before? What I see is that the program just keeps looping through printing out the printf statements. The program does not stop at the scanf function call and wait for user input. CODE: ====== #include <stdio.h> #include <tms320.h> #include <dsplib.h> //////////////////////////////////////////////////////////////////////////// //// //////////////////////////////////////////////////////////////////////////// //// void main( void ) { unsigned char prog_option; unsigned char *input; input = &prog_option; puts( "ProbePoint Test Started...\n" ); while( TRUE ) { printf("Select Option: "); scanf("%ld", &prog_option); printf("Entered: %d", prog_option); } } > -----Original Message----- > From: LAURENT FOUILHAC [mailto:] > Sent: Thursday, October 17, 2002 11:52 PM > To: ; > Subject: Re: [c54x] CCS Input > It is indeed possible to get input from CCS into your program. The only > thing your have to do is to include standard libraries like stdio.h or > stdlib.h depending on what you need. > > for example when the program executes a gets a small input window pops up > and asks you to enter the value. The window is modal, i.e. you don't have > any access to CCS until you have entered a value > > Good Luck, > > Laurent > > > >From: "ajmassa" <> > >To: > >Subject: [c54x] CCS Input > >Date: Thu, 17 Oct 2002 23:40:56 -0000 > > > >Is there a way to get input into a program in CCS? What I want to do > >is a scanf in my program and input the data using CCS. > > > >Thanks. > > > > > > > >_____________________________________ > > > > > > > > _________________________________________________________________ > MSN Search, le moteur de recherche qui pense comme vous ! > http://search.msn.fr/worldwide.asp |
|
You will need to allocate stack and heap in your linker file. If you don't have enough stack and heap, the pop up window doesn't show up. Good luck, Prasad -----Original Message----- From: Anthony Massa [mailto:] Sent: Friday, October 18, 2002 10:39 AM To: LAURENT FOUILHAC; Subject: RE: [c54x] CCS Input I noticed something similar to what you are saying in the help. However, when I ran my program (included below) I didn't get any such window to pop up. Is there something that I need to enable in CCS? Have you gotten this to work before? What I see is that the program just keeps looping through printing out the printf statements. The program does not stop at the scanf function call and wait for user input. CODE: ====== #include <stdio.h> #include <tms320.h> #include <dsplib.h> //////////////////////////////////////////////////////////////////////////// //// //////////////////////////////////////////////////////////////////////////// //// void main( void ) { unsigned char prog_option; unsigned char *input; input = &prog_option; puts( "ProbePoint Test Started...\n" ); while( TRUE ) { printf("Select Option: "); scanf("%ld", &prog_option); printf("Entered: %d", prog_option); } } > -----Original Message----- > From: LAURENT FOUILHAC [mailto:] > Sent: Thursday, October 17, 2002 11:52 PM > To: ; > Subject: Re: [c54x] CCS Input > It is indeed possible to get input from CCS into your program. The only > thing your have to do is to include standard libraries like stdio.h or > stdlib.h depending on what you need. > > for example when the program executes a gets a small input window pops up > and asks you to enter the value. The window is modal, i.e. you don't have > any access to CCS until you have entered a value > > Good Luck, > > Laurent > > > >From: "ajmassa" <> > >To: > >Subject: [c54x] CCS Input > >Date: Thu, 17 Oct 2002 23:40:56 -0000 > > > >Is there a way to get input into a program in CCS? What I want to do > >is a scanf in my program and input the data using CCS. > > > >Thanks. > > > > > > > >_____________________________________ > > > > > > > > _________________________________________________________________ > MSN Search, le moteur de recherche qui pense comme vous ! > http://search.msn.fr/worldwide.asp _____________________________________ |