Announcement

Collapse
No announcement yet.

GUI Display Stopped working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GUI Display Stopped working

    I have been adding to my base code for the last week or so and recently, my screen stopped drawing. My platform is uLCD-32PTU. Even the first first welcome screen which just displays a bunch of text and nothing else isn't displaying. I thought it was because of the number of debug print statements that I had since this happened before and I fixed it by removing it. Now that the code is getting bigger, that is not even helping. I am clueless right now on the debug steps. Any ideas would be appreciated. My code size is also below.

    The code still works and keeps running. The Com0 and Com1 writes work great. Just no display except for spurious lines.

    Things I have noticed besides the Welcome screen (or any screen) not displaying is that I the
    putstr("Mounting...") is not working. However, " to(COM0); print("Mounting\n");" does work.

    To display my home screen I just call the below function and it still does not work, it used to...

    func DrawTitleScreen()

    gfx_Cls() ;

    gfx_Set(SCREEN_MODE,LANDSCAPE) ;


    // Title 1.1 generated 6/22/2014 7:12:17 PM

    // Statictext18 1.0 generated 6/22/2014 7:12:17 PM
    img_Show(hndl,iStatictext18) ;

    // Statictext19 1.0 generated 6/22/2014 7:12:17 PM
    img_Show(hndl,iStatictext19) ;

    // Statictext21 1.0 generated 6/22/2014 7:12:17 PM
    img_Show(hndl,iStatictext21) ;

    // Statictext22 1.0 generated 6/22/2014 7:12:17 PM
    img_Show(hndl,iStatictext22) ;

    // Statictext23 1.0 generated 6/22/2014 7:12:17 PM
    img_Show(hndl,iStatictext23) ;

    // Statictext24 1.0 generated 6/22/2014 7:12:17 PM
    img_Show(hndl,iStatictext24) ;


    endfunc

    0 errors
    0 warnings
    8 notices
    No Errors, code size = 9814 bytes out of 14400 total
    Initial RAM size = 1112 bytes out of 14400 total
    Program will run from ram so total initial RAM size = 10926 bytes out of 14400 total
    Download to RAM successful.

  • #2
    Hi kenjustken,

    You may be running out of RAM at run time. Under the menu Project in Workshop, choose "Flash" as the destination. In your code insert the line

    #MODE RUNFLASH

    just after the #inherit preprocessor directive lines. A 4DGL program that has #MODE RUNFLASH, executes from Flash, providing the entire RAM for the user variables, stack and other temporary data. Have a look at

    4D-AN-P2005 Designer Managing Flash and RAM for more info and examples.

    Hope this helps and regards.
    Doff

    Comment


    • #3
      I was able to get to run from flash now. I have another question to help me understand the size difference. When I run from flash is the memory footprint the same? The reason for my question, is when I compile for flash the summary at the console outpu says I am still running from RAM (See Below).

      0 errors
      0 warnings
      9 notices
      No Errors, code size = 9272 bytes out of 14400 total
      Initial RAM size = 1112 bytes out of 14400 total
      Program will run from ram so total initial RAM size = 10384 bytes out of 14400 total

      Comment


      • #4
        Did you miss adding
        #MODE RUNFLASH
        to your program?
        (If you don't have it there and use 'Destination Flash' then the program is saved to Flash, but is copied to RAM before being run.
        Mark

        Comment

        Working...
        X