Announcement

Collapse
No announcement yet.

Compilation, notices ,code size

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

  • Compilation, notices ,code size

    Hi
    i m working on a uLCD-43PT device and Workshop 4 (by the way the version installer proposed here http://www.4dsystems.com.au/product/10/120/Development/4D_Workshop_4_IDE/ is not working for me (windows XP) , files seems corrupt, i downloaded it several times but the installation is not starting , so i had to find a previous version elsewhere: )

    i have a question about the "0 errors 0 warnings 64 notices" message i get after compiling my program
    what are exactly notices?
    unused variables/funtions declared?
    how can i reduce this number? i have no clue on each notice is pointing at, it this possible to get the pb detected and relative to this notice?

    other question i have message:
    "code size = 7951 bytes (14400 available)"

    what happens if my program size gets bigger later and size >= 14400 bytes? it wont be downloaded? Are the 14400 bytes the size of my device flash memory?

    Thx.

  • #2


    files seems corrupt, i downloaded it several times but the installation is not starting
    We have had several reports of this, although it always seems to work when we try it, with whatever browser we try it with and eventually the users seem to get it downloaded. The download size is 68,085,660 so if you don't get a file of that size, it is definitely corrupted in some way.

    It should work fine with XP, although we are aware of an issue with 'non English' versions of XP.

    Notices are simple that, notices, or perhaps 'informational messages'. If you turn the compiler message to all, (Options, Compiler, 'Reporting level') you will be able to see what they are. Most likely they are telling you that you have indexed a variable (usually when you pass a pointer to a function). If you put an * in front of the name it wont produce the message anymore (eg var *ptr).

    If you exceed the code size the program wont compile. Yes 14400 is the RAM and Flash memory sizes.
    Mark

    Comment


    • #3


      ok thx
      fyi, i indeed have a french XP version, which could be the problem like you suggested

      concerning the size limit of 14400 bytes, there is no solution for bigger program?
      my program size is already 9000 bytes and it is far from finished...
      so can i run my program by launching it through the SD card memory (which can let me have a much bigger program size?
      if not, is there some tricks / good programming methods that you recommand to reduce size of code produced?

      And finally is there a debugger module in Workshop 4 (with break points, step by step execution, etc...?)

      Thanks

      Comment


      • #4
        i indeed have a french XP version, which could be the problem like you suggested
        So, I hope, that means the problem occurs when you try to run Workshop. A temporary workaround is to copy the contents of c:\Documents and Settings\All Users\Documents?\4D Labs\ to c:\Documents and Settings\All Users\Documents\4D Labs\ where Documents? is the spelling of the word Documents on your system.

        This has been fixed for the next release.

        concerning the size limit of 14400 bytes, there is no solution for bigger program?
        my program size is already 9000 bytes and it is far from finished...
        so can i run my program by launching it through the SD card memory (which can let me have a much bigger program size?
        if not, is there some tricks / good programming methods that you recommand to reduce size of code produced
        There are 14400 bytes of FLASH and RAM, a program running from FLASH can thus have 14400 bytes of RAM, whereas a program running from RAM (the default) only has the 'leftover' RAM available to it.
        Functions and/or programs executed off uSD are run from RAM.
        So, loading your main program to FLASH and using #MODE RUNFLASH will give you the most RAM. See App note P2005 for similar information and samples of calling functions and sub programs and accessing and returning variables.

        So if you can split your program into less frequently used modules and have them on uSD that is one way to write bigger programs.

        A few other things to consider.
        1. If you have lots of strings, consider putting them on uSD and using a routine to access them
        2. If you have lots of switch type statements that just set a lot of constants differently, consider using arrays to access the different values and remove the switch completely.
        3. Check 'repeated' lines of code and consider turning into a subroutine, maybe even with parameters. Sometimes even 2 lines of code used twice can use less space in a subroutine.

        Sorry there is no debugger. You can write to the serial port 'ala Arduino', or write to the screen (followed by a pause, if necessary).

        Mark

        Comment


        • #5


          Thx for these answers and advice.
          lets study that

          Comment


          • #6
            Functions and/or programs executed off uSD are run from RAM. So, loading your main program to FLASH and using #MODE RUNFLASH will give you the most RAM. See App note P2005 for similar information and samples of calling functions and sub programs and accessing and returning variables.???
            We offer best quality pass4sure test papers and Harvard University

            Comment

            Working...
            X