Skip to content
Merged
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ This API is dependent on the following external libraries:
- `-DRNS_USE_FS` Used to enable use of file system by RNS for persistence
- `-DRNS_PERSIST_PATHS` Used to enable persistence of RNS paths in file system (also requires `-DRNS_USE_FS`)
- `-DRNS_USE_TLSF=1` Enables the use of the TLSF (Two-Level Segregate Fit) dynamic memory manager for efficient management of constrained MCU memory with minimal fragmentation. Currently only required on NRF52 boards (ESP32 already uses TLSF internally).
- `-RNS_TLSF_BUFFER_SIZ=N` Defines the TLSF memory pool buffer size (N bytes, default 0 which means dynamic)
- `-DRNS_USE_ALLOCATOR=1` Enables the replacement of default new/delete operators with custom implementations that take advantage of optimized memory managers (eg, TLSF). Currently only required on NRF52 boards (ESP32 already uses TLSF internally).

## Building
Expand Down
1 change: 1 addition & 0 deletions boards/rak4630.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
],
"debug": {
"jlink_device": "nRF52840_xxAA",
"openocd_target": "nrf52840",
"svd_path": "nrf52840.svd"
},
"frameworks": [
Expand Down
87 changes: 67 additions & 20 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
default_envs = native17

[env]
monitor_speed = 115200
build_unflags =
-fno-exceptions
build_flags =
Expand Down Expand Up @@ -70,7 +71,37 @@ lib_deps =
${env.lib_deps}
lib_compat_mode = off

[env:mcu]
[env:native_debug]
platform = native
build_flags =
${env.build_flags}
-std=gnu++11
-DNATIVE
; CBA TEST
;-fsanitize=address
-fno-omit-frame-pointer
-g
;-O1
-O0
;-DRNS_MEM_LOG
-DRNS_USE_ALLOCATOR=1
-DRNS_USE_TLSF=1
-DTLSF_DEBUG=1
;-DRNS_TLSF_BUFFER_SIZE=81920
;-DRNS_TLSF_BUFFER_SIZE=102400
-DRNS_TLSF_BUFFER_SIZE=204800
;-DRNS_TLSF_BUFFER_SIZE=307200
;-DRNS_TLSF_BUFFER_SIZE=409600
;-DRNS_TLSF_BUFFER_SIZE=512000
;-DRNS_TLSF_BUFFER_SIZE=614400
;-DRNS_TLSF_BUFFER_SIZE=1024000
lib_deps =
${env.lib_deps}
lib_compat_mode = off

[env:embedded]
framework = arduino
upload_speed = 460800
build_unflags =
${env.build_unflags}
;-std=gnu++11
Expand All @@ -81,72 +112,88 @@ lib_deps =
${env.lib_deps}

[env:ttgo-lora32-v21]
extends = env:embedded
platform = espressif32
board = ttgo-lora32-v21
board_build.partitions = no_ota.csv
framework = arduino
monitor_speed = 115200
build_unflags =
${env:mcu.build_unflags}
${env:embedded.build_unflags}
-std=gnu++11
build_flags =
${env:mcu.build_flags}
${env:embedded.build_flags}
-std=gnu++17
-DBOARD_ESP32
-DMSGPACK_USE_BOOST=OFF
lib_deps =
${env:mcu.lib_deps}
${env:embedded.lib_deps}
monitor_filters = esp32_exception_decoder

[env:ttgo-t-beam]
extends = env:embedded
platform = espressif32
board = ttgo-t-beam
board_build.partitions = no_ota.csv
;board_build.partitions = huge_app.csv
framework = arduino
monitor_speed = 115200
build_flags =
${env:mcu.build_flags}
${env:embedded.build_flags}
-DBOARD_ESP32
-DMSGPACK_USE_BOOST=OFF
lib_deps =
${env:mcu.lib_deps}
${env:embedded.lib_deps}
monitor_filters = esp32_exception_decoder

[env:lilygo_tbeam_supreme]
extends = env:embedded
platform = espressif32
board = t-beams3-supreme
board_build.partitions = no_ota.csv
;board_build.partitions = huge_app.csv
framework = arduino
monitor_speed = 115200
build_flags =
${env:mcu.build_flags}
${env:embedded.build_flags}
-DBOARD_ESP32
-DMSGPACK_USE_BOOST=OFF
lib_deps =
${env:mcu.lib_deps}
${env:embedded.lib_deps}
monitor_filters = esp32_exception_decoder

; also Heltec Wireless Tracker
[env:heltec_wifi_lora_32_V4]
extends = env:embedded
platform = espressif32
board = esp32-s3-devkitc-1
board_build.partitions = no_ota.csv
;board_build.partitions = huge_app.csv
build_flags =
${env.build_flags}
-DBOARD_ESP32
-DMSGPACK_USE_BOOST=OFF
-DARDUINO_USB_CDC_ON_BOOT=1
lib_deps =
${env:embedded.lib_deps}
monitor_filters = esp32_exception_decoder
upload_speed = 921600

[env:wiscore_rak4631]
extends = env:embedded
platform = nordicnrf52
board = rak4630
board_build.partitions = no_ota.csv
framework = arduino
monitor_speed = 115200
build_src_filter = ${env:mcu.build_src_filter}+<../variants/rak4630>
build_src_filter = ${env:embedded.build_src_filter}+<../variants/rak4630>
build_flags =
${env:mcu.build_flags}
${env:embedded.build_flags}
-I variants/rak4630
-fexceptions
-DBOARD_NRF52
-DRNS_USE_ALLOCATOR=1
-DRNS_USE_TLSF=1
-DMSGPACK_USE_BOOST=OFF
lib_deps =
${env:mcu.lib_deps}
${env:embedded.lib_deps}
adafruit/Adafruit TinyUSB Library

; Overrides for specific tests (not working!)
[test_env:test_objects]
build_flags =
${env:mcu.build_flags}
${env:embedded.build_flags}
;-DTEST_OBJECT_DATA=1
-DTEST_OBJECT_IMPL=1
Loading