Thursday, September 9, 2010

Re: external compiler output into window/buffer/quickfix from vim

>> For example like this output:
>> # Model Technology ModelSim ALTERA vcom 6.5b Compiler 2009.10 Oct 1 2009
>> # -- Loading package standard
>> # -- Loading package textio
>> # -- Loading package std_logic_1164
>> [...]
>> # -- Compiling entity cntrlio_module
>> # -- Compiling architecture rtl of cntrlio_module
>> # -- Compiling entity iic_state
>> # -- Compiling architecture a0 of iic_state
>> # -- Compiling entity iic_in
>> # -- Compiling architecture a0 of iic_in
>> # -- Compiling entity iic_bundle
>> # -- Compiling architecture a0 of iic_bundle
>> # -- Compiling entity iic_sync
>> # -- Compiling architecture a0 of iic_sync
>> # -- Compiling entity cntrl_module
>> # -- Compiling architecture structure of cntrl_module
>> # -- Compiling entity iic_slave_pa_a0
>> # -- Compiling architecture a0 of iic_slave_pa_a0
>
> Executing ":clist" should show you all the messages in the quickfix
> list. Executing ":clist!" should show you all the messages from
> the compiler. See ":help quickfix-valid" for more on the
> difference.
>
> For messages to be accepted into the quickfix list, they must match
> one of the patterns in 'errorformat'. None of the compiler messages
> you have shown so far would normally be included in the quickfix
> list, though, since none of them indicate an error.
>
> Regards,
> Gary
>
Thanks Gary,

I now have it working.
I have a vhdl.vim file in "C:\Program Files\Vim\vimfiles\ftplugin"

It has the ":set makeprg" and the "F9" mapping.
And it's contains a copy of the modelsim_vcom.vim file located on
http://mirrors.fe.up.pt/pub/vim/runtime/compiler/modelsim_vcom.vim

+------------------------------------------------------------------+
:set makeprg=vcom\ -work\
C:\\projects\\iic_slave_pa_top_a0\\modelsim\\work\ -2002\ -explicit\ %
:map <F9> :w<CR>:make<CR><CR>:clist<CR>

if exists("current_compiler")
finish
endif
let current_compiler = "modelsim_vcom"

if exists(":CompilerSet") != 2 " older Vim always used :setlocal
command -nargs=* CompilerSet setlocal <args>
endif

CompilerSet errorformat=\*\*\ %tRROR:\ %f(%l):\ %m,\*\*\ %tRROR:\
%m,\*\*\ %tARNING:\ %m,\*\*\ %tOTE:\ %m,%tRROR:\ %f(%l):\
%m,%tARNING\[%*[0-9]\]:\ %f(%l):\ %m,%tRROR:\ %m,%tARNING\[%*[0-9]\]:\ %m
+------------------------------------------------------------------+

I don't know if the current_compiler is needed and the CompilerSet.
Bottum line is that it's working.
When I have an error it reports it and goes the line that has the error
When it's error free it shows this:
Model Technology ModelSim ALTERA vcom 6.5b Compiler 2009.10 Oct 1 2009
-- Loading package standard
-- Loading package textio
-- Loading package std_logic_1164

-- Compiling entity cntrlio_module
-- Compiling architecture rtl of cntrlio_module
-- Compiling entity iic_state
-- Compiling architecture a0 of iic_state
-- Compiling entity iic_in
-- Compiling architecture a0 of iic_in
-- Compiling entity iic_bundle
-- Compiling architecture a0 of iic_bundle
-- Compiling entity iic_sync
-- Compiling architecture a0 of iic_sync
-- Compiling entity cntrl_module
-- Compiling architecture structure of cntrl_module
-- Compiling entity iic_slave_pa_a0
-- Compiling architecture a0 of iic_slave_pa_a0

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

No comments:

Post a Comment