This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Re-building the Ezusb.lib Library file

I am developing with the CA51 package and the cypress FX2 development board.
I have noticed that the Ezusb.lib library file supplied on the software CD was built for the small memory model.
I am attempting to rebuild it for the large memory model as my project is too large to fit into the small memory model.
I ran the build.bat script for this library file but it comes up with errors saying it doesn't know what the lib51 command is.
Do i need to setup any paths to get this to work?
I have looked in my bin directory and found that the lib51 executable is in there.
any suggestions would be greatly appreciated.

  • Why can't you use the library routines as they are in small model and write your routines using large model?

    Or, even better, why don't you just explicitly locate your large buffers in XDATA and continue using small model. Small model applications are ALWAYS smaller and run faster than large model ones.

    I frequently am asked to help optimize programs that are too slow and/or too big. Switching back to small model is the first thing I do.

    Jon

  • If i use the large memory model setting in my project and link in the ezusb.lib library file, the compiler brings up an error saying that the memory models are incompatible.

    I am doing all i can to keep my project within the constraints of the small memory model, but it keeps getting bigger and bigger.

  • the compiler brings up an error saying that the memory models are incompatible

    Actually, it's the linker that outputs that error. The reason the link generates the error is because the program will not work!

    it keeps getting bigger and bigger

    What keeps getting bigger? Code or Data?

    Jon

  • My code is getting bigger as i am adding a module
    at a time. It is approximately 10K in size
    at the moment and i anticipate that it will end
    up between 15K-20K in size for the final build.
    This doesn't really present a problem as my hardware
    will be capable of storing 64K of code.
    However, it's the data space that is causing a
    problem. With each extra module that i add, there
    are more variables to store. I guess i will try and
    specify a particular memory area for these extra
    variables to ensure that my project fits within
    the constraints of the small memory model.