Skip to content

Commit 84edbac

Browse files
authored
Merge branch 'tock:master' into master
2 parents b50e10e + e5c540b commit 84edbac

File tree

180 files changed

+3207
-713
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+3207
-713
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@ env:
55
# Controls when the action will run. Triggers the workflow on push or pull request
66
# events but only for the master branch
77
on:
8+
push:
89
pull_request: # Run CI for PRs on any branch
910
merge_group:
1011

1112
jobs:
1213
ci-format:
1314
strategy:
1415
matrix:
15-
os: [ubuntu-20.04]
16+
os: [ubuntu-22.04]
1617
# The type of runner that the job will run on
1718
runs-on: ${{ matrix.os }}
1819

@@ -21,37 +22,18 @@ jobs:
2122
- uses: actions/checkout@v2
2223
with:
2324
submodules: false # LVGL makefile manually installs the submodule
24-
- uses: fiam/arm-none-eabi-gcc@v1
25+
- uses: carlosperate/arm-none-eabi-gcc-action@v1
2526
with:
26-
release: '10-2020-q4' # The arm-none-eabi-gcc release to use.
27+
release: '10.3-2021.07' # The arm-none-eabi-gcc release to use.
2728
- name: setup-riscv-toolchain
28-
run: |
29-
RISCV_TOOLCHAIN_MIRRORS=(\
30-
"http://www.cs.virginia.edu/~bjc8c/archive/gcc-riscv64-unknown-elf-8.3.0-ubuntu.zip" \
31-
"https://alpha.mirror.svc.schuermann.io/files/2023-08-17_gcc-riscv64-unknown-elf-8.3.0-ubuntu.zip"\
32-
)
33-
pushd $HOME
34-
for MIRROR in ${RISCV_TOOLCHAIN_MIRRORS[@]}; do
35-
echo "Fetching RISC-V toolchain from ${MIRROR}..."
36-
wget -Oriscv-toolchain.zip -q "$MIRROR" &&\
37-
(echo "2c82a8f3ac77bf2b24d66abff3aa5e873750c76de24c77e12dae91b9d2f4da27 riscv-toolchain.zip" |\
38-
sha256sum -c)
39-
if [ $? -ne 0 ]; then
40-
echo "WARNING: Fetching RISC-V from mirror $MIRROR failed!" >&2
41-
else
42-
break
43-
fi
44-
done
45-
unzip riscv-toolchain.zip
46-
echo "$HOME/gcc-riscv64-unknown-elf-8.3.0-ubuntu/bin" >> $GITHUB_PATH
47-
popd
29+
run: sudo apt-get install -y gcc-riscv64-unknown-elf
4830
- name: ci-format
4931
run: pushd examples; ./format_all.sh || exit; popd
5032

5133
ci-build:
5234
strategy:
5335
matrix:
54-
os: [ubuntu-20.04]
36+
os: [ubuntu-22.04]
5537
# The type of runner that the job will run on
5638
runs-on: ${{ matrix.os }}
5739

@@ -60,31 +42,12 @@ jobs:
6042
- uses: actions/checkout@v2
6143
with:
6244
submodules: recursive
63-
- uses: fiam/arm-none-eabi-gcc@v1
45+
- uses: carlosperate/arm-none-eabi-gcc-action@v1
6446
with:
65-
release: '10-2020-q4' # The arm-none-eabi-gcc release to use.
47+
release: '10.3-2021.07' # The arm-none-eabi-gcc release to use.
6648
- name: setup-riscv-toolchain
67-
run: |
68-
RISCV_TOOLCHAIN_MIRRORS=(\
69-
"http://www.cs.virginia.edu/~bjc8c/archive/gcc-riscv64-unknown-elf-8.3.0-ubuntu.zip" \
70-
"https://alpha.mirror.svc.schuermann.io/files/2023-08-17_gcc-riscv64-unknown-elf-8.3.0-ubuntu.zip"\
71-
)
72-
pushd $HOME
73-
for MIRROR in ${RISCV_TOOLCHAIN_MIRRORS[@]}; do
74-
echo "Fetching RISC-V toolchain from ${MIRROR}..."
75-
wget -Oriscv-toolchain.zip -q "$MIRROR" &&\
76-
(echo "2c82a8f3ac77bf2b24d66abff3aa5e873750c76de24c77e12dae91b9d2f4da27 riscv-toolchain.zip" |\
77-
sha256sum -c)
78-
if [ $? -ne 0 ]; then
79-
echo "WARNING: Fetching RISC-V from mirror $MIRROR failed!" >&2
80-
else
81-
break
82-
fi
83-
done
84-
unzip riscv-toolchain.zip
85-
echo "$HOME/gcc-riscv64-unknown-elf-8.3.0-ubuntu/bin" >> $GITHUB_PATH
86-
popd
49+
run: sudo apt-get install -y gcc-riscv64-unknown-elf
8750
- name: ci-build
88-
run: pushd examples; RISCV=1 ./build_all.sh || exit; popd
51+
run: pushd examples; ./build_all.sh || exit; popd
8952
- name: ci-debug-build
9053
run: pushd examples/blink; make debug RAM_START=0x20004000 FLASH_INIT=0x30051 || exit; popd

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "lvgl/lvgl"]
55
path = lvgl/lvgl
66
url = https://github.com/littlevgl/lvgl.git
7+
[submodule "examples/lora/RadioLib"]
8+
path = examples/lora/RadioLib
9+
url = https://github.com/jgromes/RadioLib.git

AppMakefile.mk

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ include $(TOCK_USERLAND_BASE_DIR)/Configuration.mk
2525
# Helper functions.
2626
include $(TOCK_USERLAND_BASE_DIR)/Helpers.mk
2727

28+
# Targets for fetching pre-compiled libraries.
29+
include $(TOCK_USERLAND_BASE_DIR)/Precompiled.mk
30+
2831
# Include the libtock makefile. Adds rules that will rebuild the core libtock
2932
# library when needed.
3033
include $(TOCK_USERLAND_BASE_DIR)/libtock/Makefile
@@ -104,24 +107,25 @@ $$(BUILDDIR)/$(1):
104107
$$(TRACE_DIR)
105108
$$(Q)mkdir -p $$@
106109

110+
107111
# First step doesn't actually compile, just generate header dependency information
108112
# More info on our approach here: http://stackoverflow.com/questions/97338
109-
$$(BUILDDIR)/$(1)/%.o: %.c | $$(BUILDDIR)/$(1)
113+
$$(BUILDDIR)/$(1)/%.o: %.c | $$(BUILDDIR)/$(1) newlib-$$(NEWLIB_VERSION_$(1))
110114
$$(TRACE_CC)
111115
$$(Q)$$(TOOLCHAIN_$(1))$$(CC_$(1)) $$(CFLAGS) $$(CFLAGS_$(1)) $$(CPPFLAGS) $$(CPPFLAGS_$(1)) -MF"$$(@:.o=.d)" -MG -MM -MP -MT"$$(@:.o=.d)@" -MT"$$@" "$$<"
112116
$$(Q)$$(TOOLCHAIN_$(1))$$(CC_$(1)) $$(CFLAGS) $$(CFLAGS_$(1)) $$(CPPFLAGS) $$(CPPFLAGS_$(1)) -c -o $$@ $$<
113117

114-
$$(BUILDDIR)/$(1)/%.o: %.cc | $$(BUILDDIR)/$(1)
118+
$$(BUILDDIR)/$(1)/%.o: %.cc | $$(BUILDDIR)/$(1) newlib-$$(NEWLIB_VERSION_$(1)) libc++-$$(LIBCPP_VERSION_$(1))
115119
$$(TRACE_CXX)
116120
$$(Q)$$(TOOLCHAIN_$(1))$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(CPPFLAGS_$(1)) -MF"$$(@:.o=.d)" -MG -MM -MP -MT"$$(@:.o=.d)@" -MT"$$@" "$$<"
117121
$$(Q)$$(TOOLCHAIN_$(1))$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(CPPFLAGS_$(1)) -c -o $$@ $$<
118122

119-
$$(BUILDDIR)/$(1)/%.o: %.cpp | $$(BUILDDIR)/$(1)
123+
$$(BUILDDIR)/$(1)/%.o: %.cpp | $$(BUILDDIR)/$(1) newlib-$$(NEWLIB_VERSION_$(1)) libc++-$$(LIBCPP_VERSION_$(1))
120124
$$(TRACE_CXX)
121125
$$(Q)$$(TOOLCHAIN_$(1))$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(CPPFLAGS_$(1)) -MF"$$(@:.o=.d)" -MG -MM -MP -MT"$$(@:.o=.d)@" -MT"$$@" "$$<"
122126
$$(Q)$$(TOOLCHAIN_$(1))$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(CPPFLAGS_$(1)) -c -o $$@ $$<
123127

124-
$$(BUILDDIR)/$(1)/%.o: %.cxx | $$(BUILDDIR)/$(1)
128+
$$(BUILDDIR)/$(1)/%.o: %.cxx | $$(BUILDDIR)/$(1) newlib-$$(NEWLIB_VERSION_$(1)) libc++-$$(LIBCPP_VERSION_$(1))
125129
$$(TRACE_CXX)
126130
$$(Q)$$(TOOLCHAIN_$(1))$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(CPPFLAGS_$(1)) -MF"$$(@:.o=.d)" -MG -MM -MP -MT"$$(@:.o=.d)@" -MT"$$@" "$$<"
127131
$$(Q)$$(TOOLCHAIN_$(1))$$(CXX) $$(CXXFLAGS) $$(CPPFLAGS) $$(CPPFLAGS_$(1)) -c -o $$@ $$<
@@ -157,15 +161,15 @@ $$(BUILDDIR)/$(1)/$(2).custom.ld: $$(LAYOUT) | $$(BUILDDIR)/$(1)
157161
perl -pi -e "s/(SRAM.*ORIGIN[ =]*)([x0-9]*)(,.*LENGTH)/\$$$${1}$(4)\$$$$3/" $$@
158162

159163
# Collect all desired built output.
160-
$$(BUILDDIR)/$(1)/$(2).elf: $$(OBJS_$(1)) $$(LIBS_$(1)) $$(LEGACY_LIBS_$(1)) $$(BUILDDIR)/$(1)/$(2).custom.ld | $$(BUILDDIR)/$(1)
164+
$$(BUILDDIR)/$(1)/$(2).elf: $$(OBJS_$(1)) $$(LIBS_$(1)) $$(LINK_LIBS_$(1)) $$(BUILDDIR)/$(1)/$(2).custom.ld | $$(BUILDDIR)/$(1)
161165
$$(TRACE_LD)
162166
$$(Q)$$(TOOLCHAIN_$(1))$$(CC_$(1)) $$(CFLAGS) $$(CFLAGS_$(1)) $$(CPPFLAGS) $$(CPPFLAGS_$(1)) $$(WLFLAGS) $$(WLFLAGS_$(1))\
163167
-Xlinker --defsym=STACK_SIZE=$$(STACK_SIZE)\
164168
-Xlinker --defsym=APP_HEAP_SIZE=$$(APP_HEAP_SIZE)\
165169
-Xlinker --defsym=KERNEL_HEAP_SIZE=$$(KERNEL_HEAP_SIZE)\
166170
-T $$(BUILDDIR)/$(1)/$(2).custom.ld\
167171
-nostdlib\
168-
-Wl,--start-group $$(OBJS_$(1)) $$(LIBS_$(1)) $$(LEGACY_LIBS_$(1)) $$(LINK_LIBS_$(1)) -Wl,--end-group\
172+
-Wl,--start-group $$(OBJS_$(1)) $$(LIBS_$(1)) $$(LINK_LIBS_$(1)) -Wl,--end-group\
169173
-Wl,-Map=$$(BUILDDIR)/$(1)/$(2).Map\
170174
-o $$@
171175

@@ -244,15 +248,15 @@ else
244248
endif
245249

246250
# Step 2: Create a new ELF with the layout that matches what's loaded
247-
$$(BUILDDIR)/$(1)/$(2).userland_debug.elf: $$(OBJS_$(1)) $$(LIBS_$(1)) $$(LEGACY_LIBS_$(1)) $$(BUILDDIR)/$(1)/$(2).userland_debug.ld | $$(BUILDDIR)/$(1)
251+
$$(BUILDDIR)/$(1)/$(2).userland_debug.elf: $$(OBJS_$(1)) $$(LIBS_$(1)) $$(LINK_LIBS_$(1)) $$(BUILDDIR)/$(1)/$(2).userland_debug.ld | $$(BUILDDIR)/$(1)
248252
$$(TRACE_LD)
249253
$$(Q)$$(TOOLCHAIN_$(1))$$(CC_$(1)) $$(CFLAGS) $$(CFLAGS_$(1)) $$(CPPFLAGS) $$(CPPFLAGS_$(1)) $$(WLFLAGS) $$(WLFLAGS_$(1))\
250254
-Xlinker --defsym=STACK_SIZE=$$(STACK_SIZE)\
251255
-Xlinker --defsym=APP_HEAP_SIZE=$$(APP_HEAP_SIZE)\
252256
-Xlinker --defsym=KERNEL_HEAP_SIZE=$$(KERNEL_HEAP_SIZE)\
253257
-T $$(BUILDDIR)/$(1)/$(2).userland_debug.ld\
254258
-nostdlib\
255-
-Wl,--start-group $$(OBJS_$(1)) $$(LIBS_$(1)) $$(LEGACY_LIBS_$(1)) $$(LINK_LIBS_$(1)) -Wl,--end-group\
259+
-Wl,--start-group $$(OBJS_$(1)) $$(LIBS_$(1)) $$(LINK_LIBS_$(1)) -Wl,--end-group\
256260
-Wl,-Map=$$(BUILDDIR)/$(1)/$(2).Map\
257261
-o $$@
258262

0 commit comments

Comments
 (0)