All my steps to be able to M-x compile
8051 projects from Emacs.
- Make sure make is in the path. (The following are for Win 7 without admin rights)
- Computer->Properties->Advanced system settings->Environment Variables
- User variables: New/Edit…
- Add C:\MinGW\msys\1.0\bin; (of course you need MingW installed)
- If your Makefile is not in the same directory as your source. Check out the tips here.
- 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)
Now you can
M-x compile
and review your errors
- C-x ` (next error)
- M-g p (previous error)
Related reading: