- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Akeem,
If your firmware is building fine and working as expected then go ahead and use it.
Thanks & Regards
Abhinav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Issued has been resolved. thank you..