Menu

Number of lines in GCB

Help
MBB
2019-10-31
2019-11-01
  • MBB

    MBB - 2019-10-31

    Does GCB or Microchip limit the number of lines of code it can handle?

    I'm using an 18F4550 with version 98.05.

    When I compile my program the IDE output window shows:
    Compiler Version (YYYY-MM-DD): 0.98.05 2019-04-20 (Windows 32 bit) Program Memory: 1678/16384 words (10.24%) RAM: 78/2048 bytes (3.81%) Chip: 18F4550.

    It shows I have plenty of Program Memory and RAM remaining.
    It compiles without any error messages.
    When I look at the .lst file it shows the program ends at line 000AFA (line 2810)
    The program works properly.

    If I add this line : GLCDROTATE Portrait_Rev
    The IDE Output window shows:
    Compiler Version (YYYY-MM-DD): 0.98.05 2019-04-20 (Windows 32 bit) Program Memory: 2311/16384 words (14.11%) RAM: 109/2048 bytes (5.32%) Chip: 18F4550

    Still plenty of Program Memory and RAM remaining.
    It compiles without any error messages.
    When I look at the .lst file it shows the program ends at line 000F1C (line 3868).
    The program runs but gives erroneous information.

    To eliminate the GLCD as the problem I removed all GLCD related code and replaced it with matamatical calculations. The same thing happened. When I added too many lines of code I got incorrect answer to the math.

    Is this normal?

     
  • Anobium

    Anobium - 2019-10-31

    No.

     
  • Anobium

    Anobium - 2019-10-31

    Best attach your source. :-)

    I can have a quick look in the 0.98.06 build

     
  • mkstevo

    mkstevo - 2019-10-31

    What programmer are you using?

    The GQ4 I used at work had some errors in the definition files which gave me problems on a few devices. I had to manually add the correct information to those files. It had worked flawlessly initially, but then all my initial programs were quite small. Once I got more ambitious and went over a particular size (50%?) things suddenly went wrong. It took me ages to track that down too!

    For the record, I am reasonably sure that the fault I had was with the 16F1825/1829 devices. They're my two most used chips, and I'm pretty sure it would have been those.

    Having originally come to GCB from PicAxe devices, the 16F1825/1829 have the same pinout as the 14M2/20M2 and so can be dropped into legacy designs with minimal (zero?) hardware changes required. Anything for an easy life...

     
  • MBB

    MBB - 2019-10-31

    I'm using an melabs U2 programmer.

     
  • Anobium

    Anobium - 2019-10-31

    Sorry - am I missing something?
    What has the programmer to with this?

     
  • MBB

    MBB - 2019-11-01

    Probably nothing. I was just responding to mkstevo's question.

     
    • mkstevo

      mkstevo - 2019-11-01

      Apologies, I have confused the situation. I personally had problems programming the 16F1825/1829 range with my GQ-4X programmer as the GQ-4X files for those devices were incorrect. Not a problem with GCB, but a problem with the GQ-4X. Just checking something similar wasn't the cause of the problems.

       
  • MBB

    MBB - 2019-11-01

    I went back and forth between 98.05 and 98.04.

    The program works with 98.04 but not with 98.05.

    It appears that something changed in 98.05.

     
  • Anobium

    Anobium - 2019-11-01

    Yes, since 98.04 about 500 changes. Send me the source and I will have a quick look.

     
  • MBB

    MBB - 2019-11-01

    Here is my code

     
  • Anobium

    Anobium - 2019-11-01

    is the source - good or bad?
    what do I do to break or fix?

    Compile as
    Compiler Version (YYYY-MM-DD): 0.98.06 2019-06-12 (Windows 32 bit) Program Memory: 3300/16384 words (20.14%) RAM: 174/2048 bytes (8.5%) Chip: 18F4550

    Code extends in lst file to 4200+ lines

     

    Last edit: Anobium 2019-11-01
  • MBB

    MBB - 2019-11-01

    I forgot to mention:

    I've added many more lines of code to the attached program since my first post. It still works with 98.04 but not 98.05.

    Simply removing GLCDROTATE Portrait_Rev as I did in the first post will not make it work with 98.05

     
  • Anobium

    Anobium - 2019-11-01

    Works here with same results of 98.04 and 98.05.

    I would update to 98.06 regardless. It is something like a error in one of your libaries.

     
  • MBB

    MBB - 2019-11-01

    The above source code is good for 98.04 and bad for 98.05.

    To make it work for 98.05 start by removing lines 264 - 298, 224 - 234, and 95 - 97. Then you might have to remove more until it works with 98.05.

     
  • Anobium

    Anobium - 2019-11-01

    It works on all versions. I would intall 98.06

    I have most versions installed and 04, 05 and 06 work.

    My guess you have a corrupt .h . Install 06 to resolve.

     

    Last edit: Anobium 2019-11-01
  • MBB

    MBB - 2019-11-01

    I downloaded 98.06 and my program works.

    I guess something did get corrupted in my 98.05.

    Thanks for your help!

     

Log in to post a comment.