No announcement yet.

Memory exceeds at 8300 bytes? (uLCD-24PTU)

  • Filter
  • Time
  • Show
Clear All
new posts

  • Memory exceeds at 8300 bytes? (uLCD-24PTU)


    I am developing an application on the uLCD-24PTU using muliptle screens, keyboards and a custom serial communication. Buttons and buffer arrays are already being reused if possible. So far the compiled application has been deployed to RAM and everything worked neatly.

    Now I seem to have reached some magical border:
    Although the Workshop 4 IDE tells me that I am only using approximately 8300 bytes for the code (14400 are available), the file_LoadImageControl call fails and thus no UI elements are displayed any more.

    This forum post ( suggests to use the #MODE RUNFLASH preprocessor command and then deploy to flash memory. This makes the file_LoadImageControl call succeed and the UI elements are displayed again.

    Unfortunately now the serial communication does not receive anything any more.

    Can anyone help and tell me what's going on here and if there's a solution to that propblem.

    Thanks in advance,

  • #2

    That should make absolutely no difference to the operation of serial communication.

    The program will run slightly slower from FLASH, are you doing something that is extremely time critical in your serial comms?


    • #3

      Thank you for your immediate reply.

      I am aware of the slow down when running from flash which is totally acceptable. There is also no time critical communication necessary.

      My experience is, that without changing anything else than the #MODE RUNFLASH directive (no changes made on the other side of the communication) neither serin() nor serin1() receive data.

      At the moment I am trying to familiarize myself with the file_LoadFunction method. Might this be the right track?


      • #4

        file_LoadFunction method
        Every line in the .dat file uses 28 bytes of RAM, there is no way around that, that may be where your RAM is going.

        As I said FLASH or RAM should make no difference to Comms functions (like serin() or serin1() )

        Which PmmC are you using, so I can try a few things myself?


        • #5

          I am not using the file_LoadFunction yet. Just thought it might a good way to free unused memory.

          And this one is embarrassing: I could not find a way to discover which PmmC is used. The forum often names the warranty label along with PmmC topics so here is what the label reads: "S I R34 150313". We have not made any changes to the PmmC.


          • #6

            That, I think is R34.

            If you have the display attached in workshop and a project open, you can go to the comms tab and it will have the version there.


            • #7

              Okay, that one was too easy. Sorry for that. Did not know the version displayed there referred to the PmmC. So you are right: it's v3.4