Arduino hardware arduino avr boards txt 0 invalid line format should be key value

Sysprogs

Sysprogs forums › Forums › VisualGDB › Can’t open Arduino project after manually editing boards.txt

This topic contains 12 replies, has 2 voices, and was last updated by support 2 years, 10 months ago.

After manually editing the clock frequency of the Arduino UNO from 8MHz to 16MHz I got projects errors while reloading the project. So I closed Visual Studio and reopened it again and now its stuck loading the solution project.

I changed it back to the previous clock frequency but it’s still stuck.

How can I revert this?

I’m using VisualGDB v. 5.5 build 3402.

  • This topic was modified 2 years, 10 months ago by MystikReasons.

Update: Every Arduino project is now having errors and won’t build because it has build errors. (see screenshot)

Reloading the project doesn’t solve the issue.

Loading cached code model from C:\Users\gwerderj\source\repos\Arduino_MIOTY_Dragino_sendString1\VisualGDBCache\Arduino_MIOTY_Dragino_sendString1-Debug-Arduino_Genuino_Uno\BuildCommandLines.txt…
Failed to parse code model from C:\Users\gwerderj\source\repos\Arduino_MIOTY_Dragino_sendString1\VisualGDBCache\Arduino_MIOTY_Dragino_sendString1-Debug-Arduino_Genuino_Uno\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
at bq2.j1.j_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:\Users\gwerderj\source\repos\Arduino_MIOTY_Dragino_sendString1\VisualGDBCache\Arduino_MIOTY_Dragino_sendString1-Debug-Arduino_Genuino_Uno\BuildFileStats.txt.old vs C:\Users\gwerderj\source\repos\Arduino_MIOTY_Dragino_sendString1\VisualGDBCache\Arduino_MIOTY_Dragino_sendString1-Debug-Arduino_Genuino_Uno\BuildFileStats.txt.new). Rerunning code model query..
Saved the code model to C:\Users\gwerderj\source\repos\Arduino_MIOTY_Dragino_sendString1\VisualGDBCache\Arduino_MIOTY_Dragino_sendString1-Debug-Arduino_Genuino_Uno\BuildCommandLines.txt
Failed to parse code model from C:\Users\gwerderj\source\repos\Arduino_MIOTY_Dragino_sendString1\VisualGDBCache\Arduino_MIOTY_Dragino_sendString1-Debug-Arduino_Genuino_Uno\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
at bq2.j1.j_2(IEnumerable 1 a)
Compiler output:

========== Project Configuration Summary ==========
Arduino_MIOTY_Dragino_sendString1 configured in 00:00
========== Configuration: 1 Succeeded, 0 Failed ==========

  • This reply was modified 2 years, 10 months ago by MystikReasons.
Attachments:

Launching Arduino builder…
C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino\arduino-builder.exe -compile -logger=machine -fqbn=arduino:avr:uno -build-path C:\Users\gwerderj\source\repos\Arduino_MIOTY_Dragino_sendString1\Output\Arduino_Genuino_Uno\Debug -unoptimize=sketch -hardware “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino/hardware” -hardware C:\Users\gwerderj\Documents/ArduinoData/packages -hardware C:\Users\gwerderj\AppData\Local/Arduino15/packages -tools “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino/tools-builder” -tools C:\Users\gwerderj\Documents/ArduinoData/packages -tools C:\Users\gwerderj\AppData\Local/Arduino15/packages -libraries C:\Users\gwerderj\Documents/Arduino/Libraries -prefs=runtime.tools.avr-gcc.path=C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5 -prefs=runtime.tools.avrdude.path=C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\tools\arduinoOTA\1.3.0 sketches/Arduino_MIOTY_Dragino_sendString1.ino
Error reading file (C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\hardware\avr\1.8.1\boards.txt:0): Invalid line format, should be ‘key=value’
————————————————————-
Command exited with code 1
Executable: C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino\arduino-builder.exe
Arguments: -compile -logger=machine -fqbn=arduino:avr:uno -build-path C:\Users\gwerderj\source\repos\Arduino_MIOTY_Dragino_sendString1\Output\Arduino_Genuino_Uno\Debug -unoptimize=sketch -hardware “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino/hardware” -hardware C:\Users\gwerderj\Documents/ArduinoData/packages -hardware C:\Users\gwerderj\AppData\Local/Arduino15/packages -tools “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino/tools-builder” -tools C:\Users\gwerderj\Documents/ArduinoData/packages -tools C:\Users\gwerderj\AppData\Local/Arduino15/packages -libraries C:\Users\gwerderj\Documents/Arduino/Libraries -prefs=runtime.tools.avr-gcc.path=C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5 -prefs=runtime.tools.avrdude.path=C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\tools\arduinoOTA\1.3.0 sketches/Arduino_MIOTY_Dragino_sendString1.ino
Directory: C:\Users\gwerderj\source\repos\Arduino_MIOTY_Dragino_sendString1
Command-line action failed

========== Project Build Summary ==========
Arduino_MIOTY_Dragino_sendString1 built in 00:00
========== Build: 0 Succeeded, 1 Failed ==========

Edit: I changed the clock frequency from 16 MHz to 8 MHz, not from 8 to 16 as stated above

  • This reply was modified 2 years, 10 months ago by MystikReasons.

It looks like you broke something in the platform files:

The easiest way to fix it would be to just delete the arduino\hardware\avr folder, restart VS, and let VisualGDB download all the necessary packages from scratch.

I did as you said but it just complains about missing the ‘arduino:avr’. It doesn’t download any necessary packages.

Reloading/building the project doesn’t help either.

Loading cached code model from C:\Users\gwerderj\source\repos\Arduino_LORA\VisualGDBCache\Arduino_LORA-Debug-Arduino_Genuino_Uno\BuildCommandLines.txt…
Failed to parse code model from C:\Users\gwerderj\source\repos\Arduino_LORA\VisualGDBCache\Arduino_LORA-Debug-Arduino_Genuino_Uno\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
at bq2.j1.j_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:\Users\gwerderj\source\repos\Arduino_LORA\VisualGDBCache\Arduino_LORA-Debug-Arduino_Genuino_Uno\BuildFileStats.txt.old vs C:\Users\gwerderj\source\repos\Arduino_LORA\VisualGDBCache\Arduino_LORA-Debug-Arduino_Genuino_Uno\BuildFileStats.txt.new). Rerunning code model query..
Failed to locate best tools for arduino:avr:uno: Platform ‘arduino:avr’ is not installed.
Saved the code model to C:\Users\gwerderj\source\repos\Arduino_LORA\VisualGDBCache\Arduino_LORA-Debug-Arduino_Genuino_Uno\BuildCommandLines.txt
Failed to parse code model from C:\Users\gwerderj\source\repos\Arduino_LORA\VisualGDBCache\Arduino_LORA-Debug-Arduino_Genuino_Uno\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
at bq2.j1.j_2(IEnumerable 1 a)
Compiler output:

========== Project Configuration Summary ==========
Arduino_LORA configured in 00:00
========== Configuration: 1 Succeeded, 0 Failed ==========

Please try creating a new project from scratch. Please also update to VisualGDB-5.5.2.3403.msi ​ . This version will download missing packages when you open the project, given that it was fully loaded before (won’t help for projects that were never loaded with the new build).

You forgot to mention that I have to install the Arduino AVR Boards package in the visualgdb package manager window, I thought it would do it himself.

After reloading the project I’m still having build errors:

Loading cached code model from C:\Users\gwerderj\source\repos\Arduino_LORA\VisualGDBCache\Arduino_LORA-Debug-Arduino_Genuino_Uno\BuildCommandLines.txt…
Failed to parse code model from C:\Users\gwerderj\source\repos\Arduino_LORA\VisualGDBCache\Arduino_LORA-Debug-Arduino_Genuino_Uno\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
at bq2.j1.j_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:\Users\gwerderj\source\repos\Arduino_LORA\VisualGDBCache\Arduino_LORA-Debug-Arduino_Genuino_Uno\BuildFileStats.txt.old vs C:\Users\gwerderj\source\repos\Arduino_LORA\VisualGDBCache\Arduino_LORA-Debug-Arduino_Genuino_Uno\BuildFileStats.txt.new). Rerunning code model query..
Saved the code model to C:\Users\gwerderj\source\repos\Arduino_LORA\VisualGDBCache\Arduino_LORA-Debug-Arduino_Genuino_Uno\BuildCommandLines.txt
Failed to parse code model from C:\Users\gwerderj\source\repos\Arduino_LORA\VisualGDBCache\Arduino_LORA-Debug-Arduino_Genuino_Uno\CodeModel.json:System.Exception: Arduino code model did not report any sketch sources
at bq2.j1.j_2(IEnumerable 1 a)
Compiler output:

========== Project Configuration Summary ==========
Arduino_LORA configured in 00:00
========== Configuration: 1 Succeeded, 0 Failed ==========

Update to your last post: I will try build 3403

  • This reply was modified 2 years, 10 months ago by MystikReasons.

Okay so after creating a new project from scratch with the Uno it already has build errors (just created the project).

I’m using your new build 3403.

Launching Arduino builder…
C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino\arduino-builder.exe -compile -logger=machine -fqbn=arduino:avr:uno -build-path C:\Users\gwerderj\source\repos\Arduino_MIOTY_LORA_LIKE_Dragino_BME280\Output\Arduino_Genuino_Uno\Debug -unoptimize=sketch -hardware “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino/hardware” -hardware C:\Users\gwerderj\Documents/ArduinoData/packages -hardware C:\Users\gwerderj\AppData\Local/Arduino15/packages -tools “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino/tools-builder” -tools C:\Users\gwerderj\Documents/ArduinoData/packages -tools C:\Users\gwerderj\AppData\Local/Arduino15/packages -libraries C:\Users\gwerderj\Documents/Arduino/Libraries -prefs=runtime.tools.avr-gcc.path=C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5 -prefs=runtime.tools.avrdude.path=C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\tools\arduinoOTA\1.3.0 sketches/Arduino_MIOTY_LORA_LIKE_Dragino_BME280.ino
Error reading file (C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\hardware\uni_erlangen\1.8.1\boards.txt:0): Invalid line format, should be ‘key=value’
————————————————————-
Command exited with code 1
Executable: C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino\arduino-builder.exe
Arguments: -compile -logger=machine -fqbn=arduino:avr:uno -build-path C:\Users\gwerderj\source\repos\Arduino_MIOTY_LORA_LIKE_Dragino_BME280\Output\Arduino_Genuino_Uno\Debug -unoptimize=sketch -hardware “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino/hardware” -hardware C:\Users\gwerderj\Documents/ArduinoData/packages -hardware C:\Users\gwerderj\AppData\Local/Arduino15/packages -tools “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino/tools-builder” -tools C:\Users\gwerderj\Documents/ArduinoData/packages -tools C:\Users\gwerderj\AppData\Local/Arduino15/packages -libraries C:\Users\gwerderj\Documents/Arduino/Libraries -prefs=runtime.tools.avr-gcc.path=C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5 -prefs=runtime.tools.avrdude.path=C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\tools\avrdude\6.3.0-arduino17 -prefs=runtime.tools.arduinoOTA.path=C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\tools\arduinoOTA\1.3.0 sketches/Arduino_MIOTY_LORA_LIKE_Dragino_BME280.ino
Directory: C:\Users\gwerderj\source\repos\Arduino_MIOTY_LORA_LIKE_Dragino_BME280
Command-line action failed

========== Project Build Summary ==========
Arduino_MIOTY_LORA_LIKE_Dragino_BME280 built in 00:00
========== Build: 0 Succeeded, 1 Failed ==========

The new build also doesn’t want to install the missing package (‘arduino:avr’)

Failed to locate best tools for arduino:avr:uno: Platform ‘arduino:avr’ is not installed.
Launching Arduino builder…
C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino\arduino-builder.exe -compile -logger=machine -fqbn=arduino:avr:uno -build-path C:\Users\gwerderj\source\repos\Arduino_MIOTY_LORA_LIKE_Dragino_BME280\Output\Arduino_Genuino_Uno\Debug -unoptimize=sketch -hardware “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino/hardware” -hardware C:\Users\gwerderj\Documents/ArduinoData/packages -hardware C:\Users\gwerderj\AppData\Local/Arduino15/packages -tools “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino/tools-builder” -tools C:\Users\gwerderj\Documents/ArduinoData/packages -tools C:\Users\gwerderj\AppData\Local/Arduino15/packages -libraries C:\Users\gwerderj\Documents/Arduino/Libraries sketches/Arduino_MIOTY_LORA_LIKE_Dragino_BME280.ino
Error reading file (C:\Users\gwerderj\Documents\ArduinoData\packages\arduino\hardware\uni_erlangen\1.8.1\boards.txt:0): Invalid line format, should be ‘key=value’
————————————————————-
Command exited with code 1
Executable: C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino\arduino-builder.exe
Arguments: -compile -logger=machine -fqbn=arduino:avr:uno -build-path C:\Users\gwerderj\source\repos\Arduino_MIOTY_LORA_LIKE_Dragino_BME280\Output\Arduino_Genuino_Uno\Debug -unoptimize=sketch -hardware “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino/hardware” -hardware C:\Users\gwerderj\Documents/ArduinoData/packages -hardware C:\Users\gwerderj\AppData\Local/Arduino15/packages -tools “C:\Program Files (x86)\Sysprogs\VisualGDB\Arduino/tools-builder” -tools C:\Users\gwerderj\Documents/ArduinoData/packages -tools C:\Users\gwerderj\AppData\Local/Arduino15/packages -libraries C:\Users\gwerderj\Documents/Arduino/Libraries sketches/Arduino_MIOTY_LORA_LIKE_Dragino_BME280.ino
Directory: C:\Users\gwerderj\source\repos\Arduino_MIOTY_LORA_LIKE_Dragino_BME280
Command-line action failed

========== Project Build Summary ==========
Arduino_MIOTY_LORA_LIKE_Dragino_BME280 built in 00:00
========== Build: 0 Succeeded, 1 Failed ==========

Источник

Arduino hardware arduino avr boards txt 0 invalid line format should be key value

Ранее я писал о прошивке контроллеров ATMEGA328 при помощи программаторов

Настала пора разобраться, а заодно привести в порядок файл BOARD.TXT

Описание данного файла довольно скудное, нашел на странице WiKi Arduino IDE. О новых возможностях формата данного файла навела на мысль возможность настройки тех же Arduino Pro Mini с дополнительным меню. Вот и решил сделать на подобие этого описание своих контроллеров.

Что требуется

Описать контроллеры Ардуино с загрузчиком OPTIBOOT, из поставки Arduino IDE, работающие с различными кварцевыми резонаторами и имеющие разные фьюз-биты, в частности, у вех из них отключен контроль входного напряжения BOD для работы на низких напряжениях питания.

  • Контроллер Atmega328 с внешним кварцем 16МГц
  • Контроллер Atmega328 с внешним кварцем 8МГц
  • Контроллер Atmega328 с внутренним резонатором 8МГц

Чтобы не перегружать список контроллеров в Arduino IDE желательно вынести различающиеся параметры в подменю

Настройка BOARDS.TXT

Нахожу файл BOARDS.TXT. У меня он установился в c:\Program Files (x86)\Arduino\hardware\arduino\avr\boards.txt и открываю в текстовом редакторе.

Чтобы Arduino IDE корректно поддерживал русские буквы, редактор должен поддерживать кодировку UTF-8 в которой работает среда программирования. Я пользуюсь редактором NOTEPAD++ с подсветкой синтаксиса и кучи возможностей.

Для начала, я создам дополнительное меню «Резонатор», отличающее типы моих контроллеров. Для этого в начале файла прописываю:

Источник

Adblock
detector