Using the maximal flash size of HW 04v000

I am using HW 04v000 (EFM32GG11 with 2MB Flash and 512kB RAM).
However, I cannot utilize that amount of memory; when exceeding approximately 251kB (96%, “code” in the Studio’s summary section), I get a compiler error:

compiler options error null - Pawn Compiler 4.0.5749 with Microtronics Addon v14

Overall, it seems that the Studio / compiler is unaware of the MCU’s memory capabilities. My project’s environment requirements:

  • Device profile: M22x - 256kB - rapidM2M M2 HW1.0
    (There is no other M22x option available)
  • Required HW&FW: rapidM2M M2 HW4.0:00v000, rapidM2M M2 HW4.0:02v002

How much flash memory / RAM should be available for the application? How to utilize it?

Hello Julian,

The following picture from the rapidM2M_M22x_Datasheet illustrates the memory organisation:

The PAWN binary (.amx file) includes code- and data memory. The file may be a maximum of 256kB.
This is transferred to the module and stored in its internal flash. The data memory is also copied to the RAM.
The rest of the internal flash memory is used by the device firmware. The measurement data is stored in an external flash memory which is 3MB in size.

The size of the amx file can be influenced by the compiler settings in the rapidM2M Studio:

-z … amx compression is only supported for M22x HW 05v000
-d … debug support. d0 reduces the file size a bit. However, the array boundry checks at runtime are omitted.
-O … code optimization. -O3 decreases the file size.

Otherwise the code size can be reduced due to programming optimizations.