Skip to content

Commit

Permalink
Merge pull request #2760 from hathach/update-pio-usb
Browse files Browse the repository at this point in the history
change pio to fix rp2040 build
  • Loading branch information
hathach authored Aug 11, 2024
2 parents 18b5aff + 8b88749 commit 9ee7d1b
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/build_util.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,10 @@ jobs:
shell: bash

- name: Build
if: inputs.toolchain != 'esp-idf'
run: |
python tools/build.py -s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ steps.set-one-per-family.outputs.build_option }} ${{ matrix.arg }}
- name: Build using ESP-IDF docker
if: inputs.toolchain == 'esp-idf'
run: |
docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_version }} python3 tools/build.py ${{ matrix.arg }}
if [ "${{ inputs.toolchain }}" == "esp-idf" ]; then
docker run --rm -v $PWD:/project -w /project espressif/idf:${{ inputs.toolchain_version }} python3 tools/build.py ${{ matrix.arg }}
else
python tools/build.py -s ${{ inputs.build-system }} ${{ steps.setup-toolchain.outputs.build_option }} ${{ steps.set-one-per-family.outputs.build_option }} ${{ matrix.arg }}
fi
shell: bash
7 changes: 6 additions & 1 deletion hw/bsp/rp2040/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@
// USB Host MAX3421E
//--------------------------------------------------------------------

#define MAX3421_SPI PICO_DEFAULT_SPI_INSTANCE
#ifdef PICO_DEFAULT_SPI
#define MAX3421_SPI PICO_DEFAULT_SPI // sdk v2
#else
#define MAX3421_SPI PICO_DEFAULT_SPI_INSTANCE // sdk v1
#endif

#define MAX3421_SCK_PIN PICO_DEFAULT_SPI_SCK_PIN
#define MAX3421_MOSI_PIN PICO_DEFAULT_SPI_TX_PIN
#define MAX3421_MISO_PIN PICO_DEFAULT_SPI_RX_PIN
Expand Down
8 changes: 8 additions & 0 deletions hw/bsp/rp2040/family.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,15 @@ static void max3421_init(void) {
gpio_set_function(MAX3421_SCK_PIN, GPIO_FUNC_SPI);
gpio_set_function(MAX3421_MOSI_PIN, GPIO_FUNC_SPI);
gpio_set_function(MAX3421_MISO_PIN, GPIO_FUNC_SPI);

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wnull-dereference"
#endif
spi_set_format(MAX3421_SPI, 8, SPI_CPOL_0, SPI_CPHA_0, SPI_MSB_FIRST);
#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
}

//// API to enable/disable MAX3421 INTR pin interrupt
Expand Down
8 changes: 4 additions & 4 deletions test/hil/rpi.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@
"flasher": "openocd",
"flasher_sn": "066FFF495087534867063844",
"flasher_args": "-f interface/stlink.cfg -f target/stm32g0x.cfg"
},
}
],
"boards-skip": [
{
"name": "nanoch32v203",
"uid": "CDAB277B0FBC03E339E339E3",
"flasher": "openocd_wch",
"flasher_sn": "EBCA8F0670AF",
"flasher_args": ""
}
],
"boards-skip": [
},
{
"name": "espressif_s3_devkitm",
"uid": "84F703C084E4",
Expand Down
4 changes: 2 additions & 2 deletions tools/get_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
'hw/mcu/nxp/mcux-sdk': ['https://github.com/hathach/mcux-sdk.git',
'144f1eb7ea8c06512e12f12b27383601c0272410',
'kinetis_k kinetis_k32l2 kinetis_kl lpc51 lpc54 lpc55 mcx imxrt'],
'hw/mcu/raspberry_pi/Pico-PIO-USB': ['https://github.com/sekigon-gonnoc/Pico-PIO-USB.git',
'0f747aaa0c16f750bdfa2ba37ec25d6c8e1bc117',
'hw/mcu/raspberry_pi/Pico-PIO-USB': ['https://github.com/adafruit/Pico-PIO-USB.git',
'770e3b2e4af14dd202f062f850f9f14820ecbb1e',
'rp2040'],
'hw/mcu/renesas/fsp': ['https://github.com/renesas/fsp.git',
'd52e5a6a59b7c638da860c2bb309b6e78e752ff8',
Expand Down

0 comments on commit 9ee7d1b

Please sign in to comment.