Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Install ARM Toolchain
uses: carlosperate/arm-none-eabi-gcc-action@v1.8.1
uses: carlosperate/arm-none-eabi-gcc-action@v1.11.0
with:
release: "10.3-2021.10"
release: "14.3.Rel1"
- name: Setup Python
uses: actions/setup-python@v5
with:
Expand All @@ -23,4 +23,4 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Build Project
run: pros make clean all
run: pros make clean all
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ INCDIR=$(ROOT)/include

WARNFLAGS+=
EXTRA_CFLAGS=
EXTRA_CXXFLAGS=
EXTRA_CXXFLAGS=-Wno-deprecated-enum-enum-conversion

# Set to 1 to enable hot/cold linking
USE_PACKAGE:=1
Expand Down
19 changes: 10 additions & 9 deletions common.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ARCHTUPLE=arm-none-eabi-
DEVICE=VEX EDR V5

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

Expand All @@ -20,8 +20,8 @@ WARNFLAGS+=-Wno-psabi
SPACE := $() $()
COMMA := ,

C_STANDARD?=gnu11
CXX_STANDARD?=gnu++20
C_STANDARD?=gnu2x
CXX_STANDARD?=gnu++23

DEPDIR := .d
$(shell mkdir -p $(DEPDIR))
Expand All @@ -34,7 +34,7 @@ LIBRARIES+=$(wildcard $(FWDIR)/*.a)
EXCLUDE_COLD_LIBRARIES+=$(FWDIR)/libc.a $(FWDIR)/libm.a
COLD_LIBRARIES=$(filter-out $(EXCLUDE_COLD_LIBRARIES), $(LIBRARIES))
wlprefix=-Wl,$(subst $(SPACE),$(COMMA),$1)
LNK_FLAGS=--gc-sections --start-group $(strip $(LIBRARIES)) -lgcc -lstdc++ --end-group -T$(FWDIR)/v5-common.ld
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

ASMFLAGS=$(MFLAGS) $(WARNFLAGS)
CFLAGS=$(MFLAGS) $(CPPFLAGS) $(WARNFLAGS) $(GCCFLAGS) --std=$(C_STANDARD)
Expand Down Expand Up @@ -188,14 +188,14 @@ quick: $(DEFAULT_BIN)

all: clean $(DEFAULT_BIN)

clean:
clean::
@echo Cleaning project
-$Drm -rf $(BINDIR)
-$Drm -rf $(DEPDIR)

ifeq ($(IS_LIBRARY),1)
ifeq ($(LIBNAME),libbest)
$(errror "You should rename your library! libbest is the default library name and should be changed")
$(error "You should rename your library! libbest is the default library name and should be changed")
endif

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

$(LIBAR): $(call GETALLOBJ,$(EXCLUDE_SRC_FROM_LIB)) $(EXTRA_LIB_DEPS)
-$Dmkdir $(BINDIR)
-$Drm -f $@
$(call test_output_2,Creating $@ ,$(AR) rcs $@ $^, $(DONE_STRING))

.PHONY: library
library: $(LIBAR)

.PHONY: template
template: clean-template $(LIBAR)
template:: clean-template $(LIBAR)
$Dpros c create-template . $(LIBNAME) $(VERSION) $(foreach file,$(TEMPLATE_FILES) $(LIBAR),--system "$(file)") --target v5 $(CREATE_TEMPLATE_FLAGS)
endif

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

define c_rule
$(BINDIR)/%.$1.o: $(SRCDIR)/%.$1
$(BINDIR)/%.$1.o: $(SRCDIR)/%.$1 $(DEPDIR)/$(basename $1).d
$(BINDIR)/%.$1.o: $(SRCDIR)/%.$1 $(DEPDIR)/$(basename %).d
$(VV)mkdir -p $$(dir $$@)
$(MAKEDEPFOLDER)
$$(call test_output_2,Compiled $$< ,$(CC) -c $(INCLUDE) -iquote"$(INCDIR)/$$(dir $$*)" $(CFLAGS) $(EXTRA_CFLAGS) $(DEPFLAGS) -o $$@ $$<,$(OK_STRING))
Expand Down Expand Up @@ -305,4 +306,4 @@ cxx-sysroot:
$(DEPDIR)/%.d: ;
.PRECIOUS: $(DEPDIR)/%.d

include $(wildcard $(patsubst $(SRCDIR)/%,$(DEPDIR)/%.d,$(CSRC) $(CXXSRC)))
include $(wildcard $(patsubst $(SRCDIR)/%,$(DEPDIR)/%.d,$(CSRC) $(CXXSRC)))
Binary file modified firmware/libc.a
Binary file not shown.
Binary file modified firmware/liblvgl.a
Binary file not shown.
Binary file modified firmware/libm.a
Binary file not shown.
Binary file modified firmware/libpros.a
Binary file not shown.
47 changes: 5 additions & 42 deletions firmware/v5-common.ld
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,6 @@ SECTIONS
*(.gcc_except_table)
} > RAM

.mmu_tbl (ALIGN(16384)) : {
__mmu_tbl_start = .;
*(.mmu_tbl)
__mmu_tbl_end = .;
} > RAM

.ARM.exidx : {
__exidx_start = .;
*(.ARM.exidx*)
Expand Down Expand Up @@ -166,11 +160,9 @@ SECTIONS
__fini_array_end = .;
} > RAM

.ARM.attributes : {
__ARM.attributes_start = .;
*(.ARM.attributes)
__ARM.attributes_end = .;
} > RAM
/DISCARD/ : {
*(.ARM.attributes*)
}

.sdata : {
__sdata_start = .;
Expand Down Expand Up @@ -228,36 +220,7 @@ _SDA2_BASE_ = __sdata2_start + ((__sbss2_end - __sdata2_start) / 2 );
_heap_end = .;
HeapLimit = .;
} > HEAP

.stack (NOLOAD) : {
. = ALIGN(16);
_stack_end = .;
. += _STACK_SIZE;
. = ALIGN(16);
_stack = .;
__stack = _stack;
. = ALIGN(16);
_irq_stack_end = .;
. += _IRQ_STACK_SIZE;
. = ALIGN(16);
__irq_stack = .;
_supervisor_stack_end = .;
. += _SUPERVISOR_STACK_SIZE;
. = ALIGN(16);
__supervisor_stack = .;
_abort_stack_end = .;
. += _ABORT_STACK_SIZE;
. = ALIGN(16);
__abort_stack = .;
_fiq_stack_end = .;
. += _FIQ_STACK_SIZE;
. = ALIGN(16);
__fiq_stack = .;
_undef_stack_end = .;
. += _UNDEF_STACK_SIZE;
. = ALIGN(16);
__undef_stack = .;
} > COLD_MEMORY

/* There are no sections for the stack. This is intentional, since VEXOs sets up a stack before
starting the program, and FreeRTOS task stacks are dynamically allocated. */
_end = .;
}
9 changes: 3 additions & 6 deletions include/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* This file should not be modified by users, since it gets replaced whenever
* a kernel upgrade occurs.
*
* \copyright Copyright (c) 2017-2023, Purdue University ACM SIGBots.
* \copyright Copyright (c) 2017-2024, Purdue University ACM SIGBots.
* All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
Expand Down Expand Up @@ -39,12 +39,8 @@
#include <unistd.h>
#endif /* __cplusplus */

#define PROS_VERSION_MAJOR 4
#define PROS_VERSION_MINOR 0
#define PROS_VERSION_PATCH 7
#define PROS_VERSION_STRING "4.0.7"

#include "pros/adi.h"
#include "pros/ai_vision.h"
#include "pros/colors.h"
#include "pros/device.h"
#include "pros/distance.h"
Expand All @@ -64,6 +60,7 @@

#ifdef __cplusplus
#include "pros/adi.hpp"
#include "pros/ai_vision.hpp"
#include "pros/colors.hpp"
#include "pros/device.hpp"
#include "pros/distance.hpp"
Expand Down
Loading