{"action":"created","issue":{"url":"https://api.github.com/repos/arduino/Arduino/issues/3807","labels_url":"https://api.github.com/repos/arduino/Arduino/issues/3807/labels{/name}","comments_url":"https://api.github.com/repos/arduino/Arduino/issues/3807/comments","events_url":"https://api.github.com/repos/arduino/Arduino/issues/3807/events","html_url":"https://github.com/arduino/Arduino/issues/3807","id":106804544,"number":3807,"title":"arduino target file is in hardcoded folder sketch","user":{"login":"jantje","id":1175841,"avatar_url":"https://avatars.githubusercontent.com/u/1175841?v=3","gravatar_id":"","url":"https://api.github.com/users/jantje","html_url":"https://github.com/jantje","followers_url":"https://api.github.com/users/jantje/followers","following_url":"https://api.github.com/users/jantje/following{/other_user}","gists_url":"https://api.github.com/users/jantje/gists{/gist_id}","starred_url":"https://api.github.com/users/jantje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jantje/subscriptions","organizations_url":"https://api.github.com/users/jantje/orgs","repos_url":"https://api.github.com/users/jantje/repos","events_url":"https://api.github.com/users/jantje/events{/privacy}","received_events_url":"https://api.github.com/users/jantje/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-16T15:58:21Z","updated_at":"2015-09-17T09:14:25Z","closed_at":null,"body":"as @matthijskooijman states:\r\n\r\n>would it perhaps be an option to store the source and .o files inside sketch, but put the final linked .elf and .hex files directly in the build folder? This might fix most backward compatibility problems I believe, and it would still make sense (and not cause problems)?\r\n\r\nthe name \"sketch\" is hardcoded. That means that everybody making tools on top of the platform.txt needs to parse the content of the value of recipe.c.combine.pattern recipe.objcopy.eep.pattern and many more yust to know where the target file is located or hardcode multiple locations as proposed by @ffissore .\r\nI think this is a very bad approach. At least the name sketch should be in a variable but even better the target should be in the {build.path} folder.\r\n\r\nPS we have had a very similar discussion about the archive name which was also hardcoded in the one of the recipes"},"comment":{"url":"https://api.github.com/repos/arduino/Arduino/issues/comments/141019183","html_url":"https://github.com/arduino/Arduino/issues/3807#issuecomment-141019183","issue_url":"https://api.github.com/repos/arduino/Arduino/issues/3807","id":141019183,"user":{"login":"matthijskooijman","id":194491,"avatar_url":"https://avatars.githubusercontent.com/u/194491?v=3","gravatar_id":"","url":"https://api.github.com/users/matthijskooijman","html_url":"https://github.com/matthijskooijman","followers_url":"https://api.github.com/users/matthijskooijman/followers","following_url":"https://api.github.com/users/matthijskooijman/following{/other_user}","gists_url":"https://api.github.com/users/matthijskooijman/gists{/gist_id}","starred_url":"https://api.github.com/users/matthijskooijman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthijskooijman/subscriptions","organizations_url":"https://api.github.com/users/matthijskooijman/orgs","repos_url":"https://api.github.com/users/matthijskooijman/repos","events_url":"https://api.github.com/users/matthijskooijman/events{/privacy}","received_events_url":"https://api.github.com/users/matthijskooijman/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T09:14:25Z","updated_at":"2015-09-17T09:14:25Z","body":"It actually seems that the SAMD core already uses the proposed approach:\r\n```\r\n/home/matthijs/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-gcc -L/tmp/build6421611539749575012.tmp -Os -Wl,--gc-sections -save-temps -T/home/matthijs/.arduino15/packages/arduino/hardware/samd/1.6.1/variants/arduino_zero/linker_scripts/gcc/flash_with_bootloader.ld -Wl,-Map,/tmp/build6421611539749575012.tmp/Blink.cpp.map --specs=nano.specs --specs=nosys.specs -mcpu=cortex-m0plus -mthumb -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align -o /tmp/build6421611539749575012.tmp/Blink.cpp.elf /tmp/build6421611539749575012.tmp/sketch/Blink.cpp.o /tmp/build6421611539749575012.tmp/core/variant.cpp.o -Wl,--start-group -lm /tmp/build6421611539749575012.tmp/core/core.a -Wl,--end-group \r\n/home/matthijs/.arduino15/packages/arduino/tools/arm-none-eabi-gcc/4.8.3-2014q1/bin/arm-none-eabi-objcopy -O binary /tmp/build6421611539749575012.tmp/Blink.cpp.elf /tmp/build6421611539749575012.tmp/Blink.cpp.bin \r\n```\r\n\r\nIn this output, not that the .o file is in the subfolder: `/tmp/build6421611539749575012.tmp/sketch/Blink.cpp.o` but the elf file is not: `/tmp/build6421611539749575012.tmp/Blink.cpp.elf `."}}