Skip to content

Commit

Permalink
default to 201 points max for all devices
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-tenma-white committed Oct 13, 2020
1 parent 86c7055 commit f02787b
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ Now you can build the firmware by running make in the firmware sources directory
cd NanoVNA-V2-firmware
make BOARDNAME=board_v2_2 EXTRA_CFLAGS="-DSWEEP_POINTS_MAX=201 -DSAVEAREA_MAX=7"
```
Note that `SWEEP_POINTS_MAX` and `SAVEAREA_MAX` can be customized depending on hardware target. Since Plus4 ECAL is no longer needed, and the extra RAM can be used to increase `SWEEP_POINTS_MAX` to 301 points.
Note that `SWEEP_POINTS_MAX` and `SAVEAREA_MAX` can be customized depending on hardware target.
Since Plus4 ECAL is no longer needed, and the extra RAM can be used to increase `SWEEP_POINTS_MAX` to 301 points (warning: experimental! there may not be enough stack space if ram usage is near full).

`BOARDNAME` should be set to:
- `board_v2_2` for V2.2 hardware
Expand All @@ -72,7 +73,7 @@ Note that `SWEEP_POINTS_MAX` and `SAVEAREA_MAX` can be customized depending on h

For Plus4, a different linker script needs to be used. The build command line for the Plus4 is:
```
make BOARDNAME=board_v2_plus4 EXTRA_CFLAGS="-DSWEEP_POINTS_MAX=301 -DSAVEAREA_MAX=7 -DDISPLAY_ST7796" LDSCRIPT=./gd32f303cc_with_bootloader_plus4.ld
make BOARDNAME=board_v2_plus4 EXTRA_CFLAGS="-DSWEEP_POINTS_MAX=201 -DSAVEAREA_MAX=7 -DDISPLAY_ST7796" LDSCRIPT=./gd32f303cc_with_bootloader_plus4.ld
```

## Flashing the firmware
Expand Down
29 changes: 15 additions & 14 deletions buildall
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
#!/bin/bash
#!/bin/bash -x

MAKE_FLAGS=-j7
MAKE=(make -j7)
DEFAULTFLAGS="-DSWEEP_POINTS_MAX=201 -DSAVEAREA_MAX=7"

make clean || exit 1
"${MAKE[@]}" clean || exit 1
rm *.bin



make "$MAKE_FLAGS" BOARDNAME=board_v2_2 || exit 1
"${MAKE[@]}" BOARDNAME=board_v2_2 EXTRA_CFLAGS="$DEFAULTFLAGS" || exit 1
mv binary.bin v2_2-ili9341.bin
make clean
"${MAKE[@]}" clean

make "$MAKE_FLAGS" BOARDNAME=board_v2_2 EXTRA_CFLAGS=-DDISPLAY_ST7796 || exit 1
"${MAKE[@]}" BOARDNAME=board_v2_2 EXTRA_CFLAGS="$DEFAULTFLAGS -DDISPLAY_ST7796" || exit 1
mv binary.bin v2_2-st7796.bin
make clean
"${MAKE[@]}" clean

make "$MAKE_FLAGS" BOARDNAME=board_v2_plus || exit 1
"${MAKE[@]}" BOARDNAME=board_v2_plus EXTRA_CFLAGS="$DEFAULTFLAGS" || exit 1
mv binary.bin v2plus-ili9341.bin
make clean
"${MAKE[@]}" clean

make "$MAKE_FLAGS" BOARDNAME=board_v2_plus EXTRA_CFLAGS=-DDISPLAY_ST7796 || exit 1
"${MAKE[@]}" BOARDNAME=board_v2_plus EXTRA_CFLAGS="$DEFAULTFLAGS -DDISPLAY_ST7796" || exit 1
mv binary.bin v2plus-st7796.bin
make clean
"${MAKE[@]}" clean


make "$MAKE_FLAGS" BOARDNAME=board_v2_plus4 EXTRA_CFLAGS=-DDISPLAY_ST7796 \
DEFAULTFLAGS="-DSWEEP_POINTS_MAX=201 -DSAVEAREA_MAX=7"
"${MAKE[@]}" BOARDNAME=board_v2_plus4 EXTRA_CFLAGS="$DEFAULTFLAGS -DDISPLAY_ST7796" \
LDSCRIPT=./gd32f303cc_with_bootloader_plus4.ld || exit 1
mv binary.bin v2plus4.bin
make clean

"${MAKE[@]}" clean
2 changes: 1 addition & 1 deletion common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ typedef int64_t freqHz_t;
static constexpr uint32_t FREQUENCY_CHANGE_OVER = 140000000;
#define SWEEP_POINTS_MIN 2
#ifndef SWEEP_POINTS_MAX
#define SWEEP_POINTS_MAX 301
#define SWEEP_POINTS_MAX 201
#endif

#define TRACES_MAX 4
Expand Down

0 comments on commit f02787b

Please sign in to comment.