We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, I have couple of lines of codes to insert into startup.a51. However, placing them at different places of startup.a51, either cause memory overlap (this disable my interrupts) or not to be executed at all. Hope someone can shine some light, where usually should codes to be executed before main() be placed at ? In addition, should I change the optimization options etc ? Thanks
Why do you need code to execute before main? The reason for that may well affect the answer to your question! "I have couple of lines of codes to insert into startup.a51. However, placing them at different places of startup.a51, either cause memory overlap (this disable my interrupts) or not to be executed at all." Then you clearly haven't inserted them properly! startup.a51 is just an assembler file; there's nothing special about it. If you're causing memory overlaps, then you haven't properly located your code; if it's not getting executed, you must've put it in an unreachable place! Note that you might also need to adjust your linker settings.