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:
parent
b3dddc645d
commit
748f7e4fc3
@ -8,7 +8,7 @@ services:
|
|||||||
stdin_open: true
|
stdin_open: true
|
||||||
volumes:
|
volumes:
|
||||||
- .:/project
|
- .:/project
|
||||||
# - /dev/bus/usb:/dev/bus/usb
|
- /dev/bus/usb:/dev/bus/usb
|
||||||
working_dir: "/project"
|
working_dir: "/project"
|
||||||
environment:
|
environment:
|
||||||
DISPLAY: $DISPLAY
|
DISPLAY: $DISPLAY
|
||||||
|
@ -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 && \
|
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
|
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 /
|
COPY entrypoint.sh syntax_check.sh /
|
||||||
|
|
||||||
RUN chmod +x /syntax_check.sh
|
RUN chmod +x /syntax_check.sh
|
||||||
|
@ -59,7 +59,7 @@ $(OBJ_DIR)/flash: $(OBJ_DIR)/$(PROJECT).bin
|
|||||||
touch $@
|
touch $@
|
||||||
|
|
||||||
$(OBJ_DIR)/upload: $(OBJ_DIR)/$(PROJECT).bin
|
$(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 $@
|
touch $@
|
||||||
|
|
||||||
$(ASSETS): $(ASSETS_SOURCES)
|
$(ASSETS): $(ASSETS_SOURCES)
|
||||||
|
Loading…
Reference in New Issue
Block a user