CX3, Data Area Overflow, camera firmware 70KBytes

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
AkCh_1378701
Level 3
Level 3
First like given

Hi sir,

I am connecting a cx3 to a camera ISP and a sensor,  the ISP's

firmware has to be downloaded from CX3 to the ISP internal RAM via i2c.

CX3 Downloading camera firmware.png

during the linking, it shows the error message as below

"region `DATA' overflowed by 57024 bytes CyCX3UvcIspSensor C/C++ Problem"

`.data' will not fit in region `DATA' CyCX3UvcIspSensor C/C++ Problem"

The firmware size is around 70K Bytes size.. which exceeds the default "data area" of CX3.. I guess.  according to fx3.ld, it seems the default size of data area is 32KBytes.

Question:    Possible to to increase the data area size to be around 70K bytes in order to accommodate the camera firmware data?

thank you

0 Likes
1 Solution
abhinavg_21
Moderator
Moderator
Moderator
50 likes received 25 likes received 10 likes received

Hi Akeem,

You can try to change the DATA LENGTH variable in the MEMORY structure of fx3.ld file present in the following path:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\fw_build\fx3_fw

MEMORY

{

I-TCM : ORIGIN = 0x100 LENGTH = 0x3F00

SYS_MEM : ORIGIN = 0x40003000 LENGTH = 0x2D000

DATA : ORIGIN = 0x40030000 LENGTH = 0x8000

}

We have a reserved 32 KB for 2nd- stage boot loader which can be shifted to DATA section. First change length of DATA section to 0x10000 in fx3.ld file. Each project has "cyfxtx.c" file, make the following changes:

#define CY_U3P_MEM_HEAP_BASE         (0x40040000)         // change this

#define CY_U3P_MEM_HEAP_SIZE         (0x8000)

/*

   The last 32 KB of RAM is reserved for 2-stage boot operation. This value can be

   changed to 0x40080000 if 2-stage boot is not used by the application.

*/

#define CY_U3P_SYS_MEM_TOP           (0x40080000)  //change this

Then try to build the code.

Thanks & Regards
Abhinav

View solution in original post

0 Likes
4 Replies
abhinavg_21
Moderator
Moderator
Moderator
50 likes received 25 likes received 10 likes received

Hi Akeem,

You can try to change the DATA LENGTH variable in the MEMORY structure of fx3.ld file present in the following path:

C:\Program Files (x86)\Cypress\EZ-USB FX3 SDK\1.3\fw_build\fx3_fw

MEMORY

{

I-TCM : ORIGIN = 0x100 LENGTH = 0x3F00

SYS_MEM : ORIGIN = 0x40003000 LENGTH = 0x2D000

DATA : ORIGIN = 0x40030000 LENGTH = 0x8000

}

We have a reserved 32 KB for 2nd- stage boot loader which can be shifted to DATA section. First change length of DATA section to 0x10000 in fx3.ld file. Each project has "cyfxtx.c" file, make the following changes:

#define CY_U3P_MEM_HEAP_BASE         (0x40040000)         // change this

#define CY_U3P_MEM_HEAP_SIZE         (0x8000)

/*

   The last 32 KB of RAM is reserved for 2-stage boot operation. This value can be

   changed to 0x40080000 if 2-stage boot is not used by the application.

*/

#define CY_U3P_SYS_MEM_TOP           (0x40080000)  //change this

Then try to build the code.

Thanks & Regards
Abhinav

0 Likes

Thanks Abhinav for the great help..

i followed the recommendations posted earlier

DATA : ORIGIN = 0x40030000 LENGTH = 0x10000

#define CY_U3P_MEM_HEAP_BASE         (0x40040000)         // change this

#define CY_U3P_MEM_HEAP_SIZE         (0x8000)

#define CY_U3P_SYS_MEM_TOP           (0x40080000)  //change this

somehow,  it still shows error message,  however, according to the error message, it indeed increase the data area ..

"region `DATA' overflowed by 57024 bytes CyCX3UvcIspSensor C/C++ Problem"   // data length 0x8000

"region `DATA' overflowed by 24256 bytes CyCX3UvcIspSensor C/C++ Problem"   // data length 0x10000

`.data' will not fit in region `DATA' CyCX3UvcIspSensor C/C++ Problem"

i further  increased the data length to 0x20000

DATA : ORIGIN = 0x40030000 LENGTH = 0x20000      //   new here,

#define CY_U3P_MEM_HEAP_BASE         (0x40040000)         //  same as earlier recommendation

#define CY_U3P_MEM_HEAP_SIZE         (0x8000)                  // same as earlier recommendation

#define CY_U3P_SYS_MEM_TOP           (0x40080000)         //   same as earlier recommendation

i got no error,  firmware img file was built successfully. 

Could you help to review the new data length ->0x20000  is a legal value, not violating the memory space has been allocated for other specific purpose??

many thanks

0 Likes

Hi Akeem,

If your firmware is building fine and working as expected then go ahead and use it.

Thanks & Regards
Abhinav

0 Likes

Issued has been resolved. thank you..

0 Likes