Skip to content

Commit 3f3978c

Browse files
authored
Merge branch 'dev' into nrf-dcdc
2 parents 4f46ec7 + c0194d8 commit 3f3978c

File tree

92 files changed

+3339
-393
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+3339
-393
lines changed

boards/meshtiny.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"ldscript": "nrf52840_s140_v6.ld"
5+
},
6+
"core": "nRF5",
7+
"cpu": "cortex-m4",
8+
"extra_flags": "-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA",
9+
"f_cpu": "64000000L",
10+
"hwids": [
11+
[
12+
"0x239A",
13+
"0x8029"
14+
],
15+
[
16+
"0x239A",
17+
"0x0029"
18+
],
19+
[
20+
"0x239A",
21+
"0x002A"
22+
],
23+
[
24+
"0x239A",
25+
"0x802A"
26+
]
27+
],
28+
"usb_product": "Meshtiny",
29+
"mcu": "nrf52840",
30+
"variant": "meshtiny",
31+
"bsp": {
32+
"name": "adafruit"
33+
},
34+
"softdevice": {
35+
"sd_flags": "-DS140",
36+
"sd_name": "s140",
37+
"sd_version": "6.1.1",
38+
"sd_fwid": "0x00B6"
39+
},
40+
"bootloader": {
41+
"settings_addr": "0xFF000"
42+
}
43+
},
44+
"connectivity": [
45+
"bluetooth"
46+
],
47+
"debug": {
48+
"jlink_device": "nRF52840_xxAA",
49+
"svd_path": "nrf52840.svd",
50+
"openocd_target": "nrf52840-mdk-rs"
51+
},
52+
"frameworks": [
53+
"arduino",
54+
"freertos"
55+
],
56+
"name": "Meshtiny",
57+
"upload": {
58+
"maximum_ram_size": 248832,
59+
"maximum_size": 815104,
60+
"speed": 115200,
61+
"protocol": "nrfutil",
62+
"protocols": [
63+
"jlink",
64+
"nrfjprog",
65+
"nrfutil",
66+
"stlink"
67+
],
68+
"use_1200bps_touch": true,
69+
"require_upload_port": true,
70+
"wait_for_upload_port": true
71+
},
72+
"url": "https://shop.mtoolstec.com/product/meshtiny",
73+
"vendor": "MTools Tec"
74+
}

boards/rak3401.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"build": {
3+
"arduino": {
4+
"ldscript": "nrf52840_s140_v6.ld"
5+
},
6+
"core": "nRF5",
7+
"cpu": "cortex-m4",
8+
"extra_flags": "-DARDUINO_NRF52840_FEATHER -DNRF52840_XXAA",
9+
"f_cpu": "64000000L",
10+
"hwids": [
11+
[
12+
"0x239A",
13+
"0x8029"
14+
],
15+
[
16+
"0x239A",
17+
"0x0029"
18+
],
19+
[
20+
"0x239A",
21+
"0x002A"
22+
],
23+
[
24+
"0x239A",
25+
"0x802A"
26+
]
27+
],
28+
"usb_product": "WisCore RAK3401 Board",
29+
"mcu": "nrf52840",
30+
"variant": "WisCore_RAK3401_Board",
31+
"bsp": {
32+
"name": "adafruit"
33+
},
34+
"softdevice": {
35+
"sd_flags": "-DS140",
36+
"sd_name": "s140",
37+
"sd_version": "6.1.1",
38+
"sd_fwid": "0x00B6"
39+
},
40+
"bootloader": {
41+
"settings_addr": "0xFF000"
42+
}
43+
},
44+
"connectivity": [
45+
"bluetooth"
46+
],
47+
"debug": {
48+
"jlink_device": "nRF52840_xxAA",
49+
"svd_path": "nrf52840.svd"
50+
},
51+
"frameworks": [
52+
"arduino"
53+
],
54+
"name": "WisCore RAK3401 Board",
55+
"upload": {
56+
"maximum_ram_size": 248832,
57+
"maximum_size": 815104,
58+
"speed": 115200,
59+
"protocol": "nrfutil",
60+
"protocols": [
61+
"jlink",
62+
"nrfjprog",
63+
"nrfutil",
64+
"stlink"
65+
],
66+
"use_1200bps_touch": true,
67+
"require_upload_port": true,
68+
"wait_for_upload_port": true
69+
},
70+
"url": "https://www.rakwireless.com",
71+
"vendor": "RAKwireless"
72+
}

build.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@ $ sh build.sh build-repeater-firmwares
2929
3030
Build all chat room server firmwares
3131
$ sh build.sh build-room-server-firmwares
32+
33+
Environment Variables:
34+
DISABLE_DEBUG=1: Disables all debug logging flags (MESH_DEBUG, MESH_PACKET_LOGGING, etc.)
35+
If not set, debug flags from variant platformio.ini files are used.
36+
37+
Examples:
38+
Build without debug logging:
39+
$ export FIRMWARE_VERSION=v1.0.0
40+
$ export DISABLE_DEBUG=1
41+
$ sh build.sh build-firmware RAK_4631_repeater
42+
43+
Build with debug logging (default, uses flags from variant files):
44+
$ export FIRMWARE_VERSION=v1.0.0
45+
$ sh build.sh build-firmware RAK_4631_repeater
3246
EOF
3347
}
3448

@@ -68,6 +82,13 @@ get_pio_envs_ending_with_string() {
6882
done
6983
}
7084

85+
# disable all debug logging flags if DISABLE_DEBUG=1 is set
86+
disable_debug_flags() {
87+
if [ "$DISABLE_DEBUG" == "1" ]; then
88+
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -UMESH_DEBUG -UBLE_DEBUG_LOGGING -UWIFI_DEBUG_LOGGING -UBRIDGE_DEBUG -UGPS_NMEA_DEBUG -UCORE_DEBUG_LEVEL -UESPNOW_DEBUG_LOGGING -UDEBUG_RP2040_WIRE -UDEBUG_RP2040_SPI -UDEBUG_RP2040_CORE -UDEBUG_RP2040_PORT -URADIOLIB_DEBUG_SPI -UCFG_DEBUG -URADIOLIB_DEBUG_BASIC -URADIOLIB_DEBUG_PROTOCOL"
89+
fi
90+
}
91+
7192
# build firmware for the provided pio env in $1
7293
build_firmware() {
7394

@@ -94,6 +115,9 @@ build_firmware() {
94115
# add firmware version info to end of existing platformio build flags in environment vars
95116
export PLATFORMIO_BUILD_FLAGS="${PLATFORMIO_BUILD_FLAGS} -DFIRMWARE_BUILD_DATE='\"${FIRMWARE_BUILD_DATE}\"' -DFIRMWARE_VERSION='\"${FIRMWARE_VERSION_STRING}\"'"
96117

118+
# disable debug flags if requested
119+
disable_debug_flags
120+
97121
# build firmware target
98122
pio run -e $1
99123

0 commit comments

Comments
 (0)