Browse Source

update pico-sdk to more recent commit

- move target_link_libraries() to family.cmake
- enable pico_bootsel_via_double_reset
hathach 5 years ago
parent
commit
ce942baad2

+ 0 - 3
examples/device/audio_test/CMakeLists.txt

@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/board_test/CMakeLists.txt

@@ -37,9 +37,6 @@ elseif(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/cdc_dual_ports/CMakeLists.txt

@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/cdc_msc/CMakeLists.txt

@@ -39,9 +39,6 @@ elseif(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/dfu_runtime/CMakeLists.txt

@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/dynamic_configuration/CMakeLists.txt

@@ -34,9 +34,6 @@ if(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/hid_composite/CMakeLists.txt

@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/hid_generic_inout/CMakeLists.txt

@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/hid_multiple_interface/CMakeLists.txt

@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/midi_test/CMakeLists.txt

@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/msc_dual_lun/CMakeLists.txt

@@ -34,9 +34,6 @@ if(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/net_lwip_webserver/CMakeLists.txt

@@ -80,9 +80,6 @@ if(FAMILY STREQUAL "rp2040")
     HTTPD_USE_CUSTOM_FSDATA=0
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/uac2_headset/CMakeLists.txt

@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/usbtmc/CMakeLists.txt

@@ -34,9 +34,6 @@ if(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/device/webusb_serial/CMakeLists.txt

@@ -33,9 +33,6 @@ if(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 0 - 3
examples/host/cdc_msc_hid/CMakeLists.txt

@@ -38,9 +38,6 @@ elseif(FAMILY STREQUAL "rp2040")
     CFG_TUSB_OS=OPT_OS_PICO
   )
 
-  target_link_libraries(${PROJECT} pico_stdlib pico_fix_rp2040_usb_device_enumeration)
-  pico_add_extra_outputs(${PROJECT})
-
 else()
   message(FATAL_ERROR "Invalid FAMILY specified")
 endif()

+ 2 - 1
examples/rules.mk

@@ -194,6 +194,8 @@ else
 	$(RM) -rf $(BUILD)
 endif
 
+endif # GNU Make
+
 # Print out the value of a make variable.
 # https://stackoverflow.com/questions/16467718/how-to-print-out-a-variable-in-makefile
 print-%:
@@ -227,7 +229,6 @@ flash-pyocd: $(BUILD)/$(PROJECT).hex
 	pyocd flash -t $(PYOCD_TARGET) $<
 	pyocd reset -t $(PYOCD_TARGET)
 
-endif # GNU Make
 
 #-------------- Artifacts --------------
 

+ 8 - 0
hw/bsp/rp2040/family.cmake

@@ -1,3 +1,11 @@
+target_link_libraries(${PROJECT}
+  pico_stdlib
+  pico_bootsel_via_double_reset
+  pico_fix_rp2040_usb_device_enumeration
+)
+
+pico_add_extra_outputs(${PROJECT})
+
 # TinyUSB Stack source
 set(SRC_TINYUSB
 	${TOP}/src/tusb.c

+ 2 - 0
hw/bsp/rp2040/family.mk

@@ -1 +1,3 @@
 FAMILY_SUBMODULES = hw/mcu/raspberrypi/pico-sdk
+
+JLINK_DEVICE = rp2040_m0_0

+ 1 - 1
hw/mcu/raspberrypi/pico-sdk

@@ -1 +1 @@
-Subproject commit 2d5789eca89658a7f0a01e2d6010c0f254605d72
+Subproject commit 61978dc707c7f2026efa4c3300bbb94baa89c78a