sim- / tgy

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

Getting errors whilst compiling #90

Open ryanskidmore opened 9 years ago

ryanskidmore commented 9 years ago

Trying to build on Windows using Avrasm2 but running into errors (error log below).

AVRASM: AVR macro assembler 2.1.43 (build 48 May 30 2011 10:07:37)
Copyright (C) 1995-2011 ATMEL Corporation

tgy.asm(53): Including file 'm8def.inc'
tgy.asm(156): error: Unrecognized board type.
tgy.asm(159): warning: Use of undefined or forward referenced symbol 'F_CPU' in .equ/.set
tgy.asm(275): warning: Use of undefined or forward referenced symbol 'USE_ICP' in .equ/.set
tgy.asm(389): error: Illegal use of undefined or forward referenced symbol 'USE_I2C' in conditional
tgy.asm(408): error: Illegal use of undefined or forward referenced symbol 'USE_I2C' in conditional
tgy.asm(475): error: Illegal use of undefined or forward referenced symbol 'USE_I2C' in conditional
tgy.asm(1148): error: Illegal use of undefined or forward referenced symbol 'CPWM_SOFT' in conditional
tgy.asm(1200): error: Illegal use of undefined or forward referenced symbol 'USE_ICP' in conditional
tgy.asm(1422): error: Illegal use of undefined or forward referenced symbol 'CPWM_SOFT' in conditional
tgy.asm(1447): error: Illegal use of undefined or forward referenced symbol 'CPWM_SOFT' in conditional
tgy.asm(1032): error: AnFET_on: Unknown instruction or macro
tgy.asm(1476): info: macro 'PWM_A_on' called here
tgy.asm(1072): error: BnFET_on: Unknown instruction or macro
tgy.asm(1478): info: macro 'PWM_B_on' called here
tgy.asm(1112): error: CnFET_on: Unknown instruction or macro
tgy.asm(1480): info: macro 'PWM_C_on' called here
tgy.asm(1041): error: AnFET_off: Unknown instruction or macro
tgy.asm(1499): info: macro 'PWM_A_off' called here
tgy.asm(1081): error: BnFET_off: Unknown instruction or macro
tgy.asm(1501): info: macro 'PWM_B_off' called here
tgy.asm(1121): error: CnFET_off: Unknown instruction or macro
tgy.asm(1503): info: macro 'PWM_C_off' called here
tgy.asm(1505): error: Illegal use of undefined or forward referenced symbol 'CPWM_SOFT' in conditional
tgy.asm(1571): error: Illegal use of undefined or forward referenced symbol 'USE_ICP' in conditional
tgy.asm(1629): error: Illegal use of undefined or forward referenced symbol 'USE_I2C' in conditional
tgy.asm(1744): error: Illegal use of undefined or forward referenced symbol 'USE_UART' in conditional
tgy.asm(1771): error: BpFET_on: Unknown instruction or macro
tgy.asm(1772): error: AnFET_on: Unknown instruction or macro
tgy.asm(1783): error: CpFET_on: Unknown instruction or macro
tgy.asm(1784): error: BnFET_on: Unknown instruction or macro
tgy.asm(1794): error: ApFET_on: Unknown instruction or macro
tgy.asm(1795): error: CnFET_on: Unknown instruction or macro
tgy.asm(1806): error: CpFET_on: Unknown instruction or macro
tgy.asm(1807): error: AnFET_on: Unknown instruction or macro
tgy.asm(1823): error: all_pFETs_off: Unknown instruction or macro
tgy.asm(1823): error: syntax error, unexpected '\n', expecting ':'

Assembly failed, 28 errors, 2 warnings

The command i'm running is avrasm2 tgy.asm, this is my first time compiling something like this so i'm a little stuck, and any help would be appreciated!

sim- commented 9 years ago

Hello! It looks like you just need to define the target, like -Dafro_nfet_esc :)