SDCC 2.6.0 reset vector missing (mcs51)

  • Anonymous - 2007-04-19

    I have successfully converted the source code from the EZ-USB2 framework (from Cypress Semiconductor) so that I can use SDCC for development. Now everything looks good, my only problem right now is that obviously nobody cares about the generation of the reset vector.
    Right now I've manually added code in one of my assembler modules so that __sdcc_gsinit_startup is used as the target for the reset jump. But should'nt that be done automatically by SDCC?

    Thanks for your help,

    Markus Klama.

    • Maarten Brock

      Maarten Brock - 2007-04-20

      Do you have a void main(void) function? Look in the generated asm for that file, it should contain the reset vector.

      What command line options did you use?

      Doesn't the EZ-USB unify code memory with xdata memory space? Did you account for that?

    • Anonymous - 2007-04-20


      You are right, the main module contains

      .area HOME (CODE)
          ljmp __sdcc_gsinit_startup

      My fault was that I translated all linker options from the KEIL linker to according SDCC options. KEIL uses a --code-loc of 0x0080 to make sure that no code will be placed within the first 128 bytes of code space, because the KEIL linker is able to "detect" the interrupt functions within the object decks and inserts the according vectoring jumps into the first 128 bytes of the code space.
      SDCC however, expects that the object decks actually supply these vectoring code, so a --code-loc of 0x0000 must be used. Thanks a lot for pointing me to the right direction.

      Have a nice weekend,


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks