Menu

AVR users - I need a Windows User and a Linux User to test programmer change

Anobium
2022-01-30
2022-02-02
  • Anobium

    Anobium - 2022-01-30

    I am asking for help from a Windows AVR user and a Linux AVR user.

    I have changed the compiler to test the serial port for serial programmers like AVRDUDE. This test will ensure the serial port is available prior using the programmer software - like AVRDUDE.

    This change supports new users and users who have not set the programmer port correctly. Today, the compiler will launch the serial programmer and your have to wait a long time, or you have to kill the process.. not a good experience.

    So, I want to ensure this works ok on real setups.

    Ping/Respond to this post if you are a user of AVR chips.

     
    • Anobium

      Anobium - 2022-01-30

      This is the new handler in use. I have the serial port open when I tried to compile and program.

      Great Cow BASIC (0.99.02 2022-01-20 (Windows 64 bit) : Build 1074)
      
      Compiling C:\GCB@Syn\GreatCowBasic\Demos\sample_header.gcb ...
      Done
      
      Assembling program ...
      
      Program assembled successfully
      
      Downloading program ...Arduino UNO @115200
      
      An error has been found:
      
       Error: Serial port COM8 not available - check your programmer serial port setting or check serial port is not exclusively open in another serial application
      
      The message has been logged to the file Errors.txt.
      
      Press any key to continue
      

      This stops the horrid AVRDUDE retry issue.

       
  • stan cartwright

    stan cartwright - 2022-01-31

    What can I do to help you?
    win 7 32bit & win10 64bit
    Also linux debian on rpi-400. TwisterOs GCB intalled/made. Using geany as a new editor, learning curves etc. Will linux run averdude and how? Stick to win version. Just get on with coding not stuff you got no clue about... imho
    I'm determined to get gcb to flash a file to avr just for the challenge... sad

     

    Last edit: stan cartwright 2022-01-31
    • Anobium

      Anobium - 2022-01-31

      Thank you,

      Test both OS's. So, download the patch and apply. Very few files. https://sourceforge.net/projects/gcbasic/files/Release%20Candidates/Patches/

      Then, ensure your serial works first as it did. Then, open the same port for exclusive use (using Terminal), do you get a response that is workable ?

       
  • stan cartwright

    stan cartwright - 2022-02-01

    download the patch and apply. Very few files.
    so on win 10 I got gcb@syn unzipped but what now?
    I'm not sure what we're testing. Sorry Anobium , I'm 68 today, that's my excuse.
    I know if you don't set the avr port for a uno or nano 328 you get an error but what's this and do I install over existing gcb?

     
    • Anobium

      Anobium - 2022-02-01

      HAPPY BIRTHDAY STAN

      Before you each cake and blow out your candles.... Do not apply the patch. Do this.

      Program - it should work
      Open terminal connect to the Ardunio using the same port number as used to program - Program again - it will lock up AVRDUDE.
      Wait of kill or kill the process.


      Then get the very latest patch. A zip was posted 15 mins ago.

      Program - it should work
      Open terminal connect to the Ardunio using the same port number as used to program - Program again - The compiler will alert you that the port is in use. :-)

       
  • stan cartwright

    stan cartwright - 2022-02-01

    Nice Evan, got to get your ideas over to non mind reading users.
    I still not a clue what the problem you want to solve is.
    I have never had a problem with uno, nano or lgt328. OK system , devices on win 10 shows devices and ports used. use the port number in program settings and it works.
    I don't know what I'm supposed to test. Do I copy the gcb@syn I'v unzipped over the existing gcb or what?
    You mention terminal, do you mean send text, hserprint to the terminal. Not clue what is wanted. Sorry. I don't know what the problem is.

     

    Last edit: stan cartwright 2022-02-01
  • Anobium

    Anobium - 2022-02-01

    HAPPY BIRTHDAY STAN

    OK - The problem is the IDE locks up when the serial port used to communicate between the PC and UNO is in use exclusively by an application like Terminal.

    Do not apply the patch. Do this.

    Program the UNO via the serial - ensure this works.
    Then, open Terminal and connect to the Ardunio using the same port number as used to program. It is not required to have any real communications between the PC and the UNO. It is simply having the Terminal software with the same com port connected/open.
    So, back in the IDE... Program again - it will lock up AVRDUDE.
    Wait of kill or kill the process.

    See the issue ?

     
  • stan cartwright

    stan cartwright - 2022-02-01

    Thanks again for the greetings.. another nail.
    I still don't see the problem.

    #chip mega328p,16
    #option Explicit
    #include <millis.h>
    'USART settings
    #define USART_BAUD_RATE 115200
    #define USART_TX_BLOCKING
    dim elapsed as Long
    dir portb.1 out
    
    do
      if Millis()-elapsed>=10 then
        elapsed=Millis()
        portb.1=!portb.1
        hserprint str(elapsed)
        HserPrintCRLF
        wait 1 s
      end if
    loop
    

    Uno is win 10 com 4. I open gcb ide terminal and click connect... to com 4 and I get a column of numbers.
    While it displays numbers in the terminal, clicking hex flash causes an error. Is this the problem with the terminal in use and same com then trying flashing?
    Should this not work?

     
    • Anobium

      Anobium - 2022-02-02

      That is the error (on mine Avrdude retries and retries and I have to kill the process).

      So, now get the very latest patch zip.
      Unzip to you install.
      Try same test.
      The compiler should handle the port usage situation. :-) This is the intent.

       
  • stan cartwright

    stan cartwright - 2022-02-02

    I unzipped the gcb@syn from your link and renamed existing gcb@syn and copied it then copied and pasted the files in your new gcb@syn to my renamed oldgcb@syn copy then renamed it gcb@syn and did the same test, ie calling flash-hex with the terminal open.
    It still gave a programming error ... com 4 in use.
    It's not really a problem.

     
    • Anobium

      Anobium - 2022-02-02

      Perfect result! Thank you.

       
  • Chris Roper

    Chris Roper - 2022-02-02

    I agree with Stan,

    It is a non issue, You have always needed to disconnect the terminal before Flashing an AVR or any other Bootloader and Not just with GCB, Arduino IDE has the same requirement.

     
    • Anobium

      Anobium - 2022-02-02

      Big issue with new users. They press <f5> without setting the port they get a nasty lock-up. Not a good experience - this is poor experience that this will resolve.</f5>

       
  • stan cartwright

    stan cartwright - 2022-02-02

    I'd test it with Linux (TwisterOs) on RPI400 but got to get Geany to link to gcb.exe and setup avrdude which is installed with TwisterOs. I don't think linux gcb gets patches.
    Linux gcb is an ongoing challenge... not a useful coding tool like on windows.

     
  • stan cartwright

    stan cartwright - 2022-02-02

    I notice using the new gcb@syn it's 32bit whereas it was 64bit so renamed oldgcb back to gcb.

     
    • Anobium

      Anobium - 2022-02-02

      Get the 64 bit from the ZIP and rename.

       
  • stan cartwright

    stan cartwright - 2022-02-02

    64 bit gcb no different

     
  • stan cartwright

    stan cartwright - 2022-02-02

    Sorry, that says 32bit, though I erased gcb32.exe. Same fault,,, if you could call it a fault.

     

    Last edit: stan cartwright 2022-02-02
    • Anobium

      Anobium - 2022-02-02

      That is correct. So, the new code works by not passing programming to AVRDUDE when the port is use.

      Job done. Thank you.

       
      • stan cartwright

        stan cartwright - 2022-02-02

        An odd request. Having loads of fun using Geany with GCB linux and averdude. Not.
        What's reals about? Floating point like arduino ide?

         
        • Anobium

          Anobium - 2022-02-02

          Enjoy....

          Reals are not useable. Therefore, nothing like the Arduino implementation as the Arduino implementation works. Do not use the Great Cow BASIC implementation there are so many issues.

           

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.