Program code Size more than CODE/DATA RAM

Hi ALL,

i am using Cypress fx2lp chip in my application & uVision2 IDE. i have 16KB of code & data memory but my code size is more than it. so i am planning to have two memory segments 1. fixed memory (around 10KB)
2. shared memory n(6KB)

i am planning to store code in EEPROM. where on reset chip will start loading code in fixed memory. the required part of the remaining code will be loaded by fixed code in to shared memory whenever required. can i do this? any other suggestions

-dhanraj

Parents
  • As Erik has pointed out, why do you need to do this?

    Are you trying to make a boot loader?

    The c51 series has several different address spaces. Code space is set as read only and is where the program executes from. XDATA is READ/WRITE along with internal RAM, neither of which you should execute from.

    You also run the risk of wearing the memory out as well. Flash and EEPROM have a certain number of cycles they can be written to before they begin going through various failure modes (mostly random bit errors). If you need to have more memory you have the option of bank switching more data into code space.

    Perhaps you could explain better what you are hoping to accomplish or intend to do?

    If your program is too large, consider how to reduce it's size by more efficient programming, and removing unnecessary code.

    Stephen

Reply
  • As Erik has pointed out, why do you need to do this?

    Are you trying to make a boot loader?

    The c51 series has several different address spaces. Code space is set as read only and is where the program executes from. XDATA is READ/WRITE along with internal RAM, neither of which you should execute from.

    You also run the risk of wearing the memory out as well. Flash and EEPROM have a certain number of cycles they can be written to before they begin going through various failure modes (mostly random bit errors). If you need to have more memory you have the option of bank switching more data into code space.

    Perhaps you could explain better what you are hoping to accomplish or intend to do?

    If your program is too large, consider how to reduce it's size by more efficient programming, and removing unnecessary code.

    Stephen

Children
More questions in this forum