AlkaMotors / AM32-MultiRotor-ESC-firmware

Firmware for stm32f051 based speed controllers for use with mutirotors
GNU General Public License v3.0
784 stars 270 forks source link

Add USE_MAKE macro and fix lower case target name #8

Closed DusKing1 closed 3 years ago

DusKing1 commented 3 years ago

I've fixed lower case target names in this PR, and fixed one issue exists in makefile we submit.

Now we can compile all targets correctly.

I'll do a further cleanup in the next PR.

Some explanations:

The #4 and #7 lack the macro USE_MAKE, which causes the compiler fall into the #ifndef case in target.h. In this case, no matter what target we make, the output target .bin is still the target defined by #ifndef then #define MP6531.

image

So we need this USE_MAKE macro.

But the original command in makefile line: 33 -MF"$(@:%.o=%.d)" makes the line: 34 -D$(TARGET) be ignored. So we need to exchange these two lines.

Tested on make ALL, all targets were compiled and built correctly.