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.

c674x_linker.cmd 4.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /*
  2. * Copyright (c) 2016, Texas Instruments Incorporated
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. *
  9. * * Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. *
  12. * * Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. *
  16. * * Neither the name of Texas Instruments Incorporated nor the names of
  17. * its contributors may be used to endorse or promote products derived
  18. * from this software without specific prior written permission.
  19. *
  20. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  21. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
  22. * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  23. * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  24. * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  25. * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  26. * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
  27. * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
  28. * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  29. * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
  30. * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  31. */
  32. #define L1P_CACHE_SIZE (4*1024)
  33. #define L1D_CACHE_SIZE (16*1024)
  34. #define MMWAVE_L3RAM_SIZE (MMWAVE_L3RAM_NUM_BANK*MMWAVE_SHMEM_BANK_SIZE - MMWAVE_MSSUSED_L3RAM_SIZE)
  35. MEMORY
  36. {
  37. PAGE 0:
  38. #if (L1P_CACHE_SIZE < 0x8000)
  39. L1PSRAM: o = 0x00E00000, l = (0x00008000 - L1P_CACHE_SIZE)
  40. #endif
  41. #if (L1D_CACHE_SIZE < 0x8000)
  42. L1DSRAM: o = 0x00F00000, l = (0x00008000 - L1D_CACHE_SIZE)
  43. #endif
  44. L2SRAM_UMAP1: o = 0x007E0000, l = 0x00020000
  45. L2SRAM_UMAP0: o = 0x00800000, l = 0x00020000
  46. L3SRAM: o = (0x20000000+MMWAVE_MSSUSED_L3RAM_SIZE), l = MMWAVE_L3RAM_SIZE
  47. L3SRAMOVLY: o = 0x20000000, l = MMWAVE_MSSUSED_L3RAM_SIZE
  48. HWA_RAM : o = 0x21030000, l = 0x00010000
  49. HSRAM: o = 0x21080000, l = 0x8000
  50. /* PAGEs 1 and onwards are for overlay purposes for memory optimization.
  51. Some examples:
  52. 1. Overlay one-time only text with uninitialized data.
  53. 2. Overlay L1PSRAM data path processing fast code and use copy tables
  54. to page in (before entering data path) and out of L1PSRAM (when entering
  55. sleep/low power).
  56. */
  57. PAGE 1:
  58. L3SRAM: o = (0x20000000+MMWAVE_MSSUSED_L3RAM_SIZE), l = MMWAVE_L3RAM_SIZE
  59. }
  60. /* Set L1D, L1P and L2 Cache Sizes */
  61. ti_sysbios_family_c64p_Cache_l1dSize = L1D_CACHE_SIZE;
  62. ti_sysbios_family_c64p_Cache_l1pSize = L1P_CACHE_SIZE;
  63. ti_sysbios_family_c64p_Cache_l2Size = 0;
  64. SECTIONS
  65. {
  66. /* hard addresses forces vecs to be allocated there */
  67. .vecs: {. = align(32); } > 0x007E0000
  68. /* Allocate data preferentially in one UMAP and code (.text) in another,
  69. this can improve performance due to simultaneous misses from L1P
  70. and L1D caches to L2 SRAM, for more information see C674 Megamodule
  71. User Guide section "Level 2 Memory Architecture".
  72. The linker notation "X >> Y | Z" indicates section X is first allocated in Y
  73. and allowed to overflow into Z and can be split from Y to Z.
  74. The linker notation "X > Y | Z" indicates section X is first allocated in Y
  75. and allowed to overflow into Z and cannot be split from Y to Z. Some sections
  76. like bss are not allowed to be split so > notation is used for them */
  77. .fardata: {} >> L2SRAM_UMAP0 | L2SRAM_UMAP1
  78. .const: {} >> L2SRAM_UMAP0 | L2SRAM_UMAP1
  79. .switch: {} >> L2SRAM_UMAP0 | L2SRAM_UMAP1
  80. .cio: {} >> L2SRAM_UMAP0 | L2SRAM_UMAP1
  81. .data: {} >> L2SRAM_UMAP0 | L2SRAM_UMAP1
  82. .rodata: {} > L2SRAM_UMAP0 | L2SRAM_UMAP1
  83. .bss: {} > L2SRAM_UMAP0 | L2SRAM_UMAP1
  84. .neardata: {} > L2SRAM_UMAP0 | L2SRAM_UMAP1
  85. .stack: {} > L2SRAM_UMAP0 | L2SRAM_UMAP1
  86. .cinit: {} > L2SRAM_UMAP0 | L2SRAM_UMAP1
  87. .far: {} > L2SRAM_UMAP0 | L2SRAM_UMAP1
  88. .text: {} >> L2SRAM_UMAP1 | L2SRAM_UMAP0
  89. }