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

Why removing code from startup file crashes my code ?

Product         DCD     0 ;0
                EXPORT  Product

FirmwareVer     DCD     0x00000001             Version, cc = Major Version
                EXPORT  FirmwareVer

After removing above lines from my startup file(filename.s), my application doesn't even make it to main() or __main().
When I undo this change, I am running.

Please advise!

Parents
  • So you could just put dummies in their place.

    >> When you remove them, other stuff will change its position.

    Could someone refer me to a source that explains this in detail ?

    It's not rocket science!

    Unless you specifically specify otherwise, memory is allocated in order - so, if you remove some stuff, then the stuff that remains will obviously get allocated at lower addresses.

    You should be able to see this in the Map file...

Reply
  • So you could just put dummies in their place.

    >> When you remove them, other stuff will change its position.

    Could someone refer me to a source that explains this in detail ?

    It's not rocket science!

    Unless you specifically specify otherwise, memory is allocated in order - so, if you remove some stuff, then the stuff that remains will obviously get allocated at lower addresses.

    You should be able to see this in the Map file...

Children