Not sure if this is the issue of CubeMX or not but as of CubeMX v4.18, the xml file (.cproject) has been changed slightly from
weak=\"attribute__((weak))\"
to just
weak=attribute__((weak))
So you may need to add the missing quots to the C_DEFS string, i.e.,
C_DEFS = -D__weak="_attribute__((weak))"
instead of
C_DEFS = -D__weak=_attribute__((weak))
line 64. after _CDEFS =-Dweak="__attribute((weak))" -Dpacked="__attribute((__packed__))"
instead of
-Dweak=__attribute((weak)) -Dpacked=__attribute((__packed__))
Not sure if this is the issue of CubeMX or not but as of CubeMX v4.18, the xml file (.cproject) has been changed slightly from weak=\"attribute__((weak))\" to just weak=attribute__((weak))
So you may need to add the missing quots to the C_DEFS string, i.e., C_DEFS = -D__weak="_attribute__((weak))" instead of C_DEFS = -D__weak=_attribute__((weak))