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

C51: The file order in the project causes errors.

I have problems with startup file, in this article http://www.keil.com/support/docs/2263.htm keil suggest that STARTUP.A51 should be last file in the project (should be linked as last)
But in my project, when STARTUP.A51 is on any other position than first, it cause problems which make my uC reset few times per hour.

Does anybody had such a problem?

I'm using:
IDE-Version: µVision V4.60.6.10
Toolchain: PK51 Prof. Developers Kit for SiLabs Version: 9.51

Best regards,
Marcin

Parents
  • Yes, there is a code that reserve space in memory, set CRC value and flash protection.

    CSEG AT 17FEh
    ProgCRC: DW 4D67h
    
    // conf memory
    CSEG AT 1800h
    ConfMem: DS 1024
    
    CSEG AT 1DFFh
    FlashProtection: DB (~(12))     // First 6KB locked -> 12 pages, 512B each
    
    CSEG AT 1E00h
    ReservedFlash: DS 512           // last page of flash
    
    END
    

    The above code is located in separate .a51 file that is linked as last file, in the configuration which behave correct (where Startup.a51 file is linked as first).

Reply
  • Yes, there is a code that reserve space in memory, set CRC value and flash protection.

    CSEG AT 17FEh
    ProgCRC: DW 4D67h
    
    // conf memory
    CSEG AT 1800h
    ConfMem: DS 1024
    
    CSEG AT 1DFFh
    FlashProtection: DB (~(12))     // First 6KB locked -> 12 pages, 512B each
    
    CSEG AT 1E00h
    ReservedFlash: DS 512           // last page of flash
    
    END
    

    The above code is located in separate .a51 file that is linked as last file, in the configuration which behave correct (where Startup.a51 file is linked as first).

Children