Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4873

SDK • Cmake is throwing warnings

$
0
0
Hello everyone,

Not sure what I did this time but I've got this message after each compile command

Code:

[build] <command-line>: warning: ISO C99 requires whitespace after the macro name
Knowing me I've done something wrong in the CMakeLists.txt so here it is.

Code:

cmake_minimum_required(VERSION 3.13)set(PICO_BOARD_HEADER_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/board)set(PICO_BOARD vga_board)# set(PICO_PLATFORM rp2350)# include build functions from Pico SDKinclude($ENV{PICO_SDK_PATH}/external/pico_sdk_import.cmake)include($ENV{PICO_EXTRAS_PATH}/external/pico_extras_import.cmake)project(pico-test C CXX ASM)set(BINARY "test")set(CMAKE_C_STANDARD 11)set(CMAKE_CXX_STANDARD 17)pico_sdk_init()if (PICO_SDK_VERSION_STRING VERSION_LESS "2.1.0")    message(FATAL_ERROR "Raspberry Pi Pico SDK version 2.1.0 (or later) required.")endif()message("== [ PT52 Loading Libraries ] ==")# Add memory Manageradd_subdirectory(umm_malloc)# Add PT52-VGAadd_subdirectory(PT52-VGA)# ADD PT52_System callsadd_subdirectory(system)# Set PTSH to be loadedset(PROGRAMS_PTSH ON)# Set femto to be loadedset(PROGRAMS_FEMTO ON)# Set Lua to be loadedset(PROGRAMS_LUA OFF)# Add Programsadd_subdirectory(programs)add_executable(  ${BINARY}  # MAIN STARTUP  main.c)if (PICO_RP2350)set_target_properties(${BINARY} PROPERTIES PICO_TARGET_LINKER_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/memmap_RP2350.ld)else()set_target_properties(${BINARY} PROPERTIES PICO_TARGET_LINKER_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/memmap_RP2040.ld)endif()target_compile_definitions(${BINARY} PUBLIC   -DPICO_MALLOC_PANIC=0 #  -DPICO_STDIO_SHORT_CIRCUIT_CLIB_FUNCS=0  )pico_enable_stdio_uart(${BINARY} 0)pico_enable_stdio_usb(${BINARY} 1)pico_add_extra_outputs(${BINARY})target_include_directories(${BINARY} PRIVATE ${CMAKE_CURRENT_LIST_DIR})target_link_libraries(  ${BINARY}  PRIVATE  pico_unique_id  pico_stdlib  umm_malloc  PT52-VGA  PTSH  femto  )
When I build in vscode it uses the -j4 or what ever it does so the output is a mess. but this is a bit of the output without just to see it's everone.

Code:

[ 56%] Building ASM object CMakeFiles/test.dir/tmp/sdk2.1.0/src/rp2_common/pico_crt0/crt0.S.o<command-line>: warning: missing whitespace after the macro name[ 57%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/src/rp2_common/pico_clib_interface/newlib_interface.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 58%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/src/rp2_common/pico_stdio/stdio.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 60%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/src/rp2_common/pico_stdio_usb/reset_interface.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 61%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/src/rp2_common/pico_stdio_usb/stdio_usb.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 62%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/src/rp2_common/pico_stdio_usb/stdio_usb_descriptors.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 62%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/portable/raspberrypi/rp2040/dcd_rp2040.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 63%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/portable/raspberrypi/rp2040/rp2040_usb.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 64%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/device/usbd.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 65%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/device/usbd_control.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 66%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/class/audio/audio_device.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 67%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/class/cdc/cdc_device.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 68%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/class/dfu/dfu_device.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 68%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/class/dfu/dfu_rt_device.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 69%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/class/hid/hid_device.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 70%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/class/midi/midi_device.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 71%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/class/msc/msc_device.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 72%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/class/net/ecm_rndis_device.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 73%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/class/net/ncm_device.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 74%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/class/usbtmc/usbtmc_device.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 74%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/class/vendor/vendor_device.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 75%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/class/video/video_device.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 76%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/tusb.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 77%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/lib/tinyusb/src/common/tusb_fifo.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name[ 78%] Building C object CMakeFiles/test.dir/tmp/sdk2.1.0/src/rp2_common/pico_fix/rp2040_usb_device_enumeration/rp2040_usb_device_enumeration.c.o<command-line>: warning: ISO C99 requires whitespace after the macro name
I've looked at this and can't work it out it's likely right there and I just can see the forest too many trees in the way.

Thanks for the help on this one

Statistics: Posted by DarkElvenAngel — Tue Dec 31, 2024 3:02 am



Viewing all articles
Browse latest Browse all 4873

Trending Articles