{"action":"created","issue":{"url":"https://api.github.com/repos/arduino/arduino-cli/issues/66","repository_url":"https://api.github.com/repos/arduino/arduino-cli","labels_url":"https://api.github.com/repos/arduino/arduino-cli/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/arduino/arduino-cli/issues/66/comments","events_url":"https://api.github.com/repos/arduino/arduino-cli/issues/66/events","html_url":"https://github.com/arduino/arduino-cli/issues/66","id":368831856,"node_id":"MDU6SXNzdWUzNjg4MzE4NTY=","number":66,"title":"Wrong core.a location for WAVGAT platform","user":{"login":"grafalex82","id":23584882,"node_id":"MDQ6VXNlcjIzNTg0ODgy","avatar_url":"https://avatars2.githubusercontent.com/u/23584882?v=4","gravatar_id":"","url":"https://api.github.com/users/grafalex82","html_url":"https://github.com/grafalex82","followers_url":"https://api.github.com/users/grafalex82/followers","following_url":"https://api.github.com/users/grafalex82/following{/other_user}","gists_url":"https://api.github.com/users/grafalex82/gists{/gist_id}","starred_url":"https://api.github.com/users/grafalex82/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grafalex82/subscriptions","organizations_url":"https://api.github.com/users/grafalex82/orgs","repos_url":"https://api.github.com/users/grafalex82/repos","events_url":"https://api.github.com/users/grafalex82/events{/privacy}","received_events_url":"https://api.github.com/users/grafalex82/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-10T20:08:57Z","updated_at":"2018-10-11T09:59:37Z","closed_at":null,"author_association":"NONE","body":"Hello and thank you for the great tool!\r\n\r\nRecently I bought an arduino-nano clone on an lgt8F328d chip which is chinease ATMega328 clone with some improvements. Since this is not a 1-to-1 clone they provide a version of arduino stuff. \r\n\r\nhttps://drive.google.com/open?id=10gwrG9uTDwaEO-7EudsmBkfgdcyrcABI\r\n\r\nI tested this on Windows with normal arduino IDE and it seems working fine. The package consists of text files, so it is safe to download. Now I am trying to get it working on Linux (actually Raspbian)\r\n\r\nFirst I had hard time installing this to arduino-cli (at least uncertainty where to put those files). I ended up putting update/hardware/WAV/avr contents from the archive to .arduino15/packages/arduino/hardware/WAV/1.0.0 as arduino-cli wants a version number in the path. Eventually it picked up list of boards\r\n\r\nBut the next problem looks more serious (at least after 2 days fighting with it I still have no solution).\r\n\r\nWhen I try to compile a regular blink sketch for traditional arduino:avr:nano board build process creates core.a at /tmp/arduino-sketch-098F6BCD4621D373CADE4E832627B4F6/**core/**core.a\r\n\r\nWhen I try to compile for arduino:WAV:lardu_328e arduino-cli calls avr-ar with output path set to /tmp/arduino-sketch-098F6BCD4621D373CADE4E832627B4F6/core.a (no 'core' subdirectory). Later link can't find core.a and build fails. \r\n\r\nI tried to find the answer in platforms.txt as well as in arduino-cli sources, but no luck. It looks odd as ar and linker commands both use the same archive {build.path}/{archive_file} path:\r\n\r\n```\r\n## Create archives\r\n#recipe.ar.pattern=\"{compiler.path}{compiler.ar.cmd}\" {compiler.ar.flags} {compiler.ar.extra_flags} \"{build.path}/{archive_file}\" \"{object_file}\"\r\n\r\n## Combine gc-sections, archives, and objects\r\nrecipe.c.combine.pattern=\"{compiler.path}{compiler.c.elf.cmd}\" {compiler.c.elf.flags} -mmcu={build.mcu} {compiler.c.elf.extra_flags} -o \"{build.path}/{build.project_name}.elf\" {object_files} \"{build.path}/{archive_file}\" \"-L{build.path}\" -lm\r\n```\r\n\r\nI dumped exact arguments passed to ar and linker:\r\n\r\n```\r\n/home/pi/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-ar\r\nrcs\r\n/tmp/arduino-sketch-098F6BCD4621D373CADE4E832627B4F6/core.a\r\n\r\n...\r\n\r\n/home/pi/.arduino15/packages/arduino/tools/avr-gcc/4.9.2-atmel3.5.4-arduino2/bin/avr-gcc\r\n-w\r\n-Os\r\n-Wl,--gc-sections\r\n-mmcu=atmega328p\r\n-o\r\n/tmp/arduino-sketch-098F6BCD4621D373CADE4E832627B4F6/test.ino.elf\r\n/tmp/arduino-sketch-098F6BCD4621D373CADE4E832627B4F6/sketch/test.ino.cpp.o\r\n/tmp/arduino-sketch-098F6BCD4621D373CADE4E832627B4F6/core/core.a\r\n-L/tmp/arduino-sketch-098F6BCD4621D373CADE4E832627B4F6\r\n-lm\r\n```\r\n\r\nCan someone help me?\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/arduino/arduino-cli/issues/comments/428896229","html_url":"https://github.com/arduino/arduino-cli/issues/66#issuecomment-428896229","issue_url":"https://api.github.com/repos/arduino/arduino-cli/issues/66","id":428896229,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODg5NjIyOQ==","user":{"login":"brusherru","id":1897530,"node_id":"MDQ6VXNlcjE4OTc1MzA=","avatar_url":"https://avatars0.githubusercontent.com/u/1897530?v=4","gravatar_id":"","url":"https://api.github.com/users/brusherru","html_url":"https://github.com/brusherru","followers_url":"https://api.github.com/users/brusherru/followers","following_url":"https://api.github.com/users/brusherru/following{/other_user}","gists_url":"https://api.github.com/users/brusherru/gists{/gist_id}","starred_url":"https://api.github.com/users/brusherru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brusherru/subscriptions","organizations_url":"https://api.github.com/users/brusherru/orgs","repos_url":"https://api.github.com/users/brusherru/repos","events_url":"https://api.github.com/users/brusherru/events{/privacy}","received_events_url":"https://api.github.com/users/brusherru/received_events","type":"User","site_admin":false},"created_at":"2018-10-11T09:59:37Z","updated_at":"2018-10-11T09:59:37Z","author_association":"NONE","body":"It looks like a problem with the esp8266 `core.a` ([solution](https://github.com/arduino/arduino-cli/issues/47#issuecomment-424666516)).\r\nTry replace `{build.path}/{archive_file}` with `{archive_file_path}`."}}
{"actor":{"display_login":"brusherru"}}