diff --git a/data/0.17.0/examples.json b/data/0.17.0/examples.json new file mode 100644 index 0000000..090517b --- /dev/null +++ b/data/0.17.0/examples.json @@ -0,0 +1,1318 @@ +{ + "hello_usb": { + "path": "hello_world/usb", + "name": "hello_usb", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_serial": { + "path": "hello_world/serial", + "name": "hello_serial", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pwm_led_fade": { + "path": "pwm/led_fade", + "name": "pwm_led_fade", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico2" + ], + "supportRiscV": true + }, + "hello_pwm": { + "path": "pwm/hello_pwm", + "name": "hello_pwm", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pwm_measure_duty_cycle": { + "path": "pwm/measure_duty_cycle", + "name": "pwm_measure_duty_cycle", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_48MHz": { + "path": "clocks/hello_48MHz", + "name": "hello_48MHz", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_resus": { + "path": "clocks/hello_resus", + "name": "hello_resus", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "clocks_detached_clk_peri": { + "path": "clocks/detached_clk_peri", + "name": "clocks_detached_clk_peri", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_gpout": { + "path": "clocks/hello_gpout", + "name": "hello_gpout", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "uart_advanced": { + "path": "uart/uart_advanced", + "name": "uart_advanced", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "lcd_uart": { + "path": "uart/lcd_uart", + "name": "lcd_uart", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_uart": { + "path": "uart/hello_uart", + "name": "hello_uart", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "dht": { + "path": "gpio/dht_sensor", + "name": "dht", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_7segment": { + "path": "gpio/hello_7segment", + "name": "hello_7segment", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_gpio_irq": { + "path": "gpio/hello_gpio_irq", + "name": "hello_gpio_irq", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "blink": { + "path": "blink", + "name": "blink", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "blink_simple": { + "path": "blink_simple", + "name": "blink_simple", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_watchdog": { + "path": "watchdog/hello_watchdog", + "name": "hello_watchdog", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_hub75": { + "path": "pio/hub75", + "name": "pio_hub75", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_pwm": { + "path": "pio/pwm", + "name": "pio_pwm", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico2" + ], + "supportRiscV": true + }, + "pio_manchester_encoding": { + "path": "pio/manchester_encoding", + "name": "pio_manchester_encoding", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_differential_manchester": { + "path": "pio/differential_manchester", + "name": "pio_differential_manchester", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_addition": { + "path": "pio/addition", + "name": "pio_addition", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_onewire": { + "path": "pio/onewire", + "name": "pio_onewire", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_squarewave": { + "path": "pio/squarewave", + "name": "pio_squarewave", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_squarewave_div_sync": { + "path": "pio/squarewave", + "name": "pio_squarewave_div_sync", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_clocked_input": { + "path": "pio/clocked_input", + "name": "pio_clocked_input", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_blink": { + "path": "pio/pio_blink", + "name": "pio_blink", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_quadrature_encoder_substep": { + "path": "pio/quadrature_encoder_substep", + "name": "pio_quadrature_encoder_substep", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_quadrature_encoder": { + "path": "pio/quadrature_encoder", + "name": "pio_quadrature_encoder", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_ws2812": { + "path": "pio/ws2812", + "name": "pio_ws2812", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_uart_rx": { + "path": "pio/uart_rx", + "name": "pio_uart_rx", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_uart_rx_intr": { + "path": "pio/uart_rx", + "name": "pio_uart_rx_intr", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_logic_analyser": { + "path": "pio/logic_analyser", + "name": "pio_logic_analyser", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_ir_loopback": { + "path": "pio/ir_nec/ir_loopback", + "name": "pio_ir_loopback", + "libPaths": [ + "pio/ir_nec/nec_receive_library", + "pio/ir_nec/nec_transmit_library" + ], + "libNames": [ + "nec_receive_library", + "nec_transmit_library" + ], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_i2c_bus_scan": { + "path": "pio/i2c", + "name": "pio_i2c_bus_scan", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_spi_flash": { + "path": "pio/spi", + "name": "pio_spi_flash", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_spi_loopback": { + "path": "pio/spi", + "name": "pio_spi_loopback", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_apa102": { + "path": "pio/apa102", + "name": "pio_apa102", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_uart_tx": { + "path": "pio/uart_tx", + "name": "pio_uart_tx", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pio_st7789_lcd": { + "path": "pio/st7789_lcd", + "name": "pio_st7789_lcd", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_pio": { + "path": "pio/hello_pio", + "name": "hello_pio", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico2" + ], + "supportRiscV": true + }, + "picoboard_button": { + "path": "picoboard/button", + "name": "picoboard_button", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico2" + ], + "supportRiscV": true + }, + "picoboard_blinky": { + "path": "picoboard/blinky", + "name": "picoboard_blinky", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico2" + ], + "supportRiscV": true + }, + "hello_divider": { + "path": "divider", + "name": "hello_divider", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "unique_board_id": { + "path": "system/unique_board_id", + "name": "unique_board_id", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "rand": { + "path": "system/rand", + "name": "rand", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_double_tap": { + "path": "system/hello_double_tap", + "name": "hello_double_tap", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "narrow_io_write": { + "path": "system/narrow_io_write", + "name": "narrow_io_write", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "flash_program": { + "path": "flash/program", + "name": "flash_program", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "flash_xip_stream": { + "path": "flash/xip_stream", + "name": "flash_xip_stream", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "flash_ssi_dma": { + "path": "flash/ssi_dma", + "name": "flash_ssi_dma", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w" + ], + "supportRiscV": false + }, + "flash_nuke": { + "path": "flash/nuke", + "name": "flash_nuke", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "flash_cache_perfctr": { + "path": "flash/cache_perfctr", + "name": "flash_cache_perfctr", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w" + ], + "supportRiscV": false + }, + "hello_timer": { + "path": "timer/hello_timer", + "name": "hello_timer", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "timer_lowlevel": { + "path": "timer/timer_lowlevel", + "name": "timer_lowlevel", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "periodic_sampler": { + "path": "timer/periodic_sampler", + "name": "periodic_sampler", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "dev_hid_composite": { + "path": "usb/device/dev_hid_composite", + "name": "dev_hid_composite", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "dev_lowlevel": { + "path": "usb/device/dev_lowlevel", + "name": "dev_lowlevel", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "host_cdc_msc_hid": { + "path": "usb/host/host_cdc_msc_hid", + "name": "host_cdc_msc_hid", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "rtc_alarm": { + "path": "rtc/rtc_alarm", + "name": "rtc_alarm", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w" + ], + "supportRiscV": false + }, + "hello_rtc": { + "path": "rtc/hello_rtc", + "name": "hello_rtc", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w" + ], + "supportRiscV": false + }, + "rtc_alarm_repeat": { + "path": "rtc/rtc_alarm_repeat", + "name": "rtc_alarm_repeat", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w" + ], + "supportRiscV": false + }, + "multicore_fifo_irqs": { + "path": "multicore/multicore_fifo_irqs", + "name": "multicore_fifo_irqs", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w" + ], + "supportRiscV": false + }, + "multicore_runner": { + "path": "multicore/multicore_runner", + "name": "multicore_runner", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "multicore_runner_queue": { + "path": "multicore/multicore_runner_queue", + "name": "multicore_runner_queue", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_multicore": { + "path": "multicore/hello_multicore", + "name": "hello_multicore", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_reset": { + "path": "reset/hello_reset", + "name": "hello_reset", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_interp": { + "path": "interp/hello_interp", + "name": "hello_interp", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "mpl3115a2_i2c": { + "path": "i2c/mpl3115a2_i2c", + "name": "mpl3115a2_i2c", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "mcp9808_i2c": { + "path": "i2c/mcp9808_i2c", + "name": "mcp9808_i2c", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "mpu6050_i2c": { + "path": "i2c/mpu6050_i2c", + "name": "mpu6050_i2c", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pa1010d_i2c": { + "path": "i2c/pa1010d_i2c", + "name": "pa1010d_i2c", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "lis3dh_i2c": { + "path": "i2c/lis3dh_i2c", + "name": "lis3dh_i2c", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "mma8451_i2c": { + "path": "i2c/mma8451_i2c", + "name": "mma8451_i2c", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "ht16k33_i2c": { + "path": "i2c/ht16k33_i2c", + "name": "ht16k33_i2c", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "i2c_bus_scan": { + "path": "i2c/bus_scan", + "name": "i2c_bus_scan", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "pcf8523_i2c": { + "path": "i2c/pcf8523_i2c", + "name": "pcf8523_i2c", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "lcd_1602_i2c": { + "path": "i2c/lcd_1602_i2c", + "name": "lcd_1602_i2c", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "bmp280_i2c": { + "path": "i2c/bmp280_i2c", + "name": "bmp280_i2c", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "slave_mem_i2c": { + "path": "i2c/slave_mem_i2c", + "name": "slave_mem_i2c", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "ssd1306_i2c": { + "path": "i2c/ssd1306_i2c", + "name": "ssd1306_i2c", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "adc_dma_capture": { + "path": "adc/dma_capture", + "name": "adc_dma_capture", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "joystick_display": { + "path": "adc/joystick_display", + "name": "joystick_display", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "onboard_temperature": { + "path": "adc/onboard_temperature", + "name": "onboard_temperature", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "microphone_adc": { + "path": "adc/microphone_adc", + "name": "microphone_adc", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "adc_console": { + "path": "adc/adc_console", + "name": "adc_console", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "read_vsys": { + "path": "adc/read_vsys", + "name": "read_vsys", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_adc": { + "path": "adc/hello_adc", + "name": "hello_adc", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "sniff_crc": { + "path": "dma/sniff_crc", + "name": "sniff_crc", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "dma_control_blocks": { + "path": "dma/control_blocks", + "name": "dma_control_blocks", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "hello_dma": { + "path": "dma/hello_dma", + "name": "hello_dma", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "dma_channel_irq": { + "path": "dma/channel_irq", + "name": "dma_channel_irq", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico2" + ], + "supportRiscV": true + }, + "spi_dma": { + "path": "spi/spi_dma", + "name": "spi_dma", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "spi_flash": { + "path": "spi/spi_flash", + "name": "spi_flash", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "mpu9250_spi": { + "path": "spi/mpu9250_spi", + "name": "mpu9250_spi", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "max7219_8x7seg_spi": { + "path": "spi/max7219_8x7seg_spi", + "name": "max7219_8x7seg_spi", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "max7219_32x8_spi": { + "path": "spi/max7219_32x8_spi", + "name": "max7219_32x8_spi", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "bme280_spi": { + "path": "spi/bme280_spi", + "name": "bme280_spi", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "spi_master": { + "path": "spi/spi_master_slave/spi_master", + "name": "spi_master", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "spi_slave": { + "path": "spi/spi_master_slave/spi_slave", + "name": "spi_slave", + "libPaths": [], + "libNames": [], + "boards": [ + "pico", + "pico_w", + "pico2" + ], + "supportRiscV": true + }, + "picow_blink": { + "path": "pico_w/wifi/blink", + "name": "picow_blink", + "libPaths": [], + "libNames": [], + "boards": [ + "pico_w" + ], + "supportRiscV": false + }, + "picow_blink_slow_clock": { + "path": "pico_w/wifi/blink", + "name": "picow_blink_slow_clock", + "libPaths": [], + "libNames": [], + "boards": [ + "pico_w" + ], + "supportRiscV": false + }, + "picow_ble_temp_reader": { + "path": "pico_w/bt/standalone", + "name": "picow_ble_temp_reader", + "libPaths": [], + "libNames": [], + "boards": [ + "pico_w" + ], + "supportRiscV": false + }, + "picow_ble_temp_sensor": { + "path": "pico_w/bt/standalone", + "name": "picow_ble_temp_sensor", + "libPaths": [], + "libNames": [], + "boards": [ + "pico_w" + ], + "supportRiscV": false + }, + "hello_sha256": { + "path": "sha/sha256", + "name": "hello_sha256", + "libPaths": [], + "libNames": [], + "boards": [ + "pico2" + ], + "supportRiscV": true + }, + "mbedtls_sha256": { + "path": "sha/mbedtls_sha256", + "name": "mbedtls_sha256", + "libPaths": [], + "libNames": [], + "boards": [ + "pico2" + ], + "supportRiscV": true + }, + "boot_info": { + "path": "system/boot_info", + "name": "boot_info", + "libPaths": [], + "libNames": [], + "boards": [ + "pico2" + ], + "supportRiscV": true + }, + "runtime_flash_permissions": { + "path": "flash/runtime_flash_permissions", + "name": "runtime_flash_permissions", + "libPaths": [], + "libNames": [], + "boards": [ + "pico2" + ], + "supportRiscV": true + }, + "multicore_doorbell": { + "path": "multicore/multicore_doorbell", + "name": "multicore_doorbell", + "libPaths": [], + "libNames": [], + "boards": [ + "pico2" + ], + "supportRiscV": true + }, + "hello_dcp": { + "path": "dcp/hello_dcp", + "name": "hello_dcp", + "libPaths": [], + "libNames": [], + "boards": [ + "pico2" + ], + "supportRiscV": false + }, + "hello_otp": { + "path": "otp/hello_otp", + "name": "hello_otp", + "libPaths": [], + "libNames": [], + "boards": [ + "pico2" + ], + "supportRiscV": true + } +} \ No newline at end of file diff --git a/data/0.17.0/github-cache.json b/data/0.17.0/github-cache.json new file mode 100644 index 0000000..5d02bf4 --- /dev/null +++ b/data/0.17.0/github-cache.json @@ -0,0 +1,699 @@ +{ + "githubApiCache-0-0": [ + "1.5.1", + "2.0.0" + ], + "githubApiCache-0-1-1.5.1": { + "assets": [ + { + "id": 112935743, + "name": "sdk-1.5.1-html-doc.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk/releases/download/1.5.1/sdk-1.5.1-html-doc.zip" + } + ], + "assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk/releases/107707260/assets" + }, + "githubApiCache-0-1-2.0.0": { + "assets": [ + { + "id": 184711853, + "name": "pico-sdk-2.0.0.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk/releases/download/2.0.0/pico-sdk-2.0.0.tar.gz" + } + ], + "assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk/releases/169292056/assets" + }, + "githubApiCache-1-0": [ + "v3.28.6", + "v3.29.6" + ], + "githubApiCache-1-1-v3.28.6": { + "assets": [ + { + "id": 171682637, + "name": "cmake-3.28.6-files-v1.json", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-files-v1.json" + }, + { + "id": 171682639, + "name": "cmake-3.28.6-linux-aarch64.sh", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-linux-aarch64.sh" + }, + { + "id": 171682797, + "name": "cmake-3.28.6-linux-aarch64.tar.gz", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-linux-aarch64.tar.gz" + }, + { + "id": 171682872, + "name": "cmake-3.28.6-linux-x86_64.sh", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-linux-x86_64.sh" + }, + { + "id": 171682906, + "name": "cmake-3.28.6-linux-x86_64.tar.gz", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-linux-x86_64.tar.gz" + }, + { + "id": 171682946, + "name": "cmake-3.28.6-macos-universal.dmg", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-macos-universal.dmg" + }, + { + "id": 171683083, + "name": "cmake-3.28.6-macos-universal.tar.gz", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-macos-universal.tar.gz" + }, + { + "id": 171683266, + "name": "cmake-3.28.6-macos10.10-universal.dmg", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-macos10.10-universal.dmg" + }, + { + "id": 171683323, + "name": "cmake-3.28.6-macos10.10-universal.tar.gz", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-macos10.10-universal.tar.gz" + }, + { + "id": 171683404, + "name": "cmake-3.28.6-SHA-256.txt", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-SHA-256.txt" + }, + { + "id": 171683405, + "name": "cmake-3.28.6-SHA-256.txt.asc", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-SHA-256.txt.asc" + }, + { + "id": 171683406, + "name": "cmake-3.28.6-windows-arm64.msi", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-windows-arm64.msi" + }, + { + "id": 171683440, + "name": "cmake-3.28.6-windows-arm64.zip", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-windows-arm64.zip" + }, + { + "id": 171683535, + "name": "cmake-3.28.6-windows-i386.msi", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-windows-i386.msi" + }, + { + "id": 171683624, + "name": "cmake-3.28.6-windows-i386.zip", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-windows-i386.zip" + }, + { + "id": 171683745, + "name": "cmake-3.28.6-windows-x86_64.msi", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-windows-x86_64.msi" + }, + { + "id": 171683767, + "name": "cmake-3.28.6-windows-x86_64.zip", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6-windows-x86_64.zip" + }, + { + "id": 171683790, + "name": "cmake-3.28.6.tar.gz", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6.tar.gz" + }, + { + "id": 171683796, + "name": "cmake-3.28.6.zip", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.28.6/cmake-3.28.6.zip" + } + ], + "assetsUrl": "https://api.github.com/repos/Kitware/CMake/releases/158667625/assets" + }, + "githubApiCache-1-1-v3.29.6": { + "assets": [ + { + "id": 174341995, + "name": "cmake-3.29.6-files-v1.json", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-files-v1.json" + }, + { + "id": 174341999, + "name": "cmake-3.29.6-linux-aarch64.sh", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-linux-aarch64.sh" + }, + { + "id": 174342062, + "name": "cmake-3.29.6-linux-aarch64.tar.gz", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-linux-aarch64.tar.gz" + }, + { + "id": 174342111, + "name": "cmake-3.29.6-linux-x86_64.sh", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-linux-x86_64.sh" + }, + { + "id": 174347312, + "name": "cmake-3.29.6-linux-x86_64.tar.gz", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-linux-x86_64.tar.gz" + }, + { + "id": 174342299, + "name": "cmake-3.29.6-macos-universal.dmg", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-macos-universal.dmg" + }, + { + "id": 174342411, + "name": "cmake-3.29.6-macos-universal.tar.gz", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-macos-universal.tar.gz" + }, + { + "id": 174342498, + "name": "cmake-3.29.6-macos10.10-universal.dmg", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-macos10.10-universal.dmg" + }, + { + "id": 174342661, + "name": "cmake-3.29.6-macos10.10-universal.tar.gz", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-macos10.10-universal.tar.gz" + }, + { + "id": 174342833, + "name": "cmake-3.29.6-SHA-256.txt", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-SHA-256.txt" + }, + { + "id": 174342839, + "name": "cmake-3.29.6-SHA-256.txt.asc", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-SHA-256.txt.asc" + }, + { + "id": 174342841, + "name": "cmake-3.29.6-windows-arm64.msi", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-windows-arm64.msi" + }, + { + "id": 174342900, + "name": "cmake-3.29.6-windows-arm64.zip", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-windows-arm64.zip" + }, + { + "id": 174342965, + "name": "cmake-3.29.6-windows-i386.msi", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-windows-i386.msi" + }, + { + "id": 174342982, + "name": "cmake-3.29.6-windows-i386.zip", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-windows-i386.zip" + }, + { + "id": 174343004, + "name": "cmake-3.29.6-windows-x86_64.msi", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-windows-x86_64.msi" + }, + { + "id": 174343044, + "name": "cmake-3.29.6-windows-x86_64.zip", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6-windows-x86_64.zip" + }, + { + "id": 174343086, + "name": "cmake-3.29.6.tar.gz", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6.tar.gz" + }, + { + "id": 174343102, + "name": "cmake-3.29.6.zip", + "browser_download_url": "https://github.com/Kitware/CMake/releases/download/v3.29.6/cmake-3.29.6.zip" + } + ], + "assetsUrl": "https://api.github.com/repos/Kitware/CMake/releases/160931478/assets" + }, + "githubApiCache-2-0": [ + "v1.12.1" + ], + "githubApiCache-2-1-v1.12.1": { + "assets": [ + { + "id": 167333823, + "name": "ninja-linux-aarch64.zip", + "browser_download_url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux-aarch64.zip" + }, + { + "id": 167333509, + "name": "ninja-linux.zip", + "browser_download_url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip" + }, + { + "id": 167333196, + "name": "ninja-mac.zip", + "browser_download_url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-mac.zip" + }, + { + "id": 167333379, + "name": "ninja-win.zip", + "browser_download_url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip" + }, + { + "id": 167333478, + "name": "ninja-winarm64.zip", + "browser_download_url": "https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-winarm64.zip" + } + ], + "assetsUrl": "https://api.github.com/repos/ninja-build/ninja/releases/155357494/assets" + }, + "githubApiCache-3-0": [ + "v1.5.1-0", + "v2.0.0-0", + "v2.0.0-1", + "v2.0.0-2", + "v2.0.0-3", + "v2.0.0-4" + ], + "githubApiCache-3-1-v1.5.1-0": { + "assets": [ + { + "id": 184737292, + "name": "openocd-0.12.0+dev-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/openocd-0.12.0%2Bdev-aarch64-lin.tar.gz" + }, + { + "id": 184736619, + "name": "openocd-0.12.0+dev-arm64-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/openocd-0.12.0%2Bdev-arm64-mac.zip" + }, + { + "id": 184739207, + "name": "openocd-0.12.0+dev-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/openocd-0.12.0%2Bdev-x64-win.zip" + }, + { + "id": 184736698, + "name": "openocd-0.12.0+dev-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/openocd-0.12.0%2Bdev-x86_64-lin.tar.gz" + }, + { + "id": 184739206, + "name": "pico-sdk-tools-1.5.1-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/pico-sdk-tools-1.5.1-x64-win.zip" + }, + { + "id": 184737290, + "name": "picotool-2.0.0-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/picotool-2.0.0-aarch64-lin.tar.gz" + }, + { + "id": 184736618, + "name": "picotool-2.0.0-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/picotool-2.0.0-mac.zip" + }, + { + "id": 184739208, + "name": "picotool-2.0.0-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/picotool-2.0.0-x64-win.zip" + }, + { + "id": 184736697, + "name": "picotool-2.0.0-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v1.5.1-0/picotool-2.0.0-x86_64-lin.tar.gz" + } + ], + "assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk-tools/releases/169373034/assets" + }, + "githubApiCache-3-1-v2.0.0-0": { + "assets": [ + { + "id": 184711252, + "name": "openocd-0.12.0+dev-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/openocd-0.12.0%2Bdev-aarch64-lin.tar.gz" + }, + { + "id": 184710255, + "name": "openocd-0.12.0+dev-arm64-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/openocd-0.12.0%2Bdev-arm64-mac.zip" + }, + { + "id": 184711712, + "name": "openocd-0.12.0+dev-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/openocd-0.12.0%2Bdev-x64-win.zip" + }, + { + "id": 184709989, + "name": "openocd-0.12.0+dev-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/openocd-0.12.0%2Bdev-x86_64-lin.tar.gz" + }, + { + "id": 184711250, + "name": "pico-sdk-tools-2.0.0-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/pico-sdk-tools-2.0.0-aarch64-lin.tar.gz" + }, + { + "id": 184710252, + "name": "pico-sdk-tools-2.0.0-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/pico-sdk-tools-2.0.0-mac.zip" + }, + { + "id": 184711713, + "name": "pico-sdk-tools-2.0.0-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/pico-sdk-tools-2.0.0-x64-win.zip" + }, + { + "id": 184709990, + "name": "pico-sdk-tools-2.0.0-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/pico-sdk-tools-2.0.0-x86_64-lin.tar.gz" + }, + { + "id": 184711251, + "name": "picotool-2.0.0-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/picotool-2.0.0-aarch64-lin.tar.gz" + }, + { + "id": 184710253, + "name": "picotool-2.0.0-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/picotool-2.0.0-mac.zip" + }, + { + "id": 184711714, + "name": "picotool-2.0.0-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/picotool-2.0.0-x64-win.zip" + }, + { + "id": 184709988, + "name": "picotool-2.0.0-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/picotool-2.0.0-x86_64-lin.tar.gz" + }, + { + "id": 184716562, + "name": "riscv-toolchain-14-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/riscv-toolchain-14-aarch64-lin.tar.gz" + } + ], + "assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk-tools/releases/169351844/assets" + }, + "githubApiCache-3-1-v2.0.0-1": { + "assets": [ + { + "id": 189376355, + "name": "openocd-0.12.0+dev-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/openocd-0.12.0%2Bdev-x64-win.zip" + }, + { + "id": 189393894, + "name": "pico-sdk-tools-2.0.0-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/pico-sdk-tools-2.0.0-aarch64-lin.tar.gz" + }, + { + "id": 189383672, + "name": "pico-sdk-tools-2.0.0-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/pico-sdk-tools-2.0.0-mac.zip" + }, + { + "id": 189376353, + "name": "pico-sdk-tools-2.0.0-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/pico-sdk-tools-2.0.0-x64-win.zip" + }, + { + "id": 189383021, + "name": "pico-sdk-tools-2.0.0-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/pico-sdk-tools-2.0.0-x86_64-lin.tar.gz" + }, + { + "id": 189393895, + "name": "picotool-2.0.0-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/picotool-2.0.0-aarch64-lin.tar.gz" + }, + { + "id": 189383673, + "name": "picotool-2.0.0-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/picotool-2.0.0-mac.zip" + }, + { + "id": 189376354, + "name": "picotool-2.0.0-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/picotool-2.0.0-x64-win.zip" + }, + { + "id": 189383020, + "name": "picotool-2.0.0-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/picotool-2.0.0-x86_64-lin.tar.gz" + }, + { + "id": 189393893, + "name": "riscv-toolchain-14-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-aarch64-lin.tar.gz" + }, + { + "id": 189383674, + "name": "riscv-toolchain-14-arm64-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-arm64-mac.zip" + }, + { + "id": 189383683, + "name": "riscv-toolchain-14-x64-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-x64-mac.zip" + }, + { + "id": 189383681, + "name": "riscv-toolchain-14-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-x64-win.zip" + }, + { + "id": 189383025, + "name": "riscv-toolchain-14-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-x86_64-lin.tar.gz" + } + ], + "assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk-tools/releases/172779839/assets" + }, + "githubApiCache-3-1-v2.0.0-2": { + "assets": [ + { + "id": 189908794, + "name": "openocd-0.12.0+dev-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/openocd-0.12.0%2Bdev-aarch64-lin.tar.gz" + }, + { + "id": 189901112, + "name": "openocd-0.12.0+dev-arm64-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/openocd-0.12.0%2Bdev-arm64-mac.zip" + }, + { + "id": 189896468, + "name": "openocd-0.12.0+dev-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/openocd-0.12.0%2Bdev-x64-win.zip" + }, + { + "id": 189901568, + "name": "openocd-0.12.0+dev-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/openocd-0.12.0%2Bdev-x86_64-lin.tar.gz" + }, + { + "id": 189908793, + "name": "pico-sdk-tools-2.0.0-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/pico-sdk-tools-2.0.0-aarch64-lin.tar.gz" + }, + { + "id": 189901108, + "name": "pico-sdk-tools-2.0.0-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/pico-sdk-tools-2.0.0-mac.zip" + }, + { + "id": 189896467, + "name": "pico-sdk-tools-2.0.0-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/pico-sdk-tools-2.0.0-x64-win.zip" + }, + { + "id": 189901566, + "name": "pico-sdk-tools-2.0.0-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/pico-sdk-tools-2.0.0-x86_64-lin.tar.gz" + }, + { + "id": 189908796, + "name": "picotool-2.0.0-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/picotool-2.0.0-aarch64-lin.tar.gz" + }, + { + "id": 189901110, + "name": "picotool-2.0.0-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/picotool-2.0.0-mac.zip" + }, + { + "id": 189896466, + "name": "picotool-2.0.0-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/picotool-2.0.0-x64-win.zip" + }, + { + "id": 189901565, + "name": "picotool-2.0.0-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/picotool-2.0.0-x86_64-lin.tar.gz" + }, + { + "id": 189908795, + "name": "riscv-toolchain-14-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-aarch64-lin.tar.gz" + }, + { + "id": 189901113, + "name": "riscv-toolchain-14-arm64-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-arm64-mac.zip" + }, + { + "id": 189901109, + "name": "riscv-toolchain-14-x64-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x64-mac.zip" + }, + { + "id": 189901111, + "name": "riscv-toolchain-14-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x64-win.zip" + }, + { + "id": 189901567, + "name": "riscv-toolchain-14-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x86_64-lin.tar.gz" + } + ], + "assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk-tools/releases/173039107/assets" + }, + "githubApiCache-3-1-v2.0.0-3": { + "assets": [ + { + "id": 191483575, + "name": "openocd-0.12.0+dev-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/openocd-0.12.0%2Bdev-aarch64-lin.tar.gz" + }, + { + "id": 191484787, + "name": "openocd-0.12.0+dev-arm64-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/openocd-0.12.0%2Bdev-arm64-mac.zip" + }, + { + "id": 191484567, + "name": "openocd-0.12.0+dev-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/openocd-0.12.0%2Bdev-x64-win.zip" + }, + { + "id": 191483298, + "name": "openocd-0.12.0+dev-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/openocd-0.12.0%2Bdev-x86_64-lin.tar.gz" + }, + { + "id": 191483574, + "name": "pico-sdk-tools-2.0.0-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/pico-sdk-tools-2.0.0-aarch64-lin.tar.gz" + }, + { + "id": 191484785, + "name": "pico-sdk-tools-2.0.0-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/pico-sdk-tools-2.0.0-mac.zip" + }, + { + "id": 191484566, + "name": "pico-sdk-tools-2.0.0-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/pico-sdk-tools-2.0.0-x64-win.zip" + }, + { + "id": 191483299, + "name": "pico-sdk-tools-2.0.0-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/pico-sdk-tools-2.0.0-x86_64-lin.tar.gz" + }, + { + "id": 191483572, + "name": "picotool-2.0.0-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/picotool-2.0.0-aarch64-lin.tar.gz" + }, + { + "id": 191484786, + "name": "picotool-2.0.0-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/picotool-2.0.0-mac.zip" + }, + { + "id": 191484565, + "name": "picotool-2.0.0-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/picotool-2.0.0-x64-win.zip" + }, + { + "id": 191483300, + "name": "picotool-2.0.0-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-3/picotool-2.0.0-x86_64-lin.tar.gz" + } + ], + "assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk-tools/releases/174135764/assets" + }, + "githubApiCache-3-1-v2.0.0-4": { + "assets": [ + { + "id": 193192683, + "name": "openocd-0.12.0+dev-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-4/openocd-0.12.0%2Bdev-aarch64-lin.tar.gz" + }, + { + "id": 193194432, + "name": "openocd-0.12.0+dev-arm64-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-4/openocd-0.12.0%2Bdev-arm64-mac.zip" + }, + { + "id": 193193748, + "name": "openocd-0.12.0+dev-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-4/openocd-0.12.0%2Bdev-x64-win.zip" + }, + { + "id": 193192582, + "name": "openocd-0.12.0+dev-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-4/openocd-0.12.0%2Bdev-x86_64-lin.tar.gz" + }, + { + "id": 193192681, + "name": "pico-sdk-tools-2.0.0-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-4/pico-sdk-tools-2.0.0-aarch64-lin.tar.gz" + }, + { + "id": 193194434, + "name": "pico-sdk-tools-2.0.0-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-4/pico-sdk-tools-2.0.0-mac.zip" + }, + { + "id": 193193746, + "name": "pico-sdk-tools-2.0.0-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-4/pico-sdk-tools-2.0.0-x64-win.zip" + }, + { + "id": 193192583, + "name": "pico-sdk-tools-2.0.0-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-4/pico-sdk-tools-2.0.0-x86_64-lin.tar.gz" + }, + { + "id": 193192682, + "name": "picotool-2.0.0-aarch64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-4/picotool-2.0.0-aarch64-lin.tar.gz" + }, + { + "id": 193194433, + "name": "picotool-2.0.0-mac.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-4/picotool-2.0.0-mac.zip" + }, + { + "id": 193193747, + "name": "picotool-2.0.0-x64-win.zip", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-4/picotool-2.0.0-x64-win.zip" + }, + { + "id": 193192581, + "name": "picotool-2.0.0-x86_64-lin.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-4/picotool-2.0.0-x86_64-lin.tar.gz" + } + ], + "assetsUrl": "https://api.github.com/repos/raspberrypi/pico-sdk-tools/releases/175505012/assets" + }, + "githubApiCache-4-0": [ + "2.0.0" + ], + "githubApiCache-4-1-2.0.0": { + "assets": [ + { + "id": 184690696, + "name": "picotool-2.0.0.tar.gz", + "browser_download_url": "https://github.com/raspberrypi/picotool/releases/download/2.0.0/picotool-2.0.0.tar.gz" + } + ], + "assetsUrl": "https://api.github.com/repos/raspberrypi/picotool/releases/169321961/assets" + } +} \ No newline at end of file diff --git a/data/0.17.0/supportedToolchains.ini b/data/0.17.0/supportedToolchains.ini new file mode 100644 index 0000000..65bf2fe --- /dev/null +++ b/data/0.17.0/supportedToolchains.ini @@ -0,0 +1,54 @@ +[13_3_Rel1] +win32_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-mingw-w64-i686-arm-none-eabi.zip +darwin_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-darwin-arm64-arm-none-eabi.tar.xz +darwin_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-darwin-x86_64-arm-none-eabi.tar.xz +linux_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-eabi.tar.xz +linux_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.3.rel1/binrel/arm-gnu-toolchain-13.3.rel1-aarch64-arm-none-eabi.tar.xz +[13_2_Rel1] +win32_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-mingw-w64-i686-arm-none-eabi.zip +darwin_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-arm64-arm-none-eabi.tar.xz +darwin_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-darwin-x86_64-arm-none-eabi.tar.xz +linux_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-x86_64-arm-none-eabi.tar.xz +linux_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/13.2.rel1/binrel/arm-gnu-toolchain-13.2.rel1-aarch64-arm-none-eabi.tar.xz +[RISCV_RPI_2_0_0_2] +win32_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x64-win.zip +darwin_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-arm64-mac.zip +darwin_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x64-mac.zip +linux_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-x86_64-lin.tar.gz +linux_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-2/riscv-toolchain-14-aarch64-lin.tar.gz +[RISCV_RPI_2_0_0_1] +win32_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-x64-win.zip +darwin_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-arm64-mac.zip +darwin_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-x64-mac.zip +linux_x64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-x86_64-lin.tar.gz +linux_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-1/riscv-toolchain-14-aarch64-lin.tar.gz +[RISCV_13_3] +win32_x64 = https://buildbot.embecosm.com/job/riscv32-gcc-win64-release/24/artifact/riscv32-embecosm-win64-gcc13.2.0.zip +darwin_arm64 = https://buildbot.embecosm.com/job/riscv32-gcc-macos-arm64-release/10/artifact/riscv32-embecosm-macos-gcc13.3.0.zip +darwin_x64 = https://buildbot.embecosm.com/job/riscv32-gcc-macos-release/21/artifact/riscv32-embecosm-macos-gcc13.3.0.zip +linux_x64 = https://buildbot.embecosm.com/job/riscv32-gcc-ubuntu2204-release/12/artifact/riscv32-embecosm-ubuntu2204-gcc13.3.0.tar.gz +[RISCV_COREV_MAY_24] +win32_x64 = https://buildbot.embecosm.com/job/corev-gcc-win64/50/artifact/corev-openhw-gcc-win64-20240602.zip +darwin_arm64 = https://buildbot.embecosm.com/job/corev-gcc-macos-arm64/8/artifact/corev-openhw-gcc-macos-20240530.zip +darwin_x64 = https://buildbot.embecosm.com/job/corev-gcc-macos/48/artifact/corev-openhw-gcc-macos-20240530.zip +linux_x64 = https://buildbot.embecosm.com/job/corev-gcc-ubuntu2204/47/artifact/corev-openhw-gcc-ubuntu2204-20240530.tar.gz +[RISCV_RPI] +linux_arm64 = https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.0.0-0/riscv-toolchain-14-aarch64-lin.tar.gz +[12_3_Rel1] +win32_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-mingw-w64-i686-arm-none-eabi.zip +darwin_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-darwin-arm64-arm-none-eabi.tar.xz +darwin_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-darwin-x86_64-arm-none-eabi.tar.xz +linux_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-x86_64-arm-none-eabi.tar.xz +linux_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.3.rel1/binrel/arm-gnu-toolchain-12.3.rel1-aarch64-arm-none-eabi.tar.xz +[12_2_Rel1] +win32_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-mingw-w64-i686-arm-none-eabi.zip +darwin_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-darwin-arm64-arm-none-eabi.tar.xz +darwin_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-darwin-x86_64-arm-none-eabi.tar.xz +linux_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-x86_64-arm-none-eabi.tar.xz +linux_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/12.2.rel1/binrel/arm-gnu-toolchain-12.2.rel1-aarch64-arm-none-eabi.tar.xz +[11_3_Rel1] +win32_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-mingw-w64-i686-arm-none-eabi.zip +darwin_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-darwin-arm64-arm-none-eabi.tar.xz +darwin_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-darwin-x86_64-arm-none-eabi.tar.xz +linux_x64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-x86_64-arm-none-eabi.tar.xz +linux_arm64 = https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu/11.3.rel1/binrel/arm-gnu-toolchain-11.3.rel1-aarch64-arm-none-eabi.tar.xz diff --git a/data/0.17.0/versionBundles.json b/data/0.17.0/versionBundles.json new file mode 100644 index 0000000..f2b2489 --- /dev/null +++ b/data/0.17.0/versionBundles.json @@ -0,0 +1,23 @@ +{ + "1.5.0": { + "ninja": "v1.12.1", + "cmake": "v3.28.6", + "picotool": "2.0.0", + "toolchain": "12_3_Rel1", + "riscvToolchain": "NONE" + }, + "1.5.1": { + "ninja": "v1.12.1", + "cmake": "v3.28.6", + "picotool": "2.0.0", + "toolchain": "13_2_Rel1", + "riscvToolchain": "NONE" + }, + "2.0.0": { + "ninja": "v1.12.1", + "cmake": "v3.28.6", + "picotool": "2.0.0", + "toolchain": "13_2_Rel1", + "riscvToolchain": "RISCV_RPI_2_0_0_2" + } +} diff --git a/package.json b/package.json index 64aa58b..01eaf8c 100644 --- a/package.json +++ b/package.json @@ -208,6 +208,7 @@ "raspberry-pi-pico.python3Path": { "type": "string", "default": "", + "scope": "machine", "description": "Path to the Python executable [no spaces]" }, "raspberry-pi-pico.ninjaPath": { diff --git a/src/extension.mts b/src/extension.mts index e20ac1f..ce35638 100644 --- a/src/extension.mts +++ b/src/extension.mts @@ -49,7 +49,6 @@ import { downloadAndInstallTools, downloadAndInstallPicotool, downloadAndInstallOpenOCD, - downloadEmbedPython, } from "./utils/download.mjs"; import { SDK_REPOSITORY_URL } from "./utils/githubREST.mjs"; import { getSupportedToolchains } from "./utils/toolchainUtil.mjs"; @@ -68,15 +67,14 @@ import OpenSdkDocumentationCommand from "./commands/openSdkDocumentation.mjs"; import ConfigureCmakeCommand from "./commands/configureCmake.mjs"; import ImportProjectCommand from "./commands/importProject.mjs"; import { homedir } from "os"; -import VersionBundlesLoader from "./utils/versionBundles.mjs"; -import { pyenvInstallPython, setupPyenv } from "./utils/pyenvUtil.mjs"; import NewExampleProjectCommand from "./commands/newExampleProject.mjs"; import SwitchBoardCommand from "./commands/switchBoard.mjs"; import UninstallPicoSDKCommand from "./commands/uninstallPicoSDK.mjs"; import FlashProjectSWDCommand from "./commands/flashProjectSwd.mjs"; // eslint-disable-next-line max-len import { NewMicroPythonProjectPanel } from "./webview/newMicroPythonProjectPanel.mjs"; -import type { Got, Progress as GotProgress } from "got"; +import type { Progress as GotProgress } from "got"; +import findPython, { showPythonNotFoundError } from "./utils/pythonHelper.mjs"; export async function activate(context: ExtensionContext): Promise { Logger.info(LoggerSource.extension, "Extension activation triggered"); @@ -633,6 +631,20 @@ export async function activate(context: ExtensionContext): Promise { } } + const pythonPath = await findPython(); + if (!pythonPath) { + Logger.error(LoggerSource.extension, "Failed to find Python3 executable."); + await commands.executeCommand( + "setContext", + ContextKeys.isPicoProject, + false + ); + showPythonNotFoundError(); + + return; + } + + /* const pythonPath = settings.getString(SettingsKey.python3Path); if (pythonPath && pythonPath.includes("/.pico-sdk/python")) { // check if python path exists @@ -732,7 +744,7 @@ export async function activate(context: ExtensionContext): Promise { return; } } - } + }*/ ui.showStatusBarItems(); ui.updateSDKVersion(selectedToolchainAndSDKVersions[0]); diff --git a/src/logger.mts b/src/logger.mts index 017cb9d..4aa4970 100644 --- a/src/logger.mts +++ b/src/logger.mts @@ -39,6 +39,7 @@ export enum LoggerSource { extension = "extension", cmake = "cmakeUtil", downloadHelper = "downloadHelper", + pythonHelper = "pythonHelper", } /** diff --git a/src/utils/download.mts b/src/utils/download.mts index 0e6f31d..33f036b 100644 --- a/src/utils/download.mts +++ b/src/utils/download.mts @@ -19,8 +19,6 @@ import { cloneRepository, initSubmodules, getGit } from "./gitUtil.mjs"; import { checkForGit } from "./requirementsUtil.mjs"; import { HOME_VAR, SettingsKey } from "../settings.mjs"; import Settings from "../settings.mjs"; -import type { VersionBundle } from "./versionBundles.mjs"; -import MacOSPythonPkgExtractor from "./macOSUtils.mjs"; import which from "which"; import { window } from "vscode"; import { fileURLToPath } from "url"; @@ -43,6 +41,11 @@ import type { Writable } from "stream"; import { unknownErrorToString } from "./errorHelper.mjs"; import { got, type Progress } from "got"; import { pipeline as streamPipeline } from "node:stream/promises"; +import { + CURRENT_PYTHON_VERSION, + WINDOWS_ARM64_PYTHON_DOWNLOAD_URL, + WINDOWS_X86_PYTHON_DOWNLOAD_URL, +} from "./sharedConstants.mjs"; /// Translate nodejs platform names to ninja platform names const NINJA_PLATFORMS: { [key: string]: string } = { @@ -1089,31 +1092,29 @@ export async function downloadAndInstallCmake( * @returns */ export async function downloadEmbedPython( - versionBundle: VersionBundle, - redirectURL?: string + progressCallback?: (progress: Progress) => void ): Promise { if ( // even tough this function supports downloading python3 on macOS arm64 // it doesn't work correctly therefore it's excluded here // use pyenvInstallPython instead process.platform !== "win32" || - (process.platform === "win32" && process.arch !== "x64") + (process.arch !== "x64" && process.arch !== "arm64") ) { Logger.error( LoggerSource.downloader, - "Embed Python installation is only supported on Windows x64." + "Embed Python installation is only supported on X86 and ARM64 Windows." ); return; } - const targetDirectory = buildPython3Path(versionBundle.python.version); + const targetDirectory = buildPython3Path(CURRENT_PYTHON_VERSION); const settingsTargetDirectory = - `${HOME_VAR}/.pico-sdk` + `/python/${versionBundle.python.version}`; + `${HOME_VAR}/.pico-sdk` + `/python/${CURRENT_PYTHON_VERSION}`; // Check if the Embed Python is already installed if ( - redirectURL === undefined && existsSync(targetDirectory) && readdirSync(targetDirectory).length !== 0 ) { @@ -1129,131 +1130,104 @@ export async function downloadEmbedPython( await mkdir(targetDirectory, { recursive: true }); // select download url - const downloadUrl = new URL(versionBundle.python.windowsAmd64); + // process.platform === "darwin" ? versionBundle.python.macos : versionBundle.python.windowsAmd64; + const downloadUrl = new URL( + process.arch === "arm64" + ? WINDOWS_ARM64_PYTHON_DOWNLOAD_URL + : WINDOWS_X86_PYTHON_DOWNLOAD_URL + ); const tmpBasePath = join(tmpdir(), "pico-sdk"); await mkdir(tmpBasePath, { recursive: true }); const archiveFilePath = join( tmpBasePath, - `python-${versionBundle.python.version}.zip` + `python-${CURRENT_PYTHON_VERSION}.zip` ); - // TODO: replace with got - return new Promise(resolve => { - const client = new Client(downloadUrl.origin); - - const requestOptions: Dispatcher.RequestOptions = { - path: downloadUrl.pathname + downloadUrl.search, - method: "GET", - headers: { - // eslint-disable-next-line @typescript-eslint/naming-convention - "User-Agent": EXT_USER_AGENT, - // eslint-disable-next-line @typescript-eslint/naming-convention - Accept: "*/*", - // eslint-disable-next-line @typescript-eslint/naming-convention - "Accept-Encoding": "gzip, deflate, br", - }, - maxRedirections: 3, - }; + const result = await downloadFileGot( + downloadUrl, + archiveFilePath, + undefined, + progressCallback + ); - // save requested stream to file - client.stream( - requestOptions, - ({ statusCode }) => - createWriteStream(archiveFilePath).on("finish", () => { - const code = statusCode ?? 404; + if (!result) { + Logger.error(LoggerSource.downloader, `Downloading Embed Python failed.`); - if (code >= 400) { - //return reject(new Error(STATUS_CODES[code])); - Logger.error( - LoggerSource.downloader, - "Downloading embed Python3 failed:", - STATUS_CODES[code] ?? `Unknown status code '${code}'` - ); + return; + } - return resolve(undefined); - } + // unpack the archive + /*if (process.platform === "darwin") { + const pkgExtractor = new MacOSPythonPkgExtractor( + archiveFilePath, + targetDirectory + ); - // any redirects should have been handled by undici + pkgExtractor + .extractPkg() + .then(success => { + if (versionBundle.python.version.lastIndexOf(".") <= 2) { + Logger.error( + LoggerSource.downloader, + "Extracting Embed Python3 failed - " + + "Python version has wrong format." + ); + resolve(undefined); + } - // doesn't work correctly therefore use pyenvInstallPython instead - // TODO: maybe remove unused darwin code-path here - if (process.platform === "darwin") { - const pkgExtractor = new MacOSPythonPkgExtractor( - archiveFilePath, - targetDirectory + if (success) { + try { + // create symlink, so the same path can be used as on Windows + const srcPath = joinPosix( + settingsTargetDirectory, + "/Versions/", + versionBundle.python.version.substring( + 0, + versionBundle.python.version.lastIndexOf(".") + ), + "bin", + "python3" ); - - pkgExtractor - .extractPkg() - .then(success => { - if (versionBundle.python.version.lastIndexOf(".") <= 2) { - Logger.error( - LoggerSource.downloader, - "Extracting Embed Python3 failed - " + - "Python version has wrong format." - ); - resolve(undefined); - } - - if (success) { - try { - // create symlink, so the same path can be used as on Windows - const srcPath = joinPosix( - settingsTargetDirectory, - "/Versions/", - versionBundle.python.version.substring( - 0, - versionBundle.python.version.lastIndexOf(".") - ), - "bin", - "python3" - ); - symlinkSync( - srcPath, - // use .exe as python is already used in the directory - join(settingsTargetDirectory, "python.exe"), - "file" - ); - symlinkSync( - srcPath, - // use .exe as python is already used in the directory - join(settingsTargetDirectory, "python3.exe"), - "file" - ); - } catch { - resolve(undefined); - } - - resolve(`${settingsTargetDirectory}/python.exe`); - } else { - resolve(undefined); - } - }) - .catch(() => { - resolve(undefined); - }); - } else { - // unpack the archive - const success = unzipFile(archiveFilePath, targetDirectory); - // delete tmp file - rmSync(archiveFilePath, { recursive: true, force: true }); - resolve( - success ? `${settingsTargetDirectory}/python.exe` : undefined + symlinkSync( + srcPath, + // use .exe as python is already used in the directory + join(settingsTargetDirectory, "python.exe"), + "file" + ); + symlinkSync( + srcPath, + // use .exe as python is already used in the directory + join(settingsTargetDirectory, "python3.exe"), + "file" ); + } catch { + resolve(undefined); } - }), - err => { - if (err) { - Logger.error( - LoggerSource.downloader, - "Downloading Embed Python failed:", - err.message - ); - return false; + resolve(`${settingsTargetDirectory}/python.exe`); + } else { + resolve(undefined); } - } + }) + .catch(() => { + resolve(undefined); + }); + }*/ + + try { + // unpack the archive + const success = unzipFile(archiveFilePath, targetDirectory); + // delete tmp file + rmSync(archiveFilePath, { recursive: true, force: true }); + + return success ? `${settingsTargetDirectory}/python.exe` : undefined; + } catch (errror) { + Logger.error( + LoggerSource.downloader, + `Extracting Embed Python failed: ${unknownErrorToString(errror)}` ); - }); + + return; + } } diff --git a/src/utils/downloadHelpers.mts b/src/utils/downloadHelpers.mts index 882e127..ce370cc 100644 --- a/src/utils/downloadHelpers.mts +++ b/src/utils/downloadHelpers.mts @@ -7,8 +7,7 @@ import AdmZip from "adm-zip"; import { request } from "https"; import { fileURLToPath } from "url"; import { unknownErrorToString } from "./errorHelper.mjs"; - -export const CURRENT_DATA_VERSION = "0.16.0"; +import { CURRENT_DATA_VERSION } from "./sharedConstants.mjs"; export function getDataRoot(): string { return joinPosix( diff --git a/src/utils/pyenvUtil.mts b/src/utils/pyenvUtil.mts index 576fdd2..f232c51 100644 --- a/src/utils/pyenvUtil.mts +++ b/src/utils/pyenvUtil.mts @@ -6,6 +6,7 @@ import { exec } from "child_process"; import { buildPython3Path } from "./download.mjs"; import { HOME_VAR } from "../settings.mjs"; import { existsSync, mkdirSync, symlinkSync } from "fs"; +import { CURRENT_PYTHON_VERSION } from "./sharedConstants.mjs"; export function buildPyenvPath(): string { // TODO: maybe replace . with _ @@ -31,12 +32,10 @@ export async function setupPyenv(): Promise { return true; } -export async function pyenvInstallPython( - version: string -): Promise { +export async function pyenvInstallPython(): Promise { const targetDirectory = buildPyenvPath(); const binDirectory = joinPosix(targetDirectory, "bin"); - const command = `${binDirectory}/pyenv install -s ${version}`; + const command = `${binDirectory}/pyenv install -s ${CURRENT_PYTHON_VERSION}`; const customEnv = { ...process.env }; customEnv["PYENV_ROOT"] = targetDirectory; @@ -44,8 +43,9 @@ export async function pyenvInstallPython( process.platform === "win32" ? ";" : ":" }${customEnv[process.platform === "win32" ? "Path" : "PATH"]}`; - const settingsTarget = `${HOME_VAR}/.pico-sdk/python/${version}/python.exe`; - const pythonVersionPath = buildPython3Path(version); + const settingsTarget = + `${HOME_VAR}/.pico-sdk/python` + `/${CURRENT_PYTHON_VERSION}/python.exe`; + const pythonVersionPath = buildPython3Path(CURRENT_PYTHON_VERSION); if (existsSync(pythonVersionPath)) { return settingsTarget; @@ -54,10 +54,14 @@ export async function pyenvInstallPython( return new Promise(resolve => { exec(command, { env: customEnv, cwd: binDirectory }, error => { if (error) { - resolve(null); + resolve(undefined); } - const versionFolder = joinPosix(targetDirectory, "versions", version); + const versionFolder = joinPosix( + targetDirectory, + "versions", + CURRENT_PYTHON_VERSION + ); const pyBin = joinPosix(versionFolder, "bin"); mkdirSync(pythonVersionPath, { recursive: true }); symlinkSync( diff --git a/src/utils/pythonHelper.mts b/src/utils/pythonHelper.mts new file mode 100644 index 0000000..d8caa04 --- /dev/null +++ b/src/utils/pythonHelper.mts @@ -0,0 +1,258 @@ +import Settings, { HOME_VAR, SettingsKey } from "../settings.mjs"; +import { PythonExtension } from "@vscode/python-extension"; +import { downloadEmbedPython } from "./download.mjs"; +import { pyenvInstallPython, setupPyenv } from "./pyenvUtil.mjs"; +import { commands, ProgressLocation, window } from "vscode"; +import Logger, { LoggerSource } from "../logger.mjs"; +import { execSync } from "child_process"; +import { unknownErrorToString } from "./errorHelper.mjs"; +import type { Progress as GotProgress } from "got"; +import { existsSync } from "fs"; +import { homedir } from "os"; +import { extensionName } from "../commands/command.mjs"; + +/** + * This function tries to find a python environment to use. It will possible download + * a python environment if it is not found and a download is available. This will + * also be reflected automatically in the UI. + * + * Python is loaded in the following order: + * 1. The python path set in the User (per machine) settings. + * 2. Check python extension for any python environments with version >= 3.9 + * 3. Download python if OS = macOS or Windows. + * + * If a python environment is found, it will be set in the User (per machine) settings. + * + * @returns If this function returns undefined, it means that the user will have to set + * the python path manually in the User (per machine) settings. If the python executable + * path is returned, it can be in Uri.fsPath format e.g. with backslashes on Windows. + */ +export default async function findPython(): Promise { + return window.withProgress( + { + location: ProgressLocation.Notification, + title: + "Searching for Python. " + + "This may take a while if it has to be downloaded.", + cancellable: false, + }, + async progress => { + // Check if python path is set in user settings + let pythonPath = findPythonPathInUserSettings()?.replace( + HOME_VAR, + homedir() + ); + if (pythonPath) { + // check if it actually exists and is a supported version + if (existsSync(pythonPath)) { + try { + const version = execSync(`&"${pythonPath}" -V`, { + encoding: "utf-8", + shell: process.platform === "win32" ? "powershell" : undefined, + timeout: 1000, + windowsHide: true, + maxBuffer: 1024, + }) + .trim() + .split(" "); + if (version.length === 2 && checkPythonVersionRaw(version[1])) { + return pythonPath; + } else { + Logger.warn( + LoggerSource.pythonHelper, + "Unable to check version of selected " + + "python path or it is not supported:", + version + ); + // TODO: clear python path from settings + } + } catch (error) { + Logger.warn( + LoggerSource.pythonHelper, + "Unable to check version of selected python path:", + unknownErrorToString(error) + ); + } + } + } + + // Check python extension for any python environments with version >= 3.9 + pythonPath = await findPythonInPythonExtension(); + if (pythonPath) { + await Settings.getInstance()?.updateGlobal( + SettingsKey.python3Path, + pythonPath + ); + + return pythonPath; + } + + switch (process.platform) { + case "darwin": + await window.withProgress( + { + location: ProgressLocation.Notification, + title: "Downloading Python", + cancellable: false, + }, + // TODO: add progress and maybe cancelable + async () => { + if (await setupPyenv()) { + pythonPath = (await pyenvInstallPython()) ?? undefined; + if (pythonPath) { + await Settings.getInstance()?.updateGlobal( + SettingsKey.python3Path, + pythonPath + ); + + return pythonPath; + } + } + } + ); + break; + case "win32": + { + if (process.arch !== "x64" && process.arch !== "arm64") { + Logger.warn( + LoggerSource.pythonHelper, + "Unsupported architecture for Windows:", + process.arch + ); + void window.showErrorMessage( + "Unsupported architecture for Windows: " + process.arch + ); + + return undefined; + } + let progressState = 0; + pythonPath = await downloadEmbedPython( + (prog: GotProgress): void => { + const percent = prog.percent * 100; + progress.report({ increment: percent - progressState }); + progressState = percent; + } + ); + if (pythonPath) { + await Settings.getInstance()?.updateGlobal( + SettingsKey.python3Path, + pythonPath + ); + + return pythonPath; + } + } + break; + } + + return undefined; + } + ); +} + +function findPythonPathInUserSettings(): string | undefined { + const settings = Settings.getInstance(); + + return settings?.getString(SettingsKey.python3Path); +} + +function checkPythonVersion(mayor: number, minor: number): boolean { + if (mayor < 3 || minor < 9) { + return false; + } + + return true; +} + +function checkPythonVersionRaw(version: string): boolean { + const parts = version.split("."); + const mayor = parseInt(parts[0]); + const minor = parseInt(parts[1]); + + if (isNaN(mayor) || isNaN(minor)) { + Logger.debug( + LoggerSource.pythonHelper, + "Python mayor or minor version is not a number:", + version + ); + + return false; + } + + return checkPythonVersion(mayor, minor); +} + +async function findPythonInPythonExtension(): Promise { + const pyApi = await PythonExtension.api(); + await pyApi.environments.refreshEnvironments(); + await pyApi.ready; + + const activeEnv = pyApi.environments.getActiveEnvironmentPath(); + const resolved = await pyApi.environments.resolveEnvironment(activeEnv); + if ( + resolved?.version && + checkPythonVersion(resolved.version.major, resolved.version.minor) + ) { + if (resolved.executable.uri) { + return resolved.executable.uri.fsPath; + } else { + Logger.debug( + LoggerSource.pythonHelper, + "Python executable URI is not available for active environment." + ); + } + } + + // check other envs + const envs = pyApi.environments.known; + + let limit = 15; + for (const env of envs) { + limit--; + const resolved = await pyApi.environments.resolveEnvironment(env.path); + if ( + resolved?.version && + checkPythonVersion(resolved.version.major, resolved.version.minor) + ) { + if (resolved.executable.uri) { + return resolved.executable.uri.fsPath; + } else { + Logger.debug( + LoggerSource.pythonHelper, + "Python executable URI is not available for environment:", + env.id + ); + } + } + + if (limit <= 0) { + Logger.debug( + LoggerSource.pythonHelper, + "Reached limit of environments to check." + ); + break; + } + } +} + +export function showPythonNotFoundError(): void { + void window + .showErrorMessage( + "Failed to find any valid Python installation. " + + "Make sure Python >=3.9 is installed. " + + "You can set a Python executable directly in your " + + "user settings or select in the Python extension.", + "Open Python Extension", + "Edit Settings" + ) + .then(selected => { + if (selected === "Open Python Extension") { + void commands.executeCommand("python.setInterpreter"); + } else if (selected === "Edit Settings") { + void commands.executeCommand( + "workbench.action.openSettings", + extensionName + "." + SettingsKey.python3Path + ); + } + }); +} diff --git a/src/utils/sharedConstants.mts b/src/utils/sharedConstants.mts new file mode 100644 index 0000000..48de290 --- /dev/null +++ b/src/utils/sharedConstants.mts @@ -0,0 +1,7 @@ +export const WINDOWS_X86_PYTHON_DOWNLOAD_URL = + "https://www.python.org/ftp/python/3.12.6/python-3.12.6-embed-amd64.zip"; +export const WINDOWS_ARM64_PYTHON_DOWNLOAD_URL = + "https://www.python.org/ftp/python/3.12.6/python-3.12.6-embed-arm64.zip"; +export const CURRENT_PYTHON_VERSION = "3.12.6"; + +export const CURRENT_DATA_VERSION = "0.17.0"; diff --git a/src/utils/versionBundles.mts b/src/utils/versionBundles.mts index b0d2a41..ae210c2 100644 --- a/src/utils/versionBundles.mts +++ b/src/utils/versionBundles.mts @@ -1,11 +1,9 @@ import { readFileSync } from "fs"; import { Uri } from "vscode"; -import { - isInternetConnected, - CURRENT_DATA_VERSION, -} from "./downloadHelpers.mjs"; +import { isInternetConnected } from "./downloadHelpers.mjs"; import { get } from "https"; import Logger from "../logger.mjs"; +import { CURRENT_DATA_VERSION } from "./sharedConstants.mjs"; const versionBundlesUrl = "https://raspberrypi.github.io/pico-vscode/" + diff --git a/src/webview/newProjectPanel.mts b/src/webview/newProjectPanel.mts index e0ff56b..32b8195 100644 --- a/src/webview/newProjectPanel.mts +++ b/src/webview/newProjectPanel.mts @@ -43,7 +43,6 @@ import { downloadAndInstallToolchain, downloadAndInstallTools, downloadAndInstallPicotool, - downloadEmbedPython, getScriptsRoot, } from "../utils/download.mjs"; import { compare } from "../utils/semverUtil.mjs"; @@ -53,7 +52,6 @@ import VersionBundlesLoader, { import which from "which"; import { homedir } from "os"; import { readFile } from "fs/promises"; -import { pyenvInstallPython, setupPyenv } from "../utils/pyenvUtil.mjs"; import { existsSync, readdirSync } from "fs"; import { type Example, @@ -62,6 +60,7 @@ import { } from "../utils/examplesUtil.mjs"; import { unknownErrorToString } from "../utils/errorHelper.mjs"; import type { Progress as GotProgress } from "got"; +import findPython, { showPythonNotFoundError } from "../utils/pythonHelper.mjs"; export const NINJA_AUTO_INSTALL_DISABLED = false; // process.platform === "linux" && process.arch === "arm64"; @@ -78,8 +77,6 @@ interface ImportProjectMessageValue { cmakeMode: number; cmakePath: string; cmakeVersion: string; - pythonMode: number; - pythonPath: string; // debugger debugger: number; @@ -791,7 +788,7 @@ export class NewProjectPanel { if ( this._versionBundle === undefined && // if no versionBundle then all version options the could be dependent on it must be custom (=> independent of versionBundle) - (data.pythonMode === 0 || data.ninjaMode === 0 || data.cmakeMode === 0) + (data.ninjaMode === 0 || data.cmakeMode === 0) ) { progress.report({ message: "Failed", @@ -803,73 +800,16 @@ export class NewProjectPanel { } // install python (if necessary) - let python3Path: string | undefined; - if (process.platform === "darwin" || process.platform === "win32") { - switch (data.pythonMode) { - case 0: { - const versionBundle = this._versionBundle; - await window.withProgress( - { - location: ProgressLocation.Notification, - title: - "Downloading and installing Python. This may take a while...", - cancellable: false, - }, - async progress2 => { - if (process.platform === "win32") { - // ! because data.pythonMode === 0 => versionBundle !== undefined - python3Path = await downloadEmbedPython(versionBundle!); - } else if (process.platform === "darwin") { - const result1 = await setupPyenv(); - if (!result1) { - progress2.report({ - increment: 100, - }); - - return; - } - const result = await pyenvInstallPython( - versionBundle!.python.version - ); - - if (result !== null) { - python3Path = result; - } - } else { - this._logger.error( - "Automatic Python installation is only supported on Windows and macOS." - ); - - void window.showErrorMessage( - "Automatic Python installation is only supported on Windows and macOS." - ); - } - progress2.report({ - increment: 100, - }); - } - ); - break; - } - case 1: - python3Path = process.platform === "win32" ? "python" : "python3"; - break; - case 2: - python3Path = data.pythonPath; - break; - } - - if (python3Path === undefined) { - progress.report({ - message: "Failed", - increment: 100, - }); - void window.showErrorMessage("Failed to find python3 executable."); + const python3Path = await findPython(); + if (!python3Path) { + progress.report({ + message: "Failed", + increment: 100, + }); + this._logger.error("Failed to find Python3 executable."); + showPythonNotFoundError(); - return; - } - } else { - python3Path = "python3"; + return; } // install selected sdk and toolchain if necessary @@ -886,7 +826,7 @@ export class NewProjectPanel { selectedSDK, SDK_REPOSITORY_URL, // python3Path is only possible undefined if downloaded and there is already checked and returned if this happened - python3Path!.replace(HOME_VAR, homedir().replaceAll("\\", "/")) + python3Path.replace(HOME_VAR, homedir().replaceAll("\\", "/")) ); if (!result) { @@ -1627,10 +1567,6 @@ export class NewProjectPanel { (await which("ninja", { nothrow: true })) !== null; const isCmakeSystemAvailable = (await which("cmake", { nothrow: true })) !== null; - // TODO: check python version, workaround, ownly allow python3 commands on unix - const isPythonSystemAvailable = - (await which("python3", { nothrow: true })) !== null || - (await which("python", { nothrow: true })) !== null; if (!isNinjaSystemAvailable && NINJA_AUTO_INSTALL_DISABLED) { this.dispose(); @@ -2003,40 +1939,6 @@ export class NewProjectPanel { - - ${ - process.platform === "darwin" || - process.platform === "win32" - ? ` -
- - - ${ - this._versionBundle !== undefined - ? `
- - -
` - : "" - } - - ${ - isPythonSystemAvailable - ? `
- - -
` - : "" - } - -
- - - -
-
` - : "" - } ${ diff --git a/web/main.js b/web/main.js index 476645f..bdbd160 100644 --- a/web/main.js +++ b/web/main.js @@ -113,7 +113,7 @@ var exampleSupportedBoards = []; // selected picotool const selectedPicotool = document.getElementById('sel-picotool').value; - // TODO: maybe move these duplicate sections for ninja, cmake and python into a generic helper function + // TODO: maybe move these duplicate sections for ninja and cmake into a generic helper function // selected ninja version const ninjaVersionRadio = document.getElementsByName('ninja-version-radio'); @@ -210,51 +210,6 @@ var exampleSupportedBoards = []; } } - // selected python version - const pythonVersionRadio = document.getElementsByName('python-version-radio'); - let pythonMode = null; - let pythonPath = null; - for (let i = 0; i < pythonVersionRadio.length; i++) { - if (pythonVersionRadio[i].checked) { - pythonMode = Number(pythonVersionRadio[i].value); - break; - } - } - if (pythonVersionRadio.length === 0) { - // default to python mode 1 == System version - pythonMode = 1; - } - - // if python version is null or not a number, smaller than 0 or bigger than 3, set it to 0 - if (pythonMode === null || isNaN(pythonMode) || pythonMode < 0 || pythonMode > 3) { - // TODO: first check if defaul is supported - pythonMode = 0; - console.debug('Invalid python version value: ' + pythonMode.toString()); - vscode.postMessage({ - command: CMD_ERROR, - value: "Please select a valid python version." - }); - submitted = false; - - return; - } - if (pythonMode === 2) { - const files = document.getElementById('python-path-executable').files; - - if (files.length === 1) { - pythonPath = files[0].name; - } else { - console.debug("Please select a valid python executable file"); - vscode.postMessage({ - command: CMD_ERROR, - value: "Please select a valid python executable file." - }); - submitted = false; - - return; - } - } - // debugger selection const debuggerRadio = document.getElementsByName('debugger-radio'); let debuggerSelection = null; @@ -290,8 +245,6 @@ var exampleSupportedBoards = []; cmakeMode: Number(cmakeMode), cmakePath: cmakePath, cmakeVersion: cmakeVersion, - pythonMode: Number(pythonMode), - pythonPath: pythonPath, // debugger selection debugger: 0, @@ -317,8 +270,6 @@ var exampleSupportedBoards = []; cmakeMode: Number(cmakeMode), cmakePath: cmakePath, cmakeVersion: cmakeVersion, - pythonMode: Number(pythonMode), - pythonPath: pythonPath, // debugger selection debugger: debuggerSelection, @@ -385,8 +336,6 @@ var exampleSupportedBoards = []; cmakeMode: Number(cmakeMode), cmakePath: cmakePath, cmakeVersion: cmakeVersion, - pythonMode: Number(pythonMode), - pythonPath: pythonPath, // features spiFeature: spiFeature, @@ -580,25 +529,9 @@ var exampleSupportedBoards = []; // get all radio buttons with the specified names and select the first non-disabled option for each if the currently selected option is disabled // TODO: move in a helper function - const pythonRadioButtons = document.querySelectorAll('input[name="python-version-radio"]'); const ninjaRadioButtons = document.querySelectorAll('input[name="ninja-version-radio"]'); const cmakeRadioButtons = document.querySelectorAll('input[name="cmake-version-radio"]'); - // Don't check if no pythonRadioButtons, eg on Linux - if (pythonRadioButtons.length > 0) { - // Check if the first radio button is selected and disabled - if (pythonRadioButtons[0].checked && pythonRadioButtons[0].disabled) { - // Find the first non-disabled radio button - for (var i = 1; i < pythonRadioButtons.length; i++) { - if (!pythonRadioButtons[i].disabled) { - // Select the first non-disabled radio button - pythonRadioButtons[i].checked = true; - break; - } - } - } - } - // Check if the first radio button is selected and disabled if (ninjaRadioButtons[0].checked && ninjaRadioButtons[0].disabled) { // Find the first non-disabled radio button @@ -811,10 +744,8 @@ var exampleSupportedBoards = []; if (ninjaVersionRadio.length > 0) ninjaVersionRadio[0].checked = true; const cmakeVersionRadio = document.getElementsByName('cmake-version-radio'); - cmakeVersionRadio[0].checked = true; - const pythonVersionRadio = document.getElementsByName('python-version-radio'); - if (pythonVersionRadio.length > 0) - pythonVersionRadio[0].checked = true; + if (cmakeVersionRadio.length > 0) + cmakeVersionRadio[0].checked = true; const sdkVersion = document.getElementById('sel-pico-sdk').value; // send message to extension diff --git a/web/state.js b/web/state.js index 8b42a6c..20db047 100644 --- a/web/state.js +++ b/web/state.js @@ -11,8 +11,6 @@ class State { cmakeMode; // cmakePath; setting the path of a file input is not supported cmakeVersion; - pythonMode; - // pythonPath; setting the path of a file input is not supported uartStdioSupport; usbStdioSupport; spiFeature; @@ -73,9 +71,6 @@ function restoreState(state) { if (state.cmakeVersion) { document.getElementById('sel-cmake').value = state.cmakeVersion; } - if (state.pythonVersion) { - document.getElementById('sel-python').value = state.pythonVersion; - } /* setting the path of a file input is not supported if (state.ninjaPath !== undefined) { @@ -85,10 +80,6 @@ function restoreState(state) { if (state.cmakePath !== undefined) { document.getElementById('cmake-path-executable').value = state.cmakePath; } - - if (state.pythonPath !== undefined) { - document.getElementById('python-path-executable').value = state.pythonPath; - } */ if (state.uartStdioSupport !== undefined) { @@ -198,19 +189,6 @@ function restoreState(state) { document.getElementById('cmake-radio-path-executable').checked = state.cmakeMode == 3; } - if (state.pythonMode !== undefined && document.getElementById('python-radio-path-executable') !== undefined) { - const pythonDefaultVersionRadio = document.getElementById('python-radio-default-version'); - if (pythonDefaultVersionRadio) { - pythonDefaultVersionRadio.checked = state.pythonMode == 0; - } - const pythonSystemVersionRadio = document.getElementById('python-radio-system-version'); - // not available in the DOM is system python is not available - if (pythonSystemVersionRadio) { - pythonSystemVersionRadio.checked = state.pythonMode == 1; - } - document.getElementById('python-radio-path-executable').checked = state.pythonMode == 2; - } - if (state.selRiscv !== undefined) { const selRiscv = document.getElementById('sel-riscv'); if (selRiscv) { @@ -354,19 +332,6 @@ function setupStateSystem(vscode) { break; } break; - case "python-version-radio": - switch (radio.id) { - case "python-radio-default-version": - state.pythonMode = parseInt(radio.value); - break; - case "python-radio-system-version": - state.pythonMode = parseInt(radio.value); - break; - case "python-radio-path-executable": - state.pythonMode = parseInt(radio.value); - break; - } - break; case "pico-wireless-radio": switch (radio.id) { case "pico-wireless-radio-none": @@ -468,9 +433,6 @@ function setupStateSystem(vscode) { case "cmake-path-executable": state.cmakePath = file.files[0].name; break; - case "python-path-executable": - state.pythonPath = file.files[0].name; - break; } vscode.setState(state);