From 669c703e46621e42c20e41d4e1d51dc111929906 Mon Sep 17 00:00:00 2001 From: Peter B Date: Thu, 8 Oct 2020 17:28:12 +0200 Subject: [PATCH] Prevent warnings during compilations for MAX32620C In Mbed OS 5.12.0 mbed_toolchain.py has been introduced, that automatically defines the macro TARGET_NAME (on line 241). This leads to a high number of generating the following warning: 'TARGET_NAME' macro redefined while compiling code for MAX32620C on Mbed OS 5.12 and above. This patch fixes it, while it keeps the definition in place for lower versions that lack mbed_toolchain.py --- targets/TARGET_Maxim/TARGET_MAX32620C/device/mxc_device.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/targets/TARGET_Maxim/TARGET_MAX32620C/device/mxc_device.h b/targets/TARGET_Maxim/TARGET_MAX32620C/device/mxc_device.h index 81a4be46f7..3b36bd9ff4 100644 --- a/targets/TARGET_Maxim/TARGET_MAX32620C/device/mxc_device.h +++ b/targets/TARGET_Maxim/TARGET_MAX32620C/device/mxc_device.h @@ -46,7 +46,9 @@ // Create a string definition for the TARGET #define STRING_ARG(arg) #arg #define STRING_NAME(name) STRING_ARG(name) +#if MBED_VERSION && MBED_VERSION < 51200 #define TARGET_NAME STRING_NAME(TARGET) +#endif // Define which revisions of the IP we are using #ifndef TARGET_REV