Unable to create a blink Arduino project

Sysprogs forums Forums VisualGDB Unable to create a blink Arduino project

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #26040
    Johanan
    Participant

    I tried a few time to start a new Arduino project with different boards, but no joy.

    Original Arduino IDE works OK.

    VisualGDB is latest version.

    See attached screen.

    This is the output: ( one for STM32F103 board, one for Arduino Leonardo)

    Checking if any source files need uploading…
    Saved the code model to C:\Users\Johanan\Documents\Arduino\ArduinoProject3\VisualGDBCache\ArduinoProject3-Debug-Generic_STM32F103C_series\BuildCommandLines.txt
    Failed to parse code model from C:\Users\Johanan\Documents\Arduino\ArduinoProject3\VisualGDBCache\ArduinoProject3-Debug-Generic_STM32F103C_series\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
    at ix.h1.c_2(IEnumerable`1 a)
    Compiler output:
    Checking if any source files need uploading…
    Saved the code model to C:\Users\Johanan\Documents\Arduino\ArduinoProject4\VisualGDBCache\ArduinoProject4-Debug-Arduino_Leonardo\BuildCommandLines.txt
    Failed to parse code model from C:\Users\Johanan\Documents\Arduino\ArduinoProject4\VisualGDBCache\ArduinoProject4-Debug-Arduino_Leonardo\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
    at ix.h1.c_2(IEnumerable`1 a)
    Compiler output:

    Attachments:
    You must be logged in to view attached files.
    #26047
    support
    Keymaster

    Hi,

    Please try this build: VisualGDB-5.5.1.3289.msi

    Then open the main source file and check if VisualGDB suggests cleaning up redundant Arduino packages. If yes, please proceed with the cleanup.

    If not, please try building the project and share the output from the View->Output->Build view (the screenshot you attached shows the output from VisualGDB Advanced Project Subsystem that is different).

    #26048
    Johanan
    Participant

    I did it and it suggested the cleanup, I clicked OK, and it cleaned up.

    Then started a new project, same result. output from Build:

    ————————————————————-
    Command exited with code 1
    Executable: C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino\arduino-builder.exe
    Arguments: -compile -logger=machine -fqbn=stm32duino:STM32F1:genericSTM32F103C:device_variant=STM32F103C8,upload_method=DFUUploadMethod,cpu_speed=speed_72mhz,opt=osstd -build-path C:\MyWork\ArduinoProjects\ArduinoProject1\Output\Generic_STM32F103C_series\Debug -unoptimize=sketch -hardware “C:\Program Files (x86)\Arduino/hardware” -hardware C:\Users\Johanan\AppData\Local/Arduino15/packages -tools “C:\Program Files (x86)\Arduino/tools-builder” -tools C:\Users\Johanan\AppData\Local/Arduino15/packages -built-in-libraries “C:\Program Files (x86)\Arduino/libraries” -libraries C:\Users\Johanan\Documents\Arduino\ -prefs=runtime.tools.stm32tools.path=C:\Users\Johanan\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.9.24 sketches/ArduinoProject1.ino
    Directory: C:\MyWork\ArduinoProjects\ArduinoProject1
    VisualGDB: Error: Command-line action failed
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    And the output from VisualGDB Advanced Project Subsystem is:

    Checking if any source files need uploading…
    Saved the code model to C:\MyWork\ArduinoProjects\ArduinoProject1\VisualGDBCache\ArduinoProject1-Debug-Generic_STM32F103C_series\BuildCommandLines.txt
    Failed to parse code model from C:\MyWork\ArduinoProjects\ArduinoProject1\VisualGDBCache\ArduinoProject1-Debug-Generic_STM32F103C_series\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
    at ov1.j1.m_2(IEnumerable`1 a)
    Compiler output:
    Checking if any source files need uploading…
    Saved the code model to C:\MyWork\ArduinoProjects\ArduinoProject2\VisualGDBCache\ArduinoProject2-Debug-Arduino_Leonardo\BuildCommandLines.txt
    Failed to parse code model from C:\MyWork\ArduinoProjects\ArduinoProject2\VisualGDBCache\ArduinoProject2-Debug-Arduino_Leonardo\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
    at ov1.j1.m_2(IEnumerable`1 a)
    Compiler output:
    Loading cached code model from C:\MyWork\ArduinoProjects\ArduinoProject1\VisualGDBCache\ArduinoProject1-Debug-Generic_STM32F103C_series\BuildCommandLines.txt…
    Failed to parse code model from C:\MyWork\ArduinoProjects\ArduinoProject1\VisualGDBCache\ArduinoProject1-Debug-Generic_STM32F103C_series\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
    at ov1.j1.m_2(IEnumerable`1 a)
    Compiler output:
    Checking if any source files need uploading…
    Checking for file modifications…
    Found changed files since last query (see C:\MyWork\ArduinoProjects\ArduinoProject1\VisualGDBCache\ArduinoProject1-Debug-Generic_STM32F103C_series\BuildFileStats.txt.old vs C:\MyWork\ArduinoProjects\ArduinoProject1\VisualGDBCache\ArduinoProject1-Debug-Generic_STM32F103C_series\BuildFileStats.txt.new). Rerunning code model query..
    Saved the code model to C:\MyWork\ArduinoProjects\ArduinoProject1\VisualGDBCache\ArduinoProject1-Debug-Generic_STM32F103C_series\BuildCommandLines.txt
    Failed to parse code model from C:\MyWork\ArduinoProjects\ArduinoProject1\VisualGDBCache\ArduinoProject1-Debug-Generic_STM32F103C_series\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
    at ov1.j1.m_2(IEnumerable`1 a)
    Compiler output:

    Hope this gives a clue.

    BTW I do have it on my laptop, with much fewer Arduino broads installed, but on the laptop it looks OK at first glance – I did not play too much with it.

    Regards

     

     

    #26049
    support
    Keymaster

    Please check the part of the build log before the “Command exited with code 1” line. It should show the actual error message coming from the arduino-builder tool.

    #26050
    Johanan
    Participant

    Here it is:

    —— Build started: Project: ArduinoProject1, Configuration: Debug Generic_STM32F103C_series ——
    Launching Arduino builder…
    VisualGDB: Run “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino\arduino-builder.exe -compile -logger=machine -fqbn=stm32duino:STM32F1:genericSTM32F103C:device_variant=STM32F103C8,upload_method=DFUUploadMethod,cpu_speed=speed_72mhz,opt=osstd -build-path C:\MyWork\ArduinoProjects\ArduinoProject1\Output\Generic_STM32F103C_series\Debug -unoptimize=sketch -hardware “C:\Program Files (x86)\Arduino/hardware” -hardware C:\Users\Johanan\AppData\Local/Arduino15/packages -tools “C:\Program Files (x86)\Arduino/tools-builder” -tools C:\Users\Johanan\AppData\Local/Arduino15/packages -built-in-libraries “C:\Program Files (x86)\Arduino/libraries” -libraries C:\Users\Johanan\Documents\Arduino\ -prefs=runtime.tools.stm32tools.path=C:\Users\Johanan\AppData\Local\Arduino15\packages\stm32duino\tools\stm32tools\2019.9.24 sketches/ArduinoProject1.ino” in directory “C:\MyWork\ArduinoProjects\ArduinoProject1” on local computer
    error: ctags pattern is missing

    #26056
    support
    Keymaster

    Strange. Normally the arduino builder should have displayed more details.

    Either way, please try deleting/moving out the C:\Users\Johanan\AppData\Local/Arduino15 folder and then create another Arduino project for that target. This will force VisualGDB to re-install all the libraries and resolve any inconsistencies that could have been left by the previous setup.

    #26066
    Johanan
    Participant

    I did,

    It really downloaded again all the libraries, but the problem is stubborn. It is the same.

    In another post I have strange issues with simple STM32L05 device. Should I Uninstall VisualGDB, clean up and re-install it?

    if Yes, please specify which directories should be deleted after uninstall, in order to leave no traces so I can make a very fresh install.

    Thanks

     

    #26081
    support
    Keymaster

    Sorry, we have tried reproducing the issue on a clean machine, but could not get anything to fail

    The problem might be caused by a conflict with some other package versions installed somewhere else (see the directories listed in the build command line, such as C:\Program Files (x86)\Arduino/hardware).

    Please try the following steps to resolve this:

    1. Try clearing the Tools->VisualGDB->Arduino->Arduino IDE Directory setting.
    2. Try clearing any other directories mentioned in the build command line.
    3. Confirm that the problem exists for a freshly created demo project and is not specific to one pre-existing project, that could be referencing some libraries incorrectly.

    If nothing helps, please try running the build from the Arduino IDE under Process Monitor and enable filters for “Process Create” event. It will show the command line used by the Arduino IDE to launch arduino-builder (you would need to locate the instance that has -compile among the arguments). The differences in the build results are likely triggered by the differences in command lines (e.g. the Arduino IDE passes some paths in a different order).

    Please try comparing the command lines and then adjusting the VisualGDB’s command line to match the one captured from Arduino IDE and running it manually via Command Prompt. If you can find a specific argument, or argument sequence that triggers the problem, we should be able to update VisualGDB to avoid it and produce the same results as Arduino IDE does.

    #26085
    Johanan
    Participant

    We are making progress.

    If I clear the Arduino IDE directory ( 1.jpg), it compiles and run, but I am unable to see debugged source code. ( it does not download anything).

    The break point is off (2.jpg) and it shows (3.jpg).

    Using bluePill stm32F103C8, and STlink-V2

    If I set the Arduino IDE directory to the correct value (C:\Program Files (x86)\Arduino) it make no difference.

    Regards.

    Johanan

     

    Attachments:
    You must be logged in to view attached files.
    #26112
    support
    Keymaster

    Thanks, it looks like the new STM32 Arduino package builds executables without debug information by default.

    We have updated VisualGDB to automatically detect and fix this condition: VisualGDB-5.5.1.3298.msi (see the bar on top of the source files belonging to the Arduino project).

    #26123
    Johanan
    Participant

    Now this looks OK.

    Only thing that may be a concern to you is that when I set the Arduino IDE directory to correct path, then the project is not built correctly.

    If I leave this setting empty, all is OK (and nothing is downloaded).

    Regards

    #26129
    support
    Keymaster

    Good to know it works.

    Regarding the Arduino IDE, it looks like some sort of a conflict between different versions of the packages in the Arduino directory and the VisualGDB directory. We should be able to fix this if you could archive the entire Arduino IDE directory and also the C:\Users\Johanan\AppData\Local/Arduino15 directory so that we could reproduce everything on our side. But since the current workaround fixes the problem, you can simply proceed with having the Arduino IDE directory unspecified.

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.