thiemar / vectorcontrol

Vector control (FOC) firmware for the S2740VC and PX4ESC 1.6.
MIT License
55 stars 33 forks source link

Build order is contaminating second board built #17

Closed davids5 closed 8 years ago

davids5 commented 8 years ago

@bendyer @LorenzMeier

I suspected we have a build order issue, and I think this will explain why the "Hey this worked for me".....

so I ran this on master @ 031a20fd07bf83e9f6074cbdcd12ee7908e48e9d prior to the recent build changes

#!/bin/bash
make clean
echo "make clean" >hmm.log

BOARD=s2740vc_1_0 make
echo "make BOARD=s2740vc_1_0" >>hmm.log
md5sum firmware/s2740vc_1_0-app.bin >>hmm.log

BOARD=px4esc_1_6 make
echo "make BOARD=px4esc_1_6" >>hmm.log
md5sum firmware/px4esc_1_6-app.bin >>hmm.log

echo "make clean Take 2" >>hmm.log

BOARD=s2740vc_1_0 make
echo "make BOARD=s2740vc_1_0" >>hmm.log
md5sum firmware/s2740vc_1_0-app.bin >>hmm.log

BOARD=px4esc_1_6 make
echo "make BOARD=px4esc_1_6" >>hmm.log
md5sum firmware/px4esc_1_6-app.bin >>hmm.log

make clean
echo "make clean reverse build order" >>hmm.log

BOARD=px4esc_1_6 make
echo "make BOARD=px4esc_1_6" >>hmm.log
md5sum firmware/px4esc_1_6-app.bin >>hmm.log

BOARD=s2740vc_1_0 make 
echo "make BOARD=s2740vc_1_0" >>hmm.log
md5sum firmware/s2740vc_1_0-app.bin >>hmm.log

cat hmm.log

make clean
make BOARD=s2740vc_1_0
c4d01ba74c713dd22d58f56104563e4d  firmware/s2740vc_1_0-app.bin
make BOARD=px4esc_1_6
b8ab0ebecba6b7a1bb05c2d39eaf8480  firmware/px4esc_1_6-app.bin
make clean Take 2
make BOARD=s2740vc_1_0
c4d01ba74c713dd22d58f56104563e4d  firmware/s2740vc_1_0-app.bin
make BOARD=px4esc_1_6
b8ab0ebecba6b7a1bb05c2d39eaf8480  firmware/px4esc_1_6-app.bin
make clean reverse build order
make BOARD=px4esc_1_6
bb6ee8bcbdd6faa906458df577001b48  firmware/px4esc_1_6-app.bin
make BOARD=s2740vc_1_0
59ebcd5aced5ab94fefbc6ef0f6261f0  firmware/s2740vc_1_0-app.bin

Run again:

cat hmm.log 
make clean
make BOARD=s2740vc_1_0
c4d01ba74c713dd22d58f56104563e4d  firmware/s2740vc_1_0-app.bin
make BOARD=px4esc_1_6
b8ab0ebecba6b7a1bb05c2d39eaf8480  firmware/px4esc_1_6-app.bin
make clean Take 2
make BOARD=s2740vc_1_0
c4d01ba74c713dd22d58f56104563e4d  firmware/s2740vc_1_0-app.bin
make BOARD=px4esc_1_6
b8ab0ebecba6b7a1bb05c2d39eaf8480  firmware/px4esc_1_6-app.bin
make clean reverse build order
make BOARD=px4esc_1_6
bb6ee8bcbdd6faa906458df577001b48  firmware/px4esc_1_6-app.bin
make BOARD=s2740vc_1_0
59ebcd5aced5ab94fefbc6ef0f6261f0  firmware/s2740vc_1_0-app.bin
LorenzMeier commented 8 years ago

yuck!

bendyer commented 8 years ago

That was actually fixed in 68e34de—I wanted to compare some assembly listings and needed to keep both sets of files around. Since I always clean when switching boards I didn't pick up the link between build order and the firmware issues. Thanks David, that explains a lot!

davids5 commented 8 years ago

Thank you Ben for fixing that!