arduino-cli для Windows проблема
- Войдите на сайт для отправки комментариев
Пт, 22/01/2021 - 11:55
В продолжение этой темы, я решил установить по совету уже скомпилированный arduino-cli на Win64(да вообще без разницы).
И столкнулся с проблемой на avr:
c:\Arduino>arduino-cli -v compile -b arduino:avr:pro c:\Arduino\examples\01.Basics\Blink\Blink.ino Using board 'pro' from platform in folder: C:\Arduino\hardware\arduino\avr Using core 'arduino' from platform in folder: C:\Arduino\hardware\arduino\avr Detecting libraries used... "C:\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2\\sketch\\Blink.ino.cpp" -o nul Generating function prototypes... "C:\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2\\preproc\\ctags_target_for_gcc_minus_e.cpp" "C:\\Arduino\\portable\\packages\\builtin\\tools\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2\\preproc\\ctags_target_for_gcc_minus_e.cpp" Compiling sketch... "C:\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10607 -DARDUINO_AVR_PRO -DARDUINO_ARCH_AVR "-IC:\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Arduino\\hardware\\arduino\\avr\\variants\\eightanaloginputs" "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2\\sketch\\Blink.ino.cpp" -o "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2\\sketch\\Blink.ino.cpp.o" Compiling libraries... Compiling core... Using precompiled core: C:\Users\Dima\AppData\Local\Temp\arduino-core-cache\core_arduino_avr_pro_2caceeb2327f081f1da40ecf6d10a0ef.a Linking everything together... "C:\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2/Blink.ino.elf" "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2\\sketch\\Blink.ino.cpp.o" "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2/..\\arduino-core-cache\\core_arduino_avr_pro_2caceeb2327f081f1da40ecf6d10a0ef.a" "-LC:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2" -lm "C:\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2/Blink.ino.elf" "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2/Blink.ino.eep" "C:\\Arduino\\hardware\\tools\\avr/bin/avr-objcopy" -O ihex -R .eeprom - "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2/Blink.ino.elf" "C:\\Users\\Dima\\AppData\\Local\\Temp\\arduino-sketch-EE67CD7D5563459E58EBDF47CC1345A2/Blink.ino.hex" Usage: C:\Arduino\hardware\tools\avr/bin/avr-objcopy [option(s)] in-file [out-file] Copies a binary file, possibly transforming it in the process The options are: -I --input-target <bfdname> Assume input file is in format <bfdname> -O --output-target <bfdname> Create an output file in format <bfdname> -B --binary-architecture <arch> Set output arch, when input is arch-less -F --target <bfdname> Set both input and output format to <bfdname> --debugging Convert debugging information, if possible -p --preserve-dates Copy modified/access timestamps to the output -D --enable-deterministic-archives Produce deterministic output when stripping archives -U --disable-deterministic-archives Disable -D behavior (default) -j --only-section <name> Only copy section <name> into the output --add-gnu-debuglink=<file> Add section .gnu_debuglink linking to <file> -R --remove-section <name> Remove section <name> from the output -S --strip-all Remove all symbol and relocation information -g --strip-debug Remove all debugging symbols & sections --strip-dwo Remove all DWO sections --strip-unneeded Remove all symbols not needed by relocations -N --strip-symbol <name> Do not copy symbol <name> --strip-unneeded-symbol <name> Do not copy symbol <name> unless needed by relocations --only-keep-debug Strip everything but the debug information --extract-dwo Copy only DWO sections --extract-symbol Remove section contents but keep symbols -K --keep-symbol <name> Do not strip symbol <name> --keep-file-symbols Do not strip file symbol(s) --localize-hidden Turn all ELF hidden symbols into locals -L --localize-symbol <name> Force symbol <name> to be marked as a local --globalize-symbol <name> Force symbol <name> to be marked as a global -G --keep-global-symbol <name> Localize all symbols except <name> -W --weaken-symbol <name> Force symbol <name> to be marked as a weak --weaken Force all global symbols to be marked as weak -w --wildcard Permit wildcard in symbol comparison -x --discard-all Remove all non-global symbols -X --discard-locals Remove any compiler-generated symbols -i --interleave[=<number>] Only copy N out of every <number> bytes --interleave-width <number> Set N for --interleave -b --byte <num> Select byte <num> in every interleaved block --gap-fill <val> Fill gaps between sections with <val> --pad-to <addr> Pad the last section up to address <addr> --set-start <addr> Set the start address to <addr> {--change-start|--adjust-start} <incr> Add <incr> to the start address {--change-addresses|--adjust-vma} <incr> Add <incr> to LMA, VMA and start addresses {--change-section-address|--adjust-section-vma} <name>{=|+|-}<val> Change LMA and VMA of section <name> by <val> --change-section-lma <name>{=|+|-}<val> Change the LMA of section <name> by <val> --change-section-vma <name>{=|+|-}<val> Change the VMA of section <name> by <val> {--[no-]change-warnings|--[no-]adjust-warnings} Warn if a named section does not exist --set-section-flags <name>=<flags> Set section <name>'s properties to <flags> --add-section <name>=<file> Add section <name> found in <file> to output --update-section <name>=<file> Update contents of section <name> with contents found in <file> --dump-section <name>=<file> Dump the contents of section <name> into <file> --rename-section <old>=<new>[,<flags>] Rename section <old> to <new> --long-section-names {enable|disable|keep} Handle long section names in Coff objects. --change-leading-char Force output format's leading character style --remove-leading-char Remove leading character from global symbols --reverse-bytes=<num> Reverse <num> bytes at a time, in output sections with content --redefine-sym <old>=<new> Redefine symbol name <old> to <new> --redefine-syms <file> --redefine-sym for all symbol pairs listed in <file> --srec-len <number> Restrict the length of generated Srecords --srec-forceS3 Restrict the type of generated Srecords to S3 --strip-symbols <file> -N for all symbols listed in <file> --strip-unneeded-symbols <file> --strip-unneeded-symbol for all symbols listed in <file> --keep-symbols <file> -K for all symbols listed in <file> --localize-symbols <file> -L for all symbols listed in <file> --globalize-symbols <file> --globalize-symbol for all in <file> --keep-global-symbols <file> -G for all symbols listed in <file> --weaken-symbols <file> -W for all symbols listed in <file> --add-symbol <name>=[<section>:]<value>[,<flags>] Add a symbol --alt-machine-code <index> Use the target's <index>'th alternative machine --writable-text Mark the output text as writable --readonly-text Make the output text write protected --pure Mark the output file as demand paged --impure Mark the output file as impure --prefix-symbols <prefix> Add <prefix> to start of every symbol name --prefix-sections <prefix> Add <prefix> to start of every section name --prefix-alloc-sections <prefix> Add <prefix> to start of every allocatable section name --file-alignment <num> Set PE file alignment to <num> --heap <reserve>[,<commit>] Set PE reserve/commit heap to <reserve>/ <commit> --image-base <address> Set PE image base to <address> --section-alignment <num> Set PE section alignment to <num> --stack <reserve>[,<commit>] Set PE reserve/commit stack to <reserve>/ <commit> --subsystem <name>[:<version>] Set PE subsystem to <name> [& <version>] --compress-debug-sections[={none|zlib|zlib-gnu|zlib-gabi}] Compress DWARF debug sections using zlib --decompress-debug-sections Decompress DWARF debug sections using zlib -v --verbose List all object files modified @<file> Read options from <file> -V --version Display this program's version number -h --help Display this output --info List object formats & architectures supported C:\Arduino\hardware\tools\avr/bin/avr-objcopy: supported targets: elf32-avr elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex Error during build: exit status 1 c:\Arduino>
Проблема на строке 016 в лишнем символе "-" перед начало пути.
Причем эта проблема наблюдается как на Latest packages так и на Nightly builds.
Вот Вам моё первое знакомство с arduino-cli...
Поправка - лишний символ в 017 строке.
Назревает вопрос - неужели никто не пользуется этим предкомпилированным arduino-cli для Windows чтоб пофиксить уже этот баг?
Эта проблема бы появилась у других пользователей... Или я исключение?
Назревает вопрос - неужели никто не пользуется этим предкомпилированным arduino-cli
Я очень опасаюсь расстроить тебя, дорогой друг, но ты первый (и единственный). Будет о чем рассказывать внукам перед камином, долгими зимними вечерами.
=============================
Делая "странное", человек вызывает желание глумиться, как естественную реакцию на "странное". Ты бы рассказал, чего добиваешься? Ты, в другой теме, написал, что что-то с чем-то сравниваешь. Расскажи что хочешь узнать? Производительность чего? И в той теме можно поставить метки времени в обычной ИДЕ. Никто, из тех кто знает как, не стал писать, ввиду того, что постановка бредова и бессмысленна. Поясню: (к примеру) при первой компиляции - компилятся библииотеки, при второй (с теми же условиями) - нет. И таких тонкостей много. Само же время компиляции - не является показателем ничего. Больше зависит от количества ОЗУ на компе, чем от других параметров.
Я ставил ИДЕ на ОранжПи с гигом памяти, на Линух, ессно. Работает, время компиляции - разница меньше секунды. Тебе для чего этот показатель? Какие ты собираешь сделать выводы из собранной информации?
неужели никто не пользуется этим предкомпилированным arduino-cli для Windows чтоб пофиксить уже этот баг?
Эта проблема бы появилась у других пользователей... Или я исключение?
вы точно исключение... уникум.
Ну а если по теме - проблема скорее всего у вас на компе. Попробуйте внимательно изучить файл platform.txt, все опции компиляции и линковки прописываются там.
А так, присоединяюсь к предыдущему оратору - вы занимаетесь откровенной хренью. К уже высказанным сомнениям добавлю, что наверняка время сборки проекта нативной ардуино ИДЕ и предкомпилированной cli будет разным. то есть ваши результаты заведомо неадекватны... кому нафик это надо?
А так, присоединяюсь к предыдущему оратору - вы занимаетесь откровенной хренью. К уже высказанным сомнениям добавлю, что наверняка время сборки проекта нативной ардуино ИДЕ и предкомпилированной cli будет разным. то есть ваши результаты заведомо неадекватны... кому нафик это надо?
Спасибо большое, что ответили на вопрос жизни и смерти. Без вашего участи в моей жизни я бы не догадался, что являюсь фриком и "занимаюсь откровенной хренью" все жизнь и по сей день.
Я поставил Вам + Удачи!
Я поставил Вам + Удачи!
а я - минус :) зато честно
Тока в честь пятницы. Скоро солнце сядет, Шаббат шалом и все эти вещи. Карму отстирать надо... а что делать?
Вот тебе ответ в первую твою тему, искать ее не хочу, простишь? ;))
нужно добавить флаг -ftime-report в строчку compiler.cpp.extra_flags= в файле platform.txt в рабочем каталоге ИДЕ, в имени которого есть arduino15. Я - линуксоид и не знаю точно, где в Винде этот каталог лежит. Где-то в твоем домашнем...
Таким образом
Еще нужно не забыть включить все сообщения компилятора в "Настройках".
Вот сейчас скомпилировал, правда для due
17 строка
у тебя