Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cppcheck related error #50

Open
zerodegress opened this issue May 15, 2023 · 2 comments
Open

cppcheck related error #50

zerodegress opened this issue May 15, 2023 · 2 comments

Comments

@zerodegress
Copy link

C:\path\to\.platformio\packages\tool-cppcheck\cppcheck --addon-python=C:\path\to\.platformio\penv\Scripts\python.exe --error-exitcode=3 --verbose --template="severity={severity}<&PIO&>message={message}<&PIO&>file={file}<&PIO&>line={line}<&PIO&>column={column}<&PIO&>callstack={callstack}<&PIO&>cwe={cwe}<&PIO&>id={id}" --inline-suppr --platform=unspecified --enable=warning,style,performance,portability,unusedFunction --language=c ---std-sdcc11 -DF_CPU=11059200L -DHEAP_SIZE=64 -DPLATFORMIO=60107 -DGeneric8051 -DNAKED_ARCH_MCS51 -DNAKED_MCS51_Generic8051 --includes-file=C:\path\to\AppData\Local\Temp\tmpy5anj5xr "C:\path\to\Documents\PlatformIO\Projects\51Test\src\main.c"
cppcheck: error: unrecognized command line option: "---std-sdcc11".

that's all thing happend.may be there some wrong with the builder script or configs?

@extantpedant
Copy link

extantpedant commented May 12, 2024

Same here. Maybe it's similar to "project inspection", and it's not supported on the sdcc platform.

PS C:\Users\*****\Dev\foo> pio check -v
Checking debug > cppcheck (platform: intel_mcs51; board: STC89C52RC)
------------------------------------------------------------------------------------------------------------------------------------
Warning: Failed to extract toolchain defines!

at 1: error 258: Failed to open input file '@C:\Users\*****\AppData\Local\Temp\tmpv1d2u54d' (Invalid argument)

Warning: Failed to extract toolchain defines!

at 1: error 265: argument to option -x is not a valid file type override
at 1: error 119: don't know what to do with file '@C:\Users\*****\AppData\Local\Temp\tmpv1d2u54d'. file extension unsupported       
at 1: warning 118: option '  ' no longer supported  'use --fomit-frame-pointer instead'
SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/sm83/tlcs90/ez80_z80/z80n/r800/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502/mos65c02 TD- 4.4.0 #14620 (MINGW32)
published under GNU General Public License (GPL)
Usage : sdcc [options] filename
Options :-

General options:
      --help                Display this help
  -v  --version             Display sdcc's version
 
.........


C:\Users\*****\.platformio\packages\tool-cppcheck\cppcheck --addon-python=C:\Users\*****\.platformio\penv\Scripts\python.exe --error-exitcode=3 --verbose --template="severity={severity}<&PIO&>message={message}<&PIO&>file={file}<&PIO&>line={line}<&PIO&>column={column}<&PIO&>callstack={callstack}<&PIO&>cwe={cwe}<&PIO&>id={id}" --inline-suppr --platform=unspecified --enable=warning,style,performance,portability,unusedFunction --language=c ---std-sdcc11 -DF_CPU=11059200L -DHEAP_SIZE=128 -DPLATFORMIO=60115 -DSTC89C5XRX -DSTC89C52RC -DNAKED_ARCH_MCS51 -DNAKED_MCS51_STC89C5XRX -D__PLATFORMIO_BUILD_DEBUG__ --includes-file=C:\Users\*****\AppData\Local\Temp\tmpyp_sufk6 "C:\Users\*****\Dev\foo\src\main.c"
cppcheck: error: unrecognized command line option: "---std-sdcc11".


Error: Failed to execute check command! Exited with code 1.

@extantpedant
Copy link

I think the problem is that std-sdcc11 has 3 dashes instead of 2. So far, I haven't found where that is getting set. Searches for "---std-sdcc11" are fruitless. I'm thinking that there's somewhere that does something like --language=c -${flags}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants