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: Accessing 96KB memory in P89C669

I created a project with main function whose code size is more than 64KB. Upon compiling there was error message,

   error C253 : 'main' :function exceeds 64kb code size

The controller P89C669 is having 96KB flash memory but then why this error message is prompted.

Do i need to do some setting in the startup.a51 file?

Parents Reply Children
  • I am getting confused with this memory arrangement and its accessing method.

    Ok as the manufacturer says it has 96kb in built flash memory if total code size goes greater 64 kb then the error will pop up?

  • All developers know that an application should be modularized, to keep down the maintenance costs.

    The compiler assumes that it can perform all jumps within a function using a 16-bit address.

    Split your code properly into multiple functions.

  • funtion of 64kkbytes is very too big

    why you neeed main so big???

    plz DO NOT post function here!!!

    if you 96k memoryy then only to functions in whole projec?

    not smart!!!

  • No actaully hat was sample.

    In my project i have many functions and the total code size is nearly 63KB.

    When i used P89C669, i had set the Memory model to be Huge(8 MB) and in the Start_mx.a51 i hade set teh EAM and ESM bit to be 1 to specify the access fo 64Kb.

    Now my question is with these settings if project goes beyond 64KB can the compiler be able to compile?

    secondly, in the manaul also i had seen that we access the 96KB either setting the memory model has Huge or by using Code banking. I dont want to use code banking.

    As i said earlier with the above settings done can i able to compile a project of above 64kb?