1 Reply Latest reply on Mar 18, 2014 5:25 PM by ArvindS_76

    Glucose application doesnt seem to be running properly

      Sometimes when I build the glucose profile code I see this trace statement




      But then I dont see any other trace statements ...


      It seems like the code isnt running properly for some reason.


      What is the max RAM the app can be? I need to add some command parsing code to the application

        • 1. Re: Glucose application doesnt seem to be running properly

          If you think you are running out of RAM, try this:


          extern UINT32 cfa_mm_MemFreeBytes(void);

          void app_create(void)


              // All other app initialization.


              // Trace number of free bytes.

              ble_trace1("Free RAM (bytes): %d\n", cfa_mm_MemFreeBytes());



          cfa_mm_MemFreeBytes() returns the number of bytes free at the point of invocation. Calling it at the end of the app_create function will ensure that you get the real number of free bytes after all the initialization is done. So your app code can grow by at most these number of bytes (but perhaps less too because some callback registrations, interrupt handler registrations also take up some dynamic memory, but this will give you a very good idea of how large your app can be).