• I want to know the description method for initializing stack pointer after the start of main function.
    • It cannot be described directly in C language. Use the assembly language. When describing in the assembly language in C source, enclose the description with #asm and #endasm. Since an absolute address is used by the assembly language, describe “#pragma romwin 0xXXXX” before the definition line of main function. Describe the end address of ROM window area of each product in 0xXXXX. An example is shown below.

      #pragma romwin 0 0xXXXX // Add the description for the end address of ROM window area of each product to 0xXXXX.
      void main(void)
      L ER0, 0000h ; Load the stack pointer stored in the address 0.
      MOV SP, ER0 ; Set the register content in the stack pointer.

      Related Products: ML610(Q)40x, ML610(Q)42x, ML610(Q)47x, ML610(Q)48x, ML610Q10x, ML610Q11x, ML610Q17x, ML610Q30x, ML610Q35x, ML610Q36x, ML610Q38x, ML610Q41x, ML610Q43x, ML610Q46x, ML620Q13x, ML620Q15x, ML620Q416/ML620Q418, ML620Q503H/ML620Q504H/ML620Q506H, ML62Q12xx, ML62Q13xx, ML62Q14xx, ML62Q15xx/ML62Q18xx, ML62Q16xx, ML62Q17xx

    • Products: General-purpose MCUs (16bit) , Speech Playback MCUs (8bit)