add dfu util to container, enable usb in container (#229)

* add dfu util to container, enable usb in container
* add DFU_SERIAL env
This commit is contained in:
coreglitch 2020-11-10 22:42:18 +06:00 committed by GitHub
parent b3dddc645d
commit 748f7e4fc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -8,7 +8,7 @@ services:
stdin_open: true
volumes:
- .:/project
# - /dev/bus/usb:/dev/bus/usb
- /dev/bus/usb:/dev/bus/usb
working_dir: "/project"
environment:
DISPLAY: $DISPLAY

View File

@ -59,6 +59,13 @@ RUN apt update && \
wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gdb-arm-none-eabi/gdb-arm-none-eabi_7.10-1ubuntu3+9_amd64.deb && \
dpkg -i gdb-arm-none-eabi_7.10-1ubuntu3+9_amd64.deb
# dfu-util
RUN apt update && \
apt install -y --no-install-recommends \
dfu-util \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
COPY entrypoint.sh syntax_check.sh /
RUN chmod +x /syntax_check.sh

View File

@ -59,7 +59,7 @@ $(OBJ_DIR)/flash: $(OBJ_DIR)/$(PROJECT).bin
touch $@
$(OBJ_DIR)/upload: $(OBJ_DIR)/$(PROJECT).bin
dfu-util -D $(OBJ_DIR)/$(PROJECT).bin -a 0 -s $(FLASH_ADDRESS):leave
dfu-util -D $(OBJ_DIR)/$(PROJECT).bin -a 0 -s $(FLASH_ADDRESS) -S $(DFU_SERIAL)
touch $@
$(ASSETS): $(ASSETS_SOURCES)