Skip to content

Commit 605aeae

Browse files
author
Ryan Holeman
committed
added pre-compiled firmware and docs on to build from docker, etc
1 parent 50afc50 commit 605aeae

5 files changed

Lines changed: 70 additions & 4 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
build/
1+
build/*
2+
!build/bootloader/bootloader.bin
3+
!build/gatt_server_service_table_demo.bin
4+
!build/partitions_singleapp.bin
25
sdkconfig
36
sdkconfig.old
47
main/*

build/bootloader/bootloader.bin

24.3 KB
Binary file not shown.
740 KB
Binary file not shown.

build/partitions_singleapp.bin

3 KB
Binary file not shown.

docs/setup.md

Lines changed: 66 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,75 @@
22

33
First, you need an esp32 micro controller. If you do not yet have one, I typically buy [these ones](https://www.amazon.com/HiLetgo%C2%AE-ESP-WROOM-32-Development-Microcontroller-Integrated/dp/B0718T232Z/ref=sr_1_4?ie=UTF8&qid=1525458705&sr=8-4&keywords=esp32) from Amazon. If you are reading this because you know I will be at BSidesLV, BlackHat USA and DEFCON, you can ping me on Twitter and Ill hook you up with a pre-flashed on at co$t in Vegas.
44

5-
Now, to get started, setup your esp32 build environment by following [this documentation](http://esp-idf.readthedocs.io/en/latest/get-started/#setup-toolchain). Once complete, you can build and flash the code from this repository just the same as you would from the example bluetooth programs in that project which are located in ```/esp-idf/examples/bluetooth/```
5+
## Precompiled Binaries
6+
7+
The easiest way to get this projects firmware flashed to an ESP32 is to flash the provided pre-compiled binaries. You will need to install [esptool](https://github.com/espressif/esptool) Then do the following:
8+
Clone the repository
9+
```
10+
git clone https://github.com/hackgnar/ble_ctf_infinity
11+
```
12+
13+
Chage directory into the repository
14+
```
15+
cd ble_ctf_infinity
16+
```
17+
18+
Flash the pre-compiled binaries
19+
```
20+
esptool.py --chip esp32 --port /dev/ttyUSB0 \
21+
--baud 115200 --before default_reset --after hard_reset write_flash \
22+
-z --flash_mode dio --flash_freq 40m --flash_size detect \
23+
0x1000 build/bootloader/bootloader.bin \
24+
0x10000 build/gatt_server_service_table_demo.bin \
25+
0x8000 build/partitions_singleapp.bin
26+
```
27+
28+
## Build From Docker
29+
30+
If you want to compile the code yourself, but are having issues setting up an environment, you can use the docker build method. This will provide you with a clean uniform build environment each time. To build from docker do the following:
31+
32+
Build your base docker image and compile the code
33+
```
34+
docker build -t blectf_infinity:v1 .
35+
```
36+
37+
Start up a docker instance to pull out the binaries you compiled
38+
```
39+
docker run blectf_infinity:v1
40+
```
41+
42+
Copy the build from your docker instance
43+
```
44+
docker cp <instance_name>:/ble_ctf_infinity/build .
45+
```
46+
47+
Shutdown and kill your docker
48+
```
49+
docker stop <instance_name>
50+
docker rm <instance_name>
51+
```
52+
53+
Flash the firmware you built (you will need [esptool](https://github.com/espressif/esptool) installed)
54+
```
55+
esptool.py --chip esp32 --port /dev/ttyUSB0 \
56+
--baud 115200 --before default_reset --after hard_reset write_flash \
57+
-z --flash_mode dio --flash_freq 40m --flash_size detect \
58+
0x1000 build/bootloader/bootloader.bin \
59+
0x10000 build/gatt_server_service_table_demo.bin \
60+
0x8000 build/partitions_singleapp.bin
61+
```
62+
63+
## Build From Source
64+
65+
Setup your esp32 build environment by following [this documentation](http://esp-idf.readthedocs.io/en/latest/get-started/#setup-toolchain). Once complete, you can build and flash the code from this repository just the same as you would from the example bluetooth programs in that project which are located in ```/esp-idf/examples/bluetooth/```
666

767
If you need a reminder, do the following once you set up your whole esp build environment from the link above.
868
````
9-
cd ble_ctf_infinity
10-
make menuconfig # set your serial device in bla -> bla -> bla
69+
cd ble_ctf
70+
make menuconfig
71+
# check Component Config > Bluetooth > Bluetooth
72+
# set Compiler options > Disable new warnings introduced in GCC 6-8
73+
# set Serial Flasher Config > Default serial device
1174
make codegen
1275
make
1376
# plug in your esp32 to usb

0 commit comments

Comments
 (0)