Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).
i am new in DSP i am using c5510 i need to use GPIO but i couldn't
found any example so i tried my code but the compiler couldn't
recognize the function names or definitions and i have the following
errors:
, line 51: error: identifier "GPIO_Handle" is undefined
, line 52: error: identifier "hGPio" is undefined
, line 52: error: identifier "GPIO_PGPIO_PIN1" is undefined
, line 53: error: declaration may not appear after executable
statement in block
, line 53: error: identifier "GPIO_Config" is undefined
, line 53: error: identifier "GPIO_PGPIO_PIN1_OUTPUT" is undefined
, line 54: error: expected a ";"
, line 55: error: too many arguments in function call
this my code can any one tell me what to do.
#include <csl.h>
#include <csl_gpio.h>
#include <csl_gpiodat.h>
#include <_csl_pgpio.h>
#include <_csl_pgpiodat.h>
#include <_csl_pgpiohal.h>
#include <csl_gpiohal.h>
void main()
{
GPIO_Handle hGPIO;
hGPio = GPIO_open(GPIO_PGPIO_PIN1,0);
GPIO_Config myConfig = {GPIO_PGPIO_PIN1_OUTPUT}
GPIO_config(hGPIO, &myConfig);
GPIO_pinEnable ( hGPIO, GPIO_PGPIO_PIN1);
}
thanks
------------------------------------
OMAP35x EVM jump-starts low-power apps
------------------------------------
The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building
applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x
On Tue, Jun 24, 2008 at 09:25:09AM -0000, aliaa wrote: > i am new in DSP i am using c5510 i need to use GPIO but i couldn't > found any example so i tried my code but the compiler couldn't > recognize the function names or definitions and i have the following > errors: > , line 51: error: identifier "GPIO_Handle" is undefined > , line 52: error: identifier "hGPio" is undefined > , line 52: error: identifier "GPIO_PGPIO_PIN1" is undefined > , line 53: error: declaration may not appear after executable > statement in block > , line 53: error: identifier "GPIO_Config" is undefined > , line 53: error: identifier "GPIO_PGPIO_PIN1_OUTPUT" is undefined > , line 54: error: expected a ";" > , line 55: error: too many arguments in function call > > this my code can any one tell me what to do. > > **snip** As far as I can tell, GPIO_Handle, GPIO_Config etc. are only used on the 5502, not on the 5510. With the 5510 you can just enable the pins, set the direction of each and write/read from them. If I'm wrong, I'd appreciate a pointer from someone. I'd also appreciate any info anyone could give me about using a timer to recover from any errors on a GPIO comms bus I'm working with. Cheers Chris -- Chris Eilbeck ------------------------------------ OMAP35x EVM jump-starts low-power apps ------------------------------------ The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x
Chris- > On Tue, Jun 24, 2008 at 09:25:09AM -0000, aliaa wrote: > > i am new in DSP i am using c5510 i need to use GPIO but i couldn't > > found any example so i tried my code but the compiler couldn't > > recognize the function names or definitions and i have the following > > errors: > > , line 51: error: identifier "GPIO_Handle" is undefined > > , line 52: error: identifier "hGPio" is undefined > > , line 52: error: identifier "GPIO_PGPIO_PIN1" is undefined > > , line 53: error: declaration may not appear after executable > > statement in block > > , line 53: error: identifier "GPIO_Config" is undefined > > , line 53: error: identifier "GPIO_PGPIO_PIN1_OUTPUT" is undefined > > , line 54: error: expected a ";" > > , line 55: error: too many arguments in function call > > > > this my code can any one tell me what to do. > > > > **snip** > > As far as I can tell, GPIO_Handle, GPIO_Config etc. are only used on the > 5502, not on the 5510. With the 5510 you can just enable the pins, set the > direction of each and write/read from them. If I'm wrong, I'd appreciate a > pointer from someone. I'd also appreciate any info anyone could give me > about using a timer to recover from any errors on a GPIO comms bus I'm > working with. I only have 5502 CSL-based project examples handy, but I would have to say it doesn't make sense why 5510 CSL would not also support GPIO functions. The GPIO functionality on the two devices is the same, although of course the pin mapping is different. GPIO is nothing and complex has been around for many years. What library files are you including? Can you use other CSL functions? Is your project using DSP/BIOS? -Jeff ------------------------------------ OMAP35x EVM jump-starts low-power apps ------------------------------------ The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x
--- In c...@yahoogroups.com, Jeff Brower <jbrower@...> wrote: > > Chris- > > > On Tue, Jun 24, 2008 at 09:25:09AM -0000, aliaa wrote: > > > i am new in DSP i am using c5510 i need to use GPIO but i couldn't > > > found any example so i tried my code but the compiler couldn't > > > recognize the function names or definitions and i have the following > > > errors: > > > , line 51: error: identifier "GPIO_Handle" is undefined > > > , line 52: error: identifier "hGPio" is undefined > > > , line 52: error: identifier "GPIO_PGPIO_PIN1" is undefined > > > , line 53: error: declaration may not appear after executable > > > statement in block > > > , line 53: error: identifier "GPIO_Config" is undefined > > > , line 53: error: identifier "GPIO_PGPIO_PIN1_OUTPUT" is undefined > > > , line 54: error: expected a ";" > > > , line 55: error: too many arguments in function call > > > > > > this my code can any one tell me what to do. > > > > > > **snip** > > > > As far as I can tell, GPIO_Handle, GPIO_Config etc. are only used on the > > 5502, not on the 5510. With the 5510 you can just enable the pins, set the > > direction of each and write/read from them. If I'm wrong, I'd appreciate a > > pointer from someone. I'd also appreciate any info anyone could give me > > about using a timer to recover from any errors on a GPIO comms bus I'm > > working with. > > I only have 5502 CSL-based project examples handy, but I would have to say it doesn't > make sense why 5510 CSL would not also support GPIO functions. The GPIO > functionality on the two devices is the same, although of course the pin mapping is > different. GPIO is nothing and complex has been around for many years. > > What library files are you including? Can you use other CSL functions? Is your > project using DSP/BIOS? > > -Jeff > I include this files #include <csl.h> #include <csl_gpio.h> #include <csl_gpiodat.h> #include <_csl_pgpio.h> #include <_csl_pgpiodat.h> #include <_csl_pgpiohal.h> #include <csl_gpiohal.h> and GPIO_pinEnable function colored blue in the code. and i used those function to enable me to out 4 digits to control motors by H-bridge can any one know how to do that with GPIO or any thing else. ------------------------------------ OMAP35x EVM jump-starts low-power apps ------------------------------------ The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x
Ali- > I include this files > #include <csl.h> > #include <csl_gpio.h> > #include <csl_gpiodat.h> > #include <_csl_pgpio.h> > #include <_csl_pgpiodat.h> > #include <_csl_pgpiohal.h> > #include <csl_gpiohal.h> > and GPIO_pinEnable function colored blue in the code. > and i used those function to enable me to out 4 digits to control > motors by H-bridge can any one know how to do that with GPIO or any > thing else. It sounds like you already have it working with GPIO. What is the question? -Jeff ------------------------------------ OMAP35x EVM jump-starts low-power apps ------------------------------------ The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x
I think what Jeff meant by "what libraries are you including" is not only your #include statements, but also what you are telling the compiler and the linker. For them to be able to _find_ the libraries you want to #include, you have to tell them where they are, i.e. a path or similar direction. If I recall correctly, you can set the csl lib from the .cdb (?) file, under Global Settings or something. There will be a field there for which csl library you want to use, and you simply write the name of it there. You also have to give library and include paths to the compiler and linker. Read the compiler and linker instructions to find out which flags you have to use. E.g. -i is the flag for include-paths. Without correct directions your program can't be linked properly and the calls you are trying to make won't work. HTH. -Sima On Sat, Jun 28, 2008 at 9:46 PM, aliaa <l...@yahoo.com> wrote: > --- In c...@yahoogroups.com <c55x%40yahoogroups.com>, Jeff Brower > <jbrower@...> wrote: > > > > Chris- > > > > > On Tue, Jun 24, 2008 at 09:25:09AM -0000, aliaa wrote: > > > > i am new in DSP i am using c5510 i need to use GPIO but i couldn't > > > > found any example so i tried my code but the compiler couldn't > > > > recognize the function names or definitions and i have the following > > > > errors: > > > > , line 51: error: identifier "GPIO_Handle" is undefined > > > > , line 52: error: identifier "hGPio" is undefined > > > > , line 52: error: identifier "GPIO_PGPIO_PIN1" is undefined > > > > , line 53: error: declaration may not appear after executable > > > > statement in block > > > > , line 53: error: identifier "GPIO_Config" is undefined > > > > , line 53: error: identifier "GPIO_PGPIO_PIN1_OUTPUT" is undefined > > > > , line 54: error: expected a ";" > > > > , line 55: error: too many arguments in function call > > > > > > > > this my code can any one tell me what to do. > > > > > > > > **snip** > > > > > > As far as I can tell, GPIO_Handle, GPIO_Config etc. are only used > on the > > > 5502, not on the 5510. With the 5510 you can just enable the > pins, set the > > > direction of each and write/read from them. If I'm wrong, I'd > appreciate a > > > pointer from someone. I'd also appreciate any info anyone could > give me > > > about using a timer to recover from any errors on a GPIO comms bus I'm > > > working with. > > > > I only have 5502 CSL-based project examples handy, but I would have > to say it doesn't > > make sense why 5510 CSL would not also support GPIO functions. The GPIO > > functionality on the two devices is the same, although of course the > pin mapping is > > different. GPIO is nothing and complex has been around for many years. > > > > What library files are you including? Can you use other CSL > functions? Is your > > project using DSP/BIOS? > > > > -Jeff > > I include this files > #include <csl.h> > #include <csl_gpio.h> > #include <csl_gpiodat.h> > #include <_csl_pgpio.h> > #include <_csl_pgpiodat.h> > #include <_csl_pgpiohal.h> > #include <csl_gpiohal.h> and GPIO_pinEnable function colored blue in the code. > and i used those function to enable me to out 4 digits to control > motors by H-bridge can any one know how to do that with GPIO or any > thing else. > > > ------------------------------------ OMAP35x EVM jump-starts low-power apps ------------------------------------ The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x
--- In c...@yahoogroups.com, "Jeff Brower" <jbrower@...> wrote: > > Ali- > > > I include this files > > #include <csl.h> > > #include <csl_gpio.h> > > #include <csl_gpiodat.h> > > #include <_csl_pgpio.h> > > #include <_csl_pgpiodat.h> > > #include <_csl_pgpiohal.h> > > #include <csl_gpiohal.h> > > > > > > and GPIO_pinEnable function colored blue in the code. > > and i used those function to enable me to out 4 digits to control > > motors by H-bridge can any one know how to do that with GPIO or any > > thing else. > > It sounds like you already have it working with GPIO. What is the question? > > -Jeff > no this errors appear when i tried to write simple code to test gpio line 51: error: identifier "GPIO_Handle" is undefined > > , line 52: error: identifier "hGPio" is undefined > > , line 52: error: identifier "GPIO_PGPIO_PIN1" is undefined ------------------------------------ OMAP35x EVM jump-starts low-power apps ------------------------------------ The modular and extensible OMAP35x Evaluation Module (EVM) enables developers to start building applications based on the OMAP35x architecture:http://www.DSPRelated.com/omap35x