Skip to content
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

[POC] Feature Favorite Apps on swipe left #487

Closed
wants to merge 252 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
252 commits
Select commit Hold shift + click to select a range
56af4a0
cleaned up the code and reduced the size of the diff by removing thin…
Raupinger May 12, 2021
9e8dd9a
NotificationItem now also redefines the start of the timeout
Raupinger May 12, 2021
378fa6b
Reset
kieranc May 18, 2021
a4968b5
PineTimeStyle
kieranc May 18, 2021
6a92529
Revert "Reset"
kieranc May 18, 2021
108bbc3
Fix it again..
kieranc May 18, 2021
5daaa5c
Tidying/formatting fixes
kieranc May 19, 2021
249b6db
Remove newline modifications
kieranc May 19, 2021
5c41301
Move GPL license header
kieranc May 19, 2021
565601e
Merge remote-tracking branch 'upstream/develop' into pinetimestyle
kieranc May 21, 2021
f2d0116
Merge remote-tracking branch 'upstream/develop' into pinetimestyle
kieranc Jun 4, 2021
d0df278
Update BatteryIcon.cpp
hassless Jun 9, 2021
123c6f1
Fix touchevent tap
Riksu9000 Jun 11, 2021
21b6f85
Fix regression
Riksu9000 Jun 11, 2021
239b554
Fix another regression
Riksu9000 Jun 11, 2021
ab1a390
Merge branch 'develop' into pinetimestyle
JF002 Jun 12, 2021
f5d7569
Merge remote-tracking branch 'upstream/develop' into pinetimestyle
kieranc Jun 16, 2021
d7b73f1
Merge branch 'pinetimestyle' of github.com:kieranc/InfiniTime into pi…
kieranc Jun 16, 2021
84a6c88
Merge branch 'JF002:develop' into improve-battery-percentage-to-batte…
hassless Jun 18, 2021
b130ffa
Merge remote-tracking branch 'upstream/develop' into pinetimestyle
kieranc Jun 20, 2021
607af27
Add step count gauge - replaces heartrate in sidebar
kieranc Jun 20, 2021
266573d
Enable 12/24h functionality
kieranc Jun 20, 2021
be505fc
Set step gauge outer to be white when step goal is reached
kieranc Jun 21, 2021
c3f854b
Add font source file
kieranc Jun 22, 2021
14721e8
Move static needle_colors array to member variable
kieranc Jun 23, 2021
38ab0ad
PineTimeStyle color picker initial commit
kieranc Jun 24, 2021
7edfc53
PineTimeStyle color picker add settings integration
kieranc Jun 24, 2021
8f16574
PineTimeStyle color picker tidying
kieranc Jun 24, 2021
d5d8438
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-co…
kieranc Jun 25, 2021
50b92e5
Move array to member variable, retrieve colors from settings for display
kieranc Jun 25, 2021
878dd1a
Use colors from settings for PineTimeStyle watchface
kieranc Jun 25, 2021
be22a9b
Fix off-by-one error, reduce step gauge needle width
kieranc Jun 25, 2021
f3b40cb
Make it loop around when you get to the end of the list of colors
kieranc Jun 25, 2021
800daec
Add a check to set default colors if all colors are white
kieranc Jun 25, 2021
6889cf1
Fix the fix, whoops
kieranc Jun 25, 2021
660a859
Add reset button, reduce button opacity
kieranc Jun 27, 2021
4f21748
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-co…
kieranc Jun 29, 2021
9bd1808
Replace font file
kieranc Jun 29, 2021
2edf41b
Fix bad merge
kieranc Jun 29, 2021
f5639db
Change step gauge to use percentage of goal for progress
kieranc Jul 6, 2021
f970dc9
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-co…
kieranc Jul 11, 2021
db99ac8
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-co…
kieranc Jul 12, 2021
5c183be
Merge branch 'pinetimestyle-colorpicker' of github.com:kieranc/Infini…
kieranc Jul 12, 2021
7efe2b7
Fix misconfigured ADC and remove now unnecessary filtering
Riksu9000 Jul 12, 2021
b5eabf6
Merge branch 'develop' into fix_adc
Riksu9000 Jul 13, 2021
3e0974e
Update App order
coxtor Jul 13, 2021
95b8a56
Merge branch 'develop' into fix_touchevent_tap
Riksu9000 Jul 14, 2021
7133287
Set correct refresh times for lvgl (#488)
Riksu9000 Jul 14, 2021
57b3397
Multiple wakeup sources (#290)
Kozova1 Jul 14, 2021
fe64176
New touch handler, with issues
Riksu9000 Jul 15, 2021
0d24d2b
Quick fix
Riksu9000 Jul 15, 2021
2a3e126
Fix most issues
Riksu9000 Jul 15, 2021
93ccbf3
Fix touch wakeup and code cleanup
Riksu9000 Jul 15, 2021
baffa15
Fix gestures
Riksu9000 Jul 15, 2021
329482f
Fix remaining known issues
Riksu9000 Jul 16, 2021
3e42297
Update
Riksu9000 Jul 18, 2021
dc2b5f0
Restore Tile.cpp changes
Riksu9000 Jul 19, 2021
97c761a
Refresh rework
Riksu9000 Jul 19, 2021
331fc2b
Set remaining default periods to LV_DISP_DEF_REFR_PERIOD
Riksu9000 Jul 19, 2021
db784fc
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-co…
kieranc Jul 20, 2021
5e4d3c8
Remove .gitignore
kieranc Jul 22, 2021
0a0f28f
Make firmware updating more foolproof (#469)
Riksu9000 Jul 22, 2021
d6cccc2
Set version to 1.3.0
JF002 Jul 23, 2021
1ddb1f0
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-co…
kieranc Jul 23, 2021
547b5a8
Restore .gitignore
kieranc Jul 23, 2021
d666c50
Merge branch 'develop' into new_touch_handler
Riksu9000 Jul 23, 2021
fc93bdb
Merge branch 'develop' into refresh_rework
Riksu9000 Jul 23, 2021
b3e3d75
Add extra screen in settings to show scrollbar correctly
kieranc Jul 24, 2021
bb26c68
minor changes regarding building (#356)
afeuerstein Jul 24, 2021
a1a6eae
Added a pre-commit hook that should simplify commiting pre-formatted …
Avamander Apr 18, 2021
10ef3a7
Added autodetection for clang-format version
Avamander May 1, 2021
1ba99d2
Made the pre-commit hook fail explicitly when the executable doesn't …
Avamander May 3, 2021
926553d
Merge branch 'fix_touchevent_tap' of git://github.com/Riksu9000/Infin…
JF002 Jul 24, 2021
057de4e
Merge branch 'Riksu9000-fix_touchevent_tap' into develop
JF002 Jul 24, 2021
a25ce5d
Merge branch 'develop' of github.com:JF002/Pinetime into develop
JF002 Jul 24, 2021
e4d9636
Merge branch 'develop' into new_touch_handler
Riksu9000 Jul 24, 2021
ce26ef8
Add PineTimeStyle in the list of watchface in README.md
JF002 Jul 24, 2021
34949a4
Dim screen before sleep (#464)
Riksu9000 Jul 24, 2021
ec2469a
Code cleanup (#466)
Riksu9000 Jul 25, 2021
7a6cead
Update documentation (#467)
Riksu9000 Jul 25, 2021
a69be15
Add task state info to SystemInfo
Riksu9000 Jul 9, 2021
f2f2218
Add new unique icons for some apps
Riksu9000 Jul 13, 2021
1ae22f4
Fix cases where Get() isn't used
Riksu9000 Jul 13, 2021
6222b7c
Correct spelling issue in documentation (#509)
Volatile86 Jul 25, 2021
5744345
Fix slow scroll
Riksu9000 Jul 23, 2021
7b75ca5
Fix compile warnings
jvandermey-evertz Jul 17, 2021
a1ba187
Merge branch 'develop' into new_touch_handler
Riksu9000 Jul 25, 2021
514481e
Tile event handler : read the event data only if the event is a "valu…
JF002 Jul 25, 2021
e6bc485
Increment settings value, remove old hacky fix
kieranc Jul 25, 2021
a0a0555
Merge branch 'develop' into fix_adc
Riksu9000 Jul 27, 2021
79ee65b
Increase ADC precision
Riksu9000 Jul 27, 2021
12aeb46
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-co…
kieranc Jul 28, 2021
5bdef36
Merge branch 'develop' into HEAD
Riksu9000 Aug 1, 2021
e6dcb30
Improvements
Riksu9000 Aug 1, 2021
a618f43
Fixes
Riksu9000 Aug 1, 2021
09aaa58
Remove floating point calculation
Riksu9000 Aug 1, 2021
f9319df
Remove leftover
Riksu9000 Aug 1, 2021
28abeae
DRAFT: Put gpio pins to separate file
hubmartin Aug 2, 2021
10b5d30
Merge branch 'develop' into refresh_rework
Riksu9000 Aug 3, 2021
f244c96
Update ota-gadgetbridge-nrfconnect.md
hubmartin Aug 3, 2021
2992f4a
Add FW validation note after DFU flash
hubmartin Aug 3, 2021
c30e54c
Make it easier for new people to find instructions
Riksu9000 Aug 3, 2021
285ac9e
Move getting started slightly lower
Riksu9000 Aug 3, 2021
b7aa04e
PinMap with namespace and constexpr
hubmartin Aug 3, 2021
b3e6da7
Cleanup, set Pinetime as default
hubmartin Aug 3, 2021
abd8f34
Rename backlight level pins
hubmartin Aug 4, 2021
65423b3
added devcontainer files
Feb 25, 2021
273a94f
removed dependency on build.sh
nscooling Feb 25, 2021
382db66
macOS and Win10 dockerfile
Feb 25, 2021
937d3e1
added dos2unix to docker for Win10 and default to release build
Feb 26, 2021
c50f2b7
added clang-tidy/format to container
Feb 26, 2021
c0b8453
added extra .sh build files
nscooling Mar 26, 2021
f7643a4
Added cmake variants
geekbozu Jul 25, 2021
e9248b2
Updated documentation
geekbozu Jul 26, 2021
7f2ee62
Typos for days
geekbozu Jul 26, 2021
d2dc719
Fix intellisense
geekbozu Aug 8, 2021
44889ad
Setup plugins for Clang-tidy/format
geekbozu Aug 9, 2021
baa7e1b
Optimize twiMaster
Riksu9000 Aug 9, 2021
d35a54c
Try to fix bootloop
Riksu9000 Aug 9, 2021
ff81a72
Better pin configuration
Riksu9000 Aug 9, 2021
5eb56d9
Set pin before loop
Riksu9000 Aug 9, 2021
2194a33
Only enable the bus when needed
Riksu9000 Aug 10, 2021
90ea107
Explicitly disable pullup
Riksu9000 Aug 10, 2021
c086520
Code cleaning in Clock, WatchFaceAnalog, WatchFaceDigital and PineTim…
JF002 Jul 24, 2021
81a1431
Merge branch 'improve-battery-percentage-to-battery-icon-mapping' of …
JF002 Aug 10, 2021
707446e
Merge branch 'hassless-improve-battery-percentage-to-battery-icon-map…
JF002 Aug 10, 2021
9fb3755
Merge pull request #483 from Riksu9000/fix_adc
JF002 Aug 10, 2021
d307c6b
Merge branch 'develop' into refresh_rework
Riksu9000 Aug 10, 2021
275a84b
Merge branch 'unblock_i2c' into develop
Riksu9000 Aug 10, 2021
6430773
Merge pull request #505 from geekbozu/devcon
JF002 Aug 10, 2021
f1346f0
Merge branch 'develop' into new_touch_handler
Riksu9000 Aug 10, 2021
7e92577
Revert "Merge branch 'unblock_i2c' into develop"
Riksu9000 Aug 10, 2021
8a694ad
Rework TouchHandler into not a task
Riksu9000 Aug 10, 2021
6776776
Make diff smaller and revert some changes in DisplayApp
Riksu9000 Aug 10, 2021
cd7ca45
Remove leftover
Riksu9000 Aug 10, 2021
fe33c75
Fix longpress gesture
Riksu9000 Aug 11, 2021
0d083a2
Merge branch 'develop' into pinmap
hubmartin Aug 11, 2021
1d341a7
Don't reconfigure pins
Riksu9000 Aug 12, 2021
52ee25e
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-co…
kieranc Aug 12, 2021
6bffc7d
Tidying
kieranc Aug 12, 2021
fbb4e8c
fix Github Action build Firmware
mabuch Aug 14, 2021
23bde0d
Make battery reading periodic. Add events. Disable pullup
Riksu9000 Aug 14, 2021
40afae3
Github Action - update mcuboot version
mabuch Aug 14, 2021
f0e9d13
Update contribute.md (#475)
Riksu9000 Aug 14, 2021
e51c3ee
Try to fix bootloop
Riksu9000 Aug 9, 2021
10f610b
Better pin configuration
Riksu9000 Aug 9, 2021
7c28de0
Set pin before loop
Riksu9000 Aug 9, 2021
6192775
Improve metronome
Riksu9000 Aug 13, 2021
dec4bab
Add VSCode ST-link debug config (#567)
hubmartin Aug 14, 2021
c3d8ee1
Merge branch 'develop' into refresh_rework
Riksu9000 Aug 14, 2021
0eeed5a
Merge branch 'call-improvements' of https://github.com/Riksu9000/Infi…
JF002 Aug 14, 2021
df8d396
Merge branch 'Riksu9000-call-improvements' into develop
JF002 Aug 14, 2021
044036e
Merge branch 'develop' into timer_battery_reading
Riksu9000 Aug 14, 2021
477ff32
Add randomise button to color picker
kieranc Aug 15, 2021
e0d0141
Ui update
Riksu9000 Jun 13, 2021
fc6458a
Add image with example layouts
Riksu9000 Jun 13, 2021
637ed80
Adjust previously missed scrollbar and firmware validation buttons
Riksu9000 Jul 24, 2021
bc82905
Clean up using variables
Riksu9000 Jul 29, 2021
ee44b6f
Adjust inner padding in applist
Riksu9000 Jul 29, 2021
c0bb887
Add check for randomise button in case colors clash
kieranc Aug 15, 2021
3cef05b
Merge branch 'develop' into refresh_rework
Riksu9000 Aug 15, 2021
16ea069
Remove duplicate code, minor fixes
kieranc Aug 15, 2021
5789f15
Avoid setting the sidebar black
kieranc Aug 15, 2021
639fd3a
More tidying following review
kieranc Aug 15, 2021
9851ed3
Fix potential edge case of sidebar being set black
kieranc Aug 15, 2021
30b32e4
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-co…
kieranc Aug 15, 2021
81a36dc
Simplify parameters and cleanup
Riksu9000 Aug 16, 2021
55f8908
Make Clock Persistant.
geekbozu Aug 17, 2021
b911005
Fix music app buttons
Riksu9000 Aug 18, 2021
df8ea7f
Add memory print usage
hubmartin Aug 16, 2021
40392d7
Use highest frequency and move mutex creation to Init
Riksu9000 Aug 18, 2021
85c9979
Merge branch 'develop' into new_touch_handler
Riksu9000 Aug 18, 2021
16502b7
Add MCUBOOT linker changes
geekbozu Aug 19, 2021
2dd7b8b
Add clearing of noinit segment on bad word
geekbozu Aug 19, 2021
4f6d7e2
Move Backup to the system task.
geekbozu Aug 19, 2021
c9dedfd
Add some VSCODE stuff to gitignore...
geekbozu Aug 19, 2021
2b30ff4
Remove unused variables
Riksu9000 Aug 19, 2021
8ac1ae7
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-co…
kieranc Aug 19, 2021
2a299fe
Merge branch 'develop' into pinmap
hubmartin Aug 22, 2021
51c5257
Update startup SCL toggling pinmap definitions
hubmartin Aug 22, 2021
110c82c
Move noinit to after BSS segment,
geekbozu Aug 23, 2021
d7293a4
Infini-iOS
Utopiah Aug 26, 2021
b45d7c3
Correct change test for wake up mode setting
ColinKinloch Aug 26, 2021
969de9a
Merge pull request #492 from Riksu9000/new_touch_handler
JF002 Aug 28, 2021
45e7638
Merge branch 'twimaster_rework' of https://github.com/Riksu9000/Infin…
JF002 Aug 28, 2021
f895da8
Merge branch 'Riksu9000-twimaster_rework' into develop
JF002 Aug 28, 2021
0313277
Fix touchinfo typo in SystemTask.
JF002 Aug 28, 2021
fab49f8
Fix recovery firmware since last changes in DisplayApp.
JF002 Aug 28, 2021
085c9ab
Merge branch 'develop' into timer_battery_reading
Riksu9000 Aug 28, 2021
c2fae47
Merge branch 'develop' into refresh_rework
Riksu9000 Aug 28, 2021
2870d3a
Merge pull request #497 from Riksu9000/refresh_rework
JF002 Aug 28, 2021
ef9f809
Merge pull request #458 from kieranc/pinetimestyle-colorpicker
JF002 Aug 28, 2021
31bc47d
Settings : use enums instead of ints to store colors. Group all PTS s…
JF002 Aug 28, 2021
6c02378
Fix wake on tap/double tap.
JF002 Aug 28, 2021
8390d0e
Merge branch 'develop' into pinmap
hubmartin Aug 29, 2021
be31f41
WIP Refactor ble advertising
evergreen22 Aug 29, 2021
21d37d1
Merge remote-tracking branch 'upstream/develop' into timer_battery_re…
Riksu9000 Aug 30, 2021
00a3f84
Completely reset connection state on fail
evergreen22 Aug 31, 2021
1635bfa
Fix notifications that wouldn't auto close when the timeout elapsed (…
JF002 Aug 31, 2021
f6248a8
Merge pull request #579 from mabuch/fix-github-build
JF002 Sep 1, 2021
d69a8e8
Fix race condition, connect->disconnect->discovery
evergreen22 Sep 2, 2021
3e1fe68
Fix styles issues - no change to functionality
evergreen22 Sep 2, 2021
6f9f0e8
Set version to 1.4.0.
JF002 Sep 2, 2021
bd1a571
Update Settings.cpp
Itai-Nelken Sep 2, 2021
28fdc37
Add some comments
geekbozu Sep 2, 2021
c32ba84
Linear decrease of advert rate to conserve battery
evergreen22 Sep 4, 2021
4820b2f
Revert "Linear decrease of advert rate to conserve battery"
evergreen22 Sep 5, 2021
22571d4
Advertise fast for at least 30 secs then slow down
evergreen22 Sep 5, 2021
3cc0077
Run CI on master and develop branch
NeroBurner Sep 10, 2021
1fb5757
Created basic alarm app
mruss77 Sep 10, 2021
2c83c35
Merge pull request #636 from Itai-Nelken/move-about-firmware-settings…
JF002 Sep 11, 2021
cdf5801
Merge pull request #615 from Utopiah/patch-1
JF002 Sep 11, 2021
3ee4876
Toggle notifications only, keep vibrations.
Riksu9000 Sep 12, 2021
53d6417
Merge pull request #550 from hubmartin/patch-2
JF002 Sep 12, 2021
1235c69
Merge pull request #551 from hubmartin/patch-3
JF002 Sep 12, 2021
977321c
Merge pull request #552 from Riksu9000/new_to_infinitime
JF002 Sep 12, 2021
f032929
Merge pull request #580 from Riksu9000/timer_battery_reading
JF002 Sep 12, 2021
8728ac2
Merge pull request #602 from Riksu9000/del_unused
JF002 Sep 12, 2021
c9aeef9
Merge pull request #617 from ColinKinloch/wake_up_mode_setting_change
JF002 Sep 12, 2021
73d3e41
Merge branch 'develop' into pinmap
hubmartin Sep 13, 2021
e614af1
Add WATCH_COLMI_P8 option to cmake & docs
hubmartin Sep 13, 2021
84a93b5
docs: Fix a few typos (#606)
timgates42 Sep 13, 2021
b0bdd2b
Merge pull request #549 from hubmartin/pinmap
JF002 Sep 13, 2021
9afa412
Merge branch 'refactor_adv' of https://github.com/evergreen22/InfiniT…
JF002 Sep 13, 2021
cf20b02
Merge branch 'evergreen22-refactor_adv' into develop
JF002 Sep 13, 2021
40765f1
Merge branch 'develop' into disable_notif_only
Riksu9000 Sep 13, 2021
6356c7f
Fix DisplayAppRecovery : fix include error by forward declaring Contr…
JF002 Sep 13, 2021
bfe13d9
Fixes based on code reviews (formatting, UI code)
mruss77 Sep 13, 2021
2bf339a
License header fix, add missing braces
mruss77 Sep 13, 2021
f89780f
Remove unused include in MotoController.h
NeroBurner Sep 13, 2021
d081c41
Merge pull request #668 from NeroBurner/motorcontroller_remove_unused…
JF002 Sep 14, 2021
3eb7377
Merge pull request #658 from NeroBurner/patch-2
JF002 Sep 14, 2021
93d240a
Merge branch 'develop' into disable_notif_only
Riksu9000 Sep 14, 2021
63477fc
Fix unsigned/signed comparison warning in Metronome.cpp
NeroBurner Sep 13, 2021
f857a75
Fixes per Riksu9000's feedback
mruss77 Sep 16, 2021
1d43adc
Merge upstream
mruss77 Sep 16, 2021
cdf99b0
Revert "Merge upstream"
mruss77 Sep 16, 2021
b9e5684
resolve conflict in src/systemtask/Messages.h
mruss77 Sep 16, 2021
9cd0def
Merge pull request #662 from mruss77/basic-alarm-app
JF002 Sep 18, 2021
7af7db7
Fix DisplayAppRecovery : add AlarmController to ctor().
JF002 Sep 18, 2021
f556003
Merge branch 'PersistantStorage' of git://github.com/geekbozu/InfiniT…
JF002 Sep 18, 2021
5855906
Merge branch 'geekbozu-PersistantStorage' into develop
JF002 Sep 18, 2021
52eb94c
Merge pull request #669 from NeroBurner/fix_unsigned_comparison_warni…
JF002 Sep 18, 2021
f3b5da0
Fix the display of the date after a reset : when the date/time was re…
JF002 Sep 19, 2021
1c3c3c8
Merge branch 'develop' of github.com:JF002/Pinetime into develop
JF002 Sep 19, 2021
8a2b86d
Merge pull request #664 from Riksu9000/disable_notif_only
JF002 Sep 23, 2021
d03db14
Set version to 1.5.0
JF002 Sep 26, 2021
c00f68f
Merge 1.5
coxtor Sep 27, 2021
7377f67
Fix Favorites for 1.5
coxtor Sep 27, 2021
9a21d71
Select Favorite via longpress
coxtor Sep 28, 2021
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
65 changes: 65 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
FROM ubuntu:latest

ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update -qq \
&& apt-get install -y \
# x86_64 / generic packages
bash \
build-essential \
cmake \
git \
make \
python3 \
python3-pip \
tar \
unzip \
wget \
curl \
dos2unix \
clang-format-12 \
clang-tidy \
locales \
libncurses5 \
# aarch64 packages
libffi-dev \
libssl-dev \
python3-dev \
rustc \
&& rm -rf /var/cache/apt/* /var/lib/apt/lists/*;

#SET LOCALE
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8

RUN pip3 install adafruit-nrfutil
# required for McuBoot
RUN pip3 install setuptools_rust

WORKDIR /opt/
# build.sh knows how to compile but it problimatic on Win10
COPY build.sh .
RUN chmod +x build.sh
# create_build_openocd.sh uses cmake to crate to build directory
COPY create_build_openocd.sh .
RUN chmod +x create_build_openocd.sh
# Lets get each in a separate docker layer for better downloads
# GCC
# RUN bash -c "source /opt/build.sh; GetGcc;"
RUN wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 -O - | tar -xj -C /opt
# NrfSdk
# RUN bash -c "source /opt/build.sh; GetNrfSdk;"
RUN wget -q "https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/nRF5_SDK_15.3.0_59ac345.zip" -O /tmp/nRF5_SDK_15.3.0_59ac345
RUN unzip -q /tmp/nRF5_SDK_15.3.0_59ac345 -d /opt
RUN rm /tmp/nRF5_SDK_15.3.0_59ac345
# McuBoot
# RUN bash -c "source /opt/build.sh; GetMcuBoot;"
RUN git clone https://github.com/JuulLabs-OSS/mcuboot.git
RUN pip3 install -r ./mcuboot/scripts/requirements.txt

RUN adduser infinitime

ENV NRF5_SDK_PATH /opt/nRF5_SDK_15.3.0_59ac345
ENV ARM_NONE_EABI_TOOLCHAIN_PATH /opt/gcc-arm-none-eabi-9-2020-q2-update
ENV SOURCES_DIR /workspaces/InfiniTime
60 changes: 60 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# VS Code Dev Container
This is a docker-based interactive development environment using VS Code and Docker Dev Containers removing the need to install any tools locally*



## Requirements

- VS Code
- [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension
- Docker
- OpenOCD - For debugging

## Using

### Code editing, and building.

1. Clone InfiniTime and update submodules
2. Launch VS Code
3. Open InfiniTime directory,
4. Allow VS Code to open folder with devcontainer.

After this the environment will be built if you do not currently have a container setup, it will install all the necessary tools and extra VSCode extensions.

In order to build InfiniTime we need to run the initial submodule init and CMake commands.

#### Manually

You can use the VS Code terminal to run the CMake commands as outlined in the [build instructions](blob/develop/doc/buildAndProgram.md)

#### Script

The dev environment comes with some scripts to make this easier, They are located in /opt/.

There are also VS Code tasks provided should you desire to use those.

The task "update submodules" will update the git submodules



### Build

You can use the build.sh script located in /opt/

CMake is also configured and controls for the CMake plugin are available in VS Code



### Debugging

Docker on windows does not support passing USB devices to the underlying WSL2 subsystem, To get around this we use OpenOCD in server mode running on the host.

`openocd -f <yourinterface> -f <nrf52.cfg target file>`

This will launch OpenOCD in server mode and attach it to the MCU.

The default launch.json file expects OpenOCD to be listening on port 3333, edit if needed


## Current Issues
Currently WSL2 Has some real performance issues with IO on a windows host. Accessing files on the virtualized filesystem is much faster. Using VS Codes "clone in container" feature of the Remote - Containers will get around this. After the container is built you will need to update the submodules and follow the build instructions like normal
78 changes: 78 additions & 0 deletions .devcontainer/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
#!/bin/bash
(return 0 2>/dev/null) && SOURCED="true" || SOURCED="false"
export LC_ALL=C.UTF-8
export LANG=C.UTF-8
set -x
set -e

# Default locations if the var isn't already set
export TOOLS_DIR="${TOOLS_DIR:=/opt}"
export SOURCES_DIR="${SOURCES_DIR:=/sources}"
export BUILD_DIR="${BUILD_DIR:=$SOURCES_DIR/build}"
export OUTPUT_DIR="${OUTPUT_DIR:=$BUILD_DIR/output}"

export BUILD_TYPE=${BUILD_TYPE:=Release}
export GCC_ARM_VER=${GCC_ARM_VER:="gcc-arm-none-eabi-9-2020-q2-update"}
export NRF_SDK_VER=${NRF_SDK_VER:="nRF5_SDK_15.3.0_59ac345"}

MACHINE="$(uname -m)"
[[ "$MACHINE" == "arm64" ]] && MACHINE="aarch64"

main() {
local target="$1"

mkdir -p "$TOOLS_DIR"

[[ ! -d "$TOOLS_DIR/$GCC_ARM_VER" ]] && GetGcc
[[ ! -d "$TOOLS_DIR/$NRF_SDK_VER" ]] && GetNrfSdk
[[ ! -d "$TOOLS_DIR/mcuboot" ]] && GetMcuBoot

mkdir -p "$BUILD_DIR"

CmakeGenerate
CmakeBuild $target
BUILD_RESULT=$?
if [ "$DISABLE_POSTBUILD" != "true" -a "$BUILD_RESULT" == 0 ]; then
source "$BUILD_DIR/post_build.sh"
fi
}

GetGcc() {
GCC_SRC="$GCC_ARM_VER-$MACHINE-linux.tar.bz"
wget -q https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2020q2/$GCC_SRC -O - | tar -xj -C $TOOLS_DIR/
}

GetMcuBoot() {
git clone https://github.com/JuulLabs-OSS/mcuboot.git "$TOOLS_DIR/mcuboot"
pip3 install -r "$TOOLS_DIR/mcuboot/scripts/requirements.txt"
}

GetNrfSdk() {
wget -q "https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v15.x.x/$NRF_SDK_VER.zip" -O /tmp/$NRF_SDK_VER
unzip -q /tmp/$NRF_SDK_VER -d "$TOOLS_DIR/"
rm /tmp/$NRF_SDK_VER
}

CmakeGenerate() {
# We can swap the CD and trailing SOURCES_DIR for -B and -S respectively
# once we go to newer CMake (Ubuntu 18.10 gives us CMake 3.10)
cd "$BUILD_DIR"

cmake -G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=$BUILD_TYPE \
-DUSE_OPENOCD=1 \
-DARM_NONE_EABI_TOOLCHAIN_PATH="$TOOLS_DIR/$GCC_ARM_VER" \
-DNRF5_SDK_PATH="$TOOLS_DIR/$NRF_SDK_VER" \
"$SOURCES_DIR"
cmake -L -N .
}

CmakeBuild() {
local target="$1"
[[ -n "$target" ]] && target="--target $target"
if cmake --build "$BUILD_DIR" --config $BUILD_TYPE $target -- -j$(nproc)
then return 0; else return 1;
fi
}

[[ $SOURCED == "false" ]] && main "$@" || echo "Sourced!"
2 changes: 2 additions & 0 deletions .devcontainer/build_app.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
cmake --build /workspaces/Pinetime/build --config Release -- -j6 pinetime-app
3 changes: 3 additions & 0 deletions .devcontainer/create_build_openocd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
rm -rf build/
cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release -DUSE_OPENOCD=1 -DARM_NONE_EABI_TOOLCHAIN_PATH=/opt/gcc-arm-none-eabi-9-2020-q2-update -DNRF5_SDK_PATH=/opt/nRF5_SDK_15.3.0_59ac345 -S . -Bbuild
36 changes: 36 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.154.2/containers/cpp
{
// "name": "Pinetime",
// "image": "feabhas/pinetime-dev"
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Debian / Ubuntu OS version: debian-10, debian-9, ubuntu-20.04, ubuntu-18.04
// "args": { "VARIANT": "ubuntu-20.04" }
},
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined"],

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-vscode.cpptools",
"ms-vscode.cmake-tools",
"marus25.cortex-debug",
"notskm.clang-tidy",
"mjohns.clang-format"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "bash /opt/create_build_openocd.sh",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// "remoteUser": "vscode"
"remoteUser": "infinitime"
}
2 changes: 2 additions & 0 deletions .devcontainer/make_build_dir.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=Release -DUSE_OPENOCD=1 -DARM_NONE_EABI_TOOLCHAIN_PATH=/opt/gcc-arm-none-eabi-9-2020-q2-update -DNRF5_SDK_PATH=/opt/nRF5_SDK_15.3.0_59ac345 ${SOURCES_DIR}
32 changes: 13 additions & 19 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ name: Build PineTime Firmware
# When to run this Workflow...
on:

# Run this Workflow when files are updated (Pushed) in the "master" Branch
# Run this Workflow when files are updated (Pushed) in the "master" and "develop" Branch
push:
branches: [ master ]
branches: [ master, develop ]

# Also run this Workflow when a Pull Request is created or updated in the "master" Branch
# Also run this Workflow when a Pull Request is created or updated in the "master" and "develop" Branch
pull_request:
branches: [ master ]
branches: [ master, develop ]

# Steps to run for the Workflow
jobs:
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Install Embedded Arm Toolchain arm-none-eabi-gcc
if: steps.cache-toolchain.outputs.cache-hit != 'true' # Install toolchain if not found in cache
uses: fiam/arm-none-eabi-gcc@v1.0.2
uses: fiam/arm-none-eabi-gcc@v1.0.4
with:
# GNU Embedded Toolchain for Arm release name, in the V-YYYY-qZ format (e.g. "9-2019-q4")
release: 9-2020-q2
Expand Down Expand Up @@ -83,10 +83,11 @@ jobs:
if: steps.cache-mcuboot.outputs.cache-hit != 'true' # Install MCUBoot if not found in cache
run: |
cd ${{ runner.temp }}
git clone --branch v1.5.0 https://github.com/JuulLabs-OSS/mcuboot
git clone --branch v1.7.2 https://github.com/mcu-tools/mcuboot

- name: Install imgtool dependencies
run: pip3 install --user -r ${{ runner.temp }}/mcuboot/scripts/requirements.txt
run: |
pip3 install --user -r ${{ runner.temp }}/mcuboot/scripts/requirements.txt

- name: Install adafruit-nrfutil
run: |
Expand All @@ -99,6 +100,8 @@ jobs:

- name: Checkout source files
uses: actions/checkout@v2
with:
submodules: recursive

- name: Show files
run: set ; pwd ; ls -l
Expand All @@ -110,7 +113,7 @@ jobs:
run: |
mkdir -p build
cd build
cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 ../
cmake -DARM_NONE_EABI_TOOLCHAIN_PATH=${{ runner.temp }}/arm-none-eabi -DNRF5_SDK_PATH=${{ runner.temp }}/nrf5_sdk -DUSE_OPENOCD=1 -DBUILD_DFU=1 ../

#########################################################################################
# Make and Upload DFU Package
Expand All @@ -125,19 +128,10 @@ jobs:
cd build
make pinetime-mcuboot-app

- name: Create firmware image
run: |
# The generated firmware binary looks like "pinetime-mcuboot-app-0.8.2.bin"
ls -l build/src/pinetime-mcuboot-app*.bin
${{ runner.temp }}/mcuboot/scripts/imgtool.py create --align 4 --version 1.0.0 --header-size 32 --slot-size 475136 --pad-header build/src/pinetime-mcuboot-app*.bin build/src/pinetime-mcuboot-app-img.bin
${{ runner.temp }}/mcuboot/scripts/imgtool.py verify build/src/pinetime-mcuboot-app-img.bin

- name: Create DFU package
- name: Unzip DFU package
run: |
~/.local/bin/adafruit-nrfutil dfu genpkg --dev-type 0x0052 --application build/src/pinetime-mcuboot-app-img.bin build/src/pinetime-mcuboot-app-dfu.zip
unzip -v build/src/pinetime-mcuboot-app-dfu.zip
# Unzip the package because Upload Artifact will zip up the files
unzip build/src/pinetime-mcuboot-app-dfu.zip -d build/src/pinetime-mcuboot-app-dfu
unzip build/src/pinetime-mcuboot-app-dfu*.zip -d build/src/pinetime-mcuboot-app-dfu

- name: Upload DFU package
uses: actions/upload-artifact@v2
Expand Down
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# CMake
cmake-build-*
cmake-*
cmake-*/
CMakeFiles
**/CMakeCache.txt
cmake_install.cmake
Expand Down Expand Up @@ -38,4 +38,8 @@ Testing/Temporary/
**/.DS_Store

# Windows
**/thumbs.db
**/thumbs.db

#VSCODE
.vscode/.cortex-debug.registers.state.json
.vscode/.cortex-debug.peripherals.state.json
20 changes: 20 additions & 0 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"configurations": [
{
"name": "nrfCC",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/src/**",
"${workspaceFolder}/src"
],
"defines": [],
"compilerPath": "${env:ARM_NONE_EABI_TOOLCHAIN_PATH}/bin/arm-none-eabi-gcc",
"cStandard": "c11",
"cppStandard": "c++14",
"intelliSenseMode": "linux-gcc-arm",
"configurationProvider": "ms-vscode.cpp-tools",
"compileCommands": "${workspaceFolder}/build/compile_commands.json"
}
],
"version": 4
}
Loading