Skip to content

Commit

Permalink
kernel upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
sy1vi3 committed Jan 26, 2023
1 parent e9df6b5 commit c4a5fd0
Show file tree
Hide file tree
Showing 45 changed files with 2,886 additions and 327 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
*.elf

# PROS
.cache/
bin/
.vscode/
.cache/
compile_commands.json
temp.log
temp.errors
Expand Down
Binary file removed [email protected]
Binary file not shown.
Binary file added [email protected]
Binary file not shown.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ EXCLUDE_COLD_LIBRARIES:=
IS_LIBRARY:=1
# TODO: CHANGE THIS!
LIBNAME:=EZ-Template
VERSION:=2.1.1
VERSION:=2.1.2
# EXCLUDE_SRC_FROM_LIB= $(SRCDIR)/unpublishedfile.c
# this line excludes opcontrol.c and similar files
EXCLUDE_SRC_FROM_LIB+=$(foreach file, $(SRCDIR)/autons $(SRCDIR)/main,$(foreach cext,$(CEXTS),$(file).$(cext)) $(foreach cxxext,$(CXXEXTS),$(file).$(cxxext)))
Expand Down
14 changes: 11 additions & 3 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARCHTUPLE=arm-none-eabi-
DEVICE=VEX EDR V5

MFLAGS=-mcpu=cortex-a9 -mfpu=neon-fp16 -mfloat-abi=softfp -Os -g
CPPFLAGS=-D_POSIX_THREADS -D_UNIX98_THREAD_MUTEX_ATTRIBUTES
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

WARNFLAGS+=-Wno-psabi
Expand Down Expand Up @@ -227,7 +227,7 @@ $(COLD_BIN): $(COLD_ELF)
$(COLD_ELF): $(COLD_LIBRARIES)
$(VV)mkdir -p $(dir $@)
$(call test_output_2,Creating cold package with $(ARCHIVE_TEXT_LIST) ,$(LD) $(LDFLAGS) $(call wlprefix,--gc-keep-exported --whole-archive $^ -lstdc++ --no-whole-archive) $(call wlprefix,-T$(FWDIR)/v5.ld $(LNK_FLAGS) -o $@),$(OK_STRING))
$(call test_output_2,Stripping cold package ,$(OBJCOPY) --strip-symbol=install_hot_table --strip-symbol=__libc_init_array --strip-symbol=_PROS_COMPILE_DIRECTORY --strip-symbol=_PROS_COMPILE_TIMESTAMP $@ $@, $(DONE_STRING))
$(call test_output_2,Stripping cold package ,$(OBJCOPY) --strip-symbol=install_hot_table --strip-symbol=__libc_init_array --strip-symbol=_PROS_COMPILE_DIRECTORY --strip-symbol=_PROS_COMPILE_TIMESTAMP --strip-symbol=_PROS_COMPILE_TIMESTAMP_INT $@ $@, $(DONE_STRING))
@echo Section sizes:
-$(VV)$(SIZETOOL) $(SIZEFLAGS) $@ $(SIZES_SED) $(SIZES_NUMFMT)

Expand Down Expand Up @@ -272,7 +272,15 @@ $(VV)mkdir -p $(dir $(LDTIMEOBJ))
@# Pipe a line of code defining _PROS_COMPILE_TOOLSTAMP and _PROS_COMPILE_DIRECTORY into GCC,
@# which allows compilation from stdin. We define _PROS_COMPILE_DIRECTORY using a command line-defined macro
@# which is the pwd | tail bit, which will truncate the path to the last 23 characters
$(call test_output_2,Adding timestamp ,echo 'char const * const _PROS_COMPILE_TIMESTAMP = __DATE__ " " __TIME__; char const * const _PROS_COMPILE_DIRECTORY = "$(shell pwd | tail -c 23)";' | $(CC) -c -x c $(CFLAGS) $(EXTRA_CFLAGS) -o $(LDTIMEOBJ) -,$(OK_STRING))
@#
@# const int _PROS_COMPILE_TIMESTAMP_INT = $(( $(date +%s) - $(date +%z) * 3600 ))
@# char const * const _PROS_COMPILE_TIEMSTAMP = __DATE__ " " __TIME__
@# char const * const _PROS_COMPILE_DIRECTORY = "$(shell pwd | tail -c 23)";
@#
@# The shell command $$(($$(date +%s)+($$(date +%-z)/100*3600))) fetches the current
@# unix timestamp, and then adds the UTC timezone offset to account for time zones.

$(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 = "$(shell pwd | tail -c 23)";' | $(CC) -c -x c $(CFLAGS) $(EXTRA_CFLAGS) -o $(LDTIMEOBJ) -,$(OK_STRING))
endef

# these rules are for build-compile-commands, which just print out sysroot information
Expand Down
Binary file modified firmware/libpros.a
Binary file not shown.
56 changes: 28 additions & 28 deletions firmware/v5-common.ld
Original file line number Diff line number Diff line change
Expand Up @@ -21,52 +21,52 @@ SECTIONS
*(.gnu.linkonce.t.*)
*(.plt)
*(.gnu_warning)
*(.gcc_execpt_table)
*(.gcc_except_table)
*(.glue_7)
*(.glue_7t)
*(.vfp11_veneer)
*(.ARM.extab)
*(.gnu.linkonce.armextab.*)
} > MEMORY
} > RAM

.init : {
KEEP (*(.init))
} > MEMORY
} > RAM

.fini : {
KEEP (*(.fini))
} > MEMORY
} > RAM

.rodata : {
__rodata_start = .;
*(.rodata)
*(.rodata.*)
*(.gnu.linkonce.r.*)
__rodata_end = .;
} > MEMORY
} > RAM

.rodata1 : {
__rodata1_start = .;
*(.rodata1)
*(.rodata1.*)
__rodata1_end = .;
} > MEMORY
} > RAM

.sdata2 : {
__sdata2_start = .;
*(.sdata2)
*(.sdata2.*)
*(.gnu.linkonce.s2.*)
__sdata2_end = .;
} > MEMORY
} > RAM

.sbss2 : {
__sbss2_start = .;
*(.sbss2)
*(.sbss2.*)
*(.gnu.linkonce.sb2.*)
__sbss2_end = .;
} > MEMORY
} > RAM

.data : {
__data_start = .;
Expand All @@ -77,18 +77,18 @@ SECTIONS
*(.got)
*(.got.plt)
__data_end = .;
} > MEMORY
} > RAM

.data1 : {
__data1_start = .;
*(.data1)
*(.data1.*)
__data1_end = .;
} > MEMORY
} > RAM

.got : {
*(.got)
} > MEMORY
} > RAM

.ctors : {
__CTOR_LIST__ = .;
Expand All @@ -99,7 +99,7 @@ SECTIONS
KEEP (*(.ctors))
__CTOR_END__ = .;
___CTORS_END___ = .;
} > MEMORY
} > RAM

.dtors : {
__DTOR_LIST__ = .;
Expand All @@ -110,99 +110,99 @@ SECTIONS
KEEP (*(.dtors))
__DTOR_END__ = .;
___DTORS_END___ = .;
} > MEMORY
} > RAM

.fixup : {
__fixup_start = .;
*(.fixup)
__fixup_end = .;
} > MEMORY
} > RAM

.eh_frame : {
*(.eh_frame)
} > MEMORY
} > RAM

.eh_framehdr : {
__eh_framehdr_start = .;
*(.eh_framehdr)
__eh_framehdr_end = .;
} > MEMORY
} > RAM

.gcc_except_table : {
*(.gcc_except_table)
} > MEMORY
} > RAM

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

.ARM.exidx : {
__exidx_start = .;
*(.ARM.exidx*)
*(.gnu.linkonce.armexidix.*.*)
__exidx_end = .;
} > MEMORY
} > RAM

.preinit_array : {
__preinit_array_start = .;
KEEP (*(SORT(.preinit_array.*)))
KEEP (*(.preinit_array))
__preinit_array_end = .;
} > MEMORY
} > RAM

.init_array : {
__init_array_start = .;
KEEP (*(SORT(.init_array.*)))
KEEP (*(.init_array))
__init_array_end = .;
} > MEMORY
} > RAM

.fini_array : {
__fini_array_start = .;
KEEP (*(SORT(.fini_array.*)))
KEEP (*(.fini_array))
__fini_array_end = .;
} > MEMORY
} > RAM

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

.sdata : {
__sdata_start = .;
*(.sdata)
*(.sdata.*)
*(.gnu.linkonce.s.*)
__sdata_end = .;
} > MEMORY
} > RAM

.sbss (NOLOAD) : {
__sbss_start = .;
*(.sbss)
*(.sbss.*)
*(.gnu.linkonce.sb.*)
__sbss_end = .;
} > MEMORY
} > RAM

.tdata : {
__tdata_start = .;
*(.tdata)
*(.tdata.*)
*(.gnu.linkonce.td.*)
__tdata_end = .;
} > MEMORY
} > RAM

.tbss : {
__tbss_start = .;
*(.tbss)
*(.tbss.*)
*(.gnu.linkonce.tb.*)
__tbss_end = .;
} > MEMORY
} > RAM

.bss (NOLOAD) : {
__bss_start = .;
Expand All @@ -211,7 +211,7 @@ SECTIONS
*(.gnu.linkonce.b.*)
*(COMMON)
__bss_end = .;
} > MEMORY
} > RAM

_SDA_BASE_ = __sdata_start + ((__sbss_end - __sdata_start) / 2 );

Expand Down
2 changes: 1 addition & 1 deletion firmware/v5-hot.ld
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ MEMORY
HOT_MEMORY : ORIGIN = start_of_hot_mem, LENGTH = _HOT_MEM_SIZE /* Just over 8 MB */
}

REGION_ALIAS("MEMORY", HOT_MEMORY);
REGION_ALIAS("RAM", HOT_MEMORY);

ENTRY(install_hot_table)
2 changes: 1 addition & 1 deletion firmware/v5.ld
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ MEMORY
HOT_MEMORY : ORIGIN = start_of_hot_mem, LENGTH = _HOT_MEM_SIZE /* Just over 8 MB */
}

REGION_ALIAS("MEMORY", COLD_MEMORY);
REGION_ALIAS("RAM", COLD_MEMORY);

ENTRY(vexStartup)
14 changes: 7 additions & 7 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 (c) 2017-2021, Purdue University ACM SIGBots.
* Copyright (c) 2017-2022, Purdue University ACM SIGBots.
* All rights reserved.
*
* This Source Code Form is subject to the terms of the Mozilla Public
Expand Down Expand Up @@ -40,19 +40,18 @@
#endif /* __cplusplus */

#define PROS_VERSION_MAJOR 3
#define PROS_VERSION_MINOR 5
#define PROS_VERSION_PATCH 4
#define PROS_VERSION_STRING "3.5.4"

#define PROS_ERR (INT32_MAX)
#define PROS_ERR_F (INFINITY)
#define PROS_VERSION_MINOR 7
#define PROS_VERSION_PATCH 3
#define PROS_VERSION_STRING "3.7.3"

#include "pros/adi.h"
#include "pros/colors.h"
#include "pros/distance.h"
#include "pros/error.h"
#include "pros/ext_adi.h"
#include "pros/gps.h"
#include "pros/imu.h"
#include "pros/link.h"
#include "pros/llemu.h"
#include "pros/misc.h"
#include "pros/motors.h"
Expand All @@ -75,6 +74,7 @@
#include "pros/rtos.hpp"
#include "pros/screen.hpp"
#include "pros/vision.hpp"
#include "pros/link.hpp"
#endif

#endif // _PROS_API_H_
Loading

0 comments on commit c4a5fd0

Please sign in to comment.