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

reset vector address beyond 64k

Dear all,
In our project we are using P87c51mc2 micro controller and a 512k bytes flash. Our requirement is, we don't want put any single instruction below 96k(onchip rom of the controller).Any code including startup and initialization code must be put after 96k. We have gone through some documents posted on keil website. But our case is some what different. It should start at the address beyond 64k(i.e,beyond 96k, including reset vector and interrupt vectors). I have tried to modify the startup code : CSEG AT 0 to some other value that is greater than 64k. But the compiler is not accepting this, it is giving the error: "INVALID ABSOLUTE BASE/OFFS VALUE" Even the case of interrupt vector addresses is also same. Please give me a solution to come out of this problem.


Thanks in advance,
Srilatha.

Parents
  • I'm neither an AX51 whiz, nor a Philips MX guy. But, glancing at the MX architecture description in the assembler manual and the documentation on CSEG and other segment directives, it seems that perhaps CSEG only allows you to define an absolute CODE segment, whereas you need an ECODE segment to specify those larger addresses for the MX.

    So, instead of "CSEG AT 0", why don't you try:

    StartSeg SEGMENT ECODE AT 18000H
    RSEG StartSeg

Reply
  • I'm neither an AX51 whiz, nor a Philips MX guy. But, glancing at the MX architecture description in the assembler manual and the documentation on CSEG and other segment directives, it seems that perhaps CSEG only allows you to define an absolute CODE segment, whereas you need an ECODE segment to specify those larger addresses for the MX.

    So, instead of "CSEG AT 0", why don't you try:

    StartSeg SEGMENT ECODE AT 18000H
    RSEG StartSeg

Children
  • Yes,I did the same thing, that solved the problem of segments in ECODE, but actually our requirement is such that we don't want to put a single instruction below 96k address space. Interrupt vectors and Reset vector addresses also should be put after 96k. For doing this, I have tried like this:I have modified the starting address in target options to be 0x18000. And I have modified the start_mx.a51 by writing,
    MY_ECODE_SEG SEGMENT ECODE AT 0x818000
    RSEG MY_ECODE_SEG

    ?C_STARTUP: EJMP STARTUP1

    in place of,CSEG AT 0
    But my problem is not solved. Is there other way to do this?

    srilatha.

  • The '51 design only allow 3 bytes for the reset vector. You can not fit an EJMP (or whatever it is called) into 3 bytes. jump normal to just after the interrupt vectors and ejmp there.

    Erik