summaryrefslogtreecommitdiff
path: root/mnv/runtime/syntax/lnk.mnv
diff options
context:
space:
mode:
authorMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-04 12:41:27 +0300
committerMehmet Samet Duman <yongdohyun@projecttick.org>2026-04-04 12:41:27 +0300
commit4f2d36194b4f299aa7509d815c07121039ea833b (patch)
treef3ded014bad3a4c76ff6a22b8726ebaab68c3d13 /mnv/runtime/syntax/lnk.mnv
parent5b578e70c314723a3cde5c9bfc2be0bf1dadc93b (diff)
downloadProject-Tick-4f2d36194b4f299aa7509d815c07121039ea833b.tar.gz
Project-Tick-4f2d36194b4f299aa7509d815c07121039ea833b.zip
NOISSUE change uvim folder name to mnv
Signed-off-by: Mehmet Samet Duman <yongdohyun@projecttick.org>
Diffstat (limited to 'mnv/runtime/syntax/lnk.mnv')
-rw-r--r--mnv/runtime/syntax/lnk.mnv40
1 files changed, 40 insertions, 0 deletions
diff --git a/mnv/runtime/syntax/lnk.mnv b/mnv/runtime/syntax/lnk.mnv
new file mode 100644
index 0000000000..c117654aa9
--- /dev/null
+++ b/mnv/runtime/syntax/lnk.mnv
@@ -0,0 +1,40 @@
+" MNV syntax file
+" Language: TI linker command file
+" Document: https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html
+" Document: https://software-dl.ti.com/ccs/esd/documents/sdto_cgt_Linker-Command-File-Primer.html
+" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
+" Last Change: 2024 Dec 31
+
+if exists("b:current_syntax")
+ finish
+endif
+
+runtime! syntax/cmacro.mnv
+
+syn case ignore
+syn match lnkNumber "0x[0-9a-f]\+"
+" Linker command files are ASCII files that contain one or more of the following:
+" Input filenames, which specify object files, archive libraries, or other command files.
+" Linker options, which can be used in the command file in the same manner that they are used on the command line
+syn match lnkOption "^[-+][-_a-zA-Z#@]\+"
+syn match lnkOption "^--[^ \t$=`'"|);]\+"
+syn match lnkFile '[^ =]\+\%(\.\S\+\)\+\>'
+syn match lnkLibFile '[^ =]\+\.lib\>'
+" The MEMORY and SECTIONS linker directives. The MEMORY directive defines the target memory configuration (see Section 8.5.4). The SECTIONS directive controls how sections are built and allocated (see Section 8.5.5.)
+syn keyword lnkKeyword ADDRESS_MASK f LOAD ORIGIN START ALGORITHM FILL LOAD_END PAGE TABLE ALIGN GROUP LOAD_SIZE PALIGN TYPE ATTR HAMMING_MASK LOAD_START PARITY_MASK UNION BLOCK HIGH MEMORY RUN UNORDERED COMPRESSION INPUT_PAGE MIRRORING RUN_END VFILL COPY INPUT_RANGE NOINIT RUN_SIZE DSECT l NOLOAD RUN_START ECC LEN o SECTIONS END LENGTH ORG SIZE
+syn region lnkLibrary start=+<+ end=+>+
+syn match lnkAttrib '\<[RWXI]\+\>'
+syn match lnkSections '\<\.\k\+'
+" Assignment statements, which define and assign values to global symbols
+syn case match
+
+hi def link lnkNumber Number
+hi def link lnkOption Special
+hi def link lnkKeyword Keyword
+hi def link lnkLibrary String
+hi def link lnkFile String
+hi def link lnkLibFile Special
+hi def link lnkAttrib Type
+hi def link lnkSections Macro
+
+let b:current_syntax = "lnk"