Skip to content

Commit f097cae

Browse files
committed
remove combinehex and erase target
update Readme
1 parent 1db3ffe commit f097cae

File tree

3 files changed

+7
-42
lines changed

3 files changed

+7
-42
lines changed

Makefile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ $(info ASFLAGS $(ASFLAGS))
305305
$(info )
306306
endif
307307

308-
.PHONY: all clean flash dfu-flash sd erase gdbflash gdb
308+
.PHONY: all clean flash dfu-flash sd gdbflash gdb
309309

310310
# default target to build
311311
all: $(BUILD)/$(OUT_FILE)-nosd.out $(BUILD)/$(MERGED_FILE).hex
@@ -332,10 +332,6 @@ sd:
332332
@echo Flashing: $(SD_HEX)
333333
$(NRFJPROG) --program $(SD_HEX) -f nrf52 --chiperase --reset
334334

335-
erase:
336-
@echo Erasing chip
337-
$(NRFJPROG) --eraseall -f nrf52
338-
339335
gdbflash: $(BUILD)/$(MERGED_FILE).hex
340336
@echo Flashing: $<
341337
@$(GDB_BMP) -nx --batch -ex 'load $<' -ex 'compare-sections' -ex 'kill'
@@ -369,7 +365,7 @@ $(BUILD)/$(OUT_FILE)-nosd.out: $(BUILD) $(OBJECTS)
369365
@$(SIZE) $@
370366

371367
#------------------- Binary generator -------------------
372-
.PHONY: genhex genpkg combinehex
368+
.PHONY: genhex genpkg
373369

374370
## Create binary .hex file from the .out file
375371
genhex: $(BUILD)/$(OUT_FILE)-nosd.hex
@@ -379,8 +375,6 @@ $(BUILD)/$(OUT_FILE)-nosd.hex: $(BUILD)/$(OUT_FILE)-nosd.out
379375
@$(OBJCOPY) -O ihex $< $@
380376

381377
# merge bootloader and sd hex together
382-
combinehex: $(BUILD)/$(MERGED_FILE).hex
383-
384378
$(BUILD)/$(MERGED_FILE).hex: $(BUILD)/$(OUT_FILE)-nosd.hex
385379
@echo CR $(MERGED_FILE).hex
386380
@mergehex -q -m $< $(SD_HEX) -o $@

README.md

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ both bootloader and the Nordic SoftDevice, you can freely upgrade/downgrade to a
105105
## How to compile and build
106106

107107
You should only continue if you are looking to develop bootloader for your own.
108-
You must have have a J-Link available to "unbrick" your device.
109-
110-
### Option 1: Build with Makefile
108+
You must have have a J-Link available to "unbrick" your device.
111109

112110
Prerequisites
113111

@@ -117,7 +115,7 @@ Prerequisites
117115
To build:
118116

119117
```
120-
make BOARD=feather_nrf52840_express all combinehex
118+
make BOARD=feather_nrf52840_express all
121119
```
122120

123121
To flash the bootloader with JLink:
@@ -138,12 +136,6 @@ To flash SoftDevice (and chip erase):
138136
make BOARD=feather_nrf52840_express sd
139137
```
140138

141-
To erase all of flash:
142-
143-
```
144-
make BOARD=feather_nrf52840_express erase
145-
```
146-
147139
For the list of supported boards, run `make` without `BOARD=` :
148140

149141
```
@@ -167,13 +159,11 @@ make: *** [_build/main.o] Error 127
167159
```
168160

169161
... you may need to pass the location of the GCC ARM toolchain binaries to `make` using
170-
the variable `GNU_INSTALL_ROOT` as below:
162+
the variable `CROSS_COMPILE` as below:
171163
```
172-
$ make GNU_INSTALL_ROOT=/opt/gcc-arm-none-eabi-9-2019-q4-major/bin/ BOARD=feather_nrf52832 all
164+
$ make CROSS_COMPILE=/opt/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi- BOARD=feather_nrf52832 all
173165
```
174166

175-
_Please note that the path needs a trailing path separator (a `/`)_
176-
177167
#### 2. `mergehex: No such file or directory`
178168

179169
Make sure that `mergehex` is available from the command-line. This binary is
@@ -184,22 +174,3 @@ part of Nordic's nRF5x Command Line Tools.
184174
Make sure that `nrfjprog` is available from the command-line. This binary is
185175
part of Nordic's nRF5x Command Line Tools.
186176

187-
On POSIX-type systems you can temporarily add the path to `nrfjprog` via a
188-
variation on the following command:
189-
190-
```
191-
$ export PATH=$PATH:/location/of/nRF5x-Command-Line-Tools_9_7_2_OSX/nrfjprog
192-
```
193-
194-
### Option 2: Build using Segger Embedded Studio
195-
196-
For easier debugging you can also use [SES](https://www.segger.com/products/development-tools/embedded-studio/).
197-
The project file is located at `src/segger/Adafruit_nRF52_Bootloader.emProject`.
198-
199-
> **Note**: SES only flashes the bootloader when you click download, not the SoftDevice.
200-
You need to flash the SoftDevice beforehand if you haven't already done so.
201-
As mentioned above do something like:
202-
203-
```
204-
make BOARD=feather_nrf52840_express sd
205-
```

tools/build_all.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
os.makedirs(bin_directory, exist_ok=True)
3535

3636
start_time = time.monotonic()
37-
make_result = subprocess.run("make -j 4 BOARD={} combinehex genpkg".format(board), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
37+
make_result = subprocess.run("make -j 4 BOARD={} all genpkg".format(board), shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
3838
build_duration = time.monotonic() - start_time
3939

4040
flash_size = "-"

0 commit comments

Comments
 (0)