MPC5646C_RAM.lcf 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /* Internal RAM linker command file for MPC5646C */
  2. /* */
  3. /* 3MB Flash, 256KB SRAM */
  4. /* */
  5. /* Intended to be used for the stationary example project. */
  6. /* This LCF should be used in single core projects. */
  7. /* */
  8. /* VERSION: 1.1 */
  9. MEMORY
  10. {
  11. /* SRAM: 0x40000000 - 0x4003FFFF */
  12. /* Contains interrupt branch tables for both Z4 core and INTC module
  13. and the ISR handlers code. Note, since the vector base address field
  14. of Z4 IVPR is defined within the range [0:15] the branch tables must
  15. be loaded at an address aligned to 64K boundary, for eg. 0x4000_0000.
  16. */
  17. exception_handlers_p0: org = 0x40000000, len = 0x00008000 /* 32K */
  18. /* Space allocated for both code and variables in order to use the memory
  19. more efficiently.*/
  20. internal_ram: org = 0x40008000, len = 0x00028000 /* 160K */
  21. heap: org = 0x40030000, len = 0x00008000 /* 32K Heap */
  22. stack: org = 0x40038000, len = 0x00008000 /* 32K Stack */
  23. }
  24. SECTIONS
  25. {
  26. /* z4 IVORxx and INTC branch tables */
  27. GROUP : {
  28. /* Special section for INTC branch table required in hardware mode.
  29. Place the .intc_hw_branch_table_p0 section first in order to used both core and INTC
  30. tables. The intc_hw_branch_table should contain entries aligned to 16 bytes.
  31. */
  32. .intc_hw_branch_table_p0 ALIGN (0x10) : {}
  33. /* Because the Z4 IVORx are settable the IVOR branch table can be placed
  34. after the INTC HW table.*/
  35. .ivor_branch_table_p0 (VLECODE) ALIGN (0x10) : {}
  36. /* ISR handlers code. */
  37. .__exception_handlers_p0 (VLECODE) : {}
  38. } > exception_handlers_p0
  39. GROUP : {
  40. /* Section used for initialization code: __ppc_eabi_init.c,
  41. MPC56xx_HWInit.c, MPC56xx_init_*.c and the entry point (__startup).
  42. */
  43. .init : {}
  44. .init_vle (VLECODE) : {
  45. *(.init)
  46. *(.init_vle)
  47. }
  48. .text (TEXT) : {}
  49. .text_vle (VLECODE) : {
  50. *(.text)
  51. *(.text_vle)
  52. }
  53. .rodata (CONST) : {
  54. *(.rdata)
  55. *(.rodata)
  56. }
  57. .ctors : {}
  58. .dtors : {}
  59. extab : {}
  60. extabindex : {}
  61. } > internal_ram
  62. GROUP : {
  63. /* Used in INTC SW mode to store the interrupt handlers array. Should be aligned to 4K. */
  64. .__uninitialized_intc_handlertable ALIGN(0x1000) : {}
  65. .data : {}
  66. .sdata : {}
  67. .sbss : {}
  68. .sdata2 : {}
  69. .sbss2 : {}
  70. .bss : {}
  71. } > internal_ram
  72. }
  73. /* Freescale CodeWarrior compiler address designations */
  74. _stack_addr = ADDR(stack)+SIZEOF(stack);
  75. _stack_end = ADDR(stack);
  76. _heap_addr = ADDR(heap);
  77. _heap_end = ADDR(heap)+SIZEOF(heap);
  78. /* If INTC HW mode is used it represents the vector base address to set
  79. IVPR and the location of intc_hw_branch_table_p0 section. The EXCEPTION_HANDLERS
  80. will point to the IVOR branch table.
  81. */
  82. __IVPR_VALUE = ADDR(exception_handlers_p0);
  83. /* IVOR branch table location. Used in Exceptions.c */
  84. EXCEPTION_HANDLERS = ADDR(.ivor_branch_table_p0);