mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-12-20 21:24:22 -05:00
Fix usb.c and usb_queue.c warnings in our CMakeLists instead of in the files (#2423)
This commit is contained in:
parent
5075349d2d
commit
b38d1012fa
@ -102,6 +102,21 @@ include(external/external.cmake)
|
|||||||
# Define linker script file here
|
# Define linker script file here
|
||||||
set(LDSCRIPT ${PORTLD}/LPC43xx_M0.ld)
|
set(LDSCRIPT ${PORTLD}/LPC43xx_M0.ld)
|
||||||
|
|
||||||
|
# Special case for these two files:
|
||||||
|
# Originally these are compiled for M4 support, but in Mayhem we use them with M0
|
||||||
|
# As a result they are generating a lot of noise warnings
|
||||||
|
# Since they are not really using the defines stated in the warnings
|
||||||
|
# Since the only used one (NVIC_USB0_IRQ) is having the same value in both M0 and M4 mode
|
||||||
|
# => We are faking M4 mode on them
|
||||||
|
set(NO_WARNINGS_USBFILES
|
||||||
|
${HACKRF_PATH}/firmware/common/usb.c
|
||||||
|
${HACKRF_PATH}/firmware/common/usb_queue.c
|
||||||
|
)
|
||||||
|
|
||||||
|
# -DLPC43XX_M4 kills the 'warning: "NVIC_XXXX..." redefined'
|
||||||
|
# -D__ARM_ARCH_7M__ kills the 'warning: implicit declaration of function __ldrex && __sdrex'
|
||||||
|
set_source_files_properties(${NO_WARNINGS_USBFILES} PROPERTIES COMPILE_FLAGS "-DLPC43XX_M4 -D__ARM_ARCH_7M__")
|
||||||
|
|
||||||
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
# C sources that can be compiled in ARM or THUMB mode depending on the global
|
||||||
# setting.
|
# setting.
|
||||||
set(CSRC
|
set(CSRC
|
||||||
@ -118,8 +133,7 @@ set(CSRC
|
|||||||
usb_serial_endpoints.c
|
usb_serial_endpoints.c
|
||||||
usb_serial_device_to_host.c
|
usb_serial_device_to_host.c
|
||||||
i2c_device_to_host.c
|
i2c_device_to_host.c
|
||||||
${HACKRF_PATH}/firmware/common/usb.c
|
${NO_WARNINGS_USBFILES}
|
||||||
${HACKRF_PATH}/firmware/common/usb_queue.c
|
|
||||||
${HACKRF_PATH}/firmware/hackrf_usb/usb_device.c
|
${HACKRF_PATH}/firmware/hackrf_usb/usb_device.c
|
||||||
${HACKRF_PATH}/firmware/common/usb_request.c
|
${HACKRF_PATH}/firmware/common/usb_request.c
|
||||||
${HACKRF_PATH}/firmware/common/usb_standard_request.c
|
${HACKRF_PATH}/firmware/common/usb_standard_request.c
|
||||||
|
Loading…
Reference in New Issue
Block a user