Chad Attermann 3af5111606 WIP: Logging optimizations and memory management
Changed a few key logs to use printf-style instead of string
concatenation to avoid dynamic memory allocation. Still need to move
all remaining logging over to printf-style.

Added option (-DRNS_USE_ALLOCATOR=1) to override new/delete operators for
both allocation metrics and the ability to implement an alternate memory
allocator.

Added option (-DRNS_USE_TLSF=1) to use the alternate TLSF allocator
(must also define RNS_USE_ALLOCATOR). This allocator is well known for
reducing fragmentation and providing constant, O(1)-time allocation
and deallocation for real-time embedded systems.

This TLSF allocator appears to already be the default allocator for
ESP32 boards, but the allocator used by NRF52 is unknown at this time so
the TLSF allocator internal to microReticulum is only being used for
NRF52 boards at this time.

Future memory management improvements will include custom allocators for
long-lived structures like the path table that will segregate them from
the general pool of memory that is constantly cycling, thereby further
reducing fragmentation. It will also allow these structures to use
alternate memory like PSRAM present on T-Beam boards.
2024-07-16 10:40:46 -06:00
2023-10-06 17:24:48 -06:00
2024-06-03 08:13:45 -06:00
2023-10-06 17:24:48 -06:00
2023-10-06 17:14:50 -06:00
2024-02-18 17:39:11 -07:00

microReticulum

Port of Reticulum Network Stack to C++ specifically but not exclusively targeting 32-bit and better MCUs.

Dependencies

Build environment is configured for use in VSCode and PlatformIO.

This API is dependent on the following external libraries:

Building

Building and uploading to hardware is simple through the VSCode PlatformIO IDE

  • Install VSCode and PlatformIO
  • Clone this repo
  • Lanch PlatformIO and load repo
  • In PlatformIO, select the environment for intended board
  • Build, Upload, and Monitor to observe application logging

Instructions for command line builds and building of individual example applications coming soon.

Roadmap

  • Framework for simple C++ API that mimics Python reference implementation with implicit object sharing
  • Utility class to efficiently handle byte buffers
  • Implemenmtat basic Identity, Destination and Packet
  • Successful testing of Announce mechanism
  • Implement Ed2551 public-key signature and X25519 key exchange
  • Implement encryption including AES, AES-CBC, HKDF, HMAC, PKCS7, and Fernet
  • Successful testing of Packet encrypt/decrypt/sign/prof
  • Implement dynamic Interfaces
  • Implement UDP Interface for testing against Python reference Reticulum instances
  • Implement basic Transport functionality
  • Successful testing of end-to-end Path Finding
  • Implement persistence for storage of runtime data structures (config, identities, routing tables, etc.)
  • Support for Links and Resources in Transport
  • Implement Packet proofs
  • Successful testing of Transport of both Packets and Links
  • Implement memory management appropriate for memory constricted MCUs
  • Implement Link, Resource, Channel and Buffer
  • Add example applications utilizing the C++ API
  • Configure PlatformIO to easily build and upload test applications to board
  • Add buid tagets for all boards currently supported by RNode

Please open an Issue if you have trouble building ior using the API, and feel free to start a new Discussion for anything else.

S
Description
No description provided
Readme Apache-2.0
884 KiB
0 Stars 1 Watchers 0 Forks
Languages
C++ 93.1%
C 6.6%
CMake 0.3%