Skip to content

Commit

Permalink
XXX test-avrdude: Determine mem sizes without the full command
Browse files Browse the repository at this point in the history
Determine the flash and ee memory sizes without invoking the full
${avrdude[@]} command with logging etc.
  • Loading branch information
ndim committed Aug 16, 2024
1 parent f90d765 commit 3c0d17f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/test-avrdude
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ for (( p=0; p<$arraylength; p++ )); do
avrdude=($avrdude_bin -l $logfile $avrdude_conf -qq ${pgm_and_target[$p]})

# Get flash and EEPROM size in bytes and make sure the numbers are in dec form
flash_size=$(${avrdude[@]} -cdryrun -T 'part -m' 2>/dev/null | grep flash | awk '{print $2}')
flash_size=$($avrdude_bin $avrdude_conf -cdryrun -T 'part -m' 2>/dev/null | grep flash | awk '{print $2}')
bench_flwr_size=$((flash_size/6)) # Approximate(!) size of file holes_rjmp_loops_${flash_size}B.hex
ee_size=$(${avrdude[@]} -cdryrun -T 'part -m' 2>/dev/null | grep eeprom | awk '{print $2}')
ee_size=$($avrdude_bin $avrdude_conf -cdryrun -T 'part -m' 2>/dev/null | grep eeprom | awk '{print $2}')
bench_eewr_size=$((ee_size/6)) # Approximate(!) size of file holes_pack_my_box_${ee_size}B.hex

if [[ -z "$flash_size" ]]; then
Expand Down

0 comments on commit 3c0d17f

Please sign in to comment.