diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index a64ec3f2..baabea97 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -24,6 +24,15 @@ jobs: # Use embedded toolchain - uses: numworks/setup-arm-toolchain@2020-q4 - # Runs a single command using the runners shell - - name: Build + # Run some of the most common build types + - name: Build native fw run: make + + - name: Clean + run: make clean + + - name: Install BMP PC hosted dependencies + run: sudo apt-get -y install libftdi1-dev libhidapi-dev + + - name: Build PC hosted binary + run: make PROBE_HOST=hosted diff --git a/Makefile b/Makefile index b0d56566..471727bb 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,7 @@ ifndef NO_LIBOPENCM3 git submodule init ;\ git submodule update ;\ fi - $(Q)$(MAKE) $(MFLAGS) -C libopencm3 lib + $(Q)$(MAKE) $(MFLAGS) -C libopencm3 lib/stm32/f1 lib/stm32/f4 lib/lm4f endif $(Q)$(MAKE) $(MFLAGS) -C src diff --git a/src/Makefile b/src/Makefile index b6930f27..b03695eb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -61,6 +61,9 @@ SRC = \ stm32g0.c \ target.c \ +# Output memory usage information +LDFLAGS += -Wl,--print-memory-usage + include $(PLATFORM_DIR)/Makefile.inc OPT_FLAGS ?= -Os diff --git a/src/gdb_main.c b/src/gdb_main.c index bdff229a..bfbe8cd6 100644 --- a/src/gdb_main.c +++ b/src/gdb_main.c @@ -539,11 +539,7 @@ handle_z_packet(char *packet, int plen) uint32_t addr; int ret; - /* I have no idea why this doesn't work. Seems to work - * with real sscanf() though... */ - //sscanf(packet, "%*[zZ]%hhd,%08lX,%hhd", &type, &addr, &len); - type = packet[1] - '0'; - sscanf(packet + 2, ",%" PRIx32 ",%d", &addr, &len); + sscanf(packet, "%*[zZ]%d,%08" PRIX32 ",%d", &type, &addr, &len); if(set) ret = target_breakwatch_set(cur_target, type, addr, len); else