diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/device/99-tinyusb.rules | 7 | ||||
| -rw-r--r-- | examples/device/dfu/.skip.MCU_TM4C123 | 4 | ||||
| -rw-r--r-- | examples/device/dfu/src/tusb_config.h | 2 | ||||
| -rw-r--r-- | examples/rules.mk | 13 |
4 files changed, 21 insertions, 5 deletions
diff --git a/examples/device/99-tinyusb.rules b/examples/device/99-tinyusb.rules index e6372ed58..d306bada5 100644 --- a/examples/device/99-tinyusb.rules +++ b/examples/device/99-tinyusb.rules @@ -12,3 +12,10 @@ ATTRS{idVendor}=="cafe", MODE="0666", GROUP="dialout" # Rule to blacklist TinyUSB example from being manipulated by ModemManager. SUBSYSTEMS=="usb", ATTRS{idVendor}=="cafe", ENV{ID_MM_DEVICE_IGNORE}="1" + +# Xplained Pro SamG55 Device +SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666", GROUP="users", ENV{ID_MM_DEVICE_IGNORE}="1" +SUBSYSTEMS=="tty", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE="0666", GROUP="users", ENV{ID_MM_DEVICE_IGNORE}="1" + +# TI Stellaris/Tiva-C Launchpad ICDI +SUBSYSTEM=="usb", ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0666" diff --git a/examples/device/dfu/.skip.MCU_TM4C123 b/examples/device/dfu/.skip.MCU_TM4C123 new file mode 100644 index 000000000..6260e6e25 --- /dev/null +++ b/examples/device/dfu/.skip.MCU_TM4C123 @@ -0,0 +1,4 @@ +LINK _build/ek-tm4c123gxl/dfu.elf +/home/runner/cache/toolchain/xpack-arm-none-eabi-gcc-10.2.1-1.1/bin/../lib/gcc/arm-none-eabi/10.2.1/../../../../arm-none-eabi/bin/ld: section .ARM.exidx.text._close LMA [0000000000002980,0000000000002987] overlaps section .data LMA [0000000000002980,0000000000002a03] +collect2: error: ld returned 1 exit status +make: *** [../../rules.mk:94: _build/ek-tm4c123gxl/dfu.elf] Error 1
\ No newline at end of file diff --git a/examples/device/dfu/src/tusb_config.h b/examples/device/dfu/src/tusb_config.h index 66e357021..012d50019 100644 --- a/examples/device/dfu/src/tusb_config.h +++ b/examples/device/dfu/src/tusb_config.h @@ -80,7 +80,7 @@ #define CFG_TUD_DFU 1 // DFU buffer size, it has to be set to the buffer size used in TUD_DFU_DESCRIPTOR -#define CFG_TUD_DFU_XFER_BUFSIZE 512 +#define CFG_TUD_DFU_XFER_BUFSIZE ( OPT_MODE_HIGH_SPEED ? 512 : 64 ) #ifdef __cplusplus } diff --git a/examples/rules.mk b/examples/rules.mk index 92fa4e14d..4cc35cb22 100644 --- a/examples/rules.mk +++ b/examples/rules.mk @@ -158,13 +158,14 @@ endif # Flash Targets # --------------------------------------- -# Flash binary using Jlink +# Jlink binary ifeq ($(OS),Windows_NT) JLINKEXE = JLink.exe else JLINKEXE = JLinkExe endif +# Jlink Interface JLINK_IF ?= swd # Flash using jlink @@ -177,18 +178,22 @@ flash-jlink: $(BUILD)/$(PROJECT).hex @echo exit >> $(BUILD)/$(BOARD).jlink $(JLINKEXE) -device $(JLINK_DEVICE) -if $(JLINK_IF) -JTAGConf -1,-1 -speed auto -CommandFile $(BUILD)/$(BOARD).jlink -# flash STM32 MCU using stlink with STM32 Cube Programmer CLI +# Flash STM32 MCU using stlink with STM32 Cube Programmer CLI flash-stlink: $(BUILD)/$(PROJECT).elf STM32_Programmer_CLI --connect port=swd --write $< --go -# flash with pyocd +# Flash using pyocd PYOCD_OPTION ?= flash-pyocd: $(BUILD)/$(PROJECT).hex pyocd flash -t $(PYOCD_TARGET) $(PYOCD_OPTION) $< pyocd reset -t $(PYOCD_TARGET) -# flash with Black Magic Probe +# Flash using openocd +OPENOCD_OPTION ?= +flash-openocd: $(BUILD)/$(PROJECT).elf + openocd $(OPENOCD_OPTION) -c "program $< verify reset exit" +# flash with Black Magic Probe # This symlink is created by https://github.com/blacksphere/blackmagic/blob/master/driver/99-blackmagic.rules BMP ?= /dev/ttyBmpGdb |
