From 54e4eb4e1b51edae2fd3d9fd796b851c5c8bd306 Mon Sep 17 00:00:00 2001 From: Ryan Cavicchioni Date: Sun, 18 Sep 2022 09:37:19 -0500 Subject: [PATCH] Configure syntastic for AVR C --- .vimrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.vimrc b/.vimrc index 8a07322..b518eb2 100644 --- a/.vimrc +++ b/.vimrc @@ -194,6 +194,15 @@ let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 0 let g:syntastic_yaml_checkers = ['yamllint'] +function SetupSyntasticAvr() + let g:syntastic_c_compiler = "avr-gcc" + let g:syntastic_c_compiler_options = "-std=c99 -Wall -g -Os -mmcu=atmega328p -DF_CPU=16000000 -I ." +endfunction + +if filereadable(".avr") + autocmd FileType c call SetupSyntasticAvr() +endif + " If it exists, include user's local vim config if filereadable(expand("~/.vimrc.local")) source ~/.vimrc.local