This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Init Code for C Source in CCS



Where is the initialization code for C source in CCS?  Like the init of global variables and such and the call to main().  Can customers modify the source for the init code?

  • Mike,

    It is in the runtime support library for the compiler  (e.g., rts2800_ml.lib), object module boot.asm.

    You can extract boot.asm and edit it if you really want to, but normally this is not needed (nor recommended).  Customer is more likely to bust something than to make it better.  You should ask your customer what the issue is with the regular boot routine.

    Regards,

    David

  • If there's something special they need to do at startup, e.g. initialize all the memory to zero, they could create their own entry point in assembly.  They just need to put the symbol for their entry point in the linker options.  Then at the end of their code they should jump to _c_int00 which is the normal entry point for C programs.
  •  Adding to Brad's comment - the header file and peripheral examples we supply do this.  The CodeStartBranch.asm file has the entry point which disables the watchdog in assembly before calling the C initialization.