You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

111 lines
3.5 KiB

  1. 1. GDB startup script for debugging purposes.
  2. # startup script for debugging flash erase
  3. target remote 10.0.0.56:2001
  4. monitor halt
  5. monitor reset
  6. load
  7. # stack
  8. monitor rm 13 0x7000
  9. # pc
  10. monitor rm 15 0x8000
  11. # arg1 to erase()
  12. monitor rm 0 0x1030000
  13. # arg2 to erase()
  14. monitor rm 1 0x10000
  15. stepi
  16. 2. Uploading flash driver via tftp
  17. $ tftp 10.0.0.108
  18. tftp> binary
  19. tftp> put at91fr40162.bin 10.0.0.108:/config/flashdriver.bin
  20. Sent 4048 bytes in 0.1 seconds
  21. tftp>
  22. 4. Programming flash
  23. eCosBoard_prog 0x1000000 /config/testdata.bin
  24. tftp> put /cygdrive/c/workspace/ecosboard/ecosboard/phi/bootloader/images/bootloader.bin 10.0.0.108:/config/test.bin
  25. Sent 165724 bytes in 3.9 seconds
  26. halt
  27. reg cpsr 0x000000D3
  28. mww 0xFFE00020 0x1
  29. mww 0xFFE00024 0x00000000
  30. mww 0xFFE00000 0x01002539
  31. eCosBoard_profile
  32. eCosBoard_prog /config/test.bin 0x1000000
  33. eCosBoard_profile_done
  34. set remote memory-write-packet-size fixed
  35. set remote memory-write-packet-size 8192
  36. set remote memory-map-packet on
  37. target remote 10.0.0.108:3333
  38. monitor halt
  39. monitor reg cpsr 0x000000D3
  40. monitor mww 0xFFE00020 0x1
  41. monitor mww 0xFFE00024 0x00000000
  42. monitor mww 0xFFE00000 0x01002539
  43. monitor eCosBoard_profile
  44. load
  45. monitor eCosBoard_profile_done
  46. source /tmp/ecosboard/packages/services/profile/gprof/current/host/gprof.gdb
  47. gprof_dump
  48. shell cp gmon.out /tmp/ecosboard/build/src
  49. echo To view: cd /tmp/ecosboard/build/src && gprof openocd
  50. Performance problems:
  51. It seems the problem is that the actual flash programming takes time.
  52. hal_delay_us() is invoked between each time the
  53. CPU is polled for whether flash programming has completed.
  54. Flat profile:
  55. Each sample counts as 0.01 seconds.
  56. % cumulative self self total
  57. time seconds seconds calls Ts/call Ts/call name
  58. 35.82 37.66 37.66 hal_delay_us
  59. 11.90 50.17 12.51 arm7tdmi_clock_out
  60. 9.86 60.54 10.37 gdb_get_packet
  61. 5.36 66.17 5.63 memcpy
  62. 4.34 70.73 4.56 target_buffer_get_u32
  63. 3.34 74.25 3.51 embeddedice_read_reg_w_che
  64. ck
  65. 1.39 75.71 1.46 arm7_9_write_memory
  66. 1.34 77.11 1.40 cyg_tcp_output
  67. 1.33 78.51 1.40 __udivsi3
  68. 1.11 79.68 1.17 cyg_tcp_input
  69. 1.07 80.80 1.13 arm7tdmi_store_word_regs
  70. 0.95 81.81 1.00 __udivdi3
  71. 0.95 82.80 1.00 __umodsi3
  72. 0.93 83.78 0.98 arm7tdmi_write_core_regs
  73. 0.86 84.68 0.91 arm7_9_poll
  74. 0.85 85.57 0.89 memset
  75. 0.77 86.38 0.81 cyg_splx
  76. 0.64 87.05 0.67 cyg_in_cksumdata
  77. 0.63 87.71 0.66 openeth_deliver
  78. 0.57 88.31 0.60 strstr
  79. 0.51 88.85 0.53 eth_drv_recv
  80. 0.49 89.36 0.52 cyg_splinternal
  81. 0.49 89.88 0.52 cyg_splimp
  82. 0.46 90.36 0.48 cyg_ip_input