Sign in

username:

password:



Not a member?

Search adsp



Search tips

Subscribe to adsp



adsp by Keywords

AD1819 | AD7332 | ADSP-2106 | ADSP-21060 | ADSP-21065L | ADSP-2116 | ADSP-21160M | ADSP-2181 | ADSP-218x | ADSP-219 | ADSP-2199 | ADSP219 | BF531 | BF532 | BF533 | BF535 | Blackfin | FFT | JTAG | LDF | SDRAM | SHARC | SPORT | UART | VDSP++ | VisualDSP

Ads

Discussion Groups

Discussion Groups | Analog Devices DSPs | VDK - BF537 strange problem

Technical discussions related to Analog Devices DSPs (including Blackfin, TigerSHARC, SHARC and ADSP-21xx DSPs).

  

Post a new Thread

VDK - BF537 strange problem - vini...@gmail.com - Aug 19 15:53:02 2007



Hi,

I had faced at least with a strange problem, that I will try to explain:

I have a big project with many threads, and in the last few days, I start to cut some parts of
the code, for a new client.
Today I have 3 threads running, and one of the has a TCP/IP stack, with a routine that you can
register a external callback funcional like this :

register_app(callback_procedure, conection_handle);

But the problem is when I compile with this funcion, the VDK doesn't start, it get's a
_unknown_exception, when I comment this line, the project starts ok. ( in both cases the line
are not executed ) 

So I start to investigate, and this points change some results:
1 - If I change the mode of uninitializated global variables to external (the default is
zeroblanked ) the project compile well.
2 - Some times I change the PCB, compile and build the same code ( as excecution mode - and the
problem didn't occur. )
3 - I identify the problem as this :
When the VDK starts... it pass for this parts : 
start
no_cplbs
supervisor_mode
and in the first CALL(P1)
it goes to __ctorloop 
at this procedure, the code use a ctortable, that has entrys for code to be initialized.
When the problem occurs, the second item at this table is different from 0x00000000 and always
a address from the TCP/IP code.
When everything goes ok, the second items at the table is a 0x00000000 adress and the
__ctorloop has a verification for this value, as this :

___ctorloop
LINK 0x0;
[ --SP ] = (R7:6 , P5:5 );
P5.L = 0x3EC0; // ctor table address.
P5.H = 0xFF80;
P0 = [P5 + 0x0 ];
SP += 12;
R0 = [ P0 + 0x4 ]; // get the second item at the table
CC = R0 == 0;
IF CC JUMP 28; // hear the difference, that the same code has the item as 0, everything is ok,
and when is different, in a few steps, will occur the unknown_exception.

I don't know if this description is enough, but at now I didn't find many things about the ctor
and all that I foung is that the VDK will use it automatic.

So if anyone can help me, because at now I'm using the VDK option of treat uninitialized memory
as extern, but I don't know, why, neather if it can cause anothers problens to my code.

Excuse-me for my english....

Thanks a lot

Vinicius Marques De Bernardi



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )

Re: VDK - BF537 strange problem - vini...@gmail.com - Aug 20 8:53:50 2007

Hi Folks,

I had found the problem the fact is one thread named ( modem with sources files named
th_modem.c and th_modem ) and my modem driver has the name ( modem.h and modem.c ) and here is
the problem the source file, with the same name of the thread.

Thanks and regards,

Vinicius Marques

Hi,
>
>I had faced at least with a strange problem, that I will try to explain:
>
>I have a big project with many threads, and in the last few days, I start to cut some parts
of the code, for a new client.
>Today I have 3 threads running, and one of the has a TCP/IP stack, with a routine that you
can register a external callback funcional like this :
>
>register_app(callback_procedure, conection_handle);
>
>But the problem is when I compile with this funcion, the VDK doesn't start, it get's a
_unknown_exception, when I comment this line, the project starts ok. ( in both cases the line
are not executed ) 
>
>So I start to investigate, and this points change some results:
>1 - If I change the mode of uninitializated global variables to external (the default is
zeroblanked ) the project compile well.
>2 - Some times I change the PCB, compile and build the same code ( as excecution mode - and
the problem didn't occur. )
>3 - I identify the problem as this :
>When the VDK starts... it pass for this parts : 
>start
>no_cplbs
>supervisor_mode
>and in the first CALL(P1)
>it goes to __ctorloop 
>at this procedure, the code use a ctortable, that has entrys for code to be initialized.
>When the problem occurs, the second item at this table is different from 0x00000000 and
always a address from the TCP/IP code.
>When everything goes ok, the second items at the table is a 0x00000000 adress and the
__ctorloop has a verification for this value, as this :
>
>___ctorloop
>LINK 0x0;
>[ --SP ] = (R7:6 , P5:5 );
>P5.L = 0x3EC0; // ctor table address.
>P5.H = 0xFF80;
>P0 = [P5 + 0x0 ];
>SP += 12;
>R0 = [ P0 + 0x4 ]; // get the second item at the table
>CC = R0 == 0;
>IF CC JUMP 28; // hear the difference, that the same code has the item as 0, everything is
ok, and when is different, in a few steps, will occur the unknown_exception.
>
>I don't know if this description is enough, but at now I didn't find many things about the
ctor and all that I foung is that the VDK will use it automatic.
>
>So if anyone can help me, because at now I'm using the VDK option of treat uninitialized
memory as extern, but I don't know, why, neather if it can cause anothers problens to my code.
>
>Excuse-me for my english....
>
>Thanks a lot
>
>Vinicius Marques De Bernardi



(You need to be a member of adsp -- send a blank email to adsp-subscribe@yahoogroups.com )