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
  • 15.1.1. Flash Lock and Key Functions
    Flash writes and erases by user software are protected with a lock and key function. The Flash Lock and Key Register (FLKEY) must be written with the correct key codes, in sequence, before Flash operations may be performed. The key codes are: 0xA5, 0xF1. The timing does not matter, but the codes must be written in order. If the key codes are written out of order, or the wrong codes are written, Flash writes and erases will be disabled until the next system reset. Flash writes and erases will also be disabled if a Flash write or erase is attempted before the key codes have been written properly. The Flash lock resets after each write or erase; the key codes must be written again before a

    so, when

    CSEG AT 1DFFh
    FlashProtection: DB (~(12))     // First 6KB locked -> 12 pages, 512B each
    


    get written, to memory you are hosed as far as writing the rest of your code

Reply
  • 15.1.1. Flash Lock and Key Functions
    Flash writes and erases by user software are protected with a lock and key function. The Flash Lock and Key Register (FLKEY) must be written with the correct key codes, in sequence, before Flash operations may be performed. The key codes are: 0xA5, 0xF1. The timing does not matter, but the codes must be written in order. If the key codes are written out of order, or the wrong codes are written, Flash writes and erases will be disabled until the next system reset. Flash writes and erases will also be disabled if a Flash write or erase is attempted before the key codes have been written properly. The Flash lock resets after each write or erase; the key codes must be written again before a

    so, when

    CSEG AT 1DFFh
    FlashProtection: DB (~(12))     // First 6KB locked -> 12 pages, 512B each
    


    get written, to memory you are hosed as far as writing the rest of your code

Children
No data