DSPRelated.com
Forums

tasks setting in DSP/BIOS-URGENT!!!!!

Started by balasubramanian vaidhyanathan September 23, 2008
Hello Balasubramanian,
I agree what Jeff said. Furthermore, you can check the Task Manager if
_our_task's been included, then from there you need to make sure it is
also included in the Task function.
If you get the right .map file, and it also pointed out the task in
there, so it should be working.
Good luck !
Tung

Jeff Brower
Sent by: c...
09/23/2008 01:46 PM

To
Balasubramanian Vaidhyanathan
cc
c...
Subject
Re: [c6x] tasks setting in DSP/BIOS-URGENT!!!!!

Balasubramanian-

> lab1cfg.obj got created... what i notice is this in lab1.map it says
_our_task is undefined
>
> address name
> -------- ----
> 0000d020 _memcpy
> UNDEFED _our_task
> 0000cda4 _our_task__Fv
> 0000f52c _rtdx_buffer_state
> 0000f54c _rtdx_mon_state

Does "_sem" show in the .map file? If not then you are looking at the
wrong
lab1cfg.obj file.

-Jeff

--- On Tue, 9/23/08, Jeff Brower wrote:

From: Jeff Brower
Subject: Re: [c6x] tasks setting in DSP/BIOS-URGENT!!!!!
To: "Balasubramanian Vaidhyanathan"
Cc: c...
Date: Tuesday, September 23, 2008, 12:44 PM

Balasubramanian-

> Infact below is the error
>
> undefined first referenced
> symbol in file
> --------- ----------------
> _our_task
C:\CCStudio_v3.1\MyProjects\lab1\Debug\lab1cfg.obj

Richard points out that lab1cfg.obj probably didn't compile. Do you see a
lab1cfg.obj file? Does it have today's date and time? Is lab1cfg.c listed
in your
source view window?

-Jeff

--- On Tue, 9/23/08, Jeff Brower wrote:

From: Jeff Brower
Subject: Re: [c6x] tasks setting in DSP/BIOS-URGENT!!!!!
To: "Balasubramanian Vaidhyanathan"

Cc: c...
Date: Tuesday, September 23, 2008, 11:54 AM

Balasubramanian-

> I am trying to figure out how to set up tasks in DSP/BIOS. My
code is
as below
> #include
> #include
> #include
> #include
> #include
> #include
> #include
> #include "lab1cfg.h"
>
> Uns counts_per_us;
> void our_task();
> extern LOG_Obj trace;
>
> /* ======== main ======== */
> int main()
> {
> LOG_printf(&trace, "Slice example started!");
> counts_per_us = CLK_countspms() / 1000;
> SEM_post(&sem);
> return;
> }
> void our_task()
> {
> while(1)
> {
> SEM_pend(&sem,SYS_FOREVER);
> LOG_printf(&trace,"Called once \n");
> SEM_pend(&sem,SYS_FOREVER);
> LOG_printf(&trace,"called twice \n");
> }
> }
> I opened to the cdb file and opened the TSK under Scheduling and
inserted
> a task TSK0 and connected it to function _our_task and 0 arguments
and
> priority 1. Now when i compile this code it says it cannot link this
> function... What am i doing wrong... This is urgent... can you
please
> help me in compling this code.....

What is the exact error message?

-Jeff
Balasubramanian-

> Date: Tue, 23 Sep 2008 12:37:40 -0700 (PDT)
> From: balasubramanian vaidhyanathan
> Subject: Re: [c6x] tasks setting in DSP/BIOS-URGENT!!!!!
> To: Jeff Brower Jeff
>
> Here is the project, it is just a test project... Can you please let
> me know where iam doing a mistake... I am sorry for sending this but i
> think this shuld help me going a long way...

I took a quick look at your .zip file. Many problems:

1) The code you posted is in main.cpp, not in a .c file. Any function name you want
to reference in the DSP/BIOS config has to be declared in a .c file, not a .cpp, to
avoid "name mangling" (yes that's right, look that term up on Google).

2) Your .zip file contains no linker command file (.cmd). Since your number of files
and memory usage should be very small at this point, that's Ok for now. Later you
will need one.

3) There are several labcfg1.obj and labcfg1_c.obj files, but no matching source
files.

Overall this project looks like a mess. But hopefully if you fix #1 above (rename to
main.c) you can get the thing to build. My suggestion for the time being is to not
have *any* .cpp files anywhere near CCS. You are not ready for that yet.

-Jeff

> Jeff Brower wrote:
>
> Balasubramanian-
> > I was talking of .map file and i find _sem defined with an
> > address properly.....
> > Did you have a look at the GUI?....
> > No point, your GUI is not the issue. If the .map file shows
> '_sem' but not '_our_task' then you have a mismatch. Either
> Richard is correct -- your lab1cfg.c file does not compile
> because "sem" is not declared -- or you should show where sem
> is declared.
> This is a basic compile/link issue. My guess is that another
> group did this lab before you and somehow you've got a mix of
> old and new files, or a filename has been changed, or other
> mismatch. Be sure to try "Build All" option.
> -Jeff
> > Jeff Brower wrote:
> >
> > Balasubramanian-
> > > lab1cfg.obj got created... what i notice is this
> > in lab1.map it says _our_task is undefined
> > >
> > > address name
> > > -------- ----
> > >
> > >
> > > 0000d020 _memcpy
> > > UNDEFED _our_task
> > > 0000cda4 _our_task__Fv
> > > 0000f52c _rtdx_buffer_state
> > > 0000f54c _rtdx_mon_state
> > Does "_sem" show in the .map file? If not then you
> > are looking at the wrong
> > lab1cfg.obj file.
> > -Jeff
> > --- On Tue, 9/23/08, Jeff Brower wrote:
> > From: Jeff Brower
> > Subject: Re: [c6x] tasks setting in
> > DSP/BIOS-URGENT!!!!!
> > To: "Balasubramanian Vaidhyanathan"
> > Cc: c...
> > Date: Tuesday, September 23, 2008, 12:44 PM
> > Balasubramanian-
> > > Infact below is the error
> > >
> > > undefined first referenced
> > > symbol in file
> > > --------- ----------------
> > > _our_task
> > C:\CCStudio_v3.1\MyProjects\lab1\Debug\lab1cfg.obj
> > Richard points out that lab1cfg.obj probably didn't
> > compile. Do you see a
> > lab1cfg.obj file? Does it have today's date and
> > time? Is lab1cfg.c listed
> > in your
> > source view window?
> > -Jeff
> > --- On Tue, 9/23/08, Jeff Brower wrote:
> > From: Jeff Brower
> > Subject: Re: [c6x] tasks setting in
> > DSP/BIOS-URGENT!!!!!
> > To: "Balasubramanian Vaidhyanathan"
> >
> > Cc: c...
> > Date: Tuesday, September 23, 2008, 11:54 AM
> > Balasubramanian-
> > > I am trying to figure out how to set up tasks in
> > DSP/BIOS. My
> > code is
> > as below
> > >
> > >
> > > #include
> > > #include
> > > #include
> > > #include
> > > #include
> > > #include
> > > #include
> > > #include "lab1cfg.h"
> > >
> > > Uns counts_per_us;
> > > void our_task();
> > > extern LOG_Obj trace;
> > >
> > > /* ======== main ======== */
> > > int main()
> > > {
> > > LOG_printf(&trace, "Slice example started!");
> > > counts_per_us = CLK_countspms() / 1000;
> > > SEM_post(&sem);
> > > return;
> > > }
> > > void our_task()
> > > {
> > > while(1)
> > > {
> > > SEM_pend(&sem,SYS_FOREVER);
> > > LOG_printf(&trace,"Called once \n");
> > > SEM_pend(&sem,SYS_FOREVER);
> > > LOG_printf(&trace,"called twice \n");
> > > }
> > > }
> > >
> > >
> > > I opened to the cdb file and opened the TSK under
> > Scheduling and
> > inserted
> > > a task TSK0 and connected it to function
> > _our_task and 0 arguments
> > and
> > > priority 1. Now when i compile this code it says
> > it cannot link this
> > > function... What am i doing wrong... This is
> > urgent... can you
> > please
> > > help me in compling this code.....
> > What is the exact error message?
> > -Jeff