Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Why can't arduino.json "output" share the same output folder that is generated for debugging? #1473

Closed
zfields opened this issue Mar 11, 2022 · 13 comments · Fixed by #1486
Closed
Labels
fixed-pending-release Fix is merged and will be included in the next release.

Comments

@zfields
Copy link

zfields commented Mar 11, 2022

I LOVE the debugging feature of VSCode for Arduino!

When I debug, instead of using a /tmp folder, it automatically creates the folder ${workspaceRoot}/.build/BluesW - I love it.

What I don't love, is that I can't use that same folder for the output key in my arduino.json. If I specify .build/BluesW to match the folder that has already been created, then it will put the binaries in .build/BluesW/BluesW. However, when I simply specify .build it will place the binaries in the root of the .build folder (as you would expect). 🤷

Also, if I completely remove the .build folder, but I have a nested path (e.g. .build/BluesW) specified for output, then it throws an error that the directory does not exist.

Please check the "output" in the sketch Settings.Cannot find the output path:/home/zak/Development/Arduino/gh-issue-1473/.build/BluesW

Here is my arduino.json file:

arduino.json
{
"configuration": "pnum=SWAN_R5,upload_method=swdMethod,xserial=generic,usb=CDCgen,xusb=FS,opt=ogstd,dbg=enable,rtlib=nano",
"board": "STMicroelectronics:stm32:BluesW",
"port": "/dev/ttyACM0",
"sketch": "gh-issue-1473.ino",
"output":".build/BluesW/"
}

@github-actions github-actions bot added the triage New issues that have not been reviewed. label Mar 11, 2022
@zfields zfields changed the title Why can't arduino.json "output" be the same as the output folder generated for debugging? Why can't arduino.json "output" share the same output folder that is generated for debugging? Mar 11, 2022
@gcampbell-msft
Copy link
Contributor

@zfields Could you share your test project including your debug configuration (launch.json if you have one) so that I can attempt to repro? Thanks!

@gcampbell-msft gcampbell-msft added needs-more-info More details about this issue are needed for it to be actionable. and removed triage New issues that have not been reviewed. labels Mar 31, 2022
@zfields
Copy link
Author

zfields commented Mar 31, 2022

What board do you have? I'll try and tailor a project just for you.

IIRC, you can just use the extension to create the blink sketch, and try and debug it and it will cause the issue to repro when it generates the build. No board required.

@gcampbell-msft
Copy link
Contributor

I'm using one of the STM Discovery Boards, STMicroelectronics B-L4S5I-IOTOA1.

My main question is what your debugging configuration looks like.

@zfields
Copy link
Author

zfields commented Mar 31, 2022

For the most part, it's the one that gets generated by the extension. I'm using OpenOCD as well.

Here are the full instructions.
https://dev.blues.io/quickstart/swan-quickstart/#debugging-arduino-with-vs-code

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Arduino",
            "type": "arduino",
            "request": "launch",
            "program": "${file}",
            "cwd": "${workspaceFolder}",
            "MIMode": "gdb",
            "targetArchitecture": "arm",
            "miDebuggerPath": "",
            "debugServerPath": "/usr/bin/openocd",
            "debugServerArgs": "-f interface/stlink.cfg -f target/stm32l4x.cfg",
            "customLaunchSetupCommands": [
                {
                    "text": "target remote localhost:3333"
                },
                {
                    "text": "file \"${file}\""
                },
                {
                    "text": "load"
                },
                {
                    "text": "monitor reset halt"
                },
                {
                    "text": "monitor reset init"
                }
            ],
            "stopAtEntry": true,
            "serverStarted": "Info\\ :\\ [\\w\\d\\.]*:\\ hardware",
            "launchCompleteCommand": "exec-continue",
            "filterStderr": true,
            "args": []
        }
    ]
}

@gcampbell-msft
Copy link
Contributor

Great. I'll attempt to repro as soon as my bandwidth allows and try to make sure this is reproducible.

I should also mention that the experience you're describing is very likely by design (I'll look into this along with attempting to reproduce), as build files often get overwritten and its often better practice to keep them separate.

@gcampbell-msft gcampbell-msft added investigating and removed needs-more-info More details about this issue are needed for it to be actionable. labels Mar 31, 2022
@zfields
Copy link
Author

zfields commented Mar 31, 2022

Kinda, sorta... I don't think it should arbitrarily choose a directory, it should probably throw an error and/or warning.

I would prefer to be able to specify this decision in a parameter instead of it being decided for me.

@gcampbell-msft
Copy link
Contributor

@zfields What version of the extension do you have installed? I'm able to repro the first scenario you mentioned .build/BluesW/BluesW, but not the second where it lets you specify simply .build.

gcampbell-msft added a commit that referenced this issue Mar 31, 2022
@gcampbell-msft gcampbell-msft linked a pull request Mar 31, 2022 that will close this issue
@zfields
Copy link
Author

zfields commented Apr 1, 2022

Build Action arduino.json "output": Pre-existing folder Actual output folder
Click, Verify nothing specified none /tmp/arduino_build_649115/
Click, Verify .build none $(workspaceRoot)/.build
Click, Verify .build/BluesW none ERROR (shown below)
Click, Verify .build/BluesW .build $(workspaceRoot)/.build/BluesW
Click, Verify .build/BluesW .build/BluesW $(workspaceRoot)/.build/BluesW
Start Debugging nothing specified none $(workspaceRoot)/.build/BluesW
Start Debugging .build none $(workspaceRoot)/.build/BluesW
Start Debugging .build/BluesW none $(workspaceRoot)/.build/BluesW/BluesW
Start Debugging .build/BluesW/verify none $(workspaceRoot)/.build/BluesW/verify/BluesW

In building the table above, I fully understand the behavior, and there are two issues.

  1. During normal compilation (a.k.a. Verify), the extension does not make directories along with necessary parent folders (on Linux, it is the difference between mkdir and mkdir -p).

    I would like to be offered the same flexibility that is being leveraged by the debug build.

  2. Under debug, the extension creates a folder with the naming convention .build/<board name>. If this matches the "output": folder, or any path along the way, then appends <board name> again.

    I don't understand the benefit of this behavior. Generally speaking, there is no advantage to recompiling another binary to use exclusively for debugging. When remote debugging, the binary is used for symbols by gdb, and the binary just needs to match what is running on the device.

    I should be able to specify the debug folder in arduino.json, if I want them to be separate (e.g. Release and Debug builds), but if I don't specify a debug folder, it should be assumed I would like to share it with the "output": folder.

ERROR
image

@gcampbell-msft
Copy link
Contributor

@zfields Understood. What version of the extension are you running? I can confirm that I'm reproducing all of the scenarios you laid out except for the first where it creates a /tmp folder and I don't see anywhere in the code that creates a folder like that.

I've published a PR that attempts to fix most of these issues (the ones listed in 1 and 2). If you download the VSIX from this PR and test with it, could you confirm that it solves your issues? Here is the link where the VSIX's are located.

@zfields
Copy link
Author

zfields commented Apr 1, 2022

Ahhh... I'm on a Linux machine. /tmp is at the root of my file system and is just a temporary directory that gets deleted when I reset my computer. It's not something I can see in VSCode or anything. I only know it's getting created from the compiler spew in the logs.

To recount, if I don't specify an "output": folder, then I get this warning...

[Warning] Output path is not specified. Unable to reuse previously compiled files. Build will be slower. See README.

and I will eventually see this from the compiler output...

...
Linking everything together...
/home/zak/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/10.3.1-2.3/bin/arm-none-eabi-gcc -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Og -g --specs=nano.specs -Wl,--defsym=LD_FLASH_OFFSET=0 -Wl,--defsym=LD_MAX_SIZE=2097152 -Wl,--defsym=LD_MAX_DATA_SIZE=655360 -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--default-script=/home/zak/.arduino15/packages/STMicroelectronics/hardware/stm32/2.2.0/variants/STM32L4xx/L4R5Z(G-I)Y_L4R9Z(G-I)Y_L4S5ZIY_L4S9ZIY/ldscript.ld -Wl,--script=/home/zak/.arduino15/packages/STMicroelectronics/hardware/stm32/2.2.0/system/ldscript.ld -Wl,-Map,/tmp/arduino_build_932108/sfy-bouy.ino.map -L/home/zak/.arduino15/packages/STMicroelectronics/tools/CMSIS/5.7.0/CMSIS/DSP/Lib/GCC/ -larm_cortexM4lf_math -o /tmp/arduino_build_932108/sfy-bouy.ino.elf -L/tmp/arduino_build_932108 -Wl,--start-group /tmp/arduino_build_932108/sketch/SrcWrapper.cpp.o /tmp/arduino_build_932108/sketch/sfy-bouy.ino.cpp.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/NoteI2c_Arduino.cpp.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/NoteLog_Arduino.cpp.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/NoteSerial_Arduino.cpp.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/Notecard.cpp.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_atof.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_b64.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_cjson.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_cjson_helpers.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_const.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_ftoa.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_helpers.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_hooks.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_i2c.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_md5.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_printf.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_request.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_serial.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_str.c.o /tmp/arduino_build_932108/libraries/Blues_Wireless_Notecard/note-c/n_ua.c.o /tmp/arduino_build_932108/libraries/Wire/Wire.cpp.o /tmp/arduino_build_932108/libraries/Wire/utility/twi.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/syscalls.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_adc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_adc_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_can.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_cec.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_comp.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_comp_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_cordic.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_cortex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_crc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_crc_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_cryp.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_cryp_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_dac.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_dac_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_dcache.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_dcmi.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_dcmi_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_dfsdm.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_dfsdm_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_dma.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_dma2d.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_dma_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_dsi.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_dts.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_eth.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_eth_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_exti.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_fdcan.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_firewall.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_flash.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_flash_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_flash_ramfunc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_fmac.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_fmpi2c.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_fmpi2c_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_fmpsmbus.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_fmpsmbus_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_gfxmmu.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_gpio.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_gpio_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_gtzc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_hash.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_hash_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_hcd.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_hrtim.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_hsem.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_i2c.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_i2c_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_i2s.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_i2s_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_icache.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_ipcc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_irda.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_iwdg.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_jpeg.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_lcd.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_lptim.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_ltdc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_ltdc_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_mdf.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_mdios.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_mdma.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_mmc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_mmc_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_nand.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_nor.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_opamp.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_opamp_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_ospi.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_otfdec.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_pccard.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_pcd.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_pcd_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_pka.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_pssi.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_pwr.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_pwr_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_qspi.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_ramcfg.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_ramecc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_rcc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_rcc_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_rng.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_rng_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_rtc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_rtc_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_sai.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_sai_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_sd.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_sd_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_sdadc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_sdram.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_smartcard.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_smartcard_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_smbus.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_smbus_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_spdifrx.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_spi.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_spi_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_sram.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_subghz.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_swpmi.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_tim.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_tim_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_tsc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_uart.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_uart_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_usart.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_usart_ex.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/HAL/stm32yyxx_hal_wwdg.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_adc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_bdma.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_comp.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_cordic.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_crc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_crs.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_dac.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_delayblock.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_dlyb.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_dma.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_dma2d.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_exti.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_fmac.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_fmc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_fmpi2c.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_fsmc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_gpio.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_hrtim.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_i2c.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_icache.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_lpgpio.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_lptim.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_lpuart.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_mdma.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_opamp.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_pka.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_pwr.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_rcc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_rng.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_rtc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_sdmmc.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_spi.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_swpmi.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_tim.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_ucpd.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_usart.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_usb.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/LL/stm32yyxx_ll_utils.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/PortNames.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/bootloader.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/clock.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/core_callback.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/dwt.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/hw_config.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/otp.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/pinmap.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/stm32_def.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/system_stm32yyxx.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/timer.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/uart.c.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/analog.cpp.o /tmp/arduino_build_932108/libraries/SrcWrapper/stm32/interrupt.cpp.o /tmp/arduino_build_932108/core/PeripheralPins.c.o /tmp/arduino_build_932108/core/PeripheralPins_SWAN_R5.c.o /tmp/arduino_build_932108/core/generic_clock.c.o /tmp/arduino_build_932108/core/variant_SWAN_R5.cpp.o /tmp/arduino_build_932108/core/variant_generic.cpp.o /tmp/arduino_build_932108/core/core.a -lc -Wl,--end-group -lm -lgcc -lstdc++
/home/zak/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/10.3.1-2.3/bin/arm-none-eabi-objcopy -O binary /tmp/arduino_build_932108/sfy-bouy.ino.elf /tmp/arduino_build_932108/sfy-bouy.ino.bin
/home/zak/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/10.3.1-2.3/bin/arm-none-eabi-objcopy -O ihex /tmp/arduino_build_932108/sfy-bouy.ino.elf /tmp/arduino_build_932108/sfy-bouy.ino.hex
Using library Blues_Wireless_Notecard at version 1.3.11 in folder: /home/zak/Development/Arduino/libraries/Blues_Wireless_Notecard 
Using library Wire at version 1.0 in folder: /home/zak/.arduino15/packages/STMicroelectronics/hardware/stm32/2.2.0/libraries/Wire 
Using library SrcWrapper at version 1.0.1 in folder: /home/zak/.arduino15/packages/STMicroelectronics/hardware/stm32/2.2.0/libraries/SrcWrapper 
/home/zak/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/10.3.1-2.3/bin/arm-none-eabi-size -A /tmp/arduino_build_932108/sfy-bouy.ino.elf
Sketch uses 50936 bytes (2%) of program storage space. Maximum is 2097152 bytes.
Global variables use 4256 bytes (0%) of dynamic memory, leaving 651104 bytes for local variables. Maximum is 655360 bytes.
IntelliSense configuration already up to date. To manually rebuild your IntelliSense configuration run "Ctrl+Alt+I"
[Done] Verifying sketch 'sfy-bouy.ino'

Check the end of the 5th line from the bottom:

/home/zak/.arduino15/packages/STMicroelectronics/tools/xpack-arm-none-eabi-gcc/10.3.1-2.3/bin/arm-none-eabi-size -A /tmp/arduino_build_932108/sfy-bouy.ino.elf

You can see the output goes into /tmp/arudino_build_932108/

Thanks for all the help! I will test your .vsix and get back to you.

@zfields
Copy link
Author

zfields commented Apr 1, 2022

I love it, it works perfectly!

The only other thing I would like to see change, is to add ...

"output": ".build"

... to the arduino.json by default.

You have already chosen it as the path for the debug binaries, and this would shine light on where someone might expect to find them. Also, I don't understand the value of not caching the build output (e.g. using /tmp/arduino_build_... instead), since you are already placing binaries on someone's file system; albeit randomly. Plus if you needed to clear them away completely (for sanity), then you can just delete the .build folder. It is very prominently featured in VSCode file system view (very near the top).

@benmcmorran
Copy link
Member

Reopening because the fix is merged but not yet released.

@benmcmorran benmcmorran reopened this Apr 29, 2022
@benmcmorran benmcmorran added fixed-pending-release Fix is merged and will be included in the next release. and removed investigating labels Apr 29, 2022
@github-actions github-actions bot added the triage New issues that have not been reviewed. label Apr 29, 2022
@benmcmorran benmcmorran removed the triage New issues that have not been reviewed. label Apr 29, 2022
@github-actions
Copy link

github-actions bot commented May 3, 2022

This issue has been fixed in the latest release of this extension, which is available in the VS Code extension marketplace.

@github-actions github-actions bot closed this as completed May 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed-pending-release Fix is merged and will be included in the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants