Hi all,

I don't know why when I try to enable multi-binFS and XIP, the return
value of GetTickCount() is always a constant. Can anyone please tell
what is the final OAL function that "GetTickCount()" will call finally?
Thanks for the infomation.

Regards,
Nicholas

Re: What is the corresponding function calls for "GetTickCount()" by K

K
Mon Nov 27 22:41:42 CST 2006

The GetTickCount is implemented in kernel (OAL) known as the SC_GetTickCount
function.
<eg_yskaa@yahoo.com.hk>
???????:1164685574.828026.48810@14g2000cws.googlegroups.com...
> Hi all,
>
> I don't know why when I try to enable multi-binFS and XIP, the return
> value of GetTickCount() is always a constant. Can anyone please tell
> what is the final OAL function that "GetTickCount()" will call finally?
> Thanks for the infomation.
>
> Regards,
> Nicholas
>



Re: What is the corresponding function calls for "GetTickCount()" by eg_yskaa

eg_yskaa
Tue Nov 28 02:54:20 CST 2006

Hi K.S. Huang

Thanks for the reply! I also tried to add code there. I found out that
if i ouput the value in the function "SC_GetTickCount"(that is the
value CurMSec), it did change. But if i output the value
GetTickCount(), the value is a constant. Do you have any idea about
that? Thanks.

Regards,
Nicholas


K. S. Huang wrote:
> The GetTickCount is implemented in kernel (OAL) known as the SC_GetTickCount
> function.
> <eg_yskaa@yahoo.com.hk>
> ???????:1164685574.828026.48810@14g2000cws.googlegroups.com...
> > Hi all,
> >
> > I don't know why when I try to enable multi-binFS and XIP, the return
> > value of GetTickCount() is always a constant. Can anyone please tell
> > what is the final OAL function that "GetTickCount()" will call finally?
> > Thanks for the infomation.
> >
> > Regards,
> > Nicholas
> >


Re: What is the corresponding function calls for "GetTickCount()" by K

K
Tue Nov 28 21:19:17 CST 2006

It is quite interested...
Have you try to build a simple OS Image without BINFS support to see if the
GetTickCount could work well or not.
It seems that with unknow reason the coredll might be corrupted or something
wrong so that the GetTickCount API will not redirect to kernel.

<eg_yskaa@yahoo.com.hk>
???????:1164704060.609274.320240@l12g2000cwl.googlegroups.com...
> Hi K.S. Huang
>
> Thanks for the reply! I also tried to add code there. I found out that
> if i ouput the value in the function "SC_GetTickCount"(that is the
> value CurMSec), it did change. But if i output the value
> GetTickCount(), the value is a constant. Do you have any idea about
> that? Thanks.
>
> Regards,
> Nicholas
>
>
> K. S. Huang wrote:
>> The GetTickCount is implemented in kernel (OAL) known as the
>> SC_GetTickCount
>> function.
>> <eg_yskaa@yahoo.com.hk>
>> ???????:1164685574.828026.48810@14g2000cws.googlegroups.com...
>> > Hi all,
>> >
>> > I don't know why when I try to enable multi-binFS and XIP, the return
>> > value of GetTickCount() is always a constant. Can anyone please tell
>> > what is the final OAL function that "GetTickCount()" will call finally?
>> > Thanks for the infomation.
>> >
>> > Regards,
>> > Nicholas
>> >
>



Re: What is the corresponding function calls for "GetTickCount()" by eg_yskaa

eg_yskaa
Wed Nov 29 21:58:25 CST 2006

Hi K.S. Huang,

Yes, I did try to build without BINFS, not define "IMGMULTIXIP" and
"IMGMULTIBIN"(that is the original one) and the system can boot-up
correctly. I tried to switch to debug build and the problem seems to be
resolved (The reason why I guess GetTickCount will call SC_GetTickCount
is because I try to step GetTickCount and it passes some assembly lines
then jump to SC_GetTickCount).

Another observation is that if I enable XIP but physically disconnect
Nand flash, the system can boot-up and run correctly.

Do you have any advice on this problem? Thanks for your help.

Regards
Nicholas

K. S. Huang wrote:
> It is quite interested...
> Have you try to build a simple OS Image without BINFS support to see if the
> GetTickCount could work well or not.
> It seems that with unknow reason the coredll might be corrupted or something
> wrong so that the GetTickCount API will not redirect to kernel.
>
> <eg_yskaa@yahoo.com.hk>
> ???????:1164704060.609274.320240@l12g2000cwl.googlegroups.com...
> > Hi K.S. Huang
> >
> > Thanks for the reply! I also tried to add code there. I found out that
> > if i ouput the value in the function "SC_GetTickCount"(that is the
> > value CurMSec), it did change. But if i output the value
> > GetTickCount(), the value is a constant. Do you have any idea about
> > that? Thanks.
> >
> > Regards,
> > Nicholas
> >
> >
> > K. S. Huang wrote:
> >> The GetTickCount is implemented in kernel (OAL) known as the
> >> SC_GetTickCount
> >> function.
> >> <eg_yskaa@yahoo.com.hk>
> >> ???????:1164685574.828026.48810@14g2000cws.googlegroups.com...
> >> > Hi all,
> >> >
> >> > I don't know why when I try to enable multi-binFS and XIP, the return
> >> > value of GetTickCount() is always a constant. Can anyone please tell
> >> > what is the final OAL function that "GetTickCount()" will call finally?
> >> > Thanks for the infomation.
> >> >
> >> > Regards,
> >> > Nicholas
> >> >
> >


Re: What is the corresponding function calls for "GetTickCount()" by Geoff

Geoff
Thu Nov 30 00:17:11 CST 2006

CurMSec probably get updated by the tick interrupt. The act of accessing
your nand flash seems to be stalling/preventing that interrupt.

Causes could be
- incorrectly mapped interrupts
- The bus hanging on a bad address in the nand
- the nand driver going into a very tight loop that prevent CurMSec
getting updated

Geoff
--

eg_yskaa@yahoo.com.hk wrote:
> Hi K.S. Huang,
>
> Yes, I did try to build without BINFS, not define "IMGMULTIXIP" and
> "IMGMULTIBIN"(that is the original one) and the system can boot-up
> correctly. I tried to switch to debug build and the problem seems to be
> resolved (The reason why I guess GetTickCount will call SC_GetTickCount
> is because I try to step GetTickCount and it passes some assembly lines
> then jump to SC_GetTickCount).
>
> Another observation is that if I enable XIP but physically disconnect
> Nand flash, the system can boot-up and run correctly.
>
> Do you have any advice on this problem? Thanks for your help.
>
> Regards
> Nicholas
>

Re: What is the corresponding function calls for "GetTickCount()" by eg_yskaa

eg_yskaa
Thu Nov 30 02:00:08 CST 2006

Hi Geoff,

Thanks for the reply. If it is the case, can you have any suggestion on
debugging this problem? Since it is ok under Debug build but not
release build. The only resource I have is the UART. I tried to put
RETAIL message in the Nand flash driver, but suprisingly the "stall"
point is in the keyboard driver (In which a while loop waiting for an
update count by GetTickCount). Any adivce is appreciated.

Regards,
Nicholas

Geoff wrote:
> CurMSec probably get updated by the tick interrupt. The act of accessing
> your nand flash seems to be stalling/preventing that interrupt.
>
> Causes could be
> - incorrectly mapped interrupts
> - The bus hanging on a bad address in the nand
> - the nand driver going into a very tight loop that prevent CurMSec
> getting updated
>
> Geoff
> --
>
> eg_yskaa@yahoo.com.hk wrote:
> > Hi K.S. Huang,
> >
> > Yes, I did try to build without BINFS, not define "IMGMULTIXIP" and
> > "IMGMULTIBIN"(that is the original one) and the system can boot-up
> > correctly. I tried to switch to debug build and the problem seems to be
> > resolved (The reason why I guess GetTickCount will call SC_GetTickCount
> > is because I try to step GetTickCount and it passes some assembly lines
> > then jump to SC_GetTickCount).
> >
> > Another observation is that if I enable XIP but physically disconnect
> > Nand flash, the system can boot-up and run correctly.
> >
> > Do you have any advice on this problem? Thanks for your help.
> >
> > Regards
> > Nicholas
> >


Re: What is the corresponding function calls for "GetTickCount()" by Steve

Steve
Thu Nov 30 08:49:42 CST 2006

>Since it is ok under Debug build but not
>release build.
Carefully scan your flash code for #ifdef DEBUG/#endif and make sure you
don't have any code in the wrong section like entering or leaving a critical
section only in the DEBUG path, etc...

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com
smaillet at EmbeddedFusion dot com



Re: What is the corresponding function calls for "GetTickCount()" by eg_yskaa

eg_yskaa
Thu Nov 30 19:44:16 CST 2006

Hi Steve,

Thanks for the reply. I tried to scan through the code and it seems
that the #ifdef DEBUG #endif section is only used to ouput debug
message. Thanks for the suggestion though!

Regards,
Nicholas

Steve Maillet (eMVP) wrote:
> >Since it is ok under Debug build but not
> >release build.
> Carefully scan your flash code for #ifdef DEBUG/#endif and make sure you
> don't have any code in the wrong section like entering or leaving a critical
> section only in the DEBUG path, etc...
>
> --
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
> smaillet at EmbeddedFusion dot com


Re: What is the corresponding function calls for "GetTickCount()" by K

K
Thu Nov 30 22:22:15 CST 2006

Have you tried to step-in GetTickCount API call on retail build, since the
code was optimized, you may want to enable the disassembly for the source
code window and instruction by instructionn when tracing the code to see if
the GetTickCount is going wrong in the thunk code or someehere else.
BTW, how do you define your multiple XIP region in your BIB files
(config.bib and platform.bib), make sure there are no two DLLs are assigned
to the same virtual space.

<eg_yskaa@yahoo.com.hk>
???????:1164937456.785707.257700@16g2000cwy.googlegroups.com...
> Hi Steve,
>
> Thanks for the reply. I tried to scan through the code and it seems
> that the #ifdef DEBUG #endif section is only used to ouput debug
> message. Thanks for the suggestion though!
>
> Regards,
> Nicholas
>
> Steve Maillet (eMVP) wrote:
>> >Since it is ok under Debug build but not
>> >release build.
>> Carefully scan your flash code for #ifdef DEBUG/#endif and make sure you
>> don't have any code in the wrong section like entering or leaving a
>> critical
>> section only in the DEBUG path, etc...
>>
>> --
>> Steve Maillet
>> EmbeddedFusion
>> www.EmbeddedFusion.com
>> smaillet at EmbeddedFusion dot com
>



Re: What is the corresponding function calls for "GetTickCount()" by eg_yskaa

eg_yskaa
Fri Dec 01 02:58:59 CST 2006

Hi K.S. Huang,

Do you mean release build for the retail build? Can you teach me how to
step retail build? Since I can only step for debug build. I have
defined two XIP region in config.bib but I put all the dll into 1
single region already. Thank you for your kind help.

Regards,
Nicholas

K. S. Huang wrote:
> Have you tried to step-in GetTickCount API call on retail build, since the
> code was optimized, you may want to enable the disassembly for the source
> code window and instruction by instructionn when tracing the code to see if
> the GetTickCount is going wrong in the thunk code or someehere else.
> BTW, how do you define your multiple XIP region in your BIB files
> (config.bib and platform.bib), make sure there are no two DLLs are assigned
> to the same virtual space.
>
> <eg_yskaa@yahoo.com.hk>
> ???????:1164937456.785707.257700@16g2000cwy.googlegroups.com...
> > Hi Steve,
> >
> > Thanks for the reply. I tried to scan through the code and it seems
> > that the #ifdef DEBUG #endif section is only used to ouput debug
> > message. Thanks for the suggestion though!
> >
> > Regards,
> > Nicholas
> >
> > Steve Maillet (eMVP) wrote:
> >> >Since it is ok under Debug build but not
> >> >release build.
> >> Carefully scan your flash code for #ifdef DEBUG/#endif and make sure you
> >> don't have any code in the wrong section like entering or leaving a
> >> critical
> >> section only in the DEBUG path, etc...
> >>
> >> --
> >> Steve Maillet
> >> EmbeddedFusion
> >> www.EmbeddedFusion.com
> >> smaillet at EmbeddedFusion dot com
> >


Re: What is the corresponding function calls for "GetTickCount()" by K

K
Fri Dec 01 03:33:05 CST 2006

You could still enable debugger in RETAIL mode OS Image, just check the
Enable Debuger and KITL option in your Work Space setting or
set IMGNOKITL=
set IMGNODEBUGGER=
when MAKEIMG, you could get a RETAIL mode OS Image with kernel debugger and
KITL conectivity.

<eg_yskaa@yahoo.com.hk>
???????:1164963539.599760.40010@80g2000cwy.googlegroups.com...
> Hi K.S. Huang,
>
> Do you mean release build for the retail build? Can you teach me how to
> step retail build? Since I can only step for debug build. I have
> defined two XIP region in config.bib but I put all the dll into 1
> single region already. Thank you for your kind help.
>
> Regards,
> Nicholas
>



Re: What is the corresponding function calls for "GetTickCount()" by eg_yskaa

eg_yskaa
Sun Dec 03 19:29:43 CST 2006

Hi K.S. Huang,

Thanks. That is a very valuable information and I will have a try
today. Really thanks!

Regards,
Nicholas

K. S. Huang wrote:
> You could still enable debugger in RETAIL mode OS Image, just check the
> Enable Debuger and KITL option in your Work Space setting or
> set IMGNOKITL=
> set IMGNODEBUGGER=
> when MAKEIMG, you could get a RETAIL mode OS Image with kernel debugger and
> KITL conectivity.
>
> <eg_yskaa@yahoo.com.hk>
> ???????:1164963539.599760.40010@80g2000cwy.googlegroups.com...
> > Hi K.S. Huang,
> >
> > Do you mean release build for the retail build? Can you teach me how to
> > step retail build? Since I can only step for debug build. I have
> > defined two XIP region in config.bib but I put all the dll into 1
> > single region already. Thank you for your kind help.
> >
> > Regards,
> > Nicholas
> >


Re: What is the corresponding function calls for "GetTickCount()" by eg_yskaa

eg_yskaa
Mon Dec 04 21:20:06 CST 2006

Hi K.S. Huang,

I tried to enable debugger and KITL, and it seems that the problem
resolved. But when I try to boot from Nand flash (that means the image
is not downloaded via ethernet), the problem still exists. (Halting
exactly the same point, it seems the count didn't get update). Is there
any way such that I can hook up the debugger when booting from Nand
flash? Thanks for your advice.

Regards
Nicholas

eg_yskaa@yahoo.com.hk wrote:
> Hi K.S. Huang,
>
> Thanks. That is a very valuable information and I will have a try
> today. Really thanks!
>
> Regards,
> Nicholas
>
> K. S. Huang wrote:
> > You could still enable debugger in RETAIL mode OS Image, just check the
> > Enable Debuger and KITL option in your Work Space setting or
> > set IMGNOKITL=
> > set IMGNODEBUGGER=
> > when MAKEIMG, you could get a RETAIL mode OS Image with kernel debugger and
> > KITL conectivity.
> >
> > <eg_yskaa@yahoo.com.hk>
> > ???????:1164963539.599760.40010@80g2000cwy.googlegroups.com...
> > > Hi K.S. Huang,
> > >
> > > Do you mean release build for the retail build? Can you teach me how to
> > > step retail build? Since I can only step for debug build. I have
> > > defined two XIP region in config.bib but I put all the dll into 1
> > > single region already. Thank you for your kind help.
> > >
> > > Regards,
> > > Nicholas
> > >


Re: What is the corresponding function calls for "GetTickCount()" by Geoff

Geoff
Mon Dec 04 21:48:20 CST 2006

Enable active KITL then hook up your debugger as normal. You may want to
hard code the setting while you are debugging, look for OALKitlInit, the
code should be around there someplace.

Geoff
-


Re: What is the corresponding function calls for "GetTickCount()" by eg_yskaa

eg_yskaa
Tue Dec 05 00:36:22 CST 2006

Hi Geoff,

Sorry I don't get what you mean. You mean I enable active KITL, then
press "Attach device" when booting from Nand flash? Thanks.

Regards,
Nicholas

Geoff wrote:
> Enable active KITL then hook up your debugger as normal. You may want to
> hard code the setting while you are debugging, look for OALKitlInit, the
> code should be around there someplace.
>
> Geoff
> -


Re: What is the corresponding function calls for "GetTickCount()" by K

K
Tue Dec 05 04:54:01 CST 2006

Frakly speaking, that is what you need to do, and make sure the IMAGE you
program into Flash is KITL enabled by default.
<eg_yskaa@yahoo.com.hk>
???????:1165300581.980838.323560@80g2000cwy.googlegroups.com...
> Hi Geoff,
>
> Sorry I don't get what you mean. You mean I enable active KITL, then
> press "Attach device" when booting from Nand flash? Thanks.
>
> Regards,
> Nicholas
>
> Geoff wrote:
>> Enable active KITL then hook up your debugger as normal. You may want to
>> hard code the setting while you are debugging, look for OALKitlInit, the
>> code should be around there someplace.
>>
>> Geoff
>> -
>



Re: What is the corresponding function calls for "GetTickCount()" by Geoff

Geoff
Tue Dec 05 12:35:39 CST 2006

You need to read the Platform Builder documentation about KITL so that
you understand what it is and how it connects.

Read here:
Bringing Up a Hardware Platform > Developing a Board Support Package >

hre:
"Developing an OEM Adaptation Layer > OEM Adaptation Layer > Kernel
Independent Transport Layer"

and here

"Debugging and Testing > Tools for Debugging and Testing > Core
Connectivity > Kernel Connectivity"


- Search in your code for "OAL_KITL_ARGS"
- In this structure is a flags field, ensure that
OAL_KITL_FLAGS_ENABLED is set, maybe OAL_KITL_FLAGS_DHCP too but not
OAL_KITL_FLAGS_PASSIVE.
- Ensure that OALKitlInit is called

It is entirely possible that you can just set this from platform builder
if you eboot supports booting from nand by checking the appropriate
options in the connectivity dialog.

Geoff
--


eg_yskaa@yahoo.com.hk wrote:
> Hi Geoff,
>
> Sorry I don't get what you mean. You mean I enable active KITL, then
> press "Attach device" when booting from Nand flash? Thanks.
>
> Regards,
> Nicholas
>
> Geoff wrote:
>> Enable active KITL then hook up your debugger as normal. You may want to
>> hard code the setting while you are debugging, look for OALKitlInit, the
>> code should be around there someplace.
>>
>> Geoff
>> -
>

Re: What is the corresponding function calls for "GetTickCount()" by eg_yskaa

eg_yskaa
Tue Dec 05 21:21:37 CST 2006

Hi Geoff,

Thanks for your useful information. I shall have a look. Thanks!

Regards,
Nicholas

Geoff wrote:
> You need to read the Platform Builder documentation about KITL so that
> you understand what it is and how it connects.
>
> Read here:
> Bringing Up a Hardware Platform > Developing a Board Support Package >
>
> hre:
> "Developing an OEM Adaptation Layer > OEM Adaptation Layer > Kernel
> Independent Transport Layer"
>
> and here
>
> "Debugging and Testing > Tools for Debugging and Testing > Core
> Connectivity > Kernel Connectivity"
>
>
> - Search in your code for "OAL_KITL_ARGS"
> - In this structure is a flags field, ensure that
> OAL_KITL_FLAGS_ENABLED is set, maybe OAL_KITL_FLAGS_DHCP too but not
> OAL_KITL_FLAGS_PASSIVE.
> - Ensure that OALKitlInit is called
>
> It is entirely possible that you can just set this from platform builder
> if you eboot supports booting from nand by checking the appropriate
> options in the connectivity dialog.
>
> Geoff
> --
>
>
> eg_yskaa@yahoo.com.hk wrote:
> > Hi Geoff,
> >
> > Sorry I don't get what you mean. You mean I enable active KITL, then
> > press "Attach device" when booting from Nand flash? Thanks.
> >
> > Regards,
> > Nicholas
> >
> > Geoff wrote:
> >> Enable active KITL then hook up your debugger as normal. You may want to
> >> hard code the setting while you are debugging, look for OALKitlInit, the
> >> code should be around there someplace.
> >>
> >> Geoff
> >> -
> >