[En-Nut-Discussion] En-Nut-Discussion Digest, Vol 56, Issue 7
steve
fishbeetle at googlemail.com
Thu Jun 12 14:05:42 CEST 2008
Hello again,
The problem was stack overflow - IJG uses 2-3K of stack space and NutOs
allocates only 768B for the main() thread. I put the code in a new thread
with 3K of stack space and the problem went away.
Maybe this will be helpful to someone else.
Best Regards,
Steve.
At 11:00 12/06/2008, you wrote:
>Hi,
>
> I'm trying to use Ethernut (on a SAM7X256-EK) with IJG's jpeg
> decompression code (ijg.org). It kind of works but the process of
> decompressing a very small 16x16 pixel test image, which does generate
> the correct output, screws up NutNet in such a way that any subsequent
> call to NutUdpReceiveFrom or NutUdpSendTo immediately crashes
> the processor without an error message. At the point just prior
> to crashing NutHeapAvailable() reports 27KB of free memory.
>
> I wonder if anyone else has attempted to use the IJG code or can
> give me some pointers on what might be going wrong. I'm new to
> Ethernut and the Yagarto Tools and am inexperienced in C
> programming so please be gentle.
>
> Your help is much appreciated.
>
>Best Regards,
>Steve.
>
>
>
>------------------------------
>
>Message: 2
>Date: Thu, 12 Jun 2008 10:02:58 +1000
>From: Curtis Maloney <cmaloney at cardgate.net>
>Subject: Re: [En-Nut-Discussion] IJG jpeg decompression problem
>To: "Ethernut User Chat (English)" <en-nut-discussion at egnite.de>
>Message-ID: <485067B2.1060708 at cardgate.net>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
>steve wrote:
> > Hi,
> >
> > I'm trying to use Ethernut (on a SAM7X256-EK) with IJG's jpeg
> > decompression code (ijg.org). It kind of works but the process of
> > decompressing a very small 16x16 pixel test image, which does generate
> > the correct output, screws up NutNet in such a way that any subsequent
> > call to NutUdpReceiveFrom or NutUdpSendTo immediately crashes
> > the processor without an error message. At the point just prior
> > to crashing NutHeapAvailable() reports 27KB of free memory.
> >
> > I wonder if anyone else has attempted to use the IJG code or can
> > give me some pointers on what might be going wrong. I'm new to
> > Ethernut and the Yagarto Tools and am inexperienced in C
> > programming so please be gentle.
>
>We used it for another project, on a different board, but what I can tell
>you is it's highly inefficient IFF you have the whole JPEG on hand to work
>from. It's written to deal with slow incoming streams, being fed the data
>as they arrive.
>
>It would be much simpler, lighter code if it knew it had all the data on
>hand. And, I dare say, would do a lot less messing about with de/allocating
>memory.
>
>--
>Curtis Maloney
>cmaloney at cardgate.net
>
>
>
>------------------------------
>
>_______________________________________________
>http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>
>
>End of En-Nut-Discussion Digest, Vol 56, Issue 7
>************************************************
More information about the En-Nut-Discussion
mailing list