Maximum .PRG file size error

I am trying to recompile one Application from github from one watch model to another. When I build it I get this error

ERROR: PRG generated exceeds the memory limit of app type 'watch-app' for device id 'instinct2x': 218282 bytes.

What does it exactly mean? Is it max file size of prg file 218282 bytes or it is bigger than maximum allowed by 218282 bytes or what?

When I build it I get 363980 bytes prg file.

Can I find somewhere the list of max oprg files for each watch?

Also, how can I decrease the size of prg file? Maybe change SDK version or some compiler option?

  • Yeah maybe if it was an Apple Watch, but Garmins are seriously underpowered due to battery life (and cost?) concerns.

    I mean Garmin native code is already slow (just look at the UI of Garmin watches) and Garmin CIQ code is already running in a VM (everyone knows CIQ apps are slower and more battery-hungry than the equivalent native functionality), so it's hard to imagine any kind of emulator running at a decent speed.

    Still, it was a pretty interesting exercise to optimize the code to get it to actually run on an instinct2x. Too bad it's not playable.