Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

64 bit fixes #179

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Documentation/building-and-flashing-firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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)
```
```
7 changes: 4 additions & 3 deletions package/BPv3-firmware/pirate-loader-source/makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OS := $(shell uname)
SOURCEPATH=.
SOURCEPATH=./source
CC=gcc
CFLAGS=-O2 -Wall
OSFLAGS= -DOS=$OS
Expand All @@ -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
Expand All @@ -19,7 +20,7 @@ endif
all: pirate-loader

pirate-loader: $(SOURCES)
$(CC) $(CFLAGS) $(<) $(OSFLAGS) -o $(@)_${SUFFIX}
$(CC) $(CFLAGS) $^ $(OSFLAGS) -o $(@)_${SUFFIX}

.PHONY: clean

Expand Down
Binary file modified package/BPv3-firmware/pirate-loader_mac
100644 → 100755
Binary file not shown.