«
»

emacs

Using Keil’s x51 tools from Emacs

12.12.12 | Comment?

All my steps to be able to M-x compile 8051 projects from Emacs.

  1. Make sure make is in the path.  (The following are for Win 7 without admin rights)
    1. Computer->Properties->Advanced system settings->Environment Variables
    2. User variables: New/Edit…
    3. Add C:\MinGW\msys\1.0\bin; (of course you need MingW installed)
  2. If your Makefile is not in the same directory as your source. Check out the tips here.
  3. Setup parsingof x51 output. Add to your .emacs:
    (require 'compile) (add-hook 'c-mode-hook (lambda () (add-to-list 'compilation-error-regexp-alist 'x51) (add-to-list 'compilation-error-regexp-alist-alist '(x51 "^... \\(\\w+\\) .*IN LINE \\([0-9]+\\) OF \\([^ :]+\\)" 3 2 nil 1)) )) (setq compilation-auto-jump-to-first-error t) 
  4. Now you can M-x compile
  5. and review your errors
    1. C-x ` (next error)
    2. M-g p (previous error)

Related reading:

have your say

Add your comment below, or trackback from your own site. Subscribe to these comments.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

You must be logged in to post a comment.


«
»