public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Freeze with big const struct/array
@ 2012-01-12 13:48 gcembed
  2012-01-18 12:05 ` Lange, Bert
  2012-05-30  9:30 ` [ECOS] " gcembed
  0 siblings, 2 replies; 3+ messages in thread
From: gcembed @ 2012-01-12 13:48 UTC (permalink / raw)
  To: ecos-discuss

Hello,
I am using ecos (20050912 with patches from Freescales).
I have generated a const struct with an image from GIMP (with "c code 
source" filter) . Its size is 34.981 bytes (when size is 40.189 bytes it 
is also working). The board boots correctly and I can display image data 
to LCD.
If I increase image size, the structure grows up to 64.909 bytes. In 
this case, board does not boot (no ++, nothing).

Here is the structure declaration (biglogo.h) of working image :
static const struct {
   unsigned int   width;
   unsigned int   height;
   unsigned int   bytes_per_pixel; /* 3:RGB, 4:RGBA */
   unsigned char  pixel_data[94 * 124 * 3 + 1];
} biglogo = {
   94, 124, 3,
   /* All RGB data */
}

and not working
static const struct {
   unsigned int   width;
   unsigned int   height;
   unsigned int   bytes_per_pixel; /* 3:RGB, 4:RGBA */
   unsigned char  pixel_data[128 * 169 * 3 + 1];
} biglogo = {
   128, 169, 3,
   /* All RGB data */
}


8 blocks of 128KByte are erased in Flash before writing new bin file and 
verifying is also correct.

When it it working, bin file (complete builded ecos binary) has a size 
of 250.668 bytes. When it is not working, bin file has a size of 310.524 
bytes.

Is there some values in configurations files (cdl, ecm, db) where a 
memory limit is set ?
Thanks a lot for your help.
Best regards,
Gaëtan.


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [ECOS] Freeze with big const struct/array
  2012-01-12 13:48 [ECOS] Freeze with big const struct/array gcembed
@ 2012-01-18 12:05 ` Lange, Bert
  2012-05-30  9:30 ` [ECOS] " gcembed
  1 sibling, 0 replies; 3+ messages in thread
From: Lange, Bert @ 2012-01-18 12:05 UTC (permalink / raw)
  To: gcembed, ecos-discuss

Hi,

> I am using ecos (20050912 with patches from Freescales).
Which controller, which platform?

> If I increase image size, the structure grows up to 64.909 bytes. In
> this case, board does not boot (no ++, nothing).
Maybe unsigned int is only 16 bit width?

Try to split you image in two halfes. So you can see if the problem in
image size or in the flash size.


regrads,
Bert









--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [ECOS] Re: Freeze with big const struct/array
  2012-01-12 13:48 [ECOS] Freeze with big const struct/array gcembed
  2012-01-18 12:05 ` Lange, Bert
@ 2012-05-30  9:30 ` gcembed
  1 sibling, 0 replies; 3+ messages in thread
From: gcembed @ 2012-05-30  9:30 UTC (permalink / raw)
  To: ecos-discuss

Hello,
Here is the answer to my question :
Once you have compiled redboot, get size of install/bin/redboot.bin . In 
my case, it is 380208 bytes (0x0005CD30). There is two constants to 
adjust to higher value than the binary file size.

1) packages/hal/arm/mx27/myboard/current/include/fsl_board.h
#define REDBOOT_IMAGE_SIZE          0x60000

2) packages/hal/arm/mx27/myboard/current/misc/redboot_ROMRAM.ecm
cdl_option CYGBLD_REDBOOT_MIN_IMAGE_SIZE {
     inferred_value 0x00060000
};

REDBOOT_IMAGE_SIZE and CYGBLD_REDBOOT_MIN_IMAGE_SIZE must be set with 
the same value.
Best regards,
Gaëtan.

On 01/12/2012 02:45 PM, gcembed wrote:
> Hello,
> I am using ecos (20050912 with patches from Freescales).
> I have generated a const struct with an image from GIMP (with "c code
> source" filter) . Its size is 34.981 bytes (when size is 40.189 bytes it
> is also working). The board boots correctly and I can display image data
> to LCD.
> If I increase image size, the structure grows up to 64.909 bytes. In
> this case, board does not boot (no ++, nothing).
>
> Here is the structure declaration (biglogo.h) of working image :
> static const struct {
> unsigned int width;
> unsigned int height;
> unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */
> unsigned char pixel_data[94 * 124 * 3 + 1];
> } biglogo = {
> 94, 124, 3,
> /* All RGB data */
> }
>
> and not working
> static const struct {
> unsigned int width;
> unsigned int height;
> unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */
> unsigned char pixel_data[128 * 169 * 3 + 1];
> } biglogo = {
> 128, 169, 3,
> /* All RGB data */
> }
>
>
> 8 blocks of 128KByte are erased in Flash before writing new bin file and
> verifying is also correct.
>
> When it it working, bin file (complete builded ecos binary) has a size
> of 250.668 bytes. When it is not working, bin file has a size of 310.524
> bytes.
>
> Is there some values in configurations files (cdl, ecm, db) where a
> memory limit is set ?
> Thanks a lot for your help.
> Best regards,
> Gaëtan.
>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-30  9:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-12 13:48 [ECOS] Freeze with big const struct/array gcembed
2012-01-18 12:05 ` Lange, Bert
2012-05-30  9:30 ` [ECOS] " gcembed

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).