FAQ's
  • How do I allocate RAM variable to a fixed address?
    • RAM variables can be assigned to fixed addresses using the segnoinit pragma and seginit pragma.
      The segnoinit pragma is a pragma for allocating variables without initialization, and the seginit pragma is a pragma for allocating variables with initialization to a specific area.

      #pragma segnoinit 0xE000 /*Example1 */
      int ni_var1; /*ni_var1 is allocated to address 0xE000 */
      int ni_var2; /*ni_var2 is allocated to address 0xE002 */
      #pragma segnoinit /* End of segnoinit pragma (optional) */

      #pragma seginit 0xE100 /*Example1 */
      int var1 = 0x1234; /*var1 is allocated to address 0xE100 */
      int var2 = 0x5678; /*var2 is allocated to address 0xE102 */
      #pragma seginit /* End of seginit pragma (optional) */

      Please also refer to "How to Allocate Functions and Variables to Specific Areas" on our product site's support contents for the ML62Q1000 series.
    • Products: General-purpose MCUs (16bit)