--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/template-pre/iar-linker-config-mode.el Sun Nov 08 19:39:56 2009 +0200
@@ -0,0 +1,44 @@
+;; DO NOT EDIT COMMENT! TAG: iar-linker-config-mode
+(define-generic-mode iar-linker-config-mode
+ '("// " ("/*" . "*/"))
+ nil
+ ;; '("define" "symbol" "region" "block" "memory" "place" "in" "at" "do" "not" "initialize" "with" "size" "from" "to")
+ '(
+ ("\\(define +symbol\\) +\\([_a-zA-Z]+\\) *= *\\(0x[0-9a-fA-F]+\\);"
+ (1 font-lock-keyword-face)
+ (2 font-lock-variable-name-face)
+ (3 font-lock-constant-face) )
+ ("\\(define +memory\\) +\\([_a-zA-Z]+\\) +\\(with +size\\) = \\(0x[0-9a-fA-F]+\\|[0-9]+\\)[GMK]?;"
+ (1 font-lock-keyword-face)
+ (2 font-lock-variable-name-face)
+ (3 font-lock-keyword-face)
+ (4 font-lock-constant-face) )
+ ("\\(define +region\\) +\\([_a-zA-Z]+\\) *= *\\([_a-zA-Z]+\\):\\[\\(from\\) +\\([_a-zA-Z]+\\) +\\(to\\) +\\([_a-zA-Z]+\\)\\];"
+ (1 font-lock-keyword-face)
+ (2 font-lock-variable-name-face)
+ (3 font-lock-variable-name-face)
+ (4 font-lock-keyword-face)
+ (5 font-lock-variable-name-face)
+ (6 font-lock-keyword-face)
+ (7 font-lock-variable-name-face) )
+ ("\\(define +block\\) +\\([_a-zA-Z]+\\) +\\(with +alignment\\) *= *[0-9]+, *\\(size\\) *= *\\([_a-zA-Z]+\\).*;"
+ (1 font-lock-keyword-face)
+ (2 font-lock-variable-name-face)
+ (3 font-lock-keyword-face)
+ (4 font-lock-keyword-face)
+ (5 font-lock-variable-name-face) )
+ ("\\(do +not +initialize\\) *{"
+ (1 font-lock-keyword-face) )
+ ("\\(place +in\\) +\\([_a-zA-Z]+\\) *{"
+ (1 font-lock-keyword-face)
+ (2 font-lock-variable-name-face) )
+ ("\\(place +at +address\\) +\\([_a-zA-Z]+\\):\\([_a-zA-Z]+\\) *{"
+ (1 font-lock-keyword-face)
+ (2 font-lock-variable-name-face)
+ (3 font-lock-variable-name-face) )
+ )
+ (list "\\.\\(icf\\)\\'")
+ (list
+ (lambda () (setq comment-start "/* " comment-end " */"))
+ )
+ "Generic mode for iar linker config files.")