Skip to content

Commit

Permalink
[RP2XXX] bump Pico Core up to 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lyusupov committed Oct 2, 2024
1 parent d6bf5f1 commit 3d72267
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ jobs:
fi
if [[ "$BOARD" =~ "rp2040:rp2040:" ]]; then
arduino --pref "boardsmanager.additional.urls=https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json" --save-prefs ;
arduino --install-boards rp2040:rp2040:4.0.3 ;
arduino --install-boards rp2040:rp2040:4.1.0 ;
arduino --board $BOARD --save-prefs ;
if [[ "$BOARD" =~ "rp2040:rp2040:rpipicow" ]]; then
arduino --pref "custom_freq=rpipicow_120" --save-prefs ;
Expand Down Expand Up @@ -445,6 +445,9 @@ jobs:
arduino --pref "boardsmanager.additional.urls=https://github.com/openwch/board_manager_files/raw/main/package_ch32v_index.json" --save-prefs ;
arduino --install-boards WCH:ch32v:1.0.4 ;
arduino --board $BOARD --save-prefs ;
#arduino --pref "custom_clock=CH32V30x_EVT_144MHz_HSE" --save-prefs ;
#arduino --pref "custom_rtlib=CH32V30x_EVT_nanofp" --save-prefs ;
#arduino --pref "custom_usb=CH32V30x_EVT_tinyusb_usbfs" --save-prefs ;
mkdir -p $HOME/Arduino/hardware/WCH ;
cd $HOME/Arduino/hardware/WCH ;
wget https://github.com/openwch/arduino_core_ch32/archive/refs/heads/main.zip ;
Expand Down
12 changes: 12 additions & 0 deletions software/firmware/source/SoftRF/src/platform/CH32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ eeprom_t eeprom_block;
settings_t *settings = &eeprom_block.field.settings;
#endif /* EXCLUDE_EEPROM */

#if defined(USE_TINYUSB)
const char *CH32_Device_Manufacturer = SOFTRF_IDENT;
const char *CH32_Device_Model = "Academy Edition";
const uint16_t CH32_Device_Version = SOFTRF_USB_FW_VERSION;
#endif /* USE_TINYUSB */

#if defined(ENABLE_RECORDER)
#include <SdFat.h>

Expand Down Expand Up @@ -125,6 +131,12 @@ static void CH32_setup()
Wire.setSCL(SOC_GPIO_PIN_SCL);
Wire.setSDA(SOC_GPIO_PIN_SDA);

#if defined(USE_TINYUSB)
USBDevice.setManufacturerDescriptor(CH32_Device_Manufacturer);
USBDevice.setProductDescriptor(CH32_Device_Model);
USBDevice.setDeviceVersion(CH32_Device_Version);
#endif /* USE_TINYUSB */

Serial.begin(SERIAL_OUT_BR, SERIAL_OUT_BITS);

#if defined(USE_TINYUSB) && defined(USBCON)
Expand Down
5 changes: 5 additions & 0 deletions software/firmware/source/SoftRF/src/platform/CH32.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ enum rst_reason {
REASON_EXT_SYS_RST = 6 /* external system reset */
};

enum CH32_board_id {
CH32_WCH-V307V-R1,
CH32_YD-V307VCT6,
};

struct rst_info {
uint32_t reason;
uint32_t exccause;
Expand Down

0 comments on commit 3d72267

Please sign in to comment.