[ECOS] Re: Freeze with big const struct/array

gcembed gcembed@gmail.com
Wed May 30 09:30:00 GMT 2012


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



More information about the Ecos-discuss mailing list