gdbns7520.jlink 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. echo Setting up the environment for debugging gdb.\n
  2. set complaints 1
  3. set output-radix 16
  4. set input-radix 16
  5. set endian big
  6. dir .
  7. set prompt (netsilicon-gdb)
  8. # This connects to a target via netsiliconLibRemote
  9. # listening for commands on this PC's tcp port 2331
  10. target remote localhost:2331
  11. monitor speed 30
  12. # Set netSiliconLibRemote to write short/long values
  13. # in big-endian
  14. monitor endian big
  15. # Set GDB in big-endian
  16. set endian big
  17. # Reset the chip to get to a known state.
  18. monitor reset
  19. # Set SCR for Big endian, full speed, 128 cycle Bus monitor
  20. monitor long 0xffb00000 = 0x4004a000
  21. # Setup DRAM refresh circuit
  22. monitor long 0xffc00000 = 0x0dc00000
  23. # Disable CS2
  24. monitor long 0xffb00030 = 0x00000000
  25. monitor long 0xffc00034 = 0x00000000
  26. # The debugger script must clear the valid bit in CS0BAR.
  27. # The ncc_init() routine looks at this bit to determine
  28. # whether the unit is running under control of a debugger.
  29. monitor long 0xffc00010 = 0x0
  30. # Configure CS1 for 16 Megs of SDRAM
  31. monitor long 0xffc00020 = 0x0
  32. monitor long 0xffc00024 = 0xf3000170
  33. monitor long 0xffc00020 = 0x0000022d
  34. monitor long 0xffc00028 = 0x00000001
  35. # Set the processor mode
  36. monitor reg cpsr = 0xd3
  37. # Setup GDB FOR FASTER DOWNLOADS
  38. set remote memory-write-packet-size 1024
  39. set remote memory-write-packet-size fixed
  40. monitor speed auto
  41. # Load the program executable called "image.elf"
  42. load image.elf
  43. # Load the symbols for the program.