Skip to content

Commit

Permalink
fixup! [ext] Add modm:etl lbuild module
Browse files Browse the repository at this point in the history
  • Loading branch information
salkinium committed Aug 5, 2021
1 parent 9392427 commit 7e2cdec
Showing 1 changed file with 37 additions and 20 deletions.
57 changes: 37 additions & 20 deletions ext/etlcpp/etl.lb
Original file line number Diff line number Diff line change
Expand Up @@ -15,52 +15,68 @@ def init(module):
module.description = """
# Embedded Template Library (ETL)
### Motivation
C++ is a great language to use for embedded applications and templates are a
powerful aspect. The standard library can offer a great deal of well tested
functionality, but there are some parts of the standard library that do not fit
well with deterministic behaviour and limited resource requirements. These
limitations usually preclude the use of dynamically allocated memory and
containers with open ended sizes.
C++ is a great language to use for embedded applications and templates are a powerful aspect. The standard library can offer a great deal of well tested functionality, but there are some parts of the standard library that do not fit well with deterministic behaviour and limited resource requirements. These limitations usually preclude the use of dynamically allocated memory and containers with open ended sizes.
What is needed is a template library where the user can declare the size, or maximum size of any object upfront. Most embedded compilers do not currently support the standard beyond C++ 03, therefore excluding the programmer from using the enhanced features of the later library.
What is needed is a template library where the user can declare the size, or
maximum size of any object upfront. Most embedded compilers do not currently
support the standard beyond C++ 03, therefore excluding the programmer from
using the enhanced features of the later library.
This is what the ETL attempts to achieve.
### Summary
The ETL is not designed to completely replace the STL, but complement it.
Its design objective covers three areas.
The ETL is not designed to completely replace the STL, but complement it. Its
design objective covers three areas.
- Create a set of containers where the size or maximum size is determined at compile time. These containers are direct equivalents of those supplied in the STL.
- Be compatible with C++ 03 but implement as many of the C++ 11 additions as possible.
- Create a set of containers where the size or maximum size is determined at
compile time. These containers are direct equivalents of those supplied in the
STL.
- Be compatible with C++ 03 but implement as many of the C++ 11 additions as
possible.
- Add other useful components that are not present in the standard library.
The embedded template library has been designed for lower resource embedded applications.
It contains a set of containers, algorithms and utilities, some of which emulate parts of the STL.
There is no dynamic memory allocation. The library makes no use of the heap. All of the containers have a fixed capacity allowing all memory allocation to be determined at compile time.
The library is intended for any compiler that supports C++ 03.
The embedded template library has been designed for lower resource embedded
applications. It contains a set of containers, algorithms and utilities, some of
which emulate parts of the STL. There is no dynamic memory allocation. The
library makes no use of the heap. All of the containers have a fixed capacity
allowing all memory allocation to be determined at compile time. The library is
intended for any compiler that supports C++ 03.
### Main features
- Cross platform. This library is not specific to any processor type.
- No dynamic memory allocation
- No RTTI required
- Very little use of virtual functions. They are used only when they are absolutely necessary for the required functionality
- A set of fixed capacity containers. (array, bitset, deque, forward_list, list, queue, stack, vector, map, set, etc.)
- As the storage for all of the container types is allocated as a contiguous block, they are extremely cache friendly
- Very little use of virtual functions. They are used only when they are
absolutely necessary for the required functionality
- A set of fixed capacity containers. (array, bitset, deque, forward_list, list,
queue, stack, vector, map, set, etc.)
- As the storage for all of the container types is allocated as a contiguous
block, they are extremely cache friendly
- Templated compile time constants
- Templated design pattern base classes (Visitor, Observer)
- Reverse engineered C++ 0x11 features (type traits, algorithms, containers etc.)
- Reverse engineered C++ 0x11 features (type traits, algorithms, containers
etc.)
- Type-safe enumerations
- Type-safe typedefs
- 8, 16, 32 & 64 bit CRC calculations
- Checksums & hash functions
- Variants (a type that can store many types in a type-safe interface)
- Choice of asserts, exceptions, error handler or no checks on errors
- Unit tested (currently over 6480 tests), using VS2019, GCC 8.1.0, , GCC 9.3.0, Clang 9.0.0 & 10.0.0
- Unit tested (currently over 6480 tests), using VS2019, GCC 8.1.0, , GCC 9.3.0,
Clang 9.0.0 & 10.0.0
- Many utilities for template support.
- Easy to read and documented source.
See https://www.etlcpp.com for up-to-date information.
(from https://github.com/ETLCPP/etl#readme)
"""

def prepare(module, options):
Expand All @@ -69,4 +85,5 @@ def prepare(module, options):
def build(env):
env.collect(":build:path.include", "modm/ext/etl")
env.outbasepath = "modm/ext/etl"
env.copy("etl/include/etl/", dest="etl/")
env.copy("etl/include/etl/", dest="etl/",
ignore_files=env.ignore_paths("etl/include/etl/profiles/", "doxygen.h"))

0 comments on commit 7e2cdec

Please sign in to comment.