sim- / tgy

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

build: fix for OS X avra 1.3.0 #67

Closed liamstask closed 9 years ago

liamstask commented 9 years ago

i did not investigate the reason that avra on OS X cannot handle this formatting, but keeping everything uniformly formatted is nice, and has the pleasant side effect of fixing the OS X build.

sim- commented 9 years ago

Hmm I think this is probably related to the memory/heap corruption issues that were occurring on my 32-bit .deb build of avra 1.3.0. Would you be able to run avra in valgrind there (not sure about OS X) to see if it changes the output? We really should fix avra here...

liamstask commented 9 years ago

Running in valgrind produces the same binaries, for the 2 that I checked. Output (only included the first file, but all subsequent files were processed successfully, and there was no further output from valgrind) pasted below:

drungus:tgy liam$ valgrind --version
valgrind-3.11.0.SVN
drungus:tgy liam$ valgrind make
==91605== Memcheck, a memory error detector
==91605== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==91605== Using Valgrind-3.11.0.SVN and LibVEX; rerun with -h for copyright info
==91605== Command: make
==91605== 
--91605-- UNKNOWN host message [id 412, to mach_host_self(), reply 0x30f]
--91605-- UNKNOWN host message [id 222, to mach_host_self(), reply 0x30f]
--91605-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option
--91605-- UNKNOWN mach_msg unhandled MACH_SEND_TRAILER option (repeated 2 times)
avra -fI -o afro.hex -D afro_esc -e afro.eeprom -d afro.obj afro.asm
AVRA: advanced AVR macro assembler Version 1.3.0 Build 1 (8 May 2010)
Copyright (C) 1998-2010. Check out README file for more info

   AVRA is an open source assembler for Atmel AVR microcontroller family
   It can be used as a replacement of 'AVRASM32.EXE' the original assembler
   shipped with AVR Studio. We do not guarantee full compatibility for avra.

   AVRA comes with NO WARRANTY, to the extent permitted by law.
   You may redistribute copies of avra under the terms
   of the GNU General Public License.
   For more information about these matters, see the files named COPYING.

Pass 1...
Pass 2...
done

Used memory blocks:
   Data      :  Start = 0x0060, End = 0x0096, Length = 0x0037
   Code      :  Start = 0x0000, End = 0x0570, Length = 0x0571
   Code      :  Start = 0x0E00, End = 0x0FDF, Length = 0x01E0
   Code      :  Start = 0x0FE0, End = 0x0FFF, Length = 0x0020

Assembly complete with no errors.
Segment usage:
   Code      :      1905 words (3810 bytes)
   Data      :        55 bytes
   EEPROM    :         0 bytes
sim- commented 9 years ago

Fixed separately.

liamstask commented 9 years ago

is a link to the fix available?