Skip to content

Commit 9ba52d8

Browse files
committed
build: ⬆️ upgrade kernel and liblvgl
1 parent 48e2567 commit 9ba52d8

606 files changed

Lines changed: 110246 additions & 15724 deletions

File tree

Some content is hidden

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

common.mk

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ARCHTUPLE=arm-none-eabi-
22
DEVICE=VEX EDR V5
33

4-
MFLAGS=-mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=softfp -Os -g
4+
MFLAGS=-mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=hard -Os -g -mthumb
55
CPPFLAGS=-D_POSIX_THREADS -D_UNIX98_THREAD_MUTEX_ATTRIBUTES -D_POSIX_TIMERS -D_POSIX_MONOTONIC_CLOCK
66
GCCFLAGS=-ffunction-sections -fdata-sections -fdiagnostics-color -funwind-tables
77

@@ -20,8 +20,8 @@ WARNFLAGS+=-Wno-psabi
2020
SPACE := $() $()
2121
COMMA := ,
2222

23-
C_STANDARD?=gnu11
24-
CXX_STANDARD?=gnu++20
23+
C_STANDARD?=gnu23
24+
CXX_STANDARD?=gnu++26
2525

2626
DEPDIR := .d
2727
$(shell mkdir -p $(DEPDIR))
@@ -34,7 +34,7 @@ LIBRARIES+=$(wildcard $(FWDIR)/*.a)
3434
EXCLUDE_COLD_LIBRARIES+=$(FWDIR)/libc.a $(FWDIR)/libm.a
3535
COLD_LIBRARIES=$(filter-out $(EXCLUDE_COLD_LIBRARIES), $(LIBRARIES))
3636
wlprefix=-Wl,$(subst $(SPACE),$(COMMA),$1)
37-
LNK_FLAGS=--gc-sections --start-group $(strip $(LIBRARIES)) -lgcc -lstdc++ --end-group -T$(FWDIR)/v5-common.ld
37+
LNK_FLAGS=--gc-sections --start-group $(strip $(LIBRARIES)) -lgcc -lstdc++ --end-group -T$(FWDIR)/v5-common.ld --no-warn-rwx-segments --sort-section=alignment --sort-common
3838

3939
ASMFLAGS=$(MFLAGS) $(WARNFLAGS)
4040
CFLAGS=$(MFLAGS) $(CPPFLAGS) $(WARNFLAGS) $(GCCFLAGS) --std=$(C_STANDARD)
@@ -188,14 +188,14 @@ quick: $(DEFAULT_BIN)
188188

189189
all: clean $(DEFAULT_BIN)
190190

191-
clean:
191+
clean::
192192
@echo Cleaning project
193193
-$Drm -rf $(BINDIR)
194194
-$Drm -rf $(DEPDIR)
195195

196196
ifeq ($(IS_LIBRARY),1)
197197
ifeq ($(LIBNAME),libbest)
198-
$(errror "You should rename your library! libbest is the default library name and should be changed")
198+
$(error "You should rename your library! libbest is the default library name and should be changed")
199199
endif
200200

201201
LIBAR=$(BINDIR)/$(LIBNAME).a
@@ -206,14 +206,15 @@ clean-template:
206206
-$Drm -rf $(TEMPLATE_DIR)
207207

208208
$(LIBAR): $(call GETALLOBJ,$(EXCLUDE_SRC_FROM_LIB)) $(EXTRA_LIB_DEPS)
209+
-$Dmkdir $(BINDIR)
209210
-$Drm -f $@
210211
$(call test_output_2,Creating $@ ,$(AR) rcs $@ $^, $(DONE_STRING))
211212

212213
.PHONY: library
213214
library: $(LIBAR)
214215

215216
.PHONY: template
216-
template: clean-template $(LIBAR)
217+
template:: clean-template $(LIBAR)
217218
$Dpros c create-template . $(LIBNAME) $(VERSION) $(foreach file,$(TEMPLATE_FILES) $(LIBAR),--system "$(file)") --target v5 $(CREATE_TEMPLATE_FLAGS)
218219
endif
219220

@@ -262,7 +263,7 @@ $(foreach asmext,$(ASMEXTS),$(eval $(call asm_rule,$(asmext))))
262263

263264
define c_rule
264265
$(BINDIR)/%.$1.o: $(SRCDIR)/%.$1
265-
$(BINDIR)/%.$1.o: $(SRCDIR)/%.$1 $(DEPDIR)/$(basename $1).d
266+
$(BINDIR)/%.$1.o: $(SRCDIR)/%.$1 $(DEPDIR)/$(basename %).d
266267
$(VV)mkdir -p $$(dir $$@)
267268
$(MAKEDEPFOLDER)
268269
$$(call test_output_2,Compiled $$< ,$(CC) -c $(INCLUDE) -iquote"$(INCDIR)/$$(dir $$*)" $(CFLAGS) $(EXTRA_CFLAGS) $(DEPFLAGS) -o $$@ $$<,$(OK_STRING))
@@ -288,12 +289,12 @@ $(VV)mkdir -p $(dir $(LDTIMEOBJ))
288289
@#
289290
@# const int _PROS_COMPILE_TIMESTAMP_INT = $(( $(date +%s) - $(date +%z) * 3600 ))
290291
@# char const * const _PROS_COMPILE_TIEMSTAMP = __DATE__ " " __TIME__
291-
@# char const * const _PROS_COMPILE_DIRECTORY = "$(shell pwd | tail -c 23)";
292+
@# char const * const _PROS_COMPILE_DIRECTORY = "$(shell pwd | tail -c23)";
292293
@#
293294
@# The shell command $$(($$(date +%s)+($$(date +%-z)/100*3600))) fetches the current
294295
@# unix timestamp, and then adds the UTC timezone offset to account for time zones.
295296

296-
$(call test_output_2,Adding timestamp ,echo 'const int _PROS_COMPILE_TIMESTAMP_INT = $(shell echo $$(($$(date +%s)+($$(date +%-z)/100*3600)))); char const * const _PROS_COMPILE_TIMESTAMP = __DATE__ " " __TIME__; char const * const _PROS_COMPILE_DIRECTORY = "$(wildcard $(shell pwd | tail -c 23))";' | $(CC) -c -x c $(CFLAGS) $(EXTRA_CFLAGS) -o $(LDTIMEOBJ) -,$(OK_STRING))
297+
$(call test_output_2,Adding timestamp ,echo 'const int _PROS_COMPILE_TIMESTAMP_INT = $(shell echo $$(($$(date +%s)+($$(date +%-z)/100*3600)))); char const * const _PROS_COMPILE_TIMESTAMP = __DATE__ " " __TIME__; char const * const _PROS_COMPILE_DIRECTORY = "$(wildcard $(shell pwd | tail -c23))";' | $(CC) -c -x c $(CFLAGS) $(EXTRA_CFLAGS) -o $(LDTIMEOBJ) -,$(OK_STRING))
297298
endef
298299

299300
# these rules are for build-compile-commands, which just print out sysroot information
@@ -305,4 +306,4 @@ cxx-sysroot:
305306
$(DEPDIR)/%.d: ;
306307
.PRECIOUS: $(DEPDIR)/%.d
307308

308-
include $(wildcard $(patsubst $(SRCDIR)/%,$(DEPDIR)/%.d,$(CSRC) $(CXXSRC)))
309+
include $(wildcard $(patsubst $(SRCDIR)/%,$(DEPDIR)/%.d,$(CSRC) $(CXXSRC)))

firmware/libc.a

-190 KB
Binary file not shown.

firmware/liblvgl.a

-194 KB
Binary file not shown.

firmware/libm.a

-168 KB
Binary file not shown.

firmware/libpros.a

42.5 KB
Binary file not shown.

firmware/v5-common.ld

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -132,12 +132,6 @@ SECTIONS
132132
*(.gcc_except_table)
133133
} > RAM
134134

135-
.mmu_tbl (ALIGN(16384)) : {
136-
__mmu_tbl_start = .;
137-
*(.mmu_tbl)
138-
__mmu_tbl_end = .;
139-
} > RAM
140-
141135
.ARM.exidx : {
142136
__exidx_start = .;
143137
*(.ARM.exidx*)
@@ -166,11 +160,9 @@ SECTIONS
166160
__fini_array_end = .;
167161
} > RAM
168162

169-
.ARM.attributes : {
170-
__ARM.attributes_start = .;
171-
*(.ARM.attributes)
172-
__ARM.attributes_end = .;
173-
} > RAM
163+
/DISCARD/ : {
164+
*(.ARM.attributes*)
165+
}
174166

175167
.sdata : {
176168
__sdata_start = .;
@@ -228,36 +220,7 @@ _SDA2_BASE_ = __sdata2_start + ((__sbss2_end - __sdata2_start) / 2 );
228220
_heap_end = .;
229221
HeapLimit = .;
230222
} > HEAP
231-
232-
.stack (NOLOAD) : {
233-
. = ALIGN(16);
234-
_stack_end = .;
235-
. += _STACK_SIZE;
236-
. = ALIGN(16);
237-
_stack = .;
238-
__stack = _stack;
239-
. = ALIGN(16);
240-
_irq_stack_end = .;
241-
. += _IRQ_STACK_SIZE;
242-
. = ALIGN(16);
243-
__irq_stack = .;
244-
_supervisor_stack_end = .;
245-
. += _SUPERVISOR_STACK_SIZE;
246-
. = ALIGN(16);
247-
__supervisor_stack = .;
248-
_abort_stack_end = .;
249-
. += _ABORT_STACK_SIZE;
250-
. = ALIGN(16);
251-
__abort_stack = .;
252-
_fiq_stack_end = .;
253-
. += _FIQ_STACK_SIZE;
254-
. = ALIGN(16);
255-
__fiq_stack = .;
256-
_undef_stack_end = .;
257-
. += _UNDEF_STACK_SIZE;
258-
. = ALIGN(16);
259-
__undef_stack = .;
260-
} > COLD_MEMORY
261-
223+
/* There are no sections for the stack. This is intentional, since VEXOs sets up a stack before
224+
starting the program, and FreeRTOS task stacks are dynamically allocated. */
262225
_end = .;
263226
}

include/api.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* This file should not be modified by users, since it gets replaced whenever
99
* a kernel upgrade occurs.
1010
*
11-
* \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots.
11+
* \copyright Copyright (c) 2017-2024, Purdue University ACM SIGBots.
1212
* All rights reserved.
1313
*
1414
* This Source Code Form is subject to the terms of the Mozilla Public
@@ -22,7 +22,6 @@
2222
#ifdef __cplusplus
2323
#include <cerrno>
2424
#include <cmath>
25-
#include <cstdbool>
2625
#include <cstddef>
2726
#include <cstdint>
2827
#include <cstdio>
@@ -39,13 +38,8 @@
3938
#include <unistd.h>
4039
#endif /* __cplusplus */
4140

42-
#define PROS_VERSION_MAJOR 4
43-
#define PROS_VERSION_MINOR 1
44-
#define PROS_VERSION_PATCH 1
45-
#define PROS_VERSION_STRING "4.1.1"
46-
47-
4841
#include "pros/adi.h"
42+
#include "pros/ai_vision.h"
4943
#include "pros/colors.h"
5044
#include "pros/device.h"
5145
#include "pros/distance.h"
@@ -65,6 +59,7 @@
6559

6660
#ifdef __cplusplus
6761
#include "pros/adi.hpp"
62+
#include "pros/ai_vision.hpp"
6863
#include "pros/colors.hpp"
6964
#include "pros/device.hpp"
7065
#include "pros/distance.hpp"

0 commit comments

Comments
 (0)