Skip to content

Commit 669c703

Browse files
authored
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
1 parent fee7a1c commit 669c703

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

targets/TARGET_Maxim/TARGET_MAX32620C/device/mxc_device.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
// Create a string definition for the TARGET
4747
#define STRING_ARG(arg) #arg
4848
#define STRING_NAME(name) STRING_ARG(name)
49+
#if MBED_VERSION && MBED_VERSION < 51200
4950
#define TARGET_NAME STRING_NAME(TARGET)
51+
#endif
5052

5153
// Define which revisions of the IP we are using
5254
#ifndef TARGET_REV

0 commit comments

Comments
 (0)