Skip to content

added debug definitions wio 0.6.0 #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 102 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
b851808
Added repo token to coveralls.yml (#34)
Mogball Nov 5, 2017
f0bbe05
CMakeLists-configuration (#35)
Nov 5, 2017
5136ee1
Fixed up Bitset (#36)
Mogball Nov 6, 2017
9da5ad6
Converted tabs to spaces (#37)
Mogball Nov 6, 2017
8cf8cc0
wmake enhanced to have args documentation (#39)
Nov 7, 2017
2dd31de
Hash map, openly addressed and separately chained (#23)
Mogball Nov 7, 2017
ee6fcf9
Static allocator hotfix (#41)
Nov 7, 2017
ac53036
EMB#2-test-static-strings (#14)
Nov 12, 2017
097ea23
[FT] Types (#46)
Nov 12, 2017
39d7813
[HF] Fix warnings (#47)
Nov 12, 2017
3496859
[HF] Namespaced typedefs in Types.h (#52)
Mogball Nov 14, 2017
892341e
[Lib] A lotta stuff (#48)
Mogball Nov 14, 2017
d509756
[HF] namespace wlp added for Static and Dynamic Allocator (#53)
Nov 14, 2017
9b6f960
[HF] adding some missing docs (#54)
Mogball Nov 20, 2017
72f6b5d
[FT] Memory improv (#55)
Nov 20, 2017
51bedc4
Cleaned up the code a bit (#57)
Mogball Nov 20, 2017
4715dd7
Implement STL List (#29)
ambyjkl Nov 21, 2017
e442cc0
[Lib] State Machine + [HF] memory fixes (#56)
Mogball Nov 21, 2017
ac5f309
[Lib] Red black tree, Tree Map, Tree Set (#50)
Mogball Nov 21, 2017
4a6c9c1
Added extra wmake commands (#59)
Mogball Nov 21, 2017
b69d8e3
Change iterator template parameters to take ref and ptr type (#58)
Mogball Nov 21, 2017
f8bbf1f
[Enhancement] Synced LinkedList and ArrayList interface, List concept…
Mogball Nov 22, 2017
6c583e4
Array tmp functions for sized and unsized arrays (#65)
Mogball Nov 23, 2017
d6010e1
Changed iterators to return the correct reference and pointer types (…
Mogball Nov 23, 2017
d01feba
[HF] memory-improvements (#66)
Nov 24, 2017
36bf34c
Added rvalue overload for (#67)
Mogball Nov 24, 2017
b432039
Modified treemap to fit map concept, created set concept (#60)
Mogball Nov 24, 2017
8ad6ee4
allow creation of primitive types with value (#69)
Mogball Nov 24, 2017
6b8a06f
[IMP] Mem imporv (#74)
Nov 26, 2017
822f3a0
Create LICENSE (#75)
Mogball Nov 26, 2017
5e078e2
Fixes conversion warnings (#71)
Mogball Nov 26, 2017
d736ff1
EMB#3-dynamic-strings created (#73)
bobqywei Nov 26, 2017
89ed3a6
doxygen docs added for c++ (#78)
Nov 26, 2017
9358141
[Enhancement] Move constructor and assignment operator for DynamicStr…
Mogball Nov 26, 2017
107957f
[Feature] Unique, Weak, Shared Pointers (#64)
Mogball Nov 27, 2017
0d9fe22
[HF] Free order (#79)
Nov 27, 2017
608d810
calls deploy script (#80)
Nov 27, 2017
785ccd5
String iterator, string concept, optimizations (#81)
Mogball Nov 27, 2017
45d303e
[HF] Doxygen and library auto deployment (#90)
Dec 1, 2017
c2f337b
deployment fixed to have a nicer documentation (#91)
Dec 1, 2017
8a87f8a
[HF] Deploy script Wlib (#92)
Dec 1, 2017
034a986
[HF] 404 error fixed docs (#93)
Dec 1, 2017
ef1d63e
[HF] 404 fix (#94)
Dec 1, 2017
54291ae
[Feature] Packet constructor (#95)
Mogball Dec 2, 2017
582d900
Bitset tostring functions (#96)
Mogball Dec 2, 2017
8f36b06
Dynamic string and static string integration (#97)
Mogball Dec 4, 2017
968b5a9
Exceptions added and a minor memory fix (#99)
Dec 6, 2017
7014d58
Namespace collision with B1 from arduino (#100)
Mogball Dec 6, 2017
756fb30
Fixed typo for __allocators (#101)
Mogball Dec 6, 2017
de596d5
Another fix (#102)
Mogball Dec 6, 2017
5b77ea5
Fixed issues with new (#103)
Mogball Dec 6, 2017
af07a8f
[HF] Fixing more warnings on platformio (#104)
Mogball Dec 6, 2017
7cd5481
Fixing deploy (#105)
Mogball Dec 6, 2017
05115e9
Fixed another build warning (#106)
Mogball Dec 6, 2017
5581184
memory fix when no pool is used (#108)
Dec 7, 2017
0dab6bd
Added exceptions to STL data structures (#107)
Mogball Dec 15, 2017
c31d93f
Update README.md (#109)
Mogball Dec 17, 2017
4cd8610
Modifications for new packet specs (#110)
Mogball Dec 17, 2017
61b327c
Update README.md (#111)
Mogball Dec 17, 2017
eb47171
Refractored RedBlackTree and HashMap into `Table` type (#113)
Mogball Dec 18, 2017
4a66281
Fixing coverage badge
Mogball Dec 19, 2017
338892d
HashMap and HashSet redux (#114)
Mogball Dec 20, 2017
eaed9d7
Using custom new/delete when COSA_H is defined (#115)
Mogball Jan 11, 2018
eaa4069
Namespacing Cosa flag (#116)
Mogball Jan 11, 2018
417d1df
Update README.md
Mogball Jan 14, 2018
4c6c14e
[FT] includes (#118)
Feb 7, 2018
9b34da1
Added array2d and vector2d (#119)
Mogball Mar 6, 2018
8e387fb
added template comparisons
Mogball Mar 15, 2018
aa95572
added runtime compares (#120)
Mogball Mar 16, 2018
74dba7f
Added repeating tuple types (#121)
Mogball Mar 16, 2018
0992763
Using reinterpret_cast for -fno-rtti (#122)
Mogball May 7, 2018
f22b9b1
added deploy instructions (#123)
Mogball May 7, 2018
290ab90
deploy script fixed to deploy unchanged files (#125)
May 15, 2018
e7454cc
Renames (#126)
Mogball Jun 1, 2018
6f8c9aa
Remove comms (#127)
Mogball Jun 1, 2018
3d5fa30
Includes (#128)
Mogball Jun 1, 2018
8ce48d5
Wio deploy (#129)
Mogball Jun 2, 2018
61b2a70
Update README.md
Mogball Jun 4, 2018
088e530
Added non-const c_str (#132)
Mogball Jun 5, 2018
3a47d0b
Version 2.0.1 (#133)
Mogball Jun 5, 2018
73b4e86
Fixing deploy and version 2.0.2 (#134)
Mogball Jun 5, 2018
47e411f
Version 2.0.3 and more dynamic string updates (#135)
Mogball Jun 5, 2018
5b99bd4
Fixing wio deploy for newer wio version (#136)
Mogball Jun 5, 2018
37e9501
Updating Documentation Link (#138)
Mogball Jun 6, 2018
ccfe6b5
Jeff/member reorder (#139)
Mogball Jun 7, 2018
b1a9ce8
string constructors to nullptr_t (#140)
Mogball Jun 7, 2018
2761c71
version 2.1.0 (#141)
Mogball Jun 7, 2018
14afcde
Small fix for insert_or_assign (#145)
Mogball Jun 7, 2018
3f4982e
Version 2.1.1 (#147)
Mogball Jun 7, 2018
55e1b7f
added iterator map get key (#149)
Mogball Jun 9, 2018
a69cf72
wio-deploy verbose build (#148)
Mogball Jun 9, 2018
bc537fc
Removing iterator types from iterators (#151)
Mogball Jun 9, 2018
8c714e7
Version 2.1.2 (#152)
Mogball Jun 9, 2018
ee0c640
redblacktree default constructor (#153)
Mogball Jun 9, 2018
a9660ab
Removing examples from travis
Mogball Jun 20, 2018
c7e42e6
Jeff/wlib stl (#155)
Mogball Jun 20, 2018
41890e0
Update README.md (#156)
Mogball Jun 20, 2018
dad22ae
Updated readme for org change (#158)
Mogball Jul 27, 2018
099bab5
updating to wio 0.4.0 (#160)
Sep 29, 2018
0877366
fixing deploy script (#161)
Sep 29, 2018
31af633
Updating deps
Mogball Sep 29, 2018
2715069
added debug definitions wio 0.6.0
Oct 24, 2018
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 .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
repo_token: 3Te84vayRwnQuCXcPP8iYI1m55iKZl2yL
18 changes: 9 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,12 @@
CMakeListsPrivate.txt
src/main.cpp
bin/
# Created by https://www.gitignore.io/api/clion
build/
wlib-wio/

### CLion ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/**/tasks.xml
.idea/dictionaries

# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
Expand All @@ -22,11 +17,9 @@ bin/
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml

# Gradle:
.idea/**/gradle.xml
.idea/**/libraries

# CMake
cmake-build-debug/

# Mongo Explorer plugin:
Expand Down Expand Up @@ -69,3 +62,10 @@ fabric.properties
# End of https://www.gitignore.io/api/clion
.pioenvs
.vscode

.DS_Store

*.swp

wlib-stl/include/*
wlib-stl/src/*
Empty file added .nojekyll
Empty file.
35 changes: 25 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,24 @@ addons:
- cmake
- valgrind
- cppcheck
- doxygen
- graphviz

install:
- if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi
- if [ "$CXX" = "g++" ]; then export CXX="g++-5" CC="gcc-5"; fi

- cd ${TRAVIS_BUILD_DIR}
- wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz
- tar xf lcov_1.11.orig.tar.gz
- sudo make -C lcov-1.11/ install
- gem install coveralls-lcov
- lcov --version
- g++ --version
- cd ${TRAVIS_BUILD_DIR}
- chmod +x deploy.sh
- ./deploy.sh
- wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz
- tar xf lcov_1.11.orig.tar.gz
- sudo make -C lcov-1.11/ install
- gem install coveralls-lcov
- lcov --version
- g++ --version
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
- sudo apt-get install -y nodejs
- sudo npm install -g [email protected] --unsafe-perm

before_script:
- cd ${TRAVIS_BUILD_DIR}
Expand All @@ -36,17 +43,25 @@ script:
# Check versions of gcc, g++ and cmake
- gcc -v && g++ -v && cmake --version
# Compile project and run tests
- cd wlib-stl
- wio update pkg .
- wio pac get
- cd ..
- ./wmake build
- ./wmake test
# Run static code analyzer
- cppcheck lib
# Run valgrind to detect memory bugs
- valgrind --leak-check=full --error-exitcode=2 ./bin/examples/examples
- valgrind --leak-check=full --error-exitcode=2 ./bin/tests/tests

after_success:
- cd ${TRAVIS_BUILD_DIR}
- lcov --directory . --capture --output-file coverage.info
- lcov --remove coverage.info 'tests/*' '/include/*' 'examples/*' --output-file coverage.info
- lcov --list coverage.info
- coveralls-lcov --repo-token=${Coveralls} coverage.info
- coveralls-lcov coverage.info

env:
global:
- ENCRYPTION_LABEL: "0b154c48edef"
- COMMIT_AUTHOR_EMAIL: "[email protected]"
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ cmake_minimum_required(VERSION 3.1)
project(EmbeddedCplusplus)
enable_testing()

SET(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 11)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -W -Wshadow -Wunused-variable -Wunused-parameter -Wunused-function -Wunused -Wno-system-headers -Wno-deprecated -Woverloaded-virtual")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")

Expand All @@ -13,6 +12,5 @@ set(WLIB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/wlib)

add_subdirectory(include/gtest-1.8.0)
add_subdirectory(lib/wlib)
add_subdirectory(examples)
add_subdirectory(tests)
add_test(NAME EmbeddedCplusplusTests COMMAND tests)
23 changes: 23 additions & 0 deletions DEPLOY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# WLib deploy instructions
WLib is hosted on two repositories under the `waterloop` organisation. The development repo `waterloop-wlib` contains
the unit tests, various build, test, and deploy files, and scripts. The `travis` build on `master`
cleans the branch and deploys to `library` and the doxygen documentation to `gh-pages`.

The deploy repo `wlib` should be used in projects and is reachable by `wcosa`. WLib is deployed manually when
critical features/fixes are added, after several milestones, or periodically. WLib is deployed by pushing the development
`library` branch to the deploy repo and tagging a new release. Tags should be pushed to both repos.

```bash
git remote add devel https://github.com/waterloop/waterloop-wlib.git
git remote add deploy https://github.com/waterloop/wlib.git
git fetch devel
git fetch deploy

git checkout devel/library
git push deploy library

git tag x.x.x
git push devel deploy --tags

```

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Waterloop

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
[![Build Status](https://travis-ci.org/teamwaterloop/embedded-cplusplus.svg?branch=master)](https://travis-ci.org/teamwaterloop/embedded-cplusplus) [![Coverage Status](https://coveralls.io/repos/github/teamwaterloop/embedded-cplusplus/badge.svg?branch=master)](https://coveralls.io/github/teamwaterloop/embedded-cplusplus?branch=master)
# Waterloop Embedded C++
C++ version of libraries used by Waterloop for embedded systems
[![Build Status](https://travis-ci.org/waterloop/wlib.svg?branch=master)](https://travis-ci.org/waterloop/wlib)
[![Coverage Status](https://coveralls.io/repos/github/waterloop/waterloop-wlib/badge.svg?branch=master)](https://coveralls.io/github/waterloop/waterloop-wlib?branch=master)

# WLib

The standard C++ library used by Waterloop.

WLib is built in-house for our pod's embedded systems. The goal of WLib is to create a lighter and safer alternative to C++ STL. WLib is more memory efficient, has a smaller binary footprint, and has low power consumption. WLib uses controlled heap memory or a static memory pool, which prevents fragmentation.

This library depends only on a few C standard libraries and is optimized for embedded systems that have less memory and low processing power.

For more details check out our [documentation](https://waterloop.github.io/wlib/).

## Committers

Jeff Niu (Mogball [[email protected]](mailto:[email protected]))

Deep Dhillon (dhillondeep [[email protected]](mailto:[email protected]))

## Contributors

Bob Wei (bobqywei [[email protected]](mailto:[email protected]))

Ambareesh Balaji (Ambyjkl [[email protected]](mailto:[email protected]))
89 changes: 89 additions & 0 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#!/bin/bash
set -e # Exit with nonzero exit code if anything fails

SOURCE_BRANCH="master"
TARGET_BRANCH="gh-pages"
WLIB_BRANCH="library"
WLIB_REPO="https://github.com/waterloop/wlib.git"

# Pull requests and commits to other branches shouldn't try to deploy, just build to verify
if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then
echo "Skipping deploy"
exit 0
fi

# Save some useful information
REPO=`git config remote.origin.url`
SSH_REPO=${REPO/https:\/\/github.com\//[email protected]:}
SHA=`git rev-parse --verify HEAD`

echo "Pushing to gh-pages"

# Clone the existing gh-pages for this repo into docs_out
# Create a new empty branch if gh-pages doesn't exist yet (should only happen on first deply)
git clone $REPO docs_out
cd docs_out

git checkout $TARGET_BRANCH || git checkout --orphan $TARGET_BRANCH
cd ..

echo "Removing current files"

# Clean out existing contents
rm -rf docs_out/*
cd docs

# Run our compile script
doxygen doxygen.conf

# Move content from html folder
cp -r html/. ../docs_out
cp ../.nojekyll ../docs_out

# Now let's go have some fun with the cloned repo
cd ../docs_out
git config user.name "Travis CI"
git config user.email "[email protected]"

echo "Deploying to gh-pages"

# Commit the "changes", i.e. the new version.
# The delta will show diffs between new and old versions.
git add .
git commit -m "Deploy to GitHub Pages: ${SHA}"

# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
ENCRYPTED_KEY=${!ENCRYPTED_KEY_VAR}
ENCRYPTED_IV=${!ENCRYPTED_IV_VAR}
openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in ../deploy_key.enc -out deploy_key -d
chmod 600 deploy_key
eval `ssh-agent -s`
ssh-add deploy_key
rm deploy_key

# Now that we're all set up, we can push.
git push $SSH_REPO $TARGET_BRANCH

cd ..

echo "Deployed to gh-pages"

# Clone the existing repo (library branch)
# Create a new empty branch if library doesn't exist yet (should only happen on first deply)
git clone $REPO library
cd library
git checkout $WLIB_BRANCH || git checkout --orphan $WLIB_BRANCH
cd ..

# Clean out existing contents and copy new content
rm -rf library/*
cp -r lib/wlib/. library
cp README.md library
cp .gitignore library
cp LICENSE library

cd library
git add -A
git diff-index --quiet HEAD && echo "Wlib library already Up to Date" || git commit -m "Deploying Wlib Library: ${SHA}" && git push $SSH_REPO $WLIB_BRANCH && echo "Deployed Wlib library"
Binary file added deploy_key.enc
Binary file not shown.
Loading