diff --git a/Documentation/building-and-flashing-firmware.md b/Documentation/building-and-flashing-firmware.md index 349f6e0f..09c26aa1 100644 --- a/Documentation/building-and-flashing-firmware.md +++ b/Documentation/building-and-flashing-firmware.md @@ -49,14 +49,14 @@ The firmware will be saved in `/Firmware/busPirate.X/dist/BusPirate_v3/productio # Flashing -*Warning: This section is bound to change really soon* - To flash the firmware onto a Bus Pirate, there is a tool called Pirate-Loader. This tool is included in the Bus Pirate Github repository, so there's nothing extra to download. Simply navigate to `Bus_Pirate/package/BPv3-firmware` if you have a Bus Pirate v3 hardware board. Here you will find pirate-loader_lnx, pirate-loader_mac and pirate-loader.exe, for the respective platforms. When you see `pirate-loader` in a command in this section replace it with either `./pirate-loader_lnx` `./pirate-loader_mac` or `pirate-loader.exe`, depending on your platform. You may wish to copy pirate-loader to another location or add it to your PATH environment variable. Before we can flash the firmware, we need to trigger the Bus Pirate bootloader. There are two ways to do this. On a Bus Pirate with bootloader v4+, you can simply type `$` at the Bus Pirate TTY prompt and press enter, then close the TTY to free up the connection. If this doesn't work for you, you can use the second method, which is to connect the PGC and PGD pins with a jumper cable. When you are in the bootloader, the MODE LED of the Bus Pirate will stay on. +Once the Bus Pirate prints BOOTLOADER you will need to quit the terminal application e.g. `screen` by typing `Ctrl+a Ctrl+k` Otherwise the loader will not be able to connect. + Now we are ready to use pirate-loader. The usage is as follows: `pirate-loader --dev=X --hex=Y` @@ -82,4 +82,4 @@ Bus Pirate v3.5 Community Firmware v7.1 - goo.gl/gCzQnW [HiZ 1-WIRE UART I2C SPI 2WIRE 3WIRE PIC DIO] Bootloader v4.4 DEVID:0x0447 REVID:0x3046 (24FJ64GA00 2 B8) -``` \ No newline at end of file +``` diff --git a/package/BPv3-firmware/pirate-loader-source/makefile b/package/BPv3-firmware/pirate-loader-source/makefile index d44a40a3..3e532bb2 100644 --- a/package/BPv3-firmware/pirate-loader-source/makefile +++ b/package/BPv3-firmware/pirate-loader-source/makefile @@ -1,5 +1,5 @@ OS := $(shell uname) -SOURCEPATH=. +SOURCEPATH=./source CC=gcc CFLAGS=-O2 -Wall OSFLAGS= -DOS=$OS @@ -10,7 +10,8 @@ SUFFIX=lnx endif ifeq ($(OS),Darwin) SUFFIX=mac -CFLAGS=$(CFLAGS) -force_cpusubtype_ALL -arch i386 -arch ppc +# CFLAGS=$(CFLAGS) -force_cpusubtype_ALL -arch i386 -arch ppc +CFLAGS+= -arch x86_64 endif ifeq ($(OS),FreeBSD) SUFFIX=fbsd @@ -19,7 +20,7 @@ endif all: pirate-loader pirate-loader: $(SOURCES) - $(CC) $(CFLAGS) $(<) $(OSFLAGS) -o $(@)_${SUFFIX} + $(CC) $(CFLAGS) $^ $(OSFLAGS) -o $(@)_${SUFFIX} .PHONY: clean diff --git a/package/BPv3-firmware/pirate-loader_mac b/package/BPv3-firmware/pirate-loader_mac old mode 100644 new mode 100755 index d6e64b79..6266962d Binary files a/package/BPv3-firmware/pirate-loader_mac and b/package/BPv3-firmware/pirate-loader_mac differ