automatically set number of model memories to MANUAL-version.txt

This commit is contained in:
Pavel Semerad
2012-06-06 22:05:38 +02:00
parent 1b7f62e90d
commit 98eba6543d
2 changed files with 5 additions and 2 deletions

View File

@@ -34,7 +34,7 @@ Flashing firmware
Global characteristics:
=======================
- 63 model memories, first 8 in EEPROM, rest in FLASH
- NUMBER_OF_MODELS model memories, first 8 in EEPROM, rest in FLASH
> numbers 10-19 will show with Right-Arrow
> numbers 20-29 will show with Left-Arrow
> numbers 30-39 will show with Left+Right-Arrows

5
build
View File

@@ -19,7 +19,10 @@ fi
# manual, set FIRMWARE_END_ADDRESS to actual value
FEA=$(perl -e "printf \"%x\", $(grep 'segment \.text' gt3b.map | head -n 1 | awk '{print "0x"$4}') - 1;");
sed -e "s/FIRMWARE_END_ADDR/$FEA/" MANUAL.txt >$R/MANUAL-$V.txt
NMODELS=$(( (0xffff - 0x$FEA) / 108 + 8 ))
sed -e "s/FIRMWARE_END_ADDR/$FEA/" \
-e "s/NUMBER_OF_MODELS/$NMODELS/" \
MANUAL.txt >$R/MANUAL-$V.txt
git add $R/MANUAL-$V.txt