Discussion in "8051 Discussion Forum" started by    scorcho    Oct 3, 2007.
Wed Oct 03 2007, 09:48 am
#1
Hi,

I'm trying to modify the Cypress EZ-USB firmware for some added
functionality, but I'm having some problems regarding running out of
code space. It seems that when I call some of the EZUSB I2C library
functions, my code space balloons by quite a bit. For example
EZUSB_InitI2C would increase my code space by 500bytes. The default
firmware already uses up over 6KB, which leaves me with about 1KB+ to
play with, so 500 bytes is a lot to be just calling an initialize
function. Has anyone experienced similar problems? Is there any way of
solving this?

btw I'm using Keil uVision2 with the Cypress CY3686 EZUSB NX2 LP-FLEX
DVK.

Thanks.
Tags cypress ez-usbCypress CY3686 EZUSB NX2 LP-FLEX DVK
Wed Oct 03 2007, 10:19 am
#2
I don't get it.. why calling a routine increases so much code space?
is the program written in C or assembly? I guess its C where you have least control on the code size...
A suggestion i can give is.. use the optimization methods.. maybe that help to reduce the code size.. try it and tell me..
Wed Oct 03 2007, 11:17 am
#3
I don't know why, I don't have access to the function definitions since they are part of a library. Anyway, is it possible to add external RAM for code space for 8051 MCUs?
Wed Oct 03 2007, 11:25 am
#4
try the optimization of the code in keil.. and tell me the results..
here is how you do it..
go to target options->C51 tab -> Code optimization level -> from dropdown select emphasis size..
check if you get some optimization..

and i think you will not be able to make any change in the circuit of programmer, if you can.. then try replacing the controller with higher onchip FLASH. As interfacing a separate ROM with controller in not a good idea.. too much hectic... first try the optimization..
Wed Oct 03 2007, 11:37 am
#5
I've already tried the optimization before. It's done on file level so I applied it for every .c file I have. It didn't do much...I gained <100 bytes with this...
Wed Oct 03 2007, 01:25 pm
#6
hmm... can you tell me what you are adding in your EZ-USB?
Wed Oct 03 2007, 04:38 pm
#7
Just some changes to LUN behavior as well as trying to access an external EEPROM.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

Williamjaf
Tue Apr 16 2024, 12:25 pm
best_yyPa
Tue Apr 16 2024, 09:42 am
ErnestoExpop
Tue Apr 16 2024, 02:57 am
Jamesclepe
Mon Apr 15 2024, 11:10 am
Aliciaelora
Mon Apr 15 2024, 07:59 am
btaletvpcu
Mon Apr 15 2024, 04:36 am
UbvpwcTib
Mon Apr 15 2024, 03:13 am
AmyJow
Sun Apr 14 2024, 11:54 pm