elf_to_ld.sh 290 B

123456789101112
  1. #!/bin/bash
  2. echo '/*'
  3. echo 'ESP32 ROM address table'
  4. echo 'Generated for ROM with MD5sum:'
  5. md5sum $1
  6. echo '*/'
  7. xtensa-esp108-elf-nm $1 | grep '[0-9a-f] [TBRD]' | while read adr ttp nm; do
  8. if ! echo "$nm" | grep -q -e '^_bss' -e '_heap'; then
  9. echo "PROVIDE ( $nm = 0x$adr );";
  10. fi
  11. done