Search code examples
macosunixemacsvhdl

compiling in vhdl mode within emacs


Description:

I am currently running emacs on unix (mac osx) and I write vhdl code in emacs vhdl mode. However when I compile I get the error code:

vcom -93 -work work /path
/bin/bash: vcom: command not found

Compilation exited abnormally with code 127 at DATE TIME

I want to be able to compile vhdl code in vhdl mode. What am I doing wrong? Please provide detailed answer. If you know how to fix this problem please give me step by step instructions on how to do the same as I don't know what is wrong.


Solution

  • There's a Mac OS X Emacs app found at GNU Emacs For Mac OS X, a universal binary that will run from OS X 10.6.8 to 10.9.2. It's vhdl-mode configuration includes ghdl should you have it installed. I'm afraid I haven't used emacs since the great schism between Gnu and a commercial concern in the '80s. I'm a joe or TextMate user myself these days (both of which can handle VHDL syntax, can be user configured (with a bit of googling and reading). The vhdl-mode appears to expect you to set up a Makefile (through menu items and the external VHDL tool). You can generally analyze the current buffer directly. Creating a Makefile isn't exactly simplistic and is outside the scope of my experience (I went and read several vhdl-mode.el versions before answering, I said I'm not an emacs user).

    enter image description here

    Notice it found out which VHDL tools were available and used ghdl. This is a function found in the vhdl-mode.el file.

    If you're running 10.9 Mavericks there's ghdl-0.31 from ghdl-updates. An mcode version of ghdl-0.29 that can run on OS X 10.6 - 10.9 can be found at Tristan's old ghdl site - GHDL for Mac OS X.

    A gtkwave app for OS X can be found on Tony Bybell's GTKWave SourceForge page.

    I understand vhdl-mode.el and (.elc, etc. files) are sensitive to which version of Emacs you're using. They may not be particularly portable between the Emacs.app (24.3) and /usr/bin/emacs (22.1.1). If that's not the case I'm sure someone will chime in.