-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
160 changed files
with
4,590 additions
and
3,179 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
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,27 @@ | ||
BOARD=BOARD_16X4U_PIXEL | ||
|
||
DEFINES =DISABLE_JSON | ||
DEFINES+=DISABLE_RTC | ||
DEFINES+=DISABLE_FS | ||
DEFINES+=DISABLE_PRINTF_FLOAT | ||
|
||
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+=DEBUG_STACK | ||
|
||
DEFINES+=NDEBUG | ||
|
||
SRCDIR=firmware lib | ||
|
||
LIBS=remoteconfig flashcodeinstall configstore display flashcode flash | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
build_gd32/main.elf : | ||
section size addr | ||
.vectors 0x1ac 0x8000000 | ||
.text 0x629c 0x80001ac | ||
.rodata 0xc18 0x8006448 | ||
.data 0x70 0x20000000 | ||
.stack 0x800 0x10000000 | ||
.tcmsram 0x2690 0x10000800 | ||
.heap 0x400 0x10002e90 | ||
.bss 0x3a6bc 0x20030000 | ||
.ramadd 0x0 0x2006a6bc | ||
.bkpsram 0x0 0x40024000 | ||
Total 0x44a1c | ||
|
||
|
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
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,33 @@ | ||
#!/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_tcmsram=$(grep ".tcmsram" "$size_file" | awk '{print $2}') | ||
used_heap=$(grep ".heap" "$size_file" | awk '{print $2}') | ||
|
||
total_tcmsram=$(grep "TCMSRAM (rw)" "$linker_script" | awk '{print $NF}' | sed 's/K$//' | awk '{printf "%d", $0 * 1024}') | ||
unused_tcmsram=$(( $(echo $total_tcmsram) - $(echo $used_stack) - $(echo $used_tcmsram) - $(echo $used_heap) )) | ||
|
||
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_data) )) | ||
|
||
used_ramadd=$(grep ".ramadd" "$size_file" | awk '{print $2}') | ||
|
||
total_ramadd=$(grep "RAMADD (xrw)" "$linker_script" | awk '{print $NF}' | sed 's/K$//' | awk '{printf "%d", $0 * 1024}') | ||
unused_ramadd=$(( $(echo $total_ramadd) - $(echo $used_ramadd) - $(echo $used_bss))) | ||
|
||
cat $1 | ||
echo "TCMSRAM $total_tcmsram bytes, Unused TCMSRAM: $unused_tcmsram bytes" | ||
echo "RAM $total_ram bytes, Unused: $unused_ram bytes" | ||
echo "RAMADD $total_ramadd bytes, Unused: $unused_ramadd bytes" | ||
echo |
Oops, something went wrong.