rm18f46j50_g.lkr 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // File: 18f46j50_g.lkr
  2. // Generic linker script for the PIC18F46J50 processor
  3. #DEFINE _CODEEND _DEBUGCODESTART - 1
  4. #DEFINE _CEND _CODEEND + _DEBUGCODELEN
  5. #DEFINE _DATAEND _DEBUGDATASTART - 1
  6. #DEFINE _DEND _DATAEND + _DEBUGDATALEN
  7. LIBPATH .
  8. #IFDEF _CRUNTIME
  9. #IFDEF _EXTENDEDMODE
  10. FILES c018i_e.o
  11. FILES clib_e.lib
  12. FILES p18f46j50_e.lib
  13. #ELSE
  14. FILES c018i.o
  15. FILES clib.lib
  16. FILES p18f46j50.lib
  17. #FI
  18. #FI
  19. #IFDEF _DEBUGCODESTART
  20. CODEPAGE NAME=bootloader START=0x0 END=0xFFF PROTECTED
  21. CODEPAGE NAME=page START=0x1000 END=_CODEEND
  22. CODEPAGE NAME=debug START=_DEBUGCODESTART END=_CEND PROTECTED
  23. #ELSE
  24. CODEPAGE NAME=bootloader START=0x0 END=0xFFF PROTECTED
  25. CODEPAGE NAME=page START=0x1000 END=0xFFF7
  26. #FI
  27. CODEPAGE NAME=config START=0xFFF8 END=0xFFFF PROTECTED
  28. CODEPAGE NAME=devid START=0x3FFFFE END=0x3FFFFF PROTECTED
  29. #IFDEF _EXTENDEDMODE
  30. DATABANK NAME=gpre START=0x0 END=0x5F
  31. #ELSE
  32. ACCESSBANK NAME=accessram START=0x0 END=0x5F
  33. #FI
  34. DATABANK NAME=gpr0 START=0x60 END=0xFF
  35. DATABANK NAME=gpr1 START=0x100 END=0x1FF
  36. DATABANK NAME=gpr2 START=0x200 END=0x2FF
  37. DATABANK NAME=gpr3 START=0x300 END=0x3FF
  38. DATABANK NAME=gpr4 START=0x400 END=0x4FF
  39. DATABANK NAME=gpr5 START=0x500 END=0x5FF
  40. DATABANK NAME=gpr6 START=0x600 END=0x6FF
  41. DATABANK NAME=gpr7 START=0x700 END=0x7FF
  42. DATABANK NAME=gpr8 START=0x800 END=0x8FF
  43. DATABANK NAME=gpr9 START=0x900 END=0x9FF
  44. DATABANK NAME=gpr10 START=0xA00 END=0xBFF
  45. //DATABANK NAME=gpr11 START=0xB00 END=0xBFF
  46. DATABANK NAME=gpr12 START=0xC00 END=0xCFF
  47. #IFDEF _DEBUGDATASTART
  48. DATABANK NAME=gpr13 START=0xD00 END=_DATAEND
  49. DATABANK NAME=dbgspr START=_DEBUGDATASTART END=_DEND PROTECTED
  50. #ELSE //no debug
  51. DATABANK NAME=gpr13 START=0xD00 END=0xDFF
  52. #FI
  53. DATABANK NAME=gpr14 START=0xE00 END=0xEBF
  54. DATABANK NAME=sfr14 START=0xEC0 END=0xEFF PROTECTED
  55. DATABANK NAME=sfr15 START=0xF00 END=0xF5F PROTECTED
  56. ACCESSBANK NAME=accesssfr START=0xF60 END=0xFFF PROTECTED
  57. SECTION NAME=USB_VARS RAM=gpr10
  58. #IFDEF _CRUNTIME
  59. SECTION NAME=CONFIG ROM=config
  60. #IFDEF _DEBUGDATASTART
  61. STACK SIZE=0x100 RAM=gpr12
  62. #ELSE
  63. STACK SIZE=0x100 RAM=gpr13
  64. #FI
  65. #FI