RE: [uClinux-dev] Programming in RTLinux

From: David Beamonte (dbeamonte@intelnet.es)
Date: Thu Mar 22 2001 - 08:51:34 EST


Hi,

I finally found the problem (i hope so, at least), it's nothing related to the RT extensions. If I download the image to the flash on the board via the ethernet (with the flashloader) the filesystem seems to be corrupted when the image reaches certain size. However, downloading the image via the serial port in the uCbootstrap, it appears to be right. Don't ask me why, but that seems to be the problem. I will have to wait 6 minutes instead of 2 when I want to commit changes to the flash.

Thanks anyway, Phil,

David Beamonte

-----Mensaje original-----
De:	Phil Wilshire [SMTP:philw@lineo.com]
Enviado el:	miércoles, 21 de marzo de 2001 16:08
Para:	uclinux-dev@uClinux.org
Asunto:	Re: [uClinux-dev] Programming in RTLinux

David 

See inline

> 
> Hi,
> 
> Thanks Phil, I have increased the fixed_stack[] size from 4k to 10k and 30k and changed my tasks definition from static allocation to dynamic,

No keep it static.

> and reduced the RT-FIFOs size, but it didn't work neither... don't you know any other limitation >or problem that could cause my corruption of the filesystem? 

The only thing I can think of is a tiny code error.
look out for the odd presence or absence of an "&"

Disable just about everything until you get something working and then
build up from that point.
You may want to use Bernhard's himemloader to speed up development.

http://www.rcs.ei.tum.de/~kuhn/uclinux/himemloader-patches.tgz
   you will have to hand patch on top of the RT patches.

patch-2.0.38.1pre7-supervisor
  trap #10 implementation for setting supervisor mode
  in user space. Include asm/system.h that provides
  the function supervisor() to make things easier.

patch-2.0.38.1pre7-supervisor-himem
  apply this patch *after* applying the supervisor-patch
  to limit the Memory to 6 Mbyte to get 2 Mbyte to
  emulate some ROM. An option "Kernel executes from HIMEM"
  is added in the "platform dependant setup".

patch-boottools-himemloader
  This patch adds the "himemloader" command to the boottools
  directory.

patch-deftemplate.sh-himemloader
  This patch just adjusts the deftemplate.sh so that
  the himemloader is also copied to the romdisk when typing
  "make" within the project directory.


good luck
  Phil


I would swear that there is no pointer that gets out of its limit, in
fact, the main program does nothing, because I have inhabilitated the
calling of all routines, although the definitions of the functions do
exist... it must be a problem of the allocation of memory or
something...
> 
> David Beamonte
> 
> -----Mensaje original-----
> De:     Phil Wilshire [SMTP:philw@lineo.com]
> Enviado el:     miércoles, 21 de marzo de 2001 12:03
> Para:   uclinux-dev@uClinux.org
> Asunto: Re: [uClinux-dev] Programming in RTLinux
> 
> Hi
> I suspect that you are running out of stack...
> The rt task structure has a fixed stack size.
> You may want to change ( increase ) this..
> This code is very experimental you are only the second or third to use
> it.
> Regards
>   Phil Wilshire
> 
> David Beamonte wrote:
> >
> > Hi all,
> >
> > I am using the 1pre72 RT extensions for uClinux on my 68EZ328 board, and I am experiencing several problems. At first, while doing small examples in order to test interrupts, RTFifos, latency of the tasks, and so on, everything worked fine. Now, I have started with the real program that mus run on the board, that of course is a little bit longer (not so much, anyway...).
> >
> > My problem is that there is something in the code that overwrites the romfs and corrupts the ROM filsystem. I don't know if there is any limitation in the size of code that can run in the RT scheme, or if there is any special caution to take into account when programming. I have examined all my struct and union definitions, as well as the scope of pointers, but i think everything is all right. The thing that puzzles me is that when I shorten de code by removing functions, there is a moment when it runs properly, don't know if there is a problem with any function that i removed or if the problem is of the code size itself...

> >
> > I don't know if there are many people working with the RT extensions, and if there is anyone who has experienced problems like this one, but hope anyone can help me.
> >
> > Thanks,
> >
> > David B
> > This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/
> This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/
> 
>   ------------------------------------------------------------------------
> 
>    Part 1.2    Type: application/ms-tnef
>            Encoding: base64
This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/


This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/

This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:19:36 EDT