BT porting

This commit has fixed the un-expected behavior when these variables were not initialized to 0 correctly. 

The problem only happens on this porting platform, which is an ARM Cortex M3, with yagarto's GNU ARM tool chain.