sim- / tgy

tgy -- Open Source Firmware for ATmega-based Brushless ESCs
http://0x.ca/tgy/
688 stars 387 forks source link

MOTOR_BRAKE and BEACON_IDLE result in assembler error #120

Closed ahalekelly closed 7 years ago

ahalekelly commented 7 years ago

When yo set MOTOR_BRAKE = 1 and BEACON_IDLE = 1, both AVRA and avrasm2 crash. AVRA says Error : Branch out of range (-64 <= k <= 63). Any idea what's causing this?

sim- commented 7 years ago

Hello! This should be (finally) fixed now. Sorry about the delay!

The error is just because AVR only supports branching to ±64 words from the "brxx" type of instructions, and enabling those features made the branch too far to reach.