diff --git a/README.md b/README.md index 9059edc..c40002f 100644 --- a/README.md +++ b/README.md @@ -231,7 +231,7 @@ libco is licensed under the [ISC license](https://opensource.org/licenses/ISC) - [ ] A name - [ ] A (VID and) PID, and maybe better subclass & protocol IDs for the vnd cfg itf -- [ ] More Pico SDK meta/buildinfo +- [x] More Pico SDK meta/buildinfo - [x] CMSIS-DAP JTAG implementation - [x] Flashrom/SPI support using Serprog - Parallel ROM flashing support, too, by having the device switch into a @@ -275,7 +275,7 @@ libco is licensed under the [ISC license](https://opensource.org/licenses/ISC) - https://github.com/Xilinx/XilinxVirtualCable/ - https://github.com/derekmulcahy/xvcpi - OpenOCD as XVC client?? -- [ ] SUMP logic analyzer mode? +- [x] SUMP logic analyzer mode? - see also [this](https://github.com/perexg/picoprobe-sump) - [ ] FT2232 emulation mode? - watch out, still need a vnd cfg interface! libftdi expects the following stuff: (TODO: acquire detailed protocol description) diff --git a/bsp/rp2040/m_default/cdc_uart.c b/bsp/rp2040/m_default/cdc_uart.c index 0e4ed96..913f6d0 100644 --- a/bsp/rp2040/m_default/cdc_uart.c +++ b/bsp/rp2040/m_default/cdc_uart.c @@ -75,3 +75,11 @@ void cdc_uart_set_hwflow(bool enable) { uart_set_hw_flow(PINOUT_UART_INTERFACE, void cdc_uart_set_baudrate(uint32_t brate) { uart_init(PINOUT_UART_INTERFACE, brate); } +// idk where to put this otherwise + +bi_decl(bi_program_feature("Mode 1: UART")); +bi_decl(bi_program_feature("Mode 1: CMSIS-DAP")); +bi_decl(bi_program_feature("Mode 1: SPI")); +bi_decl(bi_program_feature("Mode 1: I2C")); +bi_decl(bi_program_feature("Mode 1: temperature sensor")); + diff --git a/bsp/rp2040/m_sump/sump_hw.c b/bsp/rp2040/m_sump/sump_hw.c index 676eb5e..7ce0d05 100644 --- a/bsp/rp2040/m_sump/sump_hw.c +++ b/bsp/rp2040/m_sump/sump_hw.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -328,6 +329,10 @@ void sump_hw_init(void) { irq_set_enabled(SAMPLING_DMA_IRQ, false); irq_set_exclusive_handler(SAMPLING_DMA_IRQ, sump_hw_dma_irq_handler); sump_dma_set_irq_channel_mask_enabled(SUMP_DMA_MASK, true); + + /*bi_decl(bi_pin_mask_with_name(SAMPLING_GPIO_MASK, "SUMP logic analyzer input")); + bi_decl(bi_1pin_with_name(SAMPLING_GPIO_TEST, "SUMP logic analyzer: test PWM"));*/ + bi_decl(bi_program_feature("Mode 4: SUMP")); } void sump_hw_stop(void) { diff --git a/bsp/rp2040/unique.c b/bsp/rp2040/unique.c index 45decef..8e1d900 100644 --- a/bsp/rp2040/unique.c +++ b/bsp/rp2040/unique.c @@ -2,10 +2,12 @@ #include +#include #include #include #include "tusb.h" +#include "info.h" #include "util.h" uint8_t get_unique_id_u8(uint8_t* desc_str) { @@ -44,3 +46,19 @@ uint8_t get_unique_id_u16(uint16_t* desc_str) { return chr_count; } +// IDK, let's just put this somewhere + +bi_decl(bi_program_name(INFO_PRODUCT(INFO_BOARDNAME))); +bi_decl(bi_program_description("USB hardware hacking multitool")); +bi_decl(bi_program_version_string("00.10")); +bi_decl(bi_program_url("https://git.lain.faith/sys64738/DapperMime-JTAG/")); +#ifdef PICO_NO_FLASH +bi_decl(bi_program_build_attribute("Not in flash")); +#elif defined(PICO_COPY_TO_RAM) +bi_decl(bi_program_build_attribute("Copy-to-RAM")); +#endif + +#ifdef USE_USBCDC_FOR_STDIO +bi_decl(bi_program_build_attribute("USB-CDC stdio debug interface")); +#endif +