2017-10-12 09:51 PM
Hello,
Kindly provide any reference material how to integrate PC lint without plugin.
Kindly provide steps to be perform to do lint in eclipse.
Thanks and regards,
Shail Shah
#ac6 #gnu-c-compiler-(gcc) #sw4stm32-eclipse #compiler2017-10-13 02:08 AM
Hello Shail ,
For eclipse point of view,
you should be the same spirit between ac6 eclipse , SPC5Studio (Automotive) or all eclipse based on CDT.
Example below :
# lint-nt must be accessible from your PATH
LINT_TOOL = lint-nt
LINT_OPTIONS = pclint/co-gcc.lnt pclint/au-misra3.lnt pclint/waivers.lnt
define AWK_CMD =
/search starts/{inc=1; next}/End of search list./{inc=0; next}{if (inc>0) { a = $$1; printf(gensub(/(.*)$$/, '--i\\\\1', 'g', a)) }}
endef
define GET_INCLUDE_PATHS_CMD =
$(shell $(TRGT)cpp -v 2>&1 | gawk '$(AWK_CMD)' > pclint/gcc-include-path.lnt)
endef
misra: pclint/gcc-include-path.lnt pclint/lint_cmac.h pclint/lint_cppmac.h
@echo
@echo Start MISRA Check...
@echo ${LINT_TOOL} ${LINT_OPTIONS} $(subst \,/,$(IINCDIR)) $(subst \,/,$(SRC)) > misra.txt
${LINT_TOOL} ${LINT_OPTIONS} $(subst \,/,$(IINCDIR)) $(subst \,/,$(SRC)) >> misra.txt
@echo
@echo See results in misra.txt
.PHONY: pclint/gcc-include-path.lnt
pclint/gcc-include-path.lnt:
@echo
@echo Generate pclint/gcc-include-path.lnt for current compiler
@$(GET_INCLUDE_PATHS_CMD)
.PHONY: pclint/lint_cmac.h
pclint/lint_cmac.h:
@echo
@echo Generate pclint/lint_cmac.h for current compiler
@touch t.c
@$(TRGT)gcc -E -dM t.c > pclint/lint_cmac.h
@rm t.c
.PHONY: pclint/lint_cppmac.h
pclint/lint_cppmac.h:
@echo
@echo Generate pclint/lint_cppmac.h for current compiler
@touch t.cpp
@$(TRGT)g++ -E -dM t.cpp > pclint/lint_cppmac.h
@rm t.cpp
�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?�?
2. In Eclipse, Create your corresponding target in Make Targets ==> Create
Best regards
Erwan
2017-10-23 12:47 AM
Hello,
Thanks for your reply.
How to update the makefile or CDT Settings?
should we need to run batch file for that?
if possible kindly explain steps?
2017-10-24 06:14 AM
Hello Shail ,
i recommend you to go in this following link
http://help.eclipse.org/neon/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Fconcepts%2Fcdt_o_home.htm
(CDT Section)Best regards
Erwan