-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Improved build system - Added stack debug framework - Removed not used source files - Added support for void __libc_init_array(void) - Changed the layout of the config store. - Before upgrading the firmware it is advised to make a backup of the configuration. - After the upgrade, then restore the saved configuration.
- Loading branch information
Showing
166 changed files
with
4,955 additions
and
3,157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,3 +52,4 @@ | |
*.bin | ||
*.list | ||
*.map | ||
*.size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
DEFINES+=DISABLE_JSON | ||
DEFINES+=DISABLE_RTC | ||
DEFINES+=DISABLE_FS | ||
DEFINES+=DISABLE_PRINTF_FLOAT | ||
|
||
DEFINES+=ENABLE_TFTP_SERVER | ||
|
||
DEFINES+=UDP_MAX_PORTS_ALLOWED=2 | ||
|
||
#DEFINES+=ENET_LINK_CHECK_REG_POLL | ||
|
||
DEFINES+=CONFIG_REMOTECONFIG_MINIMUM | ||
DEFINES+=CONFIG_STORE_USE_SPI | ||
|
||
SRCDIR=firmware lib | ||
|
||
LIBS=remoteconfig flashcodeinstall configstore display flashcode flash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
BOARD=BOARD_BW_OPIDMX4 | ||
|
||
DEFINES=CONFIG_USE_SOFTUART0 | ||
|
||
DEFINES+=DEBUG_STACK | ||
DEFINES+=NDEBUG | ||
|
||
SRCDIR= | ||
LIBS= | ||
|
||
include Common.mk | ||
include ../firmware-template-gd32/Rules.mk | ||
|
||
prerequisites: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
BOARD=BOARD_BW_OPIDMX4 | ||
|
||
DEFINES=CONSOLE_NULL | ||
|
||
DEFINES+=DEBUG_STACK | ||
DEFINES+=NDEBUG | ||
|
||
SRCDIR= | ||
LIBS= | ||
|
||
include Common.mk | ||
include ../firmware-template-gd32/Rules.mk | ||
|
||
prerequisites: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
BOARD=BOARD_DMX3 | ||
|
||
DEFINES= | ||
|
||
DEFINES+=DEBUG_STACK | ||
DEFINES+=NDEBUG | ||
|
||
SRCDIR= | ||
LIBS= | ||
|
||
include Common.mk | ||
include ../firmware-template-gd32/Rules.mk | ||
|
||
prerequisites: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
BOARD=BOARD_DMX4 | ||
|
||
DEFINES=CONFIG_USE_SOFTUART0 | ||
|
||
DEFINES+=DEBUG_STACK | ||
DEFINES+=NDEBUG | ||
|
||
SRCDIR= | ||
LIBS= | ||
|
||
include Common.mk | ||
include ../firmware-template-gd32/Rules.mk | ||
|
||
prerequisites: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
BOARD=BOARD_DMX4 | ||
|
||
DEFINES=CONSOLE_NULL | ||
|
||
DEFINES+=DEBUG_STACK | ||
DEFINES+=NDEBUG | ||
|
||
SRCDIR= | ||
LIBS= | ||
|
||
include Common.mk | ||
include ../firmware-template-gd32/Rules.mk | ||
|
||
prerequisites: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
DEFINES =DISABLE_JSON | ||
DEFINES+=DISABLE_RTC | ||
DEFINES+=DISABLE_FS | ||
DEFINES+=DISABLE_PRINTF_FLOAT | ||
BOARD=BOARD_GD32F207RG | ||
|
||
DEFINES+=ENABLE_TFTP_SERVER | ||
DEFINES+=CONFIG_REMOTECONFIG_MINIMUM | ||
|
||
DEFINES+=UDP_MAX_PORTS_ALLOWED=2 | ||
|
||
#DEFINES+=ENET_LINK_CHECK_REG_POLL | ||
|
||
DEFINES+=CONFIG_STORE_USE_SPI | ||
DEFINES= | ||
|
||
DEFINES+=DEBUG_STACK | ||
DEFINES+=NDEBUG | ||
|
||
SRCDIR=firmware lib | ||
|
||
LIBS=remoteconfig flashcodeinstall configstore display flashcode flash | ||
SRCDIR= | ||
LIBS= | ||
|
||
include Common.mk | ||
include ../firmware-template-gd32/Rules.mk | ||
|
||
prerequisites: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* @file networkdisplay.cpp | ||
* | ||
*/ | ||
/* Copyright (C) 2022 by Arjan van Vught mailto:[email protected] | ||
/* Copyright (C) 2022-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 | ||
|
@@ -33,13 +33,23 @@ | |
namespace network { | ||
static constexpr auto LINE_IP = 2U; | ||
|
||
void display_emac_config() { | ||
Display::Get()->ClearEndOfLine(); | ||
Display::Get()->Printf(LINE_IP, "Ethernet config"); | ||
} | ||
|
||
void display_emac_start() { | ||
Display::Get()->ClearLine(LINE_IP); | ||
Display::Get()->PutString("Ethernet start"); | ||
Display::Get()->ClearEndOfLine(); | ||
Display::Get()->Printf(LINE_IP, "Ethernet start"); | ||
} | ||
|
||
void display_emac_status(const bool isLinkUp) { | ||
Display::Get()->ClearEndOfLine(); | ||
Display::Get()->Printf(LINE_IP, "Ethernet Link %s", isLinkUp ? "UP" : "DOWN"); | ||
} | ||
|
||
void display_ip() { | ||
Display::Get()->ClearLine(LINE_IP); | ||
Display::Get()->ClearEndOfLine(); | ||
Display::Get()->Printf(LINE_IP, "" IPSTR "/%d %c", IP2STR(Network::Get()->GetIp()), Network::Get()->GetNetmaskCIDR(), Network::Get()->GetAddressingMode()); | ||
} | ||
|
||
|
@@ -54,7 +64,7 @@ void display_hostname() { | |
} | ||
|
||
void display_emac_shutdown() { | ||
Display::Get()->ClearLine(LINE_IP); | ||
Display::Get()->ClearEndOfLine(); | ||
Display::Get()->PutString("Ethernet shutdown"); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
|
||
if [ $# -lt 2 ]; then | ||
echo "Usage: $0 <size_file> <linker_script>" | ||
exit 1 | ||
fi | ||
|
||
size_file="$1" | ||
linker_script="$2" | ||
|
||
used_stack=$(grep ".stack" "$size_file" | awk '{print $2}') | ||
used_heap=$(grep ".heap" "$size_file" | awk '{print $2}') | ||
used_data=$(grep '.data' "$size_file" | tail -n 1 | awk '{print $2}') | ||
used_bss=$(grep ".bss" "$size_file" | awk '{print $2}') | ||
|
||
total_ram=$(grep "RAM (xrw)" "$linker_script" | awk '{print $NF}' | sed 's/K$//' | awk '{printf "%d", $0 * 1024}') | ||
unused_ram=$(( $(echo $total_ram) - $(echo $used_stack) - $(echo $used_heap) - $(echo $used_data) - $(echo $used_bss) )) | ||
|
||
cat $1 | ||
echo "RAM $total_ram bytes, Unused: $unused_ram bytes" | ||
echo |
Oops, something went wrong.