• AVR Freaks

AnsweredHot!"ISO C99 requires whitespace after the macro name" and other errors...

Author
rdpoor
Starting Member
  • Total Posts : 19
  • Reward points : 0
  • Joined: 2019/06/08 02:17:19
  • Location: 0
  • Status: offline
2020/06/20 16:36:35 (permalink)
0

"ISO C99 requires whitespace after the macro name" and other errors...

I'm trying use MPLAB X and Harmony to create the simplest "hello world" program for the E54 Xplained Pro board.  I'm not succeeding.  I created a fresh project, opened Harmony and added a few components (BSP for the E54 XPlained Pro, SERCOM2 and STDOUT), generated the code and hit "clean and compile".  And I'm getting a zillion errors, the likes of which I've not seen before.
 
The full error log follows.  A few other things to know:
  • MPLAB X IDE v5.35
  • MPLAB Harmony Configurator (hmmm - howdo you find the version #?)
  • I'll attach any other files that might be helpful...
What have I missed?!?
 

CLEAN SUCCESSFUL (total time: 0ms)
make -f nbproject/Makefile-e54-xplained-pro.mk SUBPROJECTS= .build-conf
make[1]: Entering directory 'C:/Users/r/Projects/mulib-examples/SAME54-XPlained-MPLABX/blinky/firmware/blinky.X'
make -f nbproject/Makefile-e54-xplained-pro.mk dist/e54-xplained-pro/production/blinky.X.production.hex
make[2]: Entering directory 'C:/Users/r/Projects/mulib-examples/SAME54-XPlained-MPLABX/blinky/firmware/blinky.X'
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/162463327/plib_nvmctrl.o.d -o build/e54-xplained-pro/production/_ext/162463327/plib_nvmctrl.o ../src/config/e54-xplained-pro/peripheral/nvmctrl/plib_nvmctrl.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/129603469/plib_nvic.o.d -o build/e54-xplained-pro/production/_ext/129603469/plib_nvic.o ../src/config/e54-xplained-pro/peripheral/nvic/plib_nvic.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/479429869/exceptions.o.d -o build/e54-xplained-pro/production/_ext/479429869/exceptions.o ../src/config/e54-xplained-pro/exceptions.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/330030563/bsp.o.d -o build/e54-xplained-pro/production/_ext/330030563/bsp.o ../src/config/e54-xplained-pro/bsp/bsp.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/2071826216/plib_sercom2_usart.o.d -o build/e54-xplained-pro/production/_ext/2071826216/plib_sercom2_usart.o ../src/config/e54-xplained-pro/peripheral/sercom/usart/plib_sercom2_usart.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/1360937237/main.o.d -o build/e54-xplained-pro/production/_ext/1360937237/main.o ../src/main.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
cc1.exe: all warnings being treated as errors
cc1.exe: all warnings being treated as errors
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
cc1.exe: all warnings being treated as errors
cc1.exe: all warnings being treated as errors
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
cc1.exe: all warnings being treated as errors
cc1.exe: all warnings being treated as errors
cc1.exe: all warnings being treated as errors
cc1.exe: all warnings being treated as errors
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:214: build/e54-xplained-pro/production/_ext/162463327/plib_nvmctrl.o] Error 1
make[2]: *** Waiting for unfinished jobs....
cc1.exe: all warnings being treated as errors
cc1.exe: all warnings being treated as errors
cc1.exe: all warnings being treated as errors
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:280: build/e54-xplained-pro/production/_ext/129603469/plib_nvic.o] Error 1
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/479429869/libc_syscalls.o.d -o build/e54-xplained-pro/production/_ext/479429869/libc_syscalls.o ../src/config/e54-xplained-pro/libc_syscalls.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:256: build/e54-xplained-pro/production/_ext/479429869/exceptions.o] Error 1
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/268958475/plib_evsys.o.d -o build/e54-xplained-pro/production/_ext/268958475/plib_evsys.o ../src/config/e54-xplained-pro/peripheral/evsys/plib_evsys.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:226: build/e54-xplained-pro/production/_ext/330030563/bsp.o] Error 1
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:220: build/e54-xplained-pro/production/_ext/2071826216/plib_sercom2_usart.o] Error 1
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/129550318/plib_port.o.d -o build/e54-xplained-pro/production/_ext/129550318/plib_port.o ../src/config/e54-xplained-pro/peripheral/port/plib_port.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
cc1.exe: all warnings being treated as errors
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:238: build/e54-xplained-pro/production/_ext/1360937237/main.o] Error 1
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/479429869/initialization.o.d -o build/e54-xplained-pro/production/_ext/479429869/initialization.o ../src/config/e54-xplained-pro/initialization.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:232: build/e54-xplained-pro/production/_ext/268958475/plib_evsys.o] Error 1
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/479429869/interrupts.o.d -o build/e54-xplained-pro/production/_ext/479429869/interrupts.o ../src/config/e54-xplained-pro/interrupts.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:268: build/e54-xplained-pro/production/_ext/129550318/plib_port.o] Error 1
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/266808989/plib_clock.o.d -o build/e54-xplained-pro/production/_ext/266808989/plib_clock.o ../src/config/e54-xplained-pro/peripheral/clock/plib_clock.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:298: build/e54-xplained-pro/production/_ext/479429869/libc_syscalls.o] Error 1
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:244: build/e54-xplained-pro/production/_ext/479429869/initialization.o] Error 1
cc1.exe: all warnings being treated as errors
cc1.exe: all warnings being treated as errors
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:250: build/e54-xplained-pro/production/_ext/479429869/interrupts.o] Error 1
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:274: build/e54-xplained-pro/production/_ext/266808989/plib_clock.o] Error 1
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:286: build/e54-xplained-pro/production/_ext/129940005/plib_cmcc.o] Error 1
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/129940005/plib_cmcc.o.d -o build/e54-xplained-pro/production/_ext/129940005/plib_cmcc.o ../src/config/e54-xplained-pro/peripheral/cmcc/plib_cmcc.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:262: build/e54-xplained-pro/production/_ext/683930343/xc32_monitor.o] Error 1
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/683930343/xc32_monitor.o.d -o build/e54-xplained-pro/production/_ext/683930343/xc32_monitor.o ../src/config/e54-xplained-pro/stdio/xc32_monitor.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
cc1.exe: all warnings being treated as errors
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/479429869/startup_xc32.o.d -o build/e54-xplained-pro/production/_ext/479429869/startup_xc32.o ../src/config/e54-xplained-pro/startup_xc32.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
<command-line>:0:9: error: ISO C99 requires whitespace after the macro name [-Werror]
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:292: build/e54-xplained-pro/production/_ext/479429869/startup_xc32.o] Error 1
cc1.exe: all warnings being treated as errors
"C:\Program Files\Microchip\xc32\v2.40\bin\xc32-gcc.exe" -g -x c -c -mprocessor=ATSAME54P20A -ffunction-sections -fdata-sections -O1 -I../src -I../src/config/e54-xplained-pro -I../src/packs/ATSAME54P20A_DFP -I../src/packs/CMSIS/CMSIS/Core/Include -I../src/packs/CMSIS/ -Werror -Wall -MMD -MF build/e54-xplained-pro/production/_ext/272904846/plib_eic.o.d -o build/e54-xplained-pro/production/_ext/272904846/plib_eic.o ../src/config/e54-xplained-pro/peripheral/eic/plib_eic.c -DXPRJ_e54-xplained-pro=e54-xplained-pro "-mdfp=C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/Microchip/SAME54_DFP/3.2.56" -I "C:/Program Files (x86)/Microchip/MPLABX/v5.35/packs/arm/CMSIS/5.4.0\CMSIS\Core\Include"
make[2]: *** [nbproject/Makefile-e54-xplained-pro.mk:304: build/e54-xplained-pro/production/_ext/272904846/plib_eic.o] Error 1
make[2]: Leaving directory 'C:/Users/r/Projects/mulib-examples/SAME54-XPlained-MPLABX/blinky/firmware/blinky.X'
make[1]: *** [nbproject/Makefile-e54-xplained-pro.mk:94: .build-conf] Error 2
make: *** [nbproject/Makefile-impl.mk:39: .build-impl] Error 2
make[1]: Leaving directory 'C:/Users/r/Projects/mulib-examples/SAME54-XPlained-MPLABX/blinky/firmware/blinky.X'

BUILD FAILED (exit value 2, total time: 1s)

#1
aschen0866
Super Member
  • Total Posts : 4573
  • Reward points : 0
  • Joined: 2006/01/08 22:18:32
  • Location: San Diego
  • Status: offline
Re: "ISO C99 requires whitespace after the macro name" and other errors... 2020/06/20 16:43:15 (permalink) ☼ Best Answerby rdpoor 2020/06/20 17:04:44
5 (1)
The first thing I'll try is to get rid of hyphens in your project configuration name or replace them with underscores, e.g., e54_xplained_pro, instead of e54-xplained-pro.
#2
jtemples
عُضْوٌ جَدِيد
  • Total Posts : 11933
  • Reward points : 0
  • Joined: 2004/02/13 12:31:19
  • Location: Southern California
  • Status: offline
Re: "ISO C99 requires whitespace after the macro name" and other errors... 2020/06/20 17:00:05 (permalink)
5 (1)
Is it your code that's generating the errors or Harmony code?
 
If you notice the "-Werror" in your errors, this means you have enabled treating warnings as errors.
#3
rdpoor
Starting Member
  • Total Posts : 19
  • Reward points : 0
  • Joined: 2019/06/08 02:17:19
  • Location: 0
  • Status: offline
Re: "ISO C99 requires whitespace after the macro name" and other errors... 2020/06/20 17:07:42 (permalink)
4.5 (2)
@aschen0866 got it exactly right: don't put hyphens in your project configuration name.
 
Which begs the question: isn't one of the purposes of an IDE to alert the user about this sort of restriction?  Or maybe that would take all the excitement out of programming...
 
post edited by rdpoor - 2020/06/20 17:15:27
#4
Jump to:
© 2020 APG vNext Commercial Version 4.5