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

Need help regarding Code Rom size

I tried to build my code with keil uVision3 and at the time of linking there was some error.
I wanted to generate hex file for AT89S51(4k flash ROM. I selected the following options in output.
*Use in-built memory
*XTAL(MHz) = 12
*Memory model: Small
*Code ROM size: Small(2k or less)
Like I said there was trouble linking.
I changed code ROM size to compact and hex file generated successfully. I want to know if the hex code built with different code ROM size is compatible with my uC.
Also. Why should I enter the crystal frequency in the options. Code remains the same irrespective of clock frequency. Isn't it?

Parents
  • *Code ROM size: Small(2k or less)
    are you using the eval version?

    I changed code ROM size to compact and hex file generated successfully. I want to know if the hex code built with different code ROM size is compatible with my uC.
    1) this is NOT "code ROM size" but "preferred location of variables". 2) compact is only "compatible with your uC" if you have 256 bytes of XDATA

    Also. Why should I enter the crystal frequency in the options. Code remains the same irrespective of clock frequency. Isn't it?
    WHAT 'options'?

    Erik

Reply
  • *Code ROM size: Small(2k or less)
    are you using the eval version?

    I changed code ROM size to compact and hex file generated successfully. I want to know if the hex code built with different code ROM size is compatible with my uC.
    1) this is NOT "code ROM size" but "preferred location of variables". 2) compact is only "compatible with your uC" if you have 256 bytes of XDATA

    Also. Why should I enter the crystal frequency in the options. Code remains the same irrespective of clock frequency. Isn't it?
    WHAT 'options'?

    Erik

Children
  • this is NOT "code ROM size" but "preferred location of variables"

    Incorrect.
    "Code ROM Size" has to do with whether short or long jumps are used

    "Memory Model" is what controls "preferred location of variables"

    "WHAT 'options'?"

    The uVision Project options.
    The crystal frequency here is used to allow the simulator to convert execution cycle counts to time values.

  • "Code ROM Size" has to do with whether short or long jumps are used.

    Have neve been below 2k and thus never 'seen' that one (which would probably create errors if above (ajmp/acall) reach

    Erik