Skip to content

Commit

Permalink
Release v1.3.0 (#19)
Browse files Browse the repository at this point in the history
* documents/Containers.md: fix error in WithStorage example.

* README.md: added license badge, and re-worded License section.

* infra/util/Observer: Relax access to constructor.

* services/tracer/TracerAdapterPrintf: fix issue with va_args.

We were passing va_args by-value, creating a copy, not consuming the arguments but repeatedly printing the first argument instead.

* infra/util/ByteRange, infra/util/Function: Add printing support for gtest

* infra/util/BoundedString.hpp: fix merge mistake.

* infra/stream: Add CountingInputStream.

* infra/util/SharedPtr: Add default constructor for AccessBySharedPtr

* infra/syntax/JsonStreamParser: Handle destruction during ParseError and SemanticError callbacks

* services/network/Http: Change BodyAvailable reader parameter into a SharedPtr so that it can live longer

* services/network/HttpClientBasic: Refactor

* examples/https_client: Fix after refactoring of interface.

* infra/syntax: Fix bug in Asn1Formatter when adding UtcTime.

* Update CMakeCcolaUserManual to emphasize non-standard implementation of Ccola (#6)

* services/network: consolidate types used across Http classes.

* upgrade/boot_loader: Move MockDecryptor to test_doubles.

* infra/syntax/Asn1Formatter: fix UtcTime conversion.

* upgrade/boot_loader: Move MockDecryptor to test_doubles.

* services/network/HttpClientImpl: get StringOutputStream out of interface into implementation.

* OutputStream Width and negative numbers

* services/network/test/TestHttpClientBasic: Add test for stop behaviour

* Update infra/timer/StreamTime.cpp for format Width

* services/network/HttpClientBasic: Avoid Done() being called after Cancel()

* ccola/version.inc: Modify Version.h.in source location when we are building outside our own source-tree (e.g. including EmbeddedInfraLib in another project).

* services/network/HttpClientJson: base class to interact with REST api's exposing large payloads.

* services/network/HttpClientJson: make Cancel accessible from HttpClientJson.

* ccola/Version: generate version at build-time instead of at configure time to give accurate version information for all builds.

* services/util/ConfigurationStore: Add Configuration(U& member) to ConfigurationStoreAccess

* services/util/test_doubles: Add ConfigurationStoreMock

* services/network/HttpClientBasic: When an error is reported, timeout timer must be stopped and no other status may be reported

* services/network/ConnectionMbedTls: Introduce workaround for reusing sessions that have no session id (#9)

* ccola/platforms: Add platform-cyw43903_smalltls which builds mbedTLS with a smaller receive buffer

* services/network: Add TracingStatusHttpClientImpl and refactor HttpClientConnectorImpl

* services/network/HttpClientImpl: Add workaround for compilers that do not yet support make_index_sequence

* examples/https_client: Fix build after refactor of HttpClientConnectorImpl

* ccola/platforms: Add support for Nordic (#10)

* services/network/TracingHttpClientImpl: Undo accidental checkin

* infra/util/Function: Add WithExtraSize to ExecuteOnDestruction

* infra/syntax/JsonStreamingParser: Be robust against deletion of the parser when a callback function is invoked

* services/network/HttpClientImpl and HttpClientJson: Be robust against deletion of the client when a callback function is invoked

* infra/syntax/JsonStreamingParser: Be robust against deletion of the parser when a callback function is invoked

* external/googltest/.../gtest: Disable catching exceptions

* Templatize QueueForOneReaderOneIrqWriter for trivial types (#12)

* Convert QueueForOneReaderOneIrqWriter to template class

* Remove QueueForOneReaderOneIrqWriter.cpp from cmakelists as well

* QueueForOneReaderOneIrqWriterTest: Assert on trivial type

* QueueForOneReaderOneIrqWriter: Address review comments

* infra/stream/InputStream: Avoid infite loop

* infra/stream/ByteInputStream: Avoid extracting data overflow

* infra/util/test_helper: Add VariantPrintTo

* services/network/Address: Add MakeUdpSocket

* infra/stream: Add StdVectorInputStream

* services/network: Add DnsResolver

* Add programmer support for NRF52840 (#14)

* infra/stream/StringInputStream: Derive from StreamReaderWithRewinding instead of StreamReader

* services/network/Datagram: Change reader on DataReceived into StreamReaderWithRewinding

* external/googletest/googletest/src/gtest.cc: Print everything in red after a failed test

* external/googletest/googletest/src/gtest.cc: Improve colouring

* services/network/DnsResolver: Resolve CNames

* services/network/DnsResolver: Avoid a segmentation fault in GCC

* services/network/DnsResolver: Limit number of recursions

* services/network/test/TestDnsResolver: Refactor

* services/network/DnsResolver: Recurse over name servers

* infra/stream/IoOutputStream: Make output stream configurable

* services/network/HttpClientImpl: Don't include trailing newline in statusLine

* external/googletest/../gtest.cc: Enter debugger on a failed assert

* services/network/HttpClient: Add Put overload which gives StreamWriters to observers to write their own content

* services/network/DnsResolver: Refactor

* services/tracer/GlobalTracer: Don't include infra/stream/IoOutputStream for embedded targets

* infra/syntax/JsonFormatter: Add AddString which returns a stream

* services/network/ConnectionMbedTls: Fix for Available()

* services/network/TracingHttpClientImpl: Only trace requests, not forwarded SendStreamAvailable calls

* hal/synchronous_interfaces/SynchronousRandomDataGenerator: Add GenerateRandomData member function template

* infra/stream/InputStream: Add Extract() member function template to DataInputStream

* services/network/DnsResolver: Refactor

* infra/util/ProxyCreator: Add specialization to ProxyCreator which makes definitions based on CreatorBase easier

* infra/util/Optional: Add TransformOptional

* infra/util/infra.util.natvis: Add visualization for MemoryRange

* infra/util/Observer: NotifyObservers short-cut variant returns whether it was an early return

* services/network/DnsResolver: Refactor

* services/network/NameResolver: Add validUntil to NameLookupDone

* services/network/test_doubles: Add NameResolverMock

* services/network: Add NameResolverCache

* Story 4620: [ESP] 02 Port HAL: mbedTLS. Remove duplicates in external libraries. Include Alternate dependency for mbedTLS

* infra/util/ProxyCreator: Change signature to use function-style declaration

* services/network/HttpClientBasic: Add Connect(BoundedString) member function

* services/util/ConfigurationStore: Add WithReadOnlyDefaultAndBlobs to FactoryDefaultConfigurationStore

* services/network: Add Network

* services/util/ConfigurationStore: Add Access member function to create ConfigurationAccess objects

* services/util/ConfigurationStore: Add copy conversion constructor to ConfigurationStoreAccess

* lwip/lwip_cpp/ConnectionLwIp: Don't send data when the connection is aborted

* services/network/CertificatesMbedTls: Convert assert into really_assert

* ccola/util.inc: silence CMake warning.

* lwip/lwip_cpp/DatagramLwIp: Fix Empty() and ContiguousRange()

* services/network/HttpServer: When a response does not fit in one network buffer, split it into multiple parts

* lwip/lwip_cpp/ConnectionLwIp: Fix bug on resetting errf when control is nullptr

* services/network/test_doubles/ConnectionLoopBack: Fix StreamWriterLoopBack::Available()

* lwip/lwip_cpp: Fixes for ESP32

* protobuf/protoc_echo_plugin/ProtoCEchoPlugin: Generate messages with references to storage

* services/util/FlashSpi: Configurable timer ID

* services/network/HttpServer: Remove the need for creation contexts by using ProxyCreator

* infra/stream: Add StdVectorOutputStream

* infra/stream/LimitedInputStream: Add LimitedStreamReaderWithRewinding

* infra/util/SharedPtr: Add AccessedBySharedPtrWithExtraSize

* services/util/FlashSpi: Convert timerId into a uint32_t

* Clean up CMakeLists

* [elf-support] adding Elf support to the pack builder

* [upgrade/pack_builder] Make targetname size restriction explicit and check (#13)

* [upgrade/pack_builder] Make targetname size restriction explicit and check

* Standardize exceptions in UpgradePackBuilder to use what() method

* Fix returning reference to storage with block scope

* Formatter (#11)

* Stream formatter

* refactored Formatter

* Format with ErrorPolicy

* ErrorPolicy on wrong type for integer

* InputStream Scanner

* Removed scanner files, will be moved to separate branch

* lwip/lwip_cpp/ConnectionLwIp: Undo making ResetOwnership asynchronous

* services/network: Add SingleConnectionListener

* infra/util/test_helper: Add MemoryRangeMatcher

* services/network/test/TestHttpServer: Apply changed NewConnection interface

* services/util: Add Stoppable

* infra/util/Tokenizer: Fix for Size() on string that only contains separators

* services/network/SingleConnectionListener: Inherit from Stoppable

* services/network/HttpServer: Remove HttpServerConnectionObserverFactory and SingleConnectionHttpServer

* infra/util/infra.util.natvis: Add support for PolymorphicVariant

* services/network: Add HttpPageWebSocket

* services/network/test_doubles/ConnectionMock: Add ConnectionObserverFullMock

* infra/stream/ByteInputStream: Add ResetRange

* services/network/WebSocket: Construct with Stream instead of a StreamReader

* services/network/test_doubles/ConnectionStub: Execute DataReceived without scheduling

* services/network/HttpClientImpl: Fix searching for crlf

* hal/interfaces/test_doubles/FlashMock: Add more contract checking

* infra/util: Extract IntegerSequenc from services/network/HttpClientImpl and use it in Function

* services/network/WiFiNetwork: Add onDone to StartAccessPoint

* infra/util/test_helper: Add ProxyCreatorMock

* infra/syntax/test_doubles: Add JsonStringMatcher

* services/util/test_doubles: Add StoppableMock

* infra/syntax/test_doubles/JsonStringMatcher: Add constructor overload

* services/network/HttpClientJson: Add constructor overload with timeout

* services/network: Add TracingConnectionFactoryWithNameResolver

* Add SychronousSpiMasterWithSynchronousChipSelect

* infra/util: Add PostAssign

* Add stateless flash stub

* Add mbedtls_minimal for esp bootloader support

* Revert "Add stateless flash stub"

This reverts commit 2581d03.

* services/network/HttpClient: Add Post with large bodies

* [esp_bootloader] crypto.mbed_tls_minimal component dependency for upgrade.bootloader

* infra/stream/ByteOutputStream and StringOutputStream: Add Reset() and Reset(new storage)

* infra/stream/SavedMarkerStream: Add Commit and Undo

* services/tracer: Add TracingOutputStream and use it in services/network/TracingHttpClientImpl

* infra/util/MemoryRange: Add Convert

* Adaptations for ESP32 printf behavior

* infra/syntax/JsonFormatter: Use the provided stream's error policy

* [esp_boatloader] added onInitialized funtion

* Feature/multi platform host build (#16)

* Consolidate hal/bsd and hal/windows into hal/generic based on stl implementations.

* Big-three support; initial version of Linux host compilation.

* CMakeLists.txt: force C++11 compilation flags to be added by default.

* .travis.yml: First step towards multi-platform build matrix.

* Make protobuf compile and generate for non-Windows hosts.

* Correct CMake syntax error.

elif -> elseif.

* ccola/platforms/platform-Darwin.inc: suppress ranlib and ar warnings when *.a files have no symbols.

* infra/util/test/TestAllocatorHeap.cpp: fix warning emitted from -Wnew-returns-null.

warning: 'operator new' should not return a null pointer unless it is declared 'throw()' or 'noexcept'

* infra/util/test/TestAutoResetFunction.cpp: fix unknown conversion from int to std::tuple<int>.

* infra/util/IntrusiveList: Relax access to destructor. Fixes GCC compilation issue.

* infra/util/IntrusiveSet: fix argument-dependent lookup issue while compiling with GCC.

* infra/util/IntrusiveList: align friend declaration with other intrusive classes.

* infra/stream/OutputStream: include int and unsigned int overloads for GCC compilers <= 4.9.x.

* infra/syntax/test/TestJsonFormatter: force r-value reference in automatic type deduction.

* hal/generic/CMakeLists.txt: convert tabs to spaces

* ccola/platforms/platform-esp32: remove obsolete define

* infra/util/test_helper/BoundedStringMatcher.hpp: add explicit overloads for testing::Matcher for BoundedString<char> and BoundedString<const char>

* infra/syntax/test/TestAsn1Formatter: fix warning in interaction with googletest

* infra/stream/OutputStream: disable int and unsigned int stream operator overloads for clang compiler.

* infra/util/Intrusive*: fully qualify friend classes otherwise clang can't find them

* infra/util/IntrusivePriorityQueue.hpp: remove non-existing friend.

* infra/util/IntrusivePriorityQueue.hpp: coding standard

* infra/[syntax|util]: resolve compiler warnings

* hal/interfaces/FileSystem: implement feature detection to find correct <filesystem> header and namespace.

* hal/interfaces/CMakeLists: include FileSystem on all x86 systems.

* external/googletest/gmock_pack: write platform detection in a different way

* upgrade/pack_builder: remove dependency on Windows by using hal/generic implementation of random data generator.

* ccola/packs/cpp/components/component_executable: When linking on Linux let the compiler make multiple passes to determine correct link dependencies.

* services/network/SntpClient: fix initialization of non-const reference.

* upgrade/pack_builder/BuildUpgradePack: Fix std::tolower usage in std::transform see: https://en.cppreference.com/w/cpp/string/byte/tolower

* upgrade/pack_builder: Replace calls to std::exception(const char*) with calls to std::runtime_error(const char*), the former is a MSVC extension.

* upgrade/security_key_generator: Replace calls to std::exception(const char*) with calls to std::runtime_error(const char*), the former is a MSVC extension.

* services/util/test/TestConfigurationStore: fix compilation under GCC.

* CMakeLists.txt: Request a CXX14 compiler since we use CXX14 features (e.g. std::make_unique)

* upgrade/pack_builder/UpgradePackInputFactory: replace std::find by std::any_of

* hal/interfaces: On Linux include stdc++fs library for std::filesystem support

* hal/generic: Link against pthread on Linux

* external/protobuf-3.3.0: Fix compilation under Linux.

* external/crypto/mbedtls-2.13.0/.../config: Enable self-tests when doing any host build, not just for MSVC

* external/protoc-3.3.0/bin/protoc: make protoc executable

* protobuf/protoc_echo_plugin/Main: guard Windows only _CrtDbgBreak() call.

* protobuf/protoc_echo_plugin/CppFormatter: give static integrals defined in header storage

* protobuf/protoc_echo_plugin_*/Main: guard Windows only _CrtDbgBreak() call.

* ccola/packs/cpp/components/component_dynamic_library: Consolidate library locations for Windows and Linux, do not add export library as dependency on non-Windows targets.

* .travis-ci.yml: Disable linux and osx build for intermediary drop to develop.

* upgrade/pack_builder/Input.hpp: Fix build warning.

* infra/stream/Formatter.hpp: correct some formatting (pun intended).

* ccola/platforms/platform-esp32.inc: Restore required define ESP_PLATFORM.

* ccola/platforms/platform-esp32.inc: Restore required define ESP_PLATFORM.

* infra/stream/OutputStream: include int and unsigned int overloads for all GNUC versions.

* infra/stream/OutputStream: only _exclude_ int and unsigned int overloads by preprocessor checks.

* infra/event/ClaimableResource: Make Claimer moveable

* services/network/Connection: Add ConnectionWithHostname and use it in ConnectionMbedTls

* services/network/TracingConnectionMbedTls: Remove superfluous line endings from mbedTLS trace messages

* examples/sntp_client: Add SNTP client example.

* examples: some refactoring to http_server and https_client examples.

* services/network/SntpClient: minor refactoring.

* services/network_win/ConnectionWin: removed empty newline.

* protobuf/echo_console/Main: remove unnecessary Windows includes and use std::string for configuration file storage.

* upgrade/security_key_generator: Build on all x86 platforms.

* services/network: Add ExclusiveConnection

* infra/event/ClaimableResource: Add ClaimsPending()

* services/network/ExclusiveConnection: When a third connection is pending, immediately request a second connection to close after it is constructed

* hal/interfaces/AnalogToDigitalPin: Increase ADC results to int32_t

* protobuf/protoc_echo_plugin: Support enums

* [esp_bootloader] Makes it possible to build the debug configuration.

* protobuf/protoc_echo_plugin_test: Fix microtest for enum support

* hal/interfaces/test_doubles/ResetMock: Fix signature of ResetModule

* [WiFiNetwork] Use enum for wifi secuirty modes

* Revert "[WiFiNetwork] Use enum for wifi secuirty modes"

This reverts commit edccc4c.

* Revert "Revert "[WiFiNetwork] Use enum for wifi secuirty modes""

This reverts commit d7a3d59.

* Story 13992: services/util/Terminal: Use Tracer to write data to console

* ccola/toolchain-gcc-arm-system_workbench: Corrected path to nm tool; it's not rm.

* [Story 14002]: services/network/ConnectionSerial: Add callback when initialization completes. + Added windows implementation of ConnectionSerial

* [Story 14002]: services/network/ConnectionSerial: Remove erroneous call to onConnected

* lwip/lwip_cpp: Remove Esp32 workarounds

* ccola: Remove libraries for ESP32

* ccola: Use target_include_directories instead of include_directories

* ccola: Disable .lst generation because it can take up more than 10 minutes

* services/network/ConnectionSerial: Reorder constructor initialization to match header declaration order

* [FlashQuadSpiCypressFll] Add ReadUniqueId command

* [UpdateEspIdf] include timeouts header

* infra/syntax/JsonFormatter: add overload that adds a int64_t from a JsonString tag.

* infra/util/test_helper/ProxyCreatorMock: Add CreatorMock specialization for 4 arguments

* infra/stream/BoundedDequeInputStream: Add Processed()

* infra/stream/LimitedInputStream: Add ResetLength and WithInput

* services/network: Add WebSocketServerConnectionObserver

* services/network/HttpClientBasic: make sure Close is called only once on multiple calls to ContentError.

* Move UartWindows from hal/generic to hal/windows and fix threading issue.

* hal/windows/UartWindows: several fixes related to threading/time-out behavior.

- Made running flag atomic.
- Set time-out according to "remarks" on https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-commtimeouts.
- Introduced condition variable to wait until a dataReceived callback function is set.

* services/util/Terminal: Use AddFromInterrupt overload for ByteRange.

* services/network/SerialServer: implementation of a serial to tcp bridge.

* services/network/SerialServer: eliminated the need for local send (serial -> tcp) buffer.

* services/network/SerialServer: implemented test and prevented overflow of send buffer.

* infra/util/BoundedString.hpp: Add helper for std::string conversion

* infra/stream/Formatter: refactored Formatter for const classes (#17)

* infra/event/QueueForOneReaderOneIrqWriter: Refactor

* infra/stream/LimitedOutputStream: Add WithOutput

* infra/stream: Add BoundedVectorOutputStream

* services/network/ConnectionMbedTls: On CloseAndDestroy, empty buffers before forwarding close request

* services/network/HttpServer: Increase initial idle time to 10 seconds

* examples: Remove usage of GlobalTracer in examples.

Using the GlobalTracer is not a recommended practice.

* services/network/TracingHttpClientImpl.hpp: Remove non-existent friend.

* infra/event/EventDispatcher.hpp: Fix compile error

* infra/stream/LimitedOutputStream: Implement Save/Restore/Overwrite

* infra/util/Endian: Add <To/From><Little/Big>Endian

* infra/util/SharedOptional: Add MakePtr

* services/network/HttpClientImpl: Remove WithMaxHeaderSize and refactor naming in services/network

* services/network: Add WebSocketClientConnectionObserver

* infra/util/test_helper/MockHelpers: Remove infra::Lambda

* examples/https_client/MainWin.cpp: fix build after interface change.

* services/network/ConnectionMbedTls: Remove workaround, reset clientSession cache when connecting to a new IP address

* services/network/HttpClientImpl: Fix reset order

* services/network/NameResolverCache: Add minimum ttl

* Feature/multi platform host build (#18)

* Revert ".travis-ci.yml: Disable linux and osx build for intermediary drop to develop."

This reverts commit 90121c3.

* infra/stream/OutputStream: fix include guards for int and unsigned int stream overloads once again.

* .travis.yml: Bump XCode version and add GCC 4.9 to Linux builds.

* infra/stream/test/TestFormatter: fix GCC builds.

* infra/stream/OutputStream: fix include guards for int and unsigned int stream overloads once again.

* services/util/test/TestConfigurationStore: fix for GCC 5 compilation.

* services/network_bsd/NameLookupBsd: comply to NameResolver interface.

* upgrade/pack_builder/SparseVector: solve error: looser throw specifier for ‘virtual const char* application::OverwriteException::what() const’

* infra/stream/OutputStream: fix typo in patchlevel check.

* .travis.yml: Use more generic command across builds to run tests.

* infra/timer/Timer.hpp: std::put_time not available in GCC <= 4.9.

* infra/stream/OutputStream: fix include guards for int and unsigned int stream overloads once again, once again.

* .travis.yml: Explicitly select build time when building and testing.

* .travis.yml: Force MacOSX deployment target to 10.15 to support std::filesystem.

* infra/stream/OutputStream: fix include guards for int and unsigned int stream overloads once again, once again.

* infra/timer/Timer: fix time conversion with strftime.

* .travis.yml: Get more info on failing tests.

* .travis.yml: Removed unsupported GCC 4.9 configuration and updated README.md in the process.

* hal/interfaces/FileSystem: Add another workaround for OSX compilation.

* .travis.yml: Don't try to run coverage after tests.

* .travis.yml: Colorize GTest output for easier diagnosis of failed tests.

* services/network/HttpClientImpl: call correct stream overload for platforms where std::size_t is defined as unsigned long.

* infra/util/test/TestStaticStorage: fix size calculation for x64 platforms.

* infra/util/test/TestStaticStorage: enable disabled test.

* upgrade/pack_builder/Input: fix missing include and made std::string return value a const&.

* upgrade/pack_builder/SparseVector: fix accidental equality compare to assignment.

* external/protobuf: Get protobuf compiling under clang.

* examples/serial_net/CmakeLists.txt: only generate for Windows.

* infra/syntax/ProtoParser: try to fix tests under GCC by not streaming to a temporary.

* infra/syntax/ProtoParser: revert 'fix' as it did not fix anything.

* infra/syntax/ProtoParser: try to fix tests under GCC by taking ownership of the data.

* upgrade/pack_builder/test: minor refactoring.

* Fix very noisy lwip warning regarding re-definition of BYTE_ORDER.

* services/network/test/TestWebSocketClientConnectionObserver.cpp: fix build error on GCC.

* services/network/HttpClientImpl.cpp: minor refactoring.

* upgrade/pack/ImageSignerRsa: fix setting RSA context for both x86 and x86_64 by using mbedtls_rsa_import_raw i.s.o. directly filling struct members.

* upgrade/pack_builder/test/TestUpgradePackBuilder.cpp: Prevent double-free. infra::Optional is not exception safe.

* upgrade/pack_builder/test/TestImageSignerRsa.cpp: Extend test.

* .travis.yml: Disable OSX build since it still has some issues.

* CHANGELOG.md: retroactively updated CHANGELOG.

* Prepare for release.
  • Loading branch information
rjaegers authored Oct 3, 2019
1 parent bc334f6 commit a6773e6
Show file tree
Hide file tree
Showing 390 changed files with 14,283 additions and 3,041 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lwip/* linguist-vendored
external/* linguist-vendored
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
language: cpp

env:
global:
- BUILD_TYPE=Debug
- GTEST_COLOR=1

matrix:
include:
- os: windows

- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-5
env:
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"

# - os: osx
# osx_image: xcode11
# env:
# - MACOSX_DEPLOYMENT_TARGET=10.15

before_install:
- eval "${MATRIX_EVAL}"

script:
- cmake -E make_directory Build
- cd Build
- cmake .. -DCCOLA_DIR=ccola -DCCOLA_INSTALL_DIR=Install -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
- cmake --build . --config ${BUILD_TYPE}
- ctest -C ${BUILD_TYPE} -T Test --output-on-failure
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,35 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)

## [Unreleased]

## [1.3.0]

### Changed

- hal/interfaces/AnalogToDigitalPin; increased ADC results to int32_t

### Fixed

- services/network/ConnectionMbedTls; On CloseAndDestroy, empty buffers before forwarding close request
- services/util/Terminal; fixed crash by using services::Tracer to write data to the console, synchronously

### Added

- .travis-ci.yml; Travis-CI build pipeline
- .gitattributes; Ignore external vendor packages in language analysis on GitHub
- https_client example
- services::HttpClientJson; base class to easily interact with REST services exposing large payloads. Uses infra::JsonStreamingObjectParser
- services/network/ExclusiveConnection; only allow one active connection at a time
- protobuf/protoc_echo_plugin: Support enums
- hal::UartWindows; hal::SerialCommunication implementation for Windows serial port
- services::SerialServer; TCP/IP <--> UART bridge, see [serial_net](examples/serial_net) example
- services::WebSocketClientConnectionObserver; WebSocket client support
- services::WebSocketServerConnectionObserver; WebSocket server support
- Support for Linux host builds with GCC

## [1.2.0]

- Initial open source version of EmbeddedInfraLib

[Unreleased]: https://github.com/philips-software/embeddedinfralib/compare/v1.2.0...HEAD
[Unreleased]: https://github.com/philips-software/embeddedinfralib/compare/v1.3.0...HEAD
[1.3.0]: https://github.com/philips-software/embeddedinfralib/compare/v1.2.0...v1.3.0
[1.2.0]: https://github.com/philips-software/embeddedinfralib/releases/tag/v1.2.0
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 3.6.2)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED true)

if(NOT CCOLA_DIR)
set(CCOLA_DIR "${CMAKE_SOURCE_DIR}/ccola")
endif()
Expand All @@ -10,9 +13,9 @@ endif()

include("${CCOLA_DIR}/ccola.inc")

ccola_project(emil VERSION 1.2.0)
ccola_project(emil VERSION 1.3.0)

ccola_generate_version_header()
ccola_add_version_header()

ccola_subdirectories(
external/googletest
Expand Down
30 changes: 13 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
# EmbeddedInfraLib (EmIL)

[![Build Status](https://travis-ci.com/philips-software/embeddedinfralib.svg?branch=develop)](https://travis-ci.com/philips-software/embeddedinfralib) [![License: MIT](https://img.shields.io/badge/License-MIT-brightgreen.svg)](https://opensource.org/licenses/MIT)

**Description**: EmbeddedInfraLib is a set of C++ libraries and headers that provide heap-less, STL like, infrastructure for embedded software development.

## Dependencies

EmIL requires:
- A recent c++ compiler that supports C++11 at minimum.
- A recent c++ compiler that supports C++14 at minimum (most notable it should support std::filesystem).
- CMake 3.6 or higher.

EmIL is know to build under the following configurations:
- Windows from Visual Studio 2015 onwards.
- Linux from GCC 5.3 onwards.
- OSX from XCode 11 and target platform 10.15 onwards.

## How to build the software

EmIL can be built by-itself, for example to execute the included micro-tests, or it can be built as part of a larger project. This paragraph describes how to build EmIL by-itself.
Expand All @@ -16,22 +23,15 @@ EmIL can be built by-itself, for example to execute the included micro-tests, or
cmake -E make_directory Build
cd Build
cmake .. -DCCOLA_DIR=ccola -DCCOLA_INSTALL_DIR=Install
cd ..
cmake --build Build
cmake --build .
```

## How to test the software

After EmIL has been built. The included automated tests can be run with one the following commands, depending on the generator used.
After EmIL has been built. The included automated tests can be run with CTest like so:

When generating for Visual Studio:
```
cmake --build Build --target RUN_TESTS
```

When generating for Ninja:
```
cmake --build Build --target test
ctest -D Experimental -C Debug
```

## Code examples
Expand All @@ -43,19 +43,15 @@ Code examples can be found under the [examples](examples) folder.
Documentation is available under the [documents](documents) folder.

* [CMakeCcolaUserManual](documents/CMakeCcolaUserManual.docx) describes the CMake Component Layer (Ccola) from a user perspective.
* [Coding Standard C++ Embedded Projects](documents/Coding%20Standard%20C++%20Embedded%20Projects.docx) describes to coding standards adhered to for this project.
* [Coding Standard C++ Embedded Projects](documents/Coding%20Standard%20C++%20Embedded%20Projects.docx) describes the coding standards adhered to for this project.
* [Containers](documents/Containers.md) describes the basic heap-less containers provided by EmIL.
* [Echo (Embedded CHOmmunication)](documents/Echo.md) describes the RPC (Remote Procedure Call) framework built on top of Google Protobuf.
* [MemoryRange](documents/MemoryRange.md) describes the basic building block for most of EmIL's heap-less memory management.

## Known issues

At the moment only Windows is supported as the host platform.

## Contributing

Please refer to our [Contributing](CONTRIBUTING.md) guide when you want to contribute to this project.

## License

License is MIT. See [LICENSE file](LICENSE.md).
EmbeddedInfraLib is licenced under the [MIT](https://opensource.org/licenses/MIT) license. See [LICENSE file](LICENSE.md).
19 changes: 8 additions & 11 deletions ccola/Version.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,10 @@
// This file is automatically generated by CMake.
// Your modifications to this file will be lost!
// Please edit version information in your top-level
// CMakeLists.txt using the project() macro.
// CMakeLists.txt using the ccola_project() macro.
//
// Refer to https://semver.org/spec/v2.0.0.html for
// semantics on version numbers.
//
// This file was generated at ${GENERATOR_TIMESTAMP}

#include <cstdint>

Expand All @@ -18,16 +16,15 @@
#define VARIABLE_MIGHT_BE_UNUSED
#endif

namespace ${PROJECT_NAME}
namespace ${CMAKE_PROJECT_NAME}
{
namespace generated
{
static const char* VERSION VARIABLE_MIGHT_BE_UNUSED = "${${PROJECT_NAME}_VERSION_STRING}";
static const char* VERSION_FULL VARIABLE_MIGHT_BE_UNUSED = "${${PROJECT_NAME}_VERSION_STRING_FULL}";
static const char* GENERATION_DATE VARIABLE_MIGHT_BE_UNUSED = "${GENERATOR_TIMESTAMP}";
static const char* VERSION VARIABLE_MIGHT_BE_UNUSED = "${${CMAKE_PROJECT_NAME}_VERSION_STRING}";
static const char* VERSION_FULL VARIABLE_MIGHT_BE_UNUSED = "${${CMAKE_PROJECT_NAME}_VERSION_STRING_FULL}";

static const uint16_t VERSION_MAJOR = ${${PROJECT_NAME}_VERSION_MAJOR};
static const uint16_t VERSION_MINOR = ${${PROJECT_NAME}_VERSION_MINOR};
static const uint16_t VERSION_PATCH = ${${PROJECT_NAME}_VERSION_PATCH};
static const uint16_t VERSION_MAJOR = ${VERSION_MAJOR};
static const uint16_t VERSION_MINOR = ${VERSION_MINOR};
static const uint16_t VERSION_PATCH = ${VERSION_PATCH};
} //! namespace generated
} //! namespace ${CCOLA_PROJECT_NAME}
} //! namespace ${CMAKE_PROJECT_NAME}
8 changes: 6 additions & 2 deletions ccola/ccola.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ if(NOT CMAKE_CONFIGURATION_TYPES)
endif()
endif()

if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" OR
"${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" OR
"${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
enable_testing()
endif()

Expand All @@ -24,7 +26,9 @@ ccola_register_file_parameter(CCOLA_INSTALL_DIR)
set(CCOLA_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(CCOLA_TOP_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" OR "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows" OR
"${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" OR
"${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
set(CCOLA_SYSTEM_CONFIGURATION ${CMAKE_SYSTEM_NAME})
add_definitions(-DCCOLA_HOST_BUILD)
else()
Expand Down
16 changes: 11 additions & 5 deletions ccola/packs/cpp/components/component_dynamic_library/end.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@ include("${CCOLA_PACK_DIR_cpp}/components/generic_cpp/end_before.inc")
add_library(${CCOLA_COMPONENT_NAME} SHARED ${CCOLA_COMPONENT_SOURCEFILES} ${CCOLA_COMPONENT_SOURCE_DEPENDENCIES})
ccola_set_component_properties_for_all_configurations(${CCOLA_COMPONENT_NAME} RUNTIME_OUTPUT_DIRECTORY ${CCOLA_DLL_INSTALL_DIR})
ccola_set_component_properties_for_all_configurations(${CCOLA_COMPONENT_NAME} ARCHIVE_OUTPUT_DIRECTORY ${CCOLA_IMPORT_LIBRARY_INSTALL_DIR})
ccola_set_component_properties_for_all_configurations(${CCOLA_COMPONENT_NAME} LIBRARY_OUTPUT_DIRECTORY ${CCOLA_IMPORT_LIBRARY_INSTALL_DIR})
ccola_set_component_properties_for_all_configurations(${CCOLA_COMPONENT_NAME} LIBRARY_OUTPUT_DIRECTORY ${CCOLA_DLL_INSTALL_DIR})
ccola_set_component_properties_for_all_configurations(${CCOLA_COMPONENT_NAME} PDB_OUTPUT_DIRECTORY ${CCOLA_PDB_INSTALL_DIR})
ccola_set_component_properties_with_generator_expression(${CCOLA_COMPONENT_NAME} LINK_LIBRARIES ${CCOLA_COMPONENT_LINK_LIBRARIES})

if(${CCOLA_ARCH} STREQUAL "win")
set_target_properties(${CCOLA_COMPONENT_NAME} PROPERTIES ccola_location "${CCOLA_EXE_INSTALL_DIR}/${CCOLA_COMPONENT_NAME}.dll")
if(${CCOLA_PROCESSOR_FAMILY} STREQUAL "x86")
set_target_properties(${CCOLA_COMPONENT_NAME} PROPERTIES ccola_location "${CCOLA_EXE_INSTALL_DIR}/${CCOLA_COMPONENT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}")

if(CMAKE_CONFIGURATION_TYPES)
get_target_property(executable_path ${CCOLA_COMPONENT_NAME} RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO)
else()
get_target_property(executable_path ${CCOLA_COMPONENT_NAME} RUNTIME_OUTPUT_DIRECTORY)
endif()

set(executable_path ${executable_path}/${CCOLA_COMPONENT_NAME}.dll)
set(executable_path ${executable_path}/${CCOLA_COMPONENT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})

ccola_translate_generator_expression(destination_dir "${CCOLA_COMPONENT_INSTALL_DIR}")
set(destination "${destination_dir}/${CCOLA_COMPONENT_NAME}.depend")
set(dependencies)
Expand All @@ -28,6 +29,11 @@ if(${CCOLA_ARCH} STREQUAL "win")
endif()

ccola_runtime_directories(${CCOLA_DLL_INSTALL_DIR})
ccola_inheritable_link_libraries(${CCOLA_IMPORT_LIBRARY_INSTALL_DIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}${CCOLA_COMPONENT_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX})

if(${CCOLA_ARCH} STREQUAL "win")
ccola_inheritable_link_libraries(${CCOLA_IMPORT_LIBRARY_INSTALL_DIR}/${CMAKE_IMPORT_LIBRARY_PREFIX}${CCOLA_COMPONENT_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX})
else()
ccola_inheritable_link_libraries(${CCOLA_DLL_INSTALL_DIR}/${CMAKE_SHARED_LIBRARY_PREFIX}${CCOLA_COMPONENT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
endif()

include("${CCOLA_PACK_DIR_cpp}/components/generic_cpp/end_after.inc")
6 changes: 4 additions & 2 deletions ccola/packs/cpp/components/component_executable/end.inc
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ if(${CCOLA_PROCESSOR_FAMILY} STREQUAL "x86")
endif()
endif()

if(${CCOLA_ARCH_FAMILY} STREQUAL cortex OR ${CCOLA_ARCH_FAMILY} STREQUAL xtensa)
if(${CCOLA_ARCH_FAMILY} STREQUAL cortex OR ${CCOLA_ARCH} STREQUAL linux)
ccola_set_component_properties_with_generator_expression(${CCOLA_COMPONENT_NAME} LINK_LIBRARIES "-Wl,-(" ${CCOLA_COMPONENT_LINK_LIBRARIES} ${CCOLA_COMPONENT_EXTERNAL_LIBRARIES} -lgcc -lc -lg -lsupc++ "-Wl,-)" )
elseif(${CCOLA_ARCH_FAMILY} STREQUAL xtensa)
ccola_set_component_properties_with_generator_expression(${CCOLA_COMPONENT_NAME} LINK_LIBRARIES "-Wl,-(" ${CCOLA_COMPONENT_LINK_LIBRARIES} ${CCOLA_COMPONENT_EXTERNAL_LIBRARIES} -lgcc -lc -lsupc++ "-Wl,-)" )
else()
ccola_set_component_properties_with_generator_expression(${CCOLA_COMPONENT_NAME} LINK_LIBRARIES ${CCOLA_COMPONENT_LINK_LIBRARIES})
endif()
Expand Down Expand Up @@ -88,7 +90,7 @@ if(${CCOLA_ARCH_FAMILY} STREQUAL cortex OR ${CCOLA_ARCH_FAMILY} STREQUAL xtensa)
add_custom_command(
TARGET ${CCOLA_COMPONENT_NAME}
POST_BUILD
COMMAND ${CCOLA_OBJ_DUMP_TOOL} --source --all-headers --demangle --line-numbers --wide "${exe_path}" > "${list_path}"
# COMMAND ${CCOLA_OBJ_DUMP_TOOL} --source --all-headers --demangle --line-numbers --wide "${exe_path}" > "${list_path}"
COMMAND ${CCOLA_APP_SIZE_TOOL} "${exe_path}"
COMMAND ${CCOLA_OBJ_COPY_TOOL} -O binary "${exe_path}" "${bin_path}"
COMMAND ${CCOLA_OBJ_COPY_TOOL} -O ihex "${exe_path}" "${hex_path}"
Expand Down
32 changes: 18 additions & 14 deletions ccola/packs/cpp/components/generic_cpp/end_after.inc
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
set_target_properties(${CCOLA_COMPONENT_NAME} PROPERTIES OUTPUT_NAME ${CCOLA_COMPONENT_BINARY_NAME})
set_target_properties(${CCOLA_COMPONENT_NAME} PROPERTIES FOLDER ${CCOLA_PACKAGE_NAME})

if(DEFINED CCOLA_COMPONENT_INCLUDE_DIRECTORIES)
target_include_directories(${CCOLA_COMPONENT_NAME} PRIVATE ${CCOLA_COMPONENT_INCLUDE_DIRECTORIES})
endif()

if(DEFINED CCOLA_COMPONENT_DEFINITIONS)
set_target_properties(${CCOLA_COMPONENT_NAME} PROPERTIES COMPILE_DEFINITIONS "${CCOLA_COMPONENT_DEFINITIONS}")
set_target_properties(${CCOLA_COMPONENT_NAME} PROPERTIES COMPILE_DEFINITIONS "${CCOLA_COMPONENT_DEFINITIONS}")
endif()

if(DEFINED CCOLA_COMPONENT_COMPILE_OPTIONS)
string(REPLACE ";" " " CCOLA_COMPONENT_COMPILE_OPTIONS "${CCOLA_COMPONENT_COMPILE_OPTIONS}")
set_target_properties(${CCOLA_COMPONENT_NAME} PROPERTIES COMPILE_FLAGS "${CCOLA_COMPONENT_COMPILE_OPTIONS}")
string(REPLACE " " ";" CCOLA_COMPONENT_COMPILE_OPTIONS "${CCOLA_COMPONENT_COMPILE_OPTIONS}")
target_compile_options(${CCOLA_COMPONENT_NAME} PRIVATE ${CCOLA_COMPONENT_COMPILE_OPTIONS})
endif()

if(DEFINED CCOLA_COMPONENT_LINK_OPTIONS)
set_target_properties(${CCOLA_COMPONENT_NAME} PROPERTIES LINK_FLAGS "${CCOLA_COMPONENT_LINK_OPTIONS}")
set_target_properties(${CCOLA_COMPONENT_NAME} PROPERTIES LINK_FLAGS "${CCOLA_COMPONENT_LINK_OPTIONS}")
endif()

foreach(item ${CCOLA_COMPONENT_SOURCE_GROUP})
Expand All @@ -25,27 +29,27 @@ foreach(item ${CCOLA_COMPONENT_DEPENDENCIES})
endforeach()
foreach(item ${CCOLA_COMPONENT_INHERITABLE_DEPENDENCIES})
add_dependencies(${CCOLA_COMPONENT_NAME} ${item})
add_dependencies(${CCOLA_COMPONENT_NAME} ${item})
endforeach()
if(DEFINED CCOLA_COMPONENT_EXTERNAL_LIBRARIES)
target_link_libraries(${CCOLA_COMPONENT_NAME} ${CCOLA_COMPONENT_EXTERNAL_LIBRARIES})
endif()
if(DEFINED CCOLA_COMPONENT_TEST)
add_test(
NAME ${CCOLA_COMPONENT_NAME}
COMMAND ${CCOLA_COMPONENT_NAME} ${CCOLA_COMPONENT_TEST_PARAMS}
WORKING_DIRECTORY ${CCOLA_COMPONENT_TEST_WORKING_DIR}
)
add_test(
NAME ${CCOLA_COMPONENT_NAME}
COMMAND ${CCOLA_COMPONENT_NAME} ${CCOLA_COMPONENT_TEST_PARAMS}
WORKING_DIRECTORY ${CCOLA_COMPONENT_TEST_WORKING_DIR}
)
endif()
configure_file(
${CCOLA_COMPONENT_GENERIC_CPP_INFO}
${CCOLA_COMPONENT_INFO_INSTALL_DIR}/${CCOLA_COMPONENT_NAME}.generic_cpp.inc ESCAPE_QUOTES @ONLY)
${CCOLA_COMPONENT_GENERIC_CPP_INFO}
${CCOLA_COMPONENT_INFO_INSTALL_DIR}/${CCOLA_COMPONENT_NAME}.generic_cpp.inc ESCAPE_QUOTES @ONLY)
configure_file(
${CCOLA_COMPONENT_GENERIC_CPP_PUBLIC_INFO}
${CCOLA_PUBLIC_COMPONENT_INFO_INSTALL_DIR}/${CCOLA_COMPONENT_NAME}.generic_cpp.inc ESCAPE_QUOTES @ONLY)
${CCOLA_COMPONENT_GENERIC_CPP_PUBLIC_INFO}
${CCOLA_PUBLIC_COMPONENT_INFO_INSTALL_DIR}/${CCOLA_COMPONENT_NAME}.generic_cpp.inc ESCAPE_QUOTES @ONLY)
unset(CCOLA_COMPONENT_SOURCEFILES)
unset(CCOLA_COMPONENT_SOURCE_DEPENDENCIES)
Expand Down
3 changes: 0 additions & 3 deletions ccola/packs/cpp/components/generic_cpp/end_before.inc
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES)
if(DEFINED CCOLA_COMPONENT_INCLUDE_DIRECTORIES)
include_directories(${CCOLA_COMPONENT_INCLUDE_DIRECTORIES})
endif()

if(DEFINED CCOLA_COMPONENT_LIBRARY_DIRECTORIES)
link_directories(${CCOLA_COMPONENT_LIBRARY_DIRECTORIES})
Expand Down
Loading

0 comments on commit a6773e6

Please sign in to comment.