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.
 
 
 
 

90 regels
4.0 KiB

  1. /*************************************************************************
  2. * Processor-specific object file. Contains SFR definitions.
  3. *************************************************************************/
  4. INPUT("processor.o")
  5. /*************************************************************************
  6. * Processor-specific peripheral libraries are optional
  7. *************************************************************************/
  8. OPTIONAL("libmchp_peripheral.a")
  9. OPTIONAL("libmchp_peripheral_32MX795F512H.a")
  10. /*************************************************************************
  11. * For interrupt vector handling
  12. *************************************************************************/
  13. PROVIDE(_vector_spacing = 0x00000001);
  14. _ebase_address = 0x9D004000; /*0x9FC01000;*/
  15. /*************************************************************************
  16. * Memory Address Equates
  17. * _RESET_ADDR -- Reset Vector
  18. * _BEV_EXCPT_ADDR -- Boot exception Vector
  19. * _DBG_EXCPT_ADDR -- In-circuit Debugging Exception Vector
  20. * _DBG_CODE_ADDR -- In-circuit Debug Executive address
  21. * _DBG_CODE_SIZE -- In-circuit Debug Executive size
  22. * _GEN_EXCPT_ADDR -- General Exception Vector
  23. *************************************************************************/
  24. _RESET_ADDR = 0xBFC00000;
  25. _BEV_EXCPT_ADDR = 0xBFC00380;
  26. _DBG_EXCPT_ADDR = 0xBFC00480;
  27. _DBG_CODE_ADDR = 0xBFC02000;
  28. _DBG_CODE_SIZE = 0xFF0;
  29. _GEN_EXCPT_ADDR = _ebase_address + 0x180;
  30. /*************************************************************************
  31. * Memory Regions
  32. *
  33. * Memory regions without attributes cannot be used for orphaned sections.
  34. * Only sections specifically assigned to these regions can be allocated
  35. * into these regions.
  36. *
  37. * The Debug exception vector is located at 0x9FC00480.
  38. *
  39. * The config_<address> sections are used to locate the config words at
  40. * their absolute addresses.
  41. *************************************************************************/
  42. MEMORY
  43. {
  44. /*kseg0_program_mem (rx) : ORIGIN = 0x9D000100, LENGTH = 0x80000*/
  45. /*kseg0_boot_mem : ORIGIN = 0x9FC00490, LENGTH = 0x970*/
  46. /*kexception_mem : ORIGIN = 0x9FC01000, LENGTH = 0x1000*/
  47. /* kseg0_program_mem (rx) : ORIGIN = 0x9D003800, LENGTH = 0x7C7FF*/ /*App code. MAX address = 9D07FFFF */
  48. /* kseg0_boot_mem : ORIGIN = 0x9D003000, LENGTH = 0x7F0*/ /* startup code */
  49. /* exception_mem : ORIGIN = 0x9D002000, LENGTH = 0x1000*/
  50. kseg0_program_mem (rx) : ORIGIN = 0x9D005800, LENGTH = 0x7A7FF /*App code. MAX address = 9D07FFFF */
  51. kseg0_boot_mem : ORIGIN = 0x9D005000, LENGTH = 0x7F0 /* startup code */
  52. exception_mem : ORIGIN = 0x9D004000, LENGTH = 0x1000
  53. kseg1_boot_mem : ORIGIN = 0xBFC00000, LENGTH = 0x490
  54. debug_exec_mem : ORIGIN = 0xBFC02000, LENGTH = 0xFF0
  55. config3 : ORIGIN = 0xBFC02FF0, LENGTH = 0x4
  56. config2 : ORIGIN = 0xBFC02FF4, LENGTH = 0x4
  57. config1 : ORIGIN = 0xBFC02FF8, LENGTH = 0x4
  58. config0 : ORIGIN = 0xBFC02FFC, LENGTH = 0x4
  59. kseg1_data_mem (w!x) : ORIGIN = 0xA0000000, LENGTH = 0x10000
  60. sfrs : ORIGIN = 0xBF800000, LENGTH = 0x100000
  61. configsfrs : ORIGIN = 0xBFC02FF0, LENGTH = 0x10
  62. }
  63. /*************************************************************************
  64. * Configuration-word sections. Map the config-pragma input sections to
  65. * absolute-address output sections.
  66. *************************************************************************/
  67. SECTIONS
  68. {
  69. .config_BFC02FF0 : {
  70. KEEP(*(.config_BFC02FF0))
  71. } > config3
  72. .config_BFC02FF4 : {
  73. KEEP(*(.config_BFC02FF4))
  74. } > config2
  75. .config_BFC02FF8 : {
  76. KEEP(*(.config_BFC02FF8))
  77. } > config1
  78. .config_BFC02FFC : {
  79. KEEP(*(.config_BFC02FFC))
  80. } > config0
  81. }