Skip to content

Commit

Permalink
Merge pull request #274 from vanvught/development
Browse files Browse the repository at this point in the history
Published
  • Loading branch information
vanvught authored Jan 13, 2024
2 parents 8e421ea + eb86c2e commit 99e3f1e
Show file tree
Hide file tree
Showing 1,112 changed files with 38,700 additions and 18,738 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ e131.txt
osc.txt
*.MacOS
#
lib-bob/examples/si5351a
linux_rpi_artipprog/linux_rpi_artipprog
*.gz
#
*/sofware_version_id.h
Expand All @@ -107,4 +105,5 @@ linux_osc/linux_osc

lib-nextion
lib-node
lib-eve

4 changes: 2 additions & 2 deletions esp8266_rtos_sdk_rpi/.settings/language.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" console="false" env-hash="1369457455798428366" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings MinGW" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.managedbuilder.internal.language.settings.providers.GCCBuiltinSpecsDetectorMinGW" console="false" env-hash="1915536111038048665" id="org.eclipse.cdt.managedbuilder.core.GCCBuiltinSpecsDetectorMinGW" keep-relative-paths="false" name="CDT GCC Built-in Compiler Settings MinGW" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
<provider-reference id="org.eclipse.cdt.managedbuilder.core.MBSLanguageSettingsProvider" ref="shared-provider"/>
</extension>
</configuration>
</project>
</project>
2 changes: 1 addition & 1 deletion firmware-template-bcm/Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ LIBS+=network properties device hal c++ debug c bcm2835 arm
DEFINES:=$(addprefix -D,$(DEFINES))

# The variable for the firmware include directories
INCDIRS=../include $(wildcard ./include) $(wildcard ./*/include)
INCDIRS=../include ../lib-configstore/include $(wildcard ./include) $(wildcard ./*/include)
INCDIRS:=$(addprefix -I,$(INCDIRS))

# The variable for the libraries include directory
Expand Down
2 changes: 1 addition & 1 deletion firmware-template-bcm/lib/Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ SRCDIR=src src/rpi $(EXTRA_SRCDIR)
SRCDIR+=src/debug
#endif

INCLUDES:=-I./include -I../include -I../lib-hal/include -I../lib-bcm2835/include -I../lib-arm/include -I../lib-debug/include
INCLUDES:=-I./include -I../include -I../lib-configstore/include -I../lib-hal/include -I../lib-bcm2835/include -I../lib-arm/include -I../lib-debug/include
INCLUDES+=$(addprefix -I,$(EXTRA_INCLUDES))

DEFINES:=$(addprefix -D,$(DEFINES))
Expand Down
11 changes: 6 additions & 5 deletions firmware-template-h3/Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ LD = $(PREFIX)ld
AR = $(PREFIX)ar
GZIP = gzip

$(info [${CURDIR}])

PLATFORM?=ORANGE_PI
CONSOLE?=

Expand Down Expand Up @@ -50,9 +52,11 @@ ifneq ($(findstring _TIME_STAMP_YEAR_,$(DEFINES)), _TIME_STAMP_YEAR_)
DEFINES+=-D_TIME_STAMP_YEAR_=$(shell date +"%Y") -D_TIME_STAMP_MONTH_=$(shell date +"%-m") -D_TIME_STAMP_DAY_=$(shell date +"%-d")
endif

DEFINES+=-DBARE_METAL -DH3
DEFINES+=-DPHY_TYPE=PHY_GENERIC
DEFINES+=-DENABLE_TFTP_SERVER -D__FPU_PRESENT=1
DEFINES+=-DCONFIG_MDNS_DOMAIN_REVERSE
DEFINES+=-DISABLE_INTERNAL_RTC

ifneq ($(findstring CONFIG_STORE_USE_SPI,$(DEFINES)), CONFIG_STORE_USE_SPI)
DEFINES+=-DCONFIG_STORE_USE_SPI
Expand All @@ -64,9 +68,6 @@ ifeq ($(findstring ARTNET_VERSION=4,$(DEFINES)),ARTNET_VERSION=4)
endif
endif

#DEFINES+=-DDEBUG_I2C
#DEFINES+=-DDEBUG_STACK

# The variable for the firmware include directories
INCDIRS+=../include $(wildcard ./include) $(wildcard ./*/include) ../firmware-template-h3/include
INCDIRS:=$(addprefix -I,$(INCDIRS))
Expand All @@ -87,7 +88,7 @@ LIBDEP=$(addprefix ../lib-,$(LIBS))

$(info [${LIBDEP}])

COPS=-DBARE_METAL -DH3 -D$(PLATFORM) $(DEFINES)
COPS=-D$(PLATFORM) $(DEFINES)
COPS+=$(INCDIRS) $(LIBINCDIRS) $(addprefix -I,$(EXTRA_INCLUDES))
COPS+=-mfpu=neon-vfpv4 -mcpu=cortex-a7 -mfloat-abi=hard -mhard-float
COPS+=-nostartfiles -ffreestanding -nostdlib -fprefetch-loop-arrays
Expand Down Expand Up @@ -131,7 +132,6 @@ all : builddirs prerequisites $(TARGET)

builddirs:
mkdir -p $(BUILD_DIRS)
[ -f generate_sofware_version_id.sh ] && chmod u+x generate_sofware_version_id.sh || true

.PHONY: clean

Expand All @@ -144,6 +144,7 @@ clean: $(LIBDEP)
rm -f $(SUFFIX).uImage
rm -f $(SUFFIX).uImage.gz
rm -f build$(BUILD_TXT).txt
rm -f include/sofware_version_id.h

#
# Libraries
Expand Down
7 changes: 4 additions & 3 deletions firmware-template-h3/lib/Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ AS = $(CC)
LD = $(PREFIX)ld
AR = $(PREFIX)ar

$(info [${CURDIR}])

PLATFORM?=ORANGE_PI
CONSOLE?=
NO_EXT_LED?=

$(info [${CURDIR}])

ifeq ($(findstring ORANGE_PI_ONE,$(PLATFORM)),ORANGE_PI_ONE)
else
endif
Expand All @@ -25,7 +25,7 @@ SRCDIR+=src/debug

$(info [${SRCDIR}])

INCLUDES:=-I./include -I../include -I../lib-hal/include -I../lib-debug/include -I../lib-h3/include -I../lib-arm/include
INCLUDES:=-I./include -I../include -I../lib-device/include -I../lib-flash/include -I../lib-configstore/include -I../lib-hal/include -I../lib-debug/include -I../lib-h3/include -I../lib-arm/include
INCLUDES+=$(addprefix -I,$(EXTRA_INCLUDES))

DEFINES:=-D$(PLATFORM) $(addprefix -D,$(DISPLAYS)) $(addprefix -D,$(DEFINES))
Expand All @@ -37,6 +37,7 @@ endif
DEFINES+=-DPHY_TYPE=PHY_GENERIC
DEFINES+=-DENABLE_TFTP_SERVER -D__FPU_PRESENT=1
DEFINES+=-DCONFIG_MDNS_DOMAIN_REVERSE
DEFINES+=-DISABLE_INTERNAL_RTC

ifneq ($(findstring CONFIG_STORE_USE_SPI,$(DEFINES)), CONFIG_STORE_USE_SPI)
DEFINES+=-DCONFIG_STORE_USE_SPI
Expand Down
5 changes: 2 additions & 3 deletions firmware-template-h3/vectors.S
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,13 @@ reset:
blo 4b

#if defined (DEBUG_STACK)
bl stack_debug_init
bl stack_debug_init
#endif

bl vfp_init
bl mmu_enable
bl hardware_init
#if defined ( NO_EMAC )
bl emac_shutdown
bl emac_shutdown
#endif
bl __libc_init_array
bl main
Expand Down
37 changes: 19 additions & 18 deletions firmware-template-linux/Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,12 @@ LIBS=$(filter-out $(TTT), $(TMPVAR))
LIBS+=debug
LDLIBS=

ifdef LINUX
ifneq (, $(shell which vcgencmd))
BCM2835 = ./../lib-bcm2835_raspbian
ifneq "$(wildcard $(BCM2835) )" ""
LIBS+=bcm2835_raspbian
else
LDLIBS=-lbcm2835
endif
DEFINES+=RASPPI
DEFINES+=BCM2835_NO_DELAY_COMPATIBILITY
endif
endif

$(info $$LDLIBS [${LDLIBS}])

DEFINES:=$(addprefix -D,$(DEFINES))
DEFINES+=-DDISABLE_TFTP
DEFINES+=-DDISABLE_RTC
DEFINES+=-DENABLE_HTTPD
DEFINES+=-DCONFIG_STORE_USE_FILE
DEFINES+=-DCONFIG_MDNS_DOMAIN_REVERSE
DEFINES+=-DISABLE_INTERNAL_RTC
DEFINES+=$(addprefix -I,$(EXTRA_INCLUDES))

ifeq ($(findstring ARTNET_VERSION=4,$(DEFINES)),ARTNET_VERSION=4)
Expand Down Expand Up @@ -83,6 +68,22 @@ LIB:=$(addsuffix /lib_linux, $(LIB))

# The variable for the ld -l flag
LDLIBS+=$(addprefix -l,$(LIBS))

ifdef LINUX
ifneq (, $(shell which vcgencmd))
BCM2835 = ./../lib-bcm2835_raspbian
ifneq "$(wildcard $(BCM2835) )" ""
LIB+=-L../lib-bcm2835_raspbian/lib_linux
LDLIBS+=-lbcm2835_raspbian
DEFINES+=-I../lib-bcm2835_raspbian/include
else
LDLIBS+=-lbcm2835
endif
DEFINES+=-DRASPPI
DEFINES+=-DBCM2835_NO_DELAY_COMPATIBILITY
endif
endif

$(info $$LDLIBS [${LDLIBS}])

# The variables for the dependency check
Expand Down Expand Up @@ -140,11 +141,11 @@ all : builddirs prerequisites $(TARGET)

builddirs:
@mkdir -p $(BUILD_DIRS)
[ -f generate_sofware_version_id.sh ] && chmod u+x generate_sofware_version_id.sh || true


clean: $(LIBDEP)
rm -rf $(BUILD)
rm -f $(TARGET)
rm -f include/sofware_version_id.h

#
# Libraries
Expand Down
4 changes: 2 additions & 2 deletions firmware-template-linux/lib/Rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ LIB_NAME :=$(patsubst lib-%,%,$(CURR_DIR))
DEFINES:=$(addprefix -D,$(DEFINES))
DEFINES+=-D_TIME_STAMP_YEAR_=$(shell date +"%Y") -D_TIME_STAMP_MONTH_=$(shell date +"%-m") -D_TIME_STAMP_DAY_=$(shell date +"%-d")
DEFINES+=-DDISABLE_TFTP
DEFINES+=-DDISABLE_RTC
DEFINES+=-DENABLE_HTTPD
DEFINES+=-DCONFIG_STORE_USE_FILE
DEFINES+=-DCONFIG_MDNS_DOMAIN_REVERSE
DEFINES+=-DISABLE_INTERNAL_RTC

ifeq ($(findstring ARTNET_VERSION=4,$(DEFINES)),ARTNET_VERSION=4)
ifeq ($(findstring ARTNET_HAVE_DMXIN,$(DEFINES)),ARTNET_HAVE_DMXIN)
DEFINES+=-DE131_HAVE_DMXIN
endif
endif

INCLUDES:=-I./include -I../lib-hal/include -I../lib-display/include -I../lib-debug/include
INCLUDES:=-I./include -I../lib-configstore/include -I../lib-hal/include -I../lib-display/include -I../lib-debug/include
INCLUDES+=$(addprefix -I,$(EXTRA_INCLUDES))
ifeq ($(findstring CONFIG_DISPLAY_USE_CUSTOM,$(DEFINES)),CONFIG_DISPLAY_USE_CUSTOM)
ifneq ($(CONFIG_DISPLAY_LIB),)
Expand Down
28 changes: 14 additions & 14 deletions firmware-template/libs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ endif

ifeq ($(findstring NODE_NODE,$(DEFINES)),NODE_NODE)
LIBS+=node artnet e131
DEFINES+=ARTNET_HAVE_FAILSAFE_RECORD
ARTNET=1
endif

Expand Down Expand Up @@ -56,36 +55,36 @@ ifeq ($(findstring ARTNET_CONTROLLER,$(DEFINES)),ARTNET_CONTROLLER)
endif

ifeq ($(findstring RDM_CONTROLLER,$(DEFINES)),RDM_CONTROLLER)
LIBS+=rdmdiscovery rdm
LIBS+=rdm
DMX=1
endif


ifeq ($(findstring RDM_RESPONDER,$(DEFINES)),RDM_RESPONDER)
LIBS+=rdm
ifneq ($(findstring NODE_ARTNET,$(DEFINES)),NODE_ARTNET)
ifneq ($(findstring dmxreceiver,$(LIBS)),dmxreceiver)
LIBS+=dmxreceiver
endif
endif
ifneq ($(findstring rdmresponder,$(LIBS)),rdmresponder)
LIBS+=rdmresponder
endif
ifneq ($(findstring rdmsensor,$(LIBS)),rdmsensor)
LIBS+=rdmsensor
endif
ifneq ($(findstring rdmsubdevice,$(LIBS)),rdmsubdevice)
LIBS+=rdmsubdevice
endif
LIBS+=rdm
DMX=1
endif

ifeq ($(findstring ENABLE_RDM_SUBDEVICES,$(DEFINES)),ENABLE_RDM_SUBDEVICES)
LIBS+=rdmsubdevice
endif

ifeq ($(findstring NODE_DMX,$(DEFINES)),NODE_DMX)
LIBS+=dmxreceiver
DMX=1
endif

ifeq ($(findstring NODE_RDMNET_LLRP_ONLY,$(DEFINES)),NODE_RDMNET_LLRP_ONLY)
ifneq ($(findstring RDM_CONTROLLER,$(DEFINES)),RDM_CONTROLLER)
LIBS+=rdm
endif
ifneq ($(findstring rdmnet,$(LIBS)),rdmnet)
LIBS+=rdmnet
endif
Expand All @@ -98,9 +97,6 @@ ifeq ($(findstring NODE_RDMNET_LLRP_ONLY,$(DEFINES)),NODE_RDMNET_LLRP_ONLY)
ifneq ($(findstring rdmsubdevice,$(LIBS)),rdmsubdevice)
LIBS+=rdmsubdevice
endif
ifneq ($(findstring RDM_CONTROLLER,$(DEFINES)),RDM_CONTROLLER)
LIBS+=rdm
endif
endif

ifeq ($(findstring e131,$(LIBS)),e131)
Expand All @@ -127,7 +123,7 @@ else
LIBS+=ws28xxdmx ws28xx jamstapl
else
ifeq ($(findstring OUTPUT_DMX_PIXEL,$(DEFINES)),OUTPUT_DMX_PIXEL)
LIBS+=ws28xxdmx ws28xx tlc59711dmx tlc59711
LIBS+=ws28xxdmx ws28xx
endif
endif
endif
Expand All @@ -140,6 +136,10 @@ ifeq ($(findstring OUTPUT_DMX_TLC59711,$(DEFINES)),OUTPUT_DMX_TLC59711)
LIBS+=tlc59711dmx tlc59711
endif

ifeq ($(findstring OUTPUT_DMX_PCA9685,$(DEFINES)),OUTPUT_DMX_PCA9685)
LIBS+=pca9685dmx pca9685
endif

ifeq ($(findstring OUTPUT_DMX_ARTNET,$(DEFINES)),OUTPUT_DMX_ARTNET)
ifneq ($(findstring artnet,$(LIBS)),artnet)
LIBS+=artnet
Expand Down
15 changes: 15 additions & 0 deletions include/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ extern "C" {

extern char *strerror(int errnum);
extern char *strtok(char *str, const char *delim);
extern char *strstr(const char *string, const char *substring);

inline int memcmp(const void *s1, const void *s2, size_t n) {
unsigned char u1, u2;
Expand Down Expand Up @@ -193,6 +194,20 @@ inline char *strcat(char *s1, const char *s2) {
return s1;
}

inline char *strchr(const char *p, int ch) {
char c = (char) ch;

for (;; ++p) {
if (*p == c) {
return (char *)p;
}
if (*p == '\0') {
return NULL;
}
}
/* NOTREACHED */
}

#ifdef __cplusplus
}
#endif
Expand Down
4 changes: 2 additions & 2 deletions lib-arm/.settings/language.settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1522590371054690799" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-1522357966463138799" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand All @@ -17,7 +17,7 @@
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1922967415963425812" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1923199820554977812" id="org.eclipse.cdt.build.crossgcc.CrossGCCBuiltinSpecsDetector" keep-relative-paths="false" name="CDT Cross GCC Built-in Compiler Settings" parameter="${COMMAND} ${FLAGS} -E -P -v -dD &quot;${INPUTS}&quot;" prefer-non-shared="true">
<language-scope id="org.eclipse.cdt.core.gcc"/>
<language-scope id="org.eclipse.cdt.core.g++"/>
</provider>
Expand Down
2 changes: 1 addition & 1 deletion lib-arm/src/fiq.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @file fiq.c
*
*/
/* Copyright (C) 2018-2022 by Arjan van Vught mailto:[email protected]
/* Copyright (C) 2018-2023 by Arjan van Vught mailto:[email protected]
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion lib-arm/src/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @file irq.c
*
*/
/* Copyright (C) 2018-2022 by Arjan van Vught mailto:[email protected]
/* Copyright (C) 2018-2023 by Arjan van Vught mailto:[email protected]
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit 99e3f1e

Please sign in to comment.