lnk.cmd 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /****************************************************************************/
  2. /* sample lnk.cmd v##### */
  3. /* Copyright (c) 1996@%%%% Texas Instruments Incorporated */
  4. /* */
  5. /* Usage: cl6x <src files...> -z -o <out file> -m <map file> lnk.cmd */
  6. /* */
  7. /* Description: THIS FILE IS A SAMPLE linker command file that can be */
  8. /* used for linking programs built with the C compiler and */
  9. /* running the resulting .out file on a C620x/C670x */
  10. /* simulator. Use it as a guideline. You will want to */
  11. /* change the memory layout to match your specific C6xxx */
  12. /* target system. You may want to change the allocation */
  13. /* scheme according to the size of your program. */
  14. /* */
  15. /* Notes: (1) You must specify a directory in which your library is */
  16. /* located. either add a -i"<directory>" line to this */
  17. /* file or use the system environment variable C_DIR to */
  18. /* specify a search path for the libraries. */
  19. /* */
  20. /* (2) You may need to specify your library name with */
  21. /* -llibrary.lib if the correct library is not found */
  22. /* automatically. */
  23. /* */
  24. /****************************************************************************/
  25. -c
  26. -heap 0x3000
  27. -stack 0x6000
  28. --args 0x1000
  29. MEMORY
  30. {
  31. PMEM: o = 00000020h l = 0020ffe0h
  32. EXT0: o = 00400000h l = 01000000h
  33. EXT1: o = 01400000h l = 00400000h
  34. EXT2: o = 02000000h l = 01000000h
  35. EXT3: o = 03000000h l = 01000000h
  36. BMEM: o = 80000000h l = 02000000h
  37. }
  38. SECTIONS
  39. {
  40. .text > PMEM
  41. .stack > BMEM
  42. .args > BMEM
  43. GROUP
  44. {
  45. .neardata /* Move .bss after .neardata and .rodata. ELF allows */
  46. .rodata /* uninitialized data to follow initialized data in a */
  47. .bss /* single segment. This order facilitates a single */
  48. /* segment for the near DP sections. */
  49. }>BMEM
  50. .cinit > BMEM
  51. .cio > BMEM
  52. .const > BMEM
  53. .data > BMEM
  54. .switch > BMEM
  55. .sysmem > BMEM
  56. .far > BMEM
  57. .fardata > BMEM
  58. .ppinfo > BMEM
  59. .ppdata > BMEM, palign(32) /* Work-around kelvin bug */
  60. }