gdbnet50.jlink 1.8 KB

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