diff options
| author | hathach <[email protected]> | 2021-03-18 19:53:39 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-03-18 19:53:39 +0700 |
| commit | 249852d25ced9852eb7f95dcc38b2a82b4c02390 (patch) | |
| tree | ebd05fce430ebc7a8f1b8a1b76ae4a71191d6e63 /hw | |
| parent | e182bb2a5b27eca914a72e8c074dabd333603d34 (diff) | |
use boot2_generic_03h for adafruit feather rp2040
- also use boot2_generic_03h for now for itsy bitsy and qt rp2040
- change default flash target for rp2040 to flash-pyocd
Diffstat (limited to 'hw')
| -rw-r--r-- | hw/bsp/rp2040/boards/adafruit_feather_rp2040/board.cmake | 1 | ||||
| -rw-r--r-- | hw/bsp/rp2040/boards/adafruit_itsybitsy_rp2040/board.cmake | 1 | ||||
| -rw-r--r-- | hw/bsp/rp2040/boards/adafruit_qt_rp2040/board.cmake | 1 | ||||
| -rw-r--r-- | hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake | 1 | ||||
| -rw-r--r-- | hw/bsp/rp2040/family.cmake | 6 | ||||
| -rw-r--r-- | hw/bsp/rp2040/family.mk | 10 |
6 files changed, 15 insertions, 5 deletions
diff --git a/hw/bsp/rp2040/boards/adafruit_feather_rp2040/board.cmake b/hw/bsp/rp2040/boards/adafruit_feather_rp2040/board.cmake new file mode 100644 index 000000000..ea4070cf3 --- /dev/null +++ b/hw/bsp/rp2040/boards/adafruit_feather_rp2040/board.cmake @@ -0,0 +1 @@ +set(PICO_DEFAULT_BOOT_STAGE2_FILE "${PICO_SDK_PATH}/src/rp2_common/boot_stage2/boot2_generic_03h.S") diff --git a/hw/bsp/rp2040/boards/adafruit_itsybitsy_rp2040/board.cmake b/hw/bsp/rp2040/boards/adafruit_itsybitsy_rp2040/board.cmake new file mode 100644 index 000000000..ea4070cf3 --- /dev/null +++ b/hw/bsp/rp2040/boards/adafruit_itsybitsy_rp2040/board.cmake @@ -0,0 +1 @@ +set(PICO_DEFAULT_BOOT_STAGE2_FILE "${PICO_SDK_PATH}/src/rp2_common/boot_stage2/boot2_generic_03h.S") diff --git a/hw/bsp/rp2040/boards/adafruit_qt_rp2040/board.cmake b/hw/bsp/rp2040/boards/adafruit_qt_rp2040/board.cmake new file mode 100644 index 000000000..ea4070cf3 --- /dev/null +++ b/hw/bsp/rp2040/boards/adafruit_qt_rp2040/board.cmake @@ -0,0 +1 @@ +set(PICO_DEFAULT_BOOT_STAGE2_FILE "${PICO_SDK_PATH}/src/rp2_common/boot_stage2/boot2_generic_03h.S") diff --git a/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake b/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake new file mode 100644 index 000000000..eb9f219d2 --- /dev/null +++ b/hw/bsp/rp2040/boards/raspberry_pi_pico/board.cmake @@ -0,0 +1 @@ +set(PICO_DEFAULT_BOOT_STAGE2_FILE "${PICO_SDK_PATH}/src/rp2_common/boot_stage2/boot2_w25q080.S") diff --git a/hw/bsp/rp2040/family.cmake b/hw/bsp/rp2040/family.cmake index af23c2368..63c7daa38 100644 --- a/hw/bsp/rp2040/family.cmake +++ b/hw/bsp/rp2040/family.cmake @@ -1,3 +1,9 @@ +# Board specific define e.g boot stage2 +# PICO_DEFAULT_BOOT_STAGE2_FILE must be set before pico_sdk_init() +include(${TOP}/hw/bsp/${FAMILY}/boards/${BOARD}/board.cmake) + +pico_sdk_init() + target_link_libraries(${PROJECT} pico_stdlib pico_bootsel_via_double_reset diff --git a/hw/bsp/rp2040/family.mk b/hw/bsp/rp2040/family.mk index ed7b11564..6df367323 100644 --- a/hw/bsp/rp2040/family.mk +++ b/hw/bsp/rp2040/family.mk @@ -1,5 +1,8 @@ DEPS_SUBMODULES += hw/mcu/raspberrypi/pico-sdk +JLINK_DEVICE = rp2040_m0_0 +PYOCD_TARGET = rp2040 + ifeq ($(DEBUG), 1) CMAKE_DEFSYM += -DCMAKE_BUILD_TYPE=Debug endif @@ -13,9 +16,6 @@ all: $(BUILD) clean: $(RM) -rf $(BUILD) -#flash: flash-pyocd -flash: +flash: flash-pyocd +flash-uf2: @$(CP) $(BUILD)/$(PROJECT).uf2 /media/$(USER)/RPI-RP2 - -JLINK_DEVICE = rp2040_m0_0 -PYOCD_TARGET = rp2040 |
