Skip to content

Commit bb143df

Browse files
authored
Merge pull request #298 from vanvught/development
Resolves #292 , Resolves #297
2 parents 1b013da + 6ab3ba6 commit bb143df

File tree

553 files changed

+62893
-5278
lines changed

Some content is hidden

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

553 files changed

+62893
-5278
lines changed

firmware-template-h3/Common.mk

100755100644
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ DEFINES+=-DENABLE_TFTP_SERVER
77
DEFINES+=-DCONFIG_MDNS_DOMAIN_REVERSE
88
DEFINES+=-DISABLE_INTERNAL_RTC
99
DEFINES+=-D__FPU_PRESENT=1 -D__GIC_PRESENT=1
10-
#DEFINES+=-DTCP_TX_QUEUE_SIZE=2
1110
DEFINES+=-DHTTPD_CONTENT_SIZE=4096
11+
DEFINES+=-DCONFIG_EMAC_HASH_MULTICAST_FILTER
1212

13-
$(info $$DEFINES [${DEFINES}])
13+
$(info $$DEFINES [${DEFINES}])

firmware-template-linux/Rules.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ $(BUILD_DIRS) :
163163

164164
$(CURR_DIR) : Makefile $(LINKER) $(OBJECTS) $(LIBDEP)
165165
$(info $$TARGET [${TARGET}])
166-
$(CPP) $(OBJECTS) -o $(CURR_DIR) $(LIB) $(LDLIBS) -luuid -lpthread
166+
$(CPP) $(OBJECTS) -o $(CURR_DIR) $(LIB) $(LDLIBS) -luuid -lpthread -lz
167167
$(PREFIX)objdump -d $(TARGET) | $(PREFIX)c++filt > linux.lst
168168

169169
$(foreach bdir,$(SRCDIR),$(eval $(call compile-objects,$(bdir))))

include/netinet/in.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @file in.h
33
*
44
*/
5-
/* Copyright (C) 2016-2017 by Arjan van Vught mailto:info@orangepi-dmx.nl
5+
/* Copyright (C) 2016-2025 by Arjan van Vught mailto:info@gd32-dmx.org
66
*
77
* Permission is hereby granted, free of charge, to any person obtaining a copy
88
* of this software and associated documentation files (the "Software"), to deal
@@ -39,6 +39,7 @@ extern "C" {
3939
#endif
4040

4141
extern int inet_aton(const char *, struct in_addr *);
42+
extern char *inet_ntoa(struct in_addr in);
4243

4344
#ifdef __cplusplus
4445
}

include/new

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* @file new
3+
*
4+
*/
5+
/* Copyright (C) 2025 by Arjan van Vught mailto:[email protected]
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
14+
* The above copyright notice and this permission notice shall be included in
15+
* all copies or substantial portions of the Software.
16+
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
* THE SOFTWARE.
24+
*/
25+
26+
#ifndef NEW_
27+
#define NEW_
28+
29+
#include <cstddef>
30+
31+
void *operator new(std::size_t size);
32+
void *operator new[](std::size_t size);
33+
void operator delete(void* ptr) noexcept;
34+
void operator delete[](void* ptr) noexcept;
35+
36+
void *operator new(std::size_t, void* ptr) noexcept;
37+
void operator delete(void*, void*) noexcept;
38+
39+
#endif /* NEW_ */

include/zlib.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* zlib.h
3+
*/
4+
5+
#ifndef ZLIB_H_
6+
#define ZLIB_H_
7+
8+
#include <cstdint>
9+
10+
uint32_t crc32(uint32_t crc, const uint8_t *, uint32_t);
11+
12+
#endif /* ZLIB_H_ */

lib-arm/.settings/language.settings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
66
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
77
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
8-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-868850457862413684" 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">
8+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-868747347899373684" 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">
99
<language-scope id="org.eclipse.cdt.core.gcc"/>
1010
<language-scope id="org.eclipse.cdt.core.g++"/>
1111
</provider>
@@ -17,7 +17,7 @@
1717
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
1818
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
1919
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
20-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1924120622932129812" 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">
20+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="1924223732895169812" 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">
2121
<language-scope id="org.eclipse.cdt.core.gcc"/>
2222
<language-scope id="org.eclipse.cdt.core.g++"/>
2323
</provider>

lib-arm/src/debug/arm_dump_memmap.c renamed to lib-arm/src/debug/arm_dump_memmap.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
2-
* @file arm_dump_memmap.c
2+
* @file arm_dump_memmap.cpp
33
*
44
*/
5-
/* Copyright (C) 2018-2020 by Arjan van Vught mailto:[email protected]
5+
/* Copyright (C) 2018-2025 by Arjan van Vught mailto:[email protected]
66
*
77
* Permission is hereby granted, free of charge, to any person obtaining a copy
88
* of this software and associated documentation files (the "Software"), to deal
@@ -23,10 +23,10 @@
2323
* THE SOFTWARE.
2424
*/
2525

26-
#include <stdint.h>
27-
#include <stdio.h>
26+
#include <cstdint>
27+
#include <cstdio>
2828

29-
extern int uart0_printf(const char* fmt, ...);
29+
int uart0_printf(const char* fmt, ...);
3030
#define printf uart0_printf
3131

3232
/* Defined by the linker */
@@ -50,7 +50,7 @@ extern uint32_t __svc_stack_top_core1;
5050
extern uint32_t __svc_stack_top_core2;
5151
extern uint32_t __svc_stack_top_core3;
5252

53-
void __attribute__((cold)) arm_dump_memmap(void) {
53+
void __attribute__((cold)) arm_dump_memmap() {
5454
printf("memmap\n");
5555
printf("__ram_start = %p\n", &__ram_start);
5656
printf(" __data_start = %p\n", &__data_start);

lib-arm/src/debug/arm_dump_page_table.c renamed to lib-arm/src/debug/arm_dump_page_table.cpp

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* @file arm_dump_page_table.c
2+
* @file arm_dump_page_table.cpp
33
*
44
*/
55
/* Copyright (C) 2018-2020 by Arjan van Vught mailto:[email protected]
@@ -23,10 +23,14 @@
2323
* THE SOFTWARE.
2424
*/
2525

26+
#pragma GCC push_options
27+
#pragma GCC diagnostic push
28+
#pragma GCC diagnostic ignored "-Wold-style-cast" //TODO remove old-style-cast
29+
2630
#include <stdint.h>
2731
#include <stdio.h>
2832

29-
extern int uart0_printf(const char* fmt, ...);
33+
int uart0_printf(const char* fmt, ...);
3034
#define printf uart0_printf
3135

3236
#include "arm/synchronize.h"
@@ -51,7 +55,7 @@ static void _dump_page_table(const uint32_t *p) {
5155
uint32_t prev = 0;
5256

5357
for (i = 0; i < 4096; i++) {
54-
uint32_t data = (uint32_t) (*p & 0xFFFFF);
58+
auto data = (*p & 0xFFFFF);
5559
if (data != prev) {
5660
printf(" %.4d : %p : 0x%.8x : %.5x -> bits ", i, p, i * MEGABYTE, data);
5761
_print_bits(data);
@@ -67,8 +71,8 @@ static void _dump_page_table(const uint32_t *p) {
6771
}
6872

6973

70-
void arm_dump_page_table(void) {
71-
register uint32_t page_table;
74+
void arm_dump_page_table() {
75+
uint32_t page_table;
7276

7377
asm volatile ("mrc p15, 0, %0, c2, c0, 0" : "=r" (page_table));
7478
isb();

lib-artnet/.settings/language.settings.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
66
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
77
<provider class="org.eclipse.cdt.managedbuilder.language.settings.providers.GCCBuildCommandParser" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser" keep-relative-paths="false" name="CDT GCC Build Output Parser" parameter="([^/\\\\]*)((g?cc)|([gc]\+\+)|(clang))" prefer-non-shared="true"/>
8-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-868850457862413684" 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">
8+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-868747347899373684" 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">
99
<language-scope id="org.eclipse.cdt.core.gcc"/>
1010
<language-scope id="org.eclipse.cdt.core.g++"/>
1111
</provider>
@@ -17,7 +17,7 @@
1717
<provider copy-of="extension" id="org.eclipse.cdt.ui.UserLanguageSettingsProvider"/>
1818
<provider-reference id="org.eclipse.cdt.core.ReferencedProjectsLanguageSettingsProvider" ref="shared-provider"/>
1919
<provider copy-of="extension" id="org.eclipse.cdt.managedbuilder.core.GCCBuildCommandParser"/>
20-
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-868850457862413684" 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">
20+
<provider class="org.eclipse.cdt.internal.build.crossgcc.CrossGCCBuiltinSpecsDetector" console="false" env-hash="-868747347899373684" 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">
2121
<language-scope id="org.eclipse.cdt.core.gcc"/>
2222
<language-scope id="org.eclipse.cdt.core.g++"/>
2323
</provider>

0 commit comments

Comments
 (0)