Menu

RESOLVED: Compiler fail at first fence

2025-03-22
2025-03-26
  • Andrew Ford

    Andrew Ford - 2025-03-22

    I need some help with a problem I am am finding in my first use of GC Basic to attempt to assemble and flash a Demo program. (Embarrassing or what!)

    GC Basic was downloaded on about 19 March 2025

    The relevant report from the IDE is below:

    Program assembled successfully (Assembly time: 0.031 seconds)
    
    Downloading program ...PICKit+ Cmd5v0 [Maintain Power @ 5v0]
    
    An error has been found:
    
    Error: Programmer executable not found - C:\GCstudio\gcbasic..\PICKitPlus\PICKitCommandline.exe
    

    What I can't figure out is what is requesting the download of PICKit+ Cmd5v0 (although I understand it is needed) and why it is trying to assemble / compile it with PICKitCommandline.exe, which I don't have and can't find to install.

    Any help gratefully received.

     
  • Anobium

    Anobium - 2025-03-22

    Welcome.

    We can resolve.

    What chip are you using? Which programmer do you have?

     
  • Andrew Ford

    Andrew Ford - 2025-03-22

    Hi Anobium
    Thanks for your quick response

    The chip is a PIC 16F877A in a K150 programmer
    Andrew

     
  • Andrew Ford

    Andrew Ford - 2025-03-22

    Hi Anobium
    If I use Syn.exe rather than GC Studio I can select K150 as the programmer and use Microbrn to program the chip. When I check the ROM it has some non -zero values of a plausible length for a simple LED flasher. There are however no flashing LEDs, so some something is still not quite right.

    I also do not under stand why the GC Basic icon calls up GC Studio, which does not seem to do what I need and I need to go hunt for Syn.exe, which seems to - or am I misunderstanding how the system is supposed to work?

     
  • Anobium

    Anobium - 2025-03-22

    The K150/MicroBrn.exe can be added to the Programmer Preferences. Currently, you have the PICKitPlus programmer selected. We can walk you thru added MicroBrn as a programmer later.

    Share your program listing please. The chip you have selected is fully supported.


    Re the installation. What is your operating system?

    GCSTUDIO should open and a window presented. What happens with you?
    Try reinstalling.
    But, the process is to open GCSTUDIO and select options from there.

    What ICON are you selecting? that will help me understand.

     
  • Andrew Ford

    Andrew Ford - 2025-03-23

    The program I am trying to flash and run is the demo program that flashes an LED:

    // ----- Main body of program commences here.
        Do Forever
    
           // PulseOut o LED for 100 milliseconds
            PulseOut PortB.5, 100 ms
    
       // Then wait 900 milliseconds after LED goes off
    Wait 900 ms
    
    Loop
    

    Operating system is Windows 11 Pro

    GCStudio presents the splash screen with options about where to pick up and then moves to the IDE when the point to restart is selected. (Screenshot attached)
    In the SynWrite environment I can see a Toolbar button with the label GCBasic which leads to an "Edit Programmer Preferences" option which I can use to select the K150.

    OK I have just been playing about with it a bit and after I click the Great Cow icon I can select the spanner symbol in the top right of the splash screen and then select the Synwrite IDE instead of the GCCode option which was the default. I can also use the "Edit Programmer Preferences" option to select the K150. So now I am starting in Synwrite with the correct programmer.

    There is clearly a lot more for to learn about the development environment, but for now I would be reassured if I could get the program to run and flash the LED.

     
  • Andrew Ford

    Andrew Ford - 2025-03-23

    I have also found how to select the K150 from the GC Basic environment.

     
  • Anobium

    Anobium - 2025-03-23

    I will answer one thing at a time.


    The program

    #chip 16f877a
    Do Forever
        PulseOut Portb.5, 100 ms
        wait 900 ms
    Loop
    

    The program above will create a HEX file that works. It will falsh an LED on PORTB.5

    As shown in the compiler report OSC: HS, 20Mhz (Clock source is not a primary internal oscillator. Ensure the clock source is correctly setup) - this means you would require an external oscillator.

    I know of no valid reason why this would not work. It works here. So, we have to look elsewhere.


    GCStudio presents the splash screen with options about where to pick up and then moves to the IDE when the point to restart is selected. (Screenshot attached)

    The screenshot is GCCODE not GCSTUDIO, and, I cannot see there 'restart is selected'

    Can you clarify what is going on ?


    In the SynWrite environment I can see a Toolbar button with the label GCBasic which leads to an "Edit Programmer Preferences" option which I can use to select the K150.

    If I assume that you are in the legacy SynWrite Editor. Then, you would access "Edit Programmer Preferences" as you describe.

    So, I am assuming that you have added the K150 programmer. Is this correct? Also, if yes, then could you upload your USE.INI as an attachment. C:\GCSTUDIO\GCBASIC\USE.INI . I want to see the setting for the K150.


    What is the message when you compile? Please attached.


    OK I have just been playing about with it a bit and after I click the Great Cow icon I can select the spanner symbol in the top right of the splash screen and then select the Synwrite IDE instead of the GCCode option which was the default. I can also use the "Edit Programmer Preferences" option to select the K150. So now I am starting in Synwrite with the correct programmer.

    I would recommend GCCODE. As all my support will be using GCCODE. There are way more tools available when using GCCODE.


    You could upload the HEX created. I can test. If this works here then it points to

    1. Incorrect External oscillator setup
    2. Programming / verify error
    3. LED not attached to PORTB.5

    Anobium

     
  • Andrew Ford

    Andrew Ford - 2025-03-23

    GCStudio presents the splash screen with options about where to pick up and then moves to the IDE when the point to restart is selected. (Screenshot attached)

    The screenshot is GCCODE not GCSTUDIO, and, I cannot see there 'restart is selected'

    Can you clarify what is going on ?

    Sorry for the confusion, you are of course quite correct that I attached the screenshot of GCCode, I tried to attach a copy of the GCStudio start up screen but it appears only one attachment is allowed.

    On the GCStudio screen as I'm sure you know there is are options to pick up previously worked on projects, that was what I meant by "the point to restart is selected" - not a good choice of words.


    So, I am assuming that you have added the K150 programmer. Is this correct? Also, if yes, then could you upload your USE.INI as an attachment. C:\GCSTUDIO\GCBASIC\USE.INI . I want to see the setting for the K150.

    Yes, I copied Microbrn.exe and the Chipdata file into the directory and then it to the list of programmers as K150.

    I have attached the use.ini file.

    Now I can select the programmer in GCCode I will stick with that as you suggest.

    You could upload the HEX created. I can test. If this works here then it points to

    1.     Incorrect External oscillator setup
    2.     Programming / verify error
    3.     LED not attached to PORTB.5
    

    I will attach the Hex file read back from the K150 / 16F877A to my next post.

    I scoped the pins on the 16F877A particularly pin 38 (PB.5 )and could not see any toggling so I don't think it is option 3.

    When I load the program hex file and press verify it comes back as verified correctly against the PIC, but I suppose there could be something wrong in the build process.

     
  • Andrew Ford

    Andrew Ford - 2025-03-23

    Read back Hex file attached

     
    • Anobium

      Anobium - 2025-03-23

      I am offline until Tuesday am UK time.

      Sorry.

      Where are you based? I can do Zoom call to resolhis on Tuesday

       
  • Andrew Ford

    Andrew Ford - 2025-03-23

    I'm in the UK (Bristol),. Thank you for the Zoom call offer, that could be really useful. Unfortunately I can only do evenings Mon to Weds but can do Thursday daytime this week, if that could work for you. Did you want to Zoom to the PC or to another computer / phone?

     
  • Anobium

    Anobium - 2025-03-24

    I can do Monday evening, send me PC-PC Zoom invite. Send me Personal Message ( select my Avatar link ) to access Personal Messages,

    :-)

     
  • Anobium

    Anobium - 2025-03-26

    @All. Andrew and I got on a Zoom call. Here are my thoughts - copied from my KO-FI post.


    Avoid the K150 Programmer – Insights from Experience

    I recently helped a new GCBASIC developer named Andrew. He was trying to get a K150 programmer operational with GCBASIC. After a Zoom call, I came face to face with one of the worst programmers I have ever seen. The experience was a wake-up call, and I knew I had to share what I learned to help others avoid this same fate.

    So, I wanted to share some critical insights into why the K150 programmer is a problematic tool for your microcontroller programming projects. Whether you're a seasoned developer or a curious hobbyist, the K150 isn't just outdated—it is a potential risk to your PIC microcontrollers. Let me break it down for you:


    🚨 Compatibility Issues

    Firstly, the K150 programmer struggles to operate on modern Windows operating systems, creating unnecessary roadblocks right from the start. To make matters worse, it does not support many newer PIC microcontrollers, limiting your options and leaving you stuck with outdated PICs. Technology evolves, and your programming tools should too!


    ⚡ Concerning Risk of Damage

    The outdated documentation for the K150 raises some serious red flags. There are risks of stray voltages in the programming socket, which could potentially damage your chips. Even with modifications described in the manual, the danger of frying your microcontroller looms large. Who needs that kind of stress when creating?


    ❌ Outdated & Buggy Software

    The K150 relies on its MicroBrn software, which hasn't kept pace with modern hardware or operating systems. Known bugs and limitations remain unaddressed, and support for larger or more complex chips is absent. Why put up with such unnecessary limitations?


    ❌ Poorly Implemented Command Line

    The MicroBrn software does not properly support command line parameter usage, and this issue will not be fixed. Unfortunately, this makes easy integration into GCBASIC impossible.


    🛠️ Better Alternatives to the K150 Programmer

    Instead of wrestling with the K150’s outdated technology, consider these modern and reliable options that support a broad range of PIC microcontrollers and operating systems:

    PICkit 2/3
    - Developed by PICKITPlus team and previously Microchip, these tools are reliable, user-friendly, and support debugging as well as programming. The PICkit 2 offers compatibility with the latest chips and faster speeds, making it a great solution for beginners and professionals alike. With PICKitPlus, this becomes an even better option.

    PICkit 4/5 & ICD (In-Circuit Debugger)
    - For more advanced projects, Microchip's range of programmers delivers excellent performance and high-speed debugging capabilities.

    Universal Programmers
    - Brands like Elnec or Xeltek offer universal programmers that support not only PICs but a variety of microcontroller families. These are great investments for those working with multiple chip types.


    🚀 Why Settle for Less?

    Programming your microcontrollers should be smooth and enjoyable—not frustrating and risky. The K150 programmer is a relic of the past, incapable of meeting the demands of modern hardware and software. With so many superior alternatives available, there's no need to compromise your creativity or the safety of your components. Invest in a programmer that works, protects your chips, and supports your goals—because your projects deserve more than the K150!

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.