gdbconnect50.jlink 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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. monitor halt
  20. # NET50 INITIALIZATION VALUES
  21. # Set SCR for Big endian, full speed, 128 cycle Bus monitor
  22. monitor long 0xffb00000 = 0x4004a000
  23. # Set up port A to enable SDRAM fix on BGA Rev A development
  24. # board.
  25. monitor long 0xffb00020 = 0x00100000
  26. # Disable all interrupts
  27. monitor long 0xffb00030 = 0x00000000
  28. monitor long 0xffc00034 = 0x00000f04
  29. monitor long 0xffc00030 = 0x00000001
  30. # The debugger script must clear the valid bit in CS0BAR.
  31. # The ncc_init() routine looks at this bit to determine
  32. # whether the unit is running under control of a debugger.
  33. monitor long 0xffc00010 = 0x00000000
  34. # Setup DRAM refresh circuit
  35. monitor long 0xffc00000 = 0x0dc00000
  36. # Configure CS1 for 16 Megs of SDRAM
  37. monitor long 0xffc00024 = 0xf3000170
  38. monitor long 0xffc00020 = 0x0000022d
  39. # Disable CS2
  40. monitor long 0xffc00030 = 0x00000000
  41. monitor long 0xffc00034 = 0x00000000
  42. # Set PLL for 44 MHz
  43. monitor long 0xffb00008 = 0x09000e1e
  44. # Set the processor mode
  45. monitor reg cpsr = 0xd3
  46. # Setup GDB FOR FASTER DOWNLOADS
  47. set remote memory-write-packet-size 1024
  48. set remote memory-write-packet-size fixed
  49. monitor speed auto
  50. load image.elf