Device Memory Limits

I'm trying to figure out which Watch devices my field will work with.

There are several disqualifiers.

First, there is the CIQ Memory Limit. For example, the Fenix 5 has a limit of 28500 bytes.

I'm also seeing this error: PRG generated exceeds the memory limit of app type 'datafield' for device id 'fenix5': 72576 bytes

Is there some resource file I can search to find these limits, rather than running every watch in the simulator to find these?

Thanks!

  • https://developer.garmin.com/connect-iq/device-reference/

    and then click on the device.

    Here's the f5 for example: https://developer.garmin.com/connect-iq/device-reference/fenix5/

    Note, that the numbers you see include 4k used by CIQ for devices > CIQ 1.x, which is why you will see 32k for a DF on the f5, but your app is actually only allowed 28K

  • There are several disqualifiers.

    First, there is the CIQ Memory Limit. For example, the Fenix 5 has a limit of 28500 bytes.

    I'm also seeing this error: PRG generated exceeds the memory limit of app type 'datafield' for device id 'fenix5': 72576 bytes

    This means that the core sections of your PRG (e.g. code + data, not resources) are too big to fit in the available memory for the app. In this context, data refers to initialized global variables in your code, and not resource data.

    It's not really 2 different limits, as you are implying, it's just that there are 2 ways for your app to run out of memory:

    - after the app has already loaded itself successfully, and is already up and running. This is the familiar runtime "out of memory" error that we've all seen

    - when app PRG - actually its core sections - is literally too big to load into memory. This is a compile time error. 

    In both cases it's basically the same memory limit.

    It's too bad that the "PRG generated exceeds the memory limit..." error message a little obscure when it comes to the actual number that's displayed. Someone else reported the same error and their PRG was indeed far too big, but it was never clear whether the number in the message (72576 bytes in your case) refers to some sort of total size (of the relevant sections of the PRG), or the difference between the total size and the memory limit.

    Either way it doesn't matter - the solution is to reduce the size of the code and data in your app.

    I bet you are porting a data field from Edge to watches. You should note that, historically, Edges typically had much more memory for CIQ apps their watch cousins.

    For example, Fenix 5 came out 8 years ago and nominally has 32 KB of memory for data fields. (Yes, as both you and jim_m_58 pointed out, the real limit is 28 KB). Edge 1030 came out in the same year and has 128 KB for data fields.

    More modern watches (e.g. FR255, FR265, FR955, FR965 and Fenix 8) have much more memory for data fields - 128 KB or 256 KB - while the latest edges still have 128 KB. 

    So if you wanna support older watches like Fenix 5, you're gonna have to trim the fat.

  • Thanks! Most Fenix watches will work, and only the more recent FR watches will work. Many of the more recent Venu, VivoActive, Approach, Instinct, Epix, D2, Descent, and MARQ series will also work. We're good with not supporting the really old and low memory watches - just need to know which ones have a memory limit < 64kb. 

  • It's in the compiler.json or simulator.json. You can also find it aggregated here: https://github.com/flocsy/garmin-dev-tools/blob/main/csv/device2memory-datafield.csv

    You also have files next to it for other app types