Nugroho's blog.

Tuesday, May 12, 2015

ATTiny13A in Assembler

  Here the assembler version

I use file coba.s

.include "tn13Adef.inc"
.def temp = R16
//Pin assignments
.equ LED = PB0 ;pin 5 of ATtiny13
.cseg
.org 0x00
rjmp setup
setup:
//CONFIGURE I/O PINS
ldi temp, (1 << LED)
out PORTB, temp
out DDRB,temp
loop:
rjmp loop

Nugrohos-MacBook-Air:ATTiny13A nugroho$ ls
coba.s

Nugrohos-MacBook-Air:ATTiny13A nugroho$ avr-as -mmcu=attiny13A -o coba.out coba.s
coba.s: Assembler messages:
coba.s:1: Error: can't open tn13Adef.inc for reading: No such file or directory
coba.s:2: Error: unknown pseudo-op: `.def'
coba.s:3: Error: junk at end of line, first unrecognized character is `/'
coba.s:4: Error: expected comma after "LED"
coba.s:5: Error: unknown pseudo-op: `.cseg'
coba.s:9: Error: junk at end of line, first unrecognized character is `/'
coba.s:10: Error: constant value required
coba.s:10: Error: register number above 15 required
coba.s:11: Error: constant value required
coba.s:11: Error: constant value required
coba.s:12: Error: constant value required
coba.s:12: Error: constant value required

Oops, it needs tn13Adef.inc. Fortunately I have that on avrasm2 (it for windows for sure, but the include directory have a bunch of def files we need), copy that to the coba.s folder.



Nugrohos-MacBook-Air:ATTiny13A nugroho$ ls

coba.s tn13Adef.inc


Nugrohos-MacBook-Air:ATTiny13A nugroho$ avr-as -mmcu=attiny13A -o coba.out coba.s

tn13Adef.inc: Assembler messages:
tn13Adef.inc:47: Error: unknown pseudo-op: `.device'
tn13Adef.inc:49: Error: expected comma after "SIGNATURE_000"
tn13Adef.inc:50: Error: expected comma after "SIGNATURE_001"
tn13Adef.inc:51: Error: expected comma after "SIGNATURE_002"
tn13Adef.inc:61: Error: expected comma after "SREG"
tn13Adef.inc:62: Error: expected comma after "SPL"
tn13Adef.inc:63: Error: expected comma after "GIMSK"
tn13Adef.inc:64: Error: expected comma after "GIFR"
tn13Adef.inc:65: Error: expected comma after "TIMSK0"
tn13Adef.inc:66: Error: expected comma after "TIFR0"
tn13Adef.inc:67: Error: expected comma after "SPMCSR"
tn13Adef.inc:68: Error: expected comma after "OCR0A"
tn13Adef.inc:69: Error: expected comma after "MCUCR"
tn13Adef.inc:70: Error: expected comma after "MCUSR"
tn13Adef.inc:71: Error: expected comma after "TCCR0B"
tn13Adef.inc:72: Error: expected comma after "TCNT0"
tn13Adef.inc:73: Error: expected comma after "OSCCAL"
tn13Adef.inc:74: Error: expected comma after "BODCR"
tn13Adef.inc:75: Error: expected comma after "TCCR0A"
tn13Adef.inc:76: Error: expected comma after "DWDR"
tn13Adef.inc:77: Error: expected comma after "OCR0B"
tn13Adef.inc:78: Error: expected comma after "GTCCR"
tn13Adef.inc:79: Error: expected comma after "CLKPR"
tn13Adef.inc:80: Error: expected comma after "PRR"
tn13Adef.inc:81: Error: expected comma after "WDTCR"

tn13Adef.inc:82: Error: expected comma after "EEAR"

tn13Adef.inc:83: Error: expected comma after "EEDR"

tn13Adef.inc:84: Error: expected comma after "EECR"

tn13Adef.inc:85: Error: expected comma after "PORTB"

tn13Adef.inc:86: Error: expected comma after "DDRB"

tn13Adef.inc:87: Error: expected comma after "PINB"

tn13Adef.inc:88: Error: expected comma after "PCMSK"

tn13Adef.inc:89: Error: expected comma after "DIDR0"

tn13Adef.inc:90: Error: expected comma after "ACSR"

tn13Adef.inc:91: Error: expected comma after "ADMUX"

tn13Adef.inc:92: Error: expected comma after "ADCSRA"

tn13Adef.inc:93: Error: expected comma after "ADCH"

tn13Adef.inc:94: Error: expected comma after "ADCL"

tn13Adef.inc:95: Error: expected comma after "ADCSRB"

tn13Adef.inc:102: Error: expected comma after "MUX0"

tn13Adef.inc:103: Error: expected comma after "MUX1"

tn13Adef.inc:104: Error: expected comma after "ADLAR"

tn13Adef.inc:105: Error: expected comma after "REFS0"

tn13Adef.inc:108: Error: expected comma after "ADPS0"

tn13Adef.inc:109: Error: expected comma after "ADPS1"

tn13Adef.inc:110: Error: expected comma after "ADPS2"

tn13Adef.inc:111: Error: expected comma after "ADIE"

tn13Adef.inc:112: Error: expected comma after "ADIF"

tn13Adef.inc:113: Error: expected comma after "ADATE"

tn13Adef.inc:114: Error: expected comma after "ADSC"

tn13Adef.inc:115: Error: expected comma after "ADEN"

tn13Adef.inc:118: Error: expected comma after "ADCH0"

tn13Adef.inc:119: Error: expected comma after "ADCH1"

tn13Adef.inc:120: Error: expected comma after "ADCH2"

tn13Adef.inc:121: Error: expected comma after "ADCH3"

tn13Adef.inc:122: Error: expected comma after "ADCH4"

tn13Adef.inc:123: Error: expected comma after "ADCH5"

tn13Adef.inc:124: Error: expected comma after "ADCH6"

tn13Adef.inc:125: Error: expected comma after "ADCH7"

tn13Adef.inc:128: Error: expected comma after "ADCL0"

tn13Adef.inc:129: Error: expected comma after "ADCL1"

tn13Adef.inc:130: Error: expected comma after "ADCL2"

tn13Adef.inc:131: Error: expected comma after "ADCL3"

tn13Adef.inc:132: Error: expected comma after "ADCL4"

tn13Adef.inc:133: Error: expected comma after "ADCL5"

tn13Adef.inc:134: Error: expected comma after "ADCL6"

tn13Adef.inc:135: Error: expected comma after "ADCL7"

tn13Adef.inc:138: Error: expected comma after "ADTS0"

tn13Adef.inc:139: Error: expected comma after "ADTS1"

tn13Adef.inc:140: Error: expected comma after "ADTS2"

tn13Adef.inc:143: Error: expected comma after "ADC1D"

tn13Adef.inc:144: Error: expected comma after "ADC3D"

tn13Adef.inc:145: Error: expected comma after "ADC2D"

tn13Adef.inc:146: Error: expected comma after "ADC0D"

tn13Adef.inc:151: Error: expected comma after "ACME"

tn13Adef.inc:154: Error: expected comma after "ACIS0"

tn13Adef.inc:155: Error: expected comma after "ACIS1"

tn13Adef.inc:156: Error: expected comma after "ACIE"

tn13Adef.inc:157: Error: expected comma after "ACI"

tn13Adef.inc:158: Error: expected comma after "ACO"

tn13Adef.inc:159: Error: expected comma after "ACBG"

tn13Adef.inc:160: Error: expected comma after "AINBG"

tn13Adef.inc:161: Error: expected comma after "ACD"

tn13Adef.inc:164: Error: expected comma after "AIN0D"

tn13Adef.inc:165: Error: expected comma after "AIN1D"

tn13Adef.inc:170: Error: expected comma after "EEARL"

tn13Adef.inc:171: Error: expected comma after "EEAR0"

tn13Adef.inc:172: Error: expected comma after "EEAR1"

tn13Adef.inc:173: Error: expected comma after "EEAR2"

tn13Adef.inc:174: Error: expected comma after "EEAR3"

tn13Adef.inc:175: Error: expected comma after "EEAR4"

tn13Adef.inc:176: Error: expected comma after "EEAR5"

tn13Adef.inc:179: Error: expected comma after "EEDR0"

tn13Adef.inc:180: Error: expected comma after "EEDR1"

tn13Adef.inc:181: Error: expected comma after "EEDR2"

tn13Adef.inc:182: Error: expected comma after "EEDR3"

tn13Adef.inc:183: Error: expected comma after "EEDR4"

tn13Adef.inc:184: Error: expected comma after "EEDR5"

tn13Adef.inc:185: Error: expected comma after "EEDR6"

tn13Adef.inc:186: Error: expected comma after "EEDR7"

tn13Adef.inc:189: Error: expected comma after "EERE"

tn13Adef.inc:190: Error: expected comma after "EEWE"

tn13Adef.inc:191: Error: expected comma after "EEPE"

tn13Adef.inc:192: Error: expected comma after "EEMWE"

tn13Adef.inc:193: Error: expected comma after "EEMPE"

tn13Adef.inc:194: Error: expected comma after "EERIE"

tn13Adef.inc:195: Error: expected comma after "EEPM0"

tn13Adef.inc:196: Error: expected comma after "EEPM1"

tn13Adef.inc:201: Error: expected comma after "PORTB0"

tn13Adef.inc:202: Error: expected comma after "PB0"

tn13Adef.inc:203: Error: expected comma after "PORTB1"

tn13Adef.inc:204: Error: expected comma after "PB1"

tn13Adef.inc:205: Error: expected comma after "PORTB2"

tn13Adef.inc:206: Error: expected comma after "PB2"

tn13Adef.inc:207: Error: expected comma after "PORTB3"

tn13Adef.inc:208: Error: expected comma after "PB3"

tn13Adef.inc:209: Error: expected comma after "PORTB4"

tn13Adef.inc:210: Error: expected comma after "PB4"

tn13Adef.inc:211: Error: expected comma after "PORTB5"

tn13Adef.inc:212: Error: expected comma after "PB5"

tn13Adef.inc:215: Error: expected comma after "DDB0"

tn13Adef.inc:216: Error: expected comma after "DDB1"

tn13Adef.inc:217: Error: expected comma after "DDB2"

tn13Adef.inc:218: Error: expected comma after "DDB3"

tn13Adef.inc:219: Error: expected comma after "DDB4"

tn13Adef.inc:220: Error: expected comma after "DDB5"

tn13Adef.inc:223: Error: expected comma after "PINB0"

tn13Adef.inc:224: Error: expected comma after "PINB1"

tn13Adef.inc:225: Error: expected comma after "PINB2"

tn13Adef.inc:226: Error: expected comma after "PINB3"

tn13Adef.inc:227: Error: expected comma after "PINB4"

tn13Adef.inc:228: Error: expected comma after "PINB5"

tn13Adef.inc:233: Error: expected comma after "ISC00"

tn13Adef.inc:234: Error: expected comma after "ISC01"

tn13Adef.inc:237: Error: expected comma after "GICR"

tn13Adef.inc:238: Error: expected comma after "PCIE"

tn13Adef.inc:239: Error: expected comma after "INT0"

tn13Adef.inc:242: Error: expected comma after "PCIF"

tn13Adef.inc:243: Error: expected comma after "INTF0"

tn13Adef.inc:246: Error: expected comma after "PCINT0"

tn13Adef.inc:247: Error: expected comma after "PCINT1"

tn13Adef.inc:248: Error: expected comma after "PCINT2"

tn13Adef.inc:249: Error: expected comma after "PCINT3"

tn13Adef.inc:250: Error: expected comma after "PCINT4"

tn13Adef.inc:251: Error: expected comma after "PCINT5"

tn13Adef.inc:256: Error: expected comma after "TOIE0"

tn13Adef.inc:257: Error: expected comma after "OCIE0A"

tn13Adef.inc:258: Error: expected comma after "OCIE0B"

tn13Adef.inc:261: Error: expected comma after "TOV0"

tn13Adef.inc:262: Error: expected comma after "OCF0A"

tn13Adef.inc:263: Error: expected comma after "OCF0B"

tn13Adef.inc:266: Error: expected comma after "OCR0A_0"

tn13Adef.inc:267: Error: expected comma after "OCR0A_1"

tn13Adef.inc:268: Error: expected comma after "OCR0A_2"

tn13Adef.inc:269: Error: expected comma after "OCR0A_3"

tn13Adef.inc:270: Error: expected comma after "OCR0A_4"

tn13Adef.inc:271: Error: expected comma after "OCR0A_5"

tn13Adef.inc:272: Error: expected comma after "OCR0A_6"

tn13Adef.inc:273: Error: expected comma after "OCR0A_7"

tn13Adef.inc:276: Error: expected comma after "WGM00"

tn13Adef.inc:277: Error: expected comma after "WGM01"

tn13Adef.inc:278: Error: expected comma after "COM0B0"

tn13Adef.inc:279: Error: expected comma after "COM0B1"

tn13Adef.inc:280: Error: expected comma after "COM0A0"

tn13Adef.inc:281: Error: expected comma after "COM0A1"

tn13Adef.inc:284: Error: expected comma after "TCNT0_0"

tn13Adef.inc:285: Error: expected comma after "TCNT0_1"

tn13Adef.inc:286: Error: expected comma after "TCNT0_2"

tn13Adef.inc:287: Error: expected comma after "TCNT0_3"

tn13Adef.inc:288: Error: expected comma after "TCNT0_4"

tn13Adef.inc:289: Error: expected comma after "TCNT0_5"

tn13Adef.inc:290: Error: expected comma after "TCNT0_6"

tn13Adef.inc:291: Error: expected comma after "TCNT0_7"

tn13Adef.inc:294: Error: expected comma after "CS00"

tn13Adef.inc:295: Error: expected comma after "CS01"

tn13Adef.inc:296: Error: expected comma after "CS02"

tn13Adef.inc:297: Error: expected comma after "WGM02"

tn13Adef.inc:298: Error: expected comma after "FOC0B"

tn13Adef.inc:299: Error: expected comma after "FOC0A"

tn13Adef.inc:302: Error: expected comma after "OCR0B_0"

tn13Adef.inc:303: Error: expected comma after "OCR0B_1"

tn13Adef.inc:304: Error: expected comma after "OCR0B_2"

tn13Adef.inc:305: Error: expected comma after "OCR0B_3"

tn13Adef.inc:306: Error: expected comma after "OCR0B_4"

tn13Adef.inc:307: Error: expected comma after "OCR0B_5"

tn13Adef.inc:308: Error: expected comma after "OCR0B_6"

tn13Adef.inc:309: Error: expected comma after "OCR0B_7"

tn13Adef.inc:312: Error: expected comma after "PSR10"

tn13Adef.inc:313: Error: expected comma after "TSM"

tn13Adef.inc:318: Error: expected comma after "WDP0"

tn13Adef.inc:319: Error: expected comma after "WDP1"

tn13Adef.inc:320: Error: expected comma after "WDP2"

tn13Adef.inc:321: Error: expected comma after "WDE"

tn13Adef.inc:322: Error: expected comma after "WDCE"

tn13Adef.inc:323: Error: expected comma after "WDP3"

tn13Adef.inc:324: Error: expected comma after "WDTIE"

tn13Adef.inc:325: Error: expected comma after "WDTIF"

tn13Adef.inc:330: Error: expected comma after "SREG_C"

tn13Adef.inc:331: Error: expected comma after "SREG_Z"

tn13Adef.inc:332: Error: expected comma after "SREG_N"

tn13Adef.inc:333: Error: expected comma after "SREG_V"

tn13Adef.inc:334: Error: expected comma after "SREG_S"

tn13Adef.inc:335: Error: expected comma after "SREG_H"

tn13Adef.inc:336: Error: expected comma after "SREG_T"

tn13Adef.inc:337: Error: expected comma after "SREG_I"

tn13Adef.inc:340: Error: expected comma after "SP0"

tn13Adef.inc:341: Error: expected comma after "SP1"

tn13Adef.inc:342: Error: expected comma after "SP2"

tn13Adef.inc:343: Error: expected comma after "SP3"

tn13Adef.inc:344: Error: expected comma after "SP4"

tn13Adef.inc:345: Error: expected comma after "SP5"

tn13Adef.inc:346: Error: expected comma after "SP6"

tn13Adef.inc:347: Error: expected comma after "SP7"

tn13Adef.inc:352: Error: expected comma after "SM0"

tn13Adef.inc:353: Error: expected comma after "SM1"

tn13Adef.inc:354: Error: expected comma after "SE"

tn13Adef.inc:355: Error: expected comma after "PUD"

tn13Adef.inc:358: Error: expected comma after "PORF"

tn13Adef.inc:359: Error: expected comma after "EXTRF"

tn13Adef.inc:360: Error: expected comma after "BORF"

tn13Adef.inc:361: Error: expected comma after "WDRF"

tn13Adef.inc:364: Error: expected comma after "CAL0"

tn13Adef.inc:365: Error: expected comma after "CAL1"

tn13Adef.inc:366: Error: expected comma after "CAL2"

tn13Adef.inc:367: Error: expected comma after "CAL3"

tn13Adef.inc:368: Error: expected comma after "CAL4"

tn13Adef.inc:369: Error: expected comma after "CAL5"

tn13Adef.inc:370: Error: expected comma after "CAL6"

tn13Adef.inc:373: Error: expected comma after "CLKPS0"

tn13Adef.inc:374: Error: expected comma after "CLKPS1"

tn13Adef.inc:375: Error: expected comma after "CLKPS2"

tn13Adef.inc:376: Error: expected comma after "CLKPS3"

tn13Adef.inc:377: Error: expected comma after "CLKPCE"

tn13Adef.inc:380: Error: expected comma after "DWDR0"

tn13Adef.inc:381: Error: expected comma after "DWDR1"

tn13Adef.inc:382: Error: expected comma after "DWDR2"

tn13Adef.inc:383: Error: expected comma after "DWDR3"

tn13Adef.inc:384: Error: expected comma after "DWDR4"

tn13Adef.inc:385: Error: expected comma after "DWDR5"

tn13Adef.inc:386: Error: expected comma after "DWDR6"

tn13Adef.inc:387: Error: expected comma after "DWDR7"

tn13Adef.inc:390: Error: expected comma after "SPMEN"

tn13Adef.inc:391: Error: expected comma after "PGERS"

tn13Adef.inc:392: Error: expected comma after "PGWRT"

tn13Adef.inc:393: Error: expected comma after "RFLB"

tn13Adef.inc:394: Error: expected comma after "CTPB"

tn13Adef.inc:397: Error: expected comma after "PRADC"

tn13Adef.inc:398: Error: expected comma after "PRTIM0"

tn13Adef.inc:401: Error: expected comma after "BPDSE"

tn13Adef.inc:402: Error: expected comma after "BPDS"

tn13Adef.inc:407: Error: expected comma after "LB1"

tn13Adef.inc:408: Error: expected comma after "LB2"

tn13Adef.inc:413: Error: expected comma after "CKSEL0"

tn13Adef.inc:414: Error: expected comma after "CKSEL1"

tn13Adef.inc:415: Error: expected comma after "SUT0"

tn13Adef.inc:416: Error: expected comma after "SUT1"

tn13Adef.inc:417: Error: expected comma after "CKDIV8"

tn13Adef.inc:418: Error: expected comma after "WDTON"

tn13Adef.inc:419: Error: expected comma after "EESAVE"

tn13Adef.inc:420: Error: expected comma after "SPIEN"

tn13Adef.inc:423: Error: expected comma after "RSTDISBL"

tn13Adef.inc:424: Error: expected comma after "BODLEVEL0"

tn13Adef.inc:425: Error: expected comma after "BODLEVEL1"

tn13Adef.inc:426: Error: expected comma after "DWEN"

tn13Adef.inc:427: Error: expected comma after "SELFPRGEN"

tn13Adef.inc:432: Error: unknown pseudo-op: `.def'

tn13Adef.inc:433: Error: unknown pseudo-op: `.def'

tn13Adef.inc:434: Error: unknown pseudo-op: `.def'

tn13Adef.inc:435: Error: unknown pseudo-op: `.def'

tn13Adef.inc:436: Error: unknown pseudo-op: `.def'

tn13Adef.inc:437: Error: unknown pseudo-op: `.def'

tn13Adef.inc:442: Error: expected comma after "FLASHEND"

tn13Adef.inc:443: Error: expected comma after "IOEND"

tn13Adef.inc:444: Error: expected comma after "SRAM_START"

tn13Adef.inc:445: Error: expected comma after "SRAM_SIZE"

tn13Adef.inc:446: Error: expected comma after "RAMEND"

tn13Adef.inc:447: Error: expected comma after "XRAMEND"

tn13Adef.inc:448: Error: expected comma after "E2END"

tn13Adef.inc:449: Error: expected comma after "EEPROMEND"

tn13Adef.inc:450: Error: expected comma after "EEADRBITS"

tn13Adef.inc:459: Error: expected comma after "PAGESIZE"

tn13Adef.inc:464: Error: expected comma after "INT0addr"

tn13Adef.inc:465: Error: expected comma after "PCI0addr"

tn13Adef.inc:466: Error: expected comma after "OVF0addr"

tn13Adef.inc:467: Error: expected comma after "ERDYaddr"

tn13Adef.inc:468: Error: expected comma after "ACIaddr"

tn13Adef.inc:469: Error: expected comma after "OC0Aaddr"

tn13Adef.inc:470: Error: expected comma after "OC0Baddr"

tn13Adef.inc:471: Error: expected comma after "WDTaddr"

tn13Adef.inc:472: Error: expected comma after "ADCCaddr"

tn13Adef.inc:474: Error: expected comma after "INT_VECTORS_SIZE"

coba.s:2: coba.s:2: Error: unknown pseudo-op: `.def'

coba.s:3: Error: junk at end of line, first unrecognized character is `/'

coba.s:4: Error: expected comma after "LED"

coba.s:5: Error: unknown pseudo-op: `.cseg'

coba.s:9: Error: junk at end of line, first unrecognized character is `/'

coba.s:10: Error: constant value required

coba.s:10: Error: register number above 15 required

coba.s:11: Error: constant value required

coba.s:11: Error: constant value required

coba.s:12: Error: constant value required

coba.s:12: Error: constant value required

Nugrohos-MacBook-Air:ATTiny13A nugroho$ ls

coba.s tn13Adef.inc

Nugrohos-MacBook-Air:ATTiny13A nugroho$ mv coba.s coba.asm

Nugrohos-MacBook-Air:ATTiny13A nugroho$ ls

coba.asm tn13Adef.inc


.
hmm, maybe if I change the name to .asm


Nugrohos-MacBook-Air:ATTiny13A nugroho$ ls
coba.s tn13Adef.inc
Nugrohos-MacBook-Air:ATTiny13A nugroho$ mv coba.s coba.asm
Nugrohos-MacBook-Air:ATTiny13A nugroho$ ls
coba.asm tn13Adef.inc
Nugrohos-MacBook-Air:ATTiny13A nugroho$ ls
coba.s tn13Adef.inc
Nugrohos-MacBook-Air:ATTiny13A nugroho$ avr-as -mmcu=attiny13A -o coba.out coba.s
tn13Adef.inc: Assembler messages:
tn13Adef.inc:47: Error: unknown pseudo-op: `.device'
tn13Adef.inc:49: Error: expected comma after "SIGNATURE_000"
tn13Adef.inc:50: Error: expected comma after "SIGNATURE_001"
tn13Adef.inc:51: Error: expected comma after "SIGNATURE_002"
tn13Adef.inc:61: Error: expected comma after "SREG"
tn13Adef.inc:62: Error: expected comma after "SPL"
tn13Adef.inc:63: Error: expected comma after "GIMSK"
tn13Adef.inc:64: Error: expected comma after "GIFR"
tn13Adef.inc:65: Error: expected comma after "TIMSK0"
tn13Adef.inc:66: Error: expected comma after "TIFR0"
tn13Adef.inc:67: Error: expected comma after "SPMCSR"
tn13Adef.inc:68: Error: expected comma after "OCR0A"
tn13Adef.inc:69: Error: expected comma after "MCUCR"
tn13Adef.inc:70: Error: expected comma after "MCUSR"
tn13Adef.inc:71: Error: expected comma after "TCCR0B"
tn13Adef.inc:72: Error: expected comma after "TCNT0"
tn13Adef.inc:73: Error: expected comma after "OSCCAL"
tn13Adef.inc:74: Error: expected comma after "BODCR"
tn13Adef.inc:75: Error: expected comma after "TCCR0A"

What the...

It seems that avr-as not compatible with atmel assembler

(after googling/duckduckgoing, yes, it is not compatible)

so, download avra, an old 2010 release avra

Nugrohos-MacBook-Air:ATTiny13A nugroho$ cd
Nugrohos-MacBook-Air:~ nugroho$ cd Downloads/avr
avra-1.3.0/ avra-1.3.0.tar.bz2 avrdude-6.1.tar
Nugrohos-MacBook-Air:~ nugroho$ cd Downloads/avra-1.3.0
Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ ls
AUTHORS COPYING README doc includes
Build INSTALL TODO examples src
Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ less INSTALL
Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ less README
Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ ls
AUTHORS COPYING README doc includes
Build INSTALL TODO examples src
Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ cd examples/
Nugrohos-MacBook-Air:examples nugroho$ ls
testcode_avra-1_2_3.asm throttle_divide.asm throttle_pulse.asm
testcode_avra-1_3_0.asm throttle_momentum.asm throttle_set_lowpass.asm
throttle.asm throttle_momentum_lowpass.asm tn15def.inc
throttle_backemf.asm throttle_multiply.asm
throttle_dev_set.inc throttle_op_set.inc
Nugrohos-MacBook-Air:examples nugroho$ less tn15def.inc
Nugrohos-MacBook-Air:examples nugroho$ cd ..
Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ cd doc/

Nugrohos-MacBook-Air:doc nugroho$ ls

ChangeLog.html asciidoc-xhtml11.js images layout1.css

Makefile build-website.sh index.html xhtml11-manpage.css

README.html downloads.html index.txt xhtml11-quirks.css

README.txt downloads.txt layout1.conf xhtml11.css

Nugrohos-MacBook-Air:doc nugroho$ less README.

README.: No such file or directory

Nugrohos-MacBook-Air:doc nugroho$ less README.txt

Nugrohos-MacBook-Air:doc nugroho$ cd ..

Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ ls

AUTHORS COPYING README doc includes

Build INSTALL TODO examples src

Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ cd src/

Nugrohos-MacBook-Air:src nugroho$ ls

Makefile.am avra.c coff.h device.h macro.c mnemonic.c

Makefile.in avra.h configure directiv.c makefiles parser.c

args.c bootstrap configure.in expr.c map.c stab.h

args.h coff.c device.c file.c misc.h stdextra.c

Nugrohos-MacBook-Air:src nugroho$ cd makefiles/

Nugrohos-MacBook-Air:makefiles nugroho$ ls

Makefile.amiga.gcc Makefile.emx Makefile.linux Makefile.os2

Makefile.amiga.sas Makefile.lcc Makefile.mingw32 Makefile.osx

Nugrohos-MacBook-Air:makefiles nugroho$ less Makefile.osx

Nugrohos-MacBook-Air:makefiles nugroho$ cd ..

Nugrohos-MacBook-Air:src nugroho$ ls

Makefile.am avra.c coff.h device.h macro.c mnemonic.c

Makefile.in avra.h configure directiv.c makefiles parser.c

args.c bootstrap configure.in expr.c map.c stab.h

args.h coff.c device.c file.c misc.h stdextra.c

Nugrohos-MacBook-Air:src nugroho$ pwd

/Users/nugroho/Downloads/avra-1.3.0/src

Nugrohos-MacBook-Air:src nugroho$ cd ..

Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ pwd

/Users/nugroho/Downloads/avra-1.3.0

Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ ls

AUTHORS COPYING README doc includes

Build INSTALL TODO examples src

Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ less INSTALL

Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ less INSTALL

Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ cd src/

Nugrohos-MacBook-Air:src nugroho$ ls

Makefile.am avra.c coff.h device.h macro.c mnemonic.c

Makefile.in avra.h configure directiv.c makefiles parser.c

args.c bootstrap configure.in expr.c map.c stab.h

args.h coff.c device.c file.c misc.h stdextra.c

Nugrohos-MacBook-Air:src nugroho$ ./configure

configure: error: cannot find install-sh or install.sh in . ./.. ./../..

Nugrohos-MacBook-Air:src nugroho$ less ../INSTALL

Nugrohos-MacBook-Air:src nugroho$ sh ./configure

configure: error: cannot find install-sh or install.sh in . ./.. ./../..

Nugrohos-MacBook-Air:src nugroho$ sh configure

configure: error: cannot find install-sh or install.sh in . ./.. ./../..

Nugrohos-MacBook-Air:src nugroho$ less ../INSTALL


It's like avra refuses to compile on OS X Yosemite use the make command
Nugrohos-MacBook-Air:avra-1.3.0 nugroho$ cd src/
Nugrohos-MacBook-Air:src nugroho$ make -f makefiles/Makefile.osx
gcc -arch i386 -arch x86_64 -arch ppc -o avra args.c avra.c coff.c device.c directiv.c expr.c file.c macro.c map.c mnemonic.c parser.c stdextra.c
gcc: error: unrecognized command line option '-arch'
make: *** [all] Error 1
Nugrohos-MacBook-Air:src nugroho$ gcc
gcc gcc-ar-4.9.2 gcc-ranlib-4.9.2 gccmakedep
gcc-4.9.2 gcc-nm-4.9.2 gccLLVM
Nugrohos-MacBook-Air:src nugroho$ less makefiles/Makefile.osx
Nugrohos-MacBook-Air:src nugroho$ llvm-g
llvm-g++ llvm-gcc
Nugrohos-MacBook-Air:src nugroho$ nano makefiles/Makefile.osx
Nugrohos-MacBook-Air:src nugroho$ pwd
/Users/nugroho/Downloads/avra-1.3.0/src



The GCC didn't recognize the -arch option
and yes..., -arch is opition for GCC from apple
so I decide to use the llvm-gcc by edit Makefile from
CC=gcc

to
CC=llvm-gcc

and
Nugrohos-MacBook-Air:src nugroho$ make -f makefiles/Makefile.osx 

llvm-gcc -arch i386 -arch x86_64 -arch ppc -o avra args.c avra.c coff.c device.c directiv.c expr.c file.c macro.c map.c mnemonic.c parser.c stdextra.c

In file included from args.c:28:

In file included from /usr/include/stdio.h:64:

/usr/include/sys/cdefs.h:680:2: error: Unsupported architecture

#error Unsupported architecture

^

In file included from args.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from args.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_blkcnt_t; /* total blocks */

^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size */

^

/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t */

^

/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/

^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'

typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */

^

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

^

/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'

typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */

^

/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */

^

/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_sigset_t; /* [???] signal set */

^

/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */

^

/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_uid_t; /* [???] user IDs */

^

/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */

^

In file included from args.c:28:

In file included from /usr/include/stdio.h:71:

/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you

mean '__builtin_va_list'?

typedef __darwin_va_list va_list;

^

note: '__builtin_va_list' declared here

In file included from args.c:28:

In file included from /usr/include/stdio.h:72:

/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean

'__darwin_ino_t'?

typedef __darwin_size_t size_t;

^

/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here

typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */

^

In file included from args.c:28:

In file included from /usr/include/stdio.h:436:

/usr/include/sys/_types/_ssize_t.h:30:9: error: unknown type name '__darwin_ssize_t'

typedef __darwin_ssize_t ssize_t;

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

In file included from avra.c:28:

In file included from /usr/include/stdio.h:64:

/usr/include/sys/cdefs.h:680:2: error: Unsupported architecture

#error Unsupported architecture

^

In file included from avra.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from avra.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_blkcnt_t; /* total blocks */

^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size */

^

/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t */

^

/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/

^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'

typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */

^

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

^

/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'

typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */

^

/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */

^

/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_sigset_t; /* [???] signal set */

^

/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */

^

/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_uid_t; /* [???] user IDs */

^

/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */

^

In file included from avra.c:28:

In file included from /usr/include/stdio.h:71:

/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you

mean '__builtin_va_list'?

typedef __darwin_va_list va_list;

^

note: '__builtin_va_list' declared here

In file included from avra.c:28:

In file included from /usr/include/stdio.h:72:

/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean

'__darwin_ino_t'?

typedef __darwin_size_t size_t;

^

/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here

typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */

^

In file included from avra.c:28:

In file included from /usr/include/stdio.h:436:

/usr/include/sys/_types/_ssize_t.h:30:9: error: unknown type name '__darwin_ssize_t'

typedef __darwin_ssize_t ssize_t;

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

In file included from coff.c:29:

In file included from /usr/include/stdio.h:64:

/usr/include/sys/cdefs.h:680:2: error: Unsupported architecture

#error Unsupported architecture

^

In file included from coff.c:29:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from coff.c:29:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_blkcnt_t; /* total blocks */

^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size */

^

/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t */

^

/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/

^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'

typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */

^

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

^

/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'

typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */

^

/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */

^

/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_sigset_t; /* [???] signal set */

^

/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */

^

/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_uid_t; /* [???] user IDs */

^

/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */

^

In file included from coff.c:29:

In file included from /usr/include/stdio.h:71:

/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you

mean '__builtin_va_list'?

typedef __darwin_va_list va_list;

^

note: '__builtin_va_list' declared here

In file included from coff.c:29:

In file included from /usr/include/stdio.h:72:

/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean

'__darwin_ino_t'?

typedef __darwin_size_t size_t;

^

/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here

typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */

^

In file included from coff.c:29:

In file included from /usr/include/stdio.h:436:

/usr/include/sys/_types/_ssize_t.h:30:9: error: unknown type name '__darwin_ssize_t'

typedef __darwin_ssize_t ssize_t;

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

In file included from device.c:30:

In file included from /usr/include/stdlib.h:63:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:32:

/usr/include/sys/cdefs.h:680:2: error: Unsupported architecture

#error Unsupported architecture

^

In file included from device.c:30:

In file included from /usr/include/stdlib.h:63:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from device.c:30:

In file included from /usr/include/stdlib.h:63:

In file included from /usr/include/_types.h:27:

/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_blkcnt_t; /* total blocks */

^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size */

^

/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t */

^

/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/

^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'

typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */

^

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

^

/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'

typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */

^

/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */

^

/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_sigset_t; /* [???] signal set */

^

/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */

^

/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_uid_t; /* [???] user IDs */

^

/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */

^

In file included from device.c:30:

In file included from /usr/include/stdlib.h:65:

In file included from /usr/include/sys/wait.h:109:

In file included from /usr/include/sys/signal.h:81:

/usr/include/machine/signal.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from device.c:30:

In file included from /usr/include/stdlib.h:65:

In file included from /usr/include/sys/wait.h:109:

In file included from /usr/include/sys/signal.h:145:

/usr/include/machine/_mcontext.h:31:2: error: architecture not supported

#error architecture not supported

^

In file included from device.c:30:

In file included from /usr/include/stdlib.h:65:

In file included from /usr/include/sys/wait.h:109:

In file included from /usr/include/sys/signal.h:149:

/usr/include/sys/_types/_sigaltstack.h:39:2: error: unknown type name '__darwin_size_t'; did you

mean '__darwin_ino_t'?

__darwin_size_t ss_size; /* signal stack length */

^

/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here

typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

In file included from directiv.c:28:

In file included from /usr/include/stdio.h:64:

/usr/include/sys/cdefs.h:680:2: error: Unsupported architecture

#error Unsupported architecture

^

In file included from directiv.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from directiv.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_blkcnt_t; /* total blocks */

^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size */

^

/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t */

^

/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/

^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'

typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */

^

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

^

/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'

typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */

^

/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */

^

/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_sigset_t; /* [???] signal set */

^

/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */

^

/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_uid_t; /* [???] user IDs */

^

/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */

^

In file included from directiv.c:28:

In file included from /usr/include/stdio.h:71:

/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you

mean '__builtin_va_list'?

typedef __darwin_va_list va_list;

^

note: '__builtin_va_list' declared here

In file included from directiv.c:28:

In file included from /usr/include/stdio.h:72:

/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean

'__darwin_ino_t'?

typedef __darwin_size_t size_t;

^

/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here

typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */

^

In file included from directiv.c:28:

In file included from /usr/include/stdio.h:436:

/usr/include/sys/_types/_ssize_t.h:30:9: error: unknown type name '__darwin_ssize_t'

typedef __darwin_ssize_t ssize_t;

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

In file included from expr.c:28:

In file included from /usr/include/stdio.h:64:

/usr/include/sys/cdefs.h:680:2: error: Unsupported architecture

#error Unsupported architecture

^

In file included from expr.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from expr.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_blkcnt_t; /* total blocks */

^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size */

^

/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t */

^

/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/

^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'

typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */

^

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

^

/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'

typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */

^

/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */

^

/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_sigset_t; /* [???] signal set */

^

/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */

^

/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_uid_t; /* [???] user IDs */

^

/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */

^

In file included from expr.c:28:

In file included from /usr/include/stdio.h:71:

/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you

mean '__builtin_va_list'?

typedef __darwin_va_list va_list;

^

note: '__builtin_va_list' declared here

In file included from expr.c:28:

In file included from /usr/include/stdio.h:72:

/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean

'__darwin_ino_t'?

typedef __darwin_size_t size_t;

^

/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here

typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */

^

In file included from expr.c:28:

In file included from /usr/include/stdio.h:436:

/usr/include/sys/_types/_ssize_t.h:30:9: error: unknown type name '__darwin_ssize_t'

typedef __darwin_ssize_t ssize_t;

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

In file included from file.c:28:

In file included from /usr/include/stdio.h:64:

/usr/include/sys/cdefs.h:680:2: error: Unsupported architecture

#error Unsupported architecture

^

In file included from file.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from file.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_blkcnt_t; /* total blocks */

^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size */

^

/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t */

^

/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/

^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'

typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */

^

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

^

/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'

typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */

^

/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */

^

/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_sigset_t; /* [???] signal set */

^

/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */

^

/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_uid_t; /* [???] user IDs */

^

/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */

^

In file included from file.c:28:

In file included from /usr/include/stdio.h:71:

/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you

mean '__builtin_va_list'?

typedef __darwin_va_list va_list;

^

note: '__builtin_va_list' declared here

In file included from file.c:28:

In file included from /usr/include/stdio.h:72:

/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean

'__darwin_ino_t'?

typedef __darwin_size_t size_t;

^

/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here

typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */

^

In file included from file.c:28:

In file included from /usr/include/stdio.h:436:

/usr/include/sys/_types/_ssize_t.h:30:9: error: unknown type name '__darwin_ssize_t'

typedef __darwin_ssize_t ssize_t;

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

In file included from macro.c:33:

In file included from /usr/include/stdio.h:64:

/usr/include/sys/cdefs.h:680:2: error: Unsupported architecture

#error Unsupported architecture

^

In file included from macro.c:33:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from macro.c:33:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_blkcnt_t; /* total blocks */

^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size */

^

/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t */

^

/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/

^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'

typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */

^

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

^

/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'

typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */

^

/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */

^

/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_sigset_t; /* [???] signal set */

^

/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */

^

/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_uid_t; /* [???] user IDs */

^

/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */

^

In file included from macro.c:33:

In file included from /usr/include/stdio.h:71:

/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you

mean '__builtin_va_list'?

typedef __darwin_va_list va_list;

^

note: '__builtin_va_list' declared here

In file included from macro.c:33:

In file included from /usr/include/stdio.h:72:

/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean

'__darwin_ino_t'?

typedef __darwin_size_t size_t;

^

/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here

typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */

^

In file included from macro.c:33:

In file included from /usr/include/stdio.h:436:

/usr/include/sys/_types/_ssize_t.h:30:9: error: unknown type name '__darwin_ssize_t'

typedef __darwin_ssize_t ssize_t;

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

In file included from map.c:28:

In file included from /usr/include/stdio.h:64:

/usr/include/sys/cdefs.h:680:2: error: Unsupported architecture

#error Unsupported architecture

^

In file included from map.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from map.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_blkcnt_t; /* total blocks */

^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size */

^

/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t */

^

/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/

^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'

typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */

^

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

^

/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'

typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */

^

/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */

^

/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_sigset_t; /* [???] signal set */

^

/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */

^

/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_uid_t; /* [???] user IDs */

^

/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */

^

In file included from map.c:28:

In file included from /usr/include/stdio.h:71:

/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you

mean '__builtin_va_list'?

typedef __darwin_va_list va_list;

^

note: '__builtin_va_list' declared here

In file included from map.c:28:

In file included from /usr/include/stdio.h:72:

/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean

'__darwin_ino_t'?

typedef __darwin_size_t size_t;

^

/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here

typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */

^

In file included from map.c:28:

In file included from /usr/include/stdio.h:436:

/usr/include/sys/_types/_ssize_t.h:30:9: error: unknown type name '__darwin_ssize_t'

typedef __darwin_ssize_t ssize_t;

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

In file included from mnemonic.c:28:

In file included from /usr/include/stdio.h:64:

/usr/include/sys/cdefs.h:680:2: error: Unsupported architecture

#error Unsupported architecture

^

In file included from mnemonic.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from mnemonic.c:28:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_blkcnt_t; /* total blocks */

^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size */

^

/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t */

^

/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/

^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'

typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */

^

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

^

/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'

typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */

^

/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */

^

/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_sigset_t; /* [???] signal set */

^

/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */

^

/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_uid_t; /* [???] user IDs */

^

/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */

^

In file included from mnemonic.c:28:

In file included from /usr/include/stdio.h:71:

/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you

mean '__builtin_va_list'?

typedef __darwin_va_list va_list;

^

note: '__builtin_va_list' declared here

In file included from mnemonic.c:28:

In file included from /usr/include/stdio.h:72:

/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean

'__darwin_ino_t'?

typedef __darwin_size_t size_t;

^

/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here

typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */

^

In file included from mnemonic.c:28:

In file included from /usr/include/stdio.h:436:

/usr/include/sys/_types/_ssize_t.h:30:9: error: unknown type name '__darwin_ssize_t'

typedef __darwin_ssize_t ssize_t;

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

In file included from parser.c:34:

In file included from /usr/include/stdio.h:64:

/usr/include/sys/cdefs.h:680:2: error: Unsupported architecture

#error Unsupported architecture

^

In file included from parser.c:34:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from parser.c:34:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_blkcnt_t; /* total blocks */

^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size */

^

/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t */

^

/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/

^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'

typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */

^

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

^

/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'

typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */

^

/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */

^

/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_sigset_t; /* [???] signal set */

^

/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */

^

/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_uid_t; /* [???] user IDs */

^

/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */

^

In file included from parser.c:34:

In file included from /usr/include/stdio.h:71:

/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you

mean '__builtin_va_list'?

typedef __darwin_va_list va_list;

^

note: '__builtin_va_list' declared here

In file included from parser.c:34:

In file included from /usr/include/stdio.h:72:

/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean

'__darwin_ino_t'?

typedef __darwin_size_t size_t;

^

/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here

typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */

^

In file included from parser.c:34:

In file included from /usr/include/stdio.h:436:

/usr/include/sys/_types/_ssize_t.h:30:9: error: unknown type name '__darwin_ssize_t'

typedef __darwin_ssize_t ssize_t;

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

In file included from stdextra.c:32:

In file included from /usr/include/stdio.h:64:

/usr/include/sys/cdefs.h:680:2: error: Unsupported architecture

#error Unsupported architecture

^

In file included from stdextra.c:32:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

In file included from /usr/include/sys/_types.h:33:

/usr/include/machine/_types.h:34:2: error: architecture not supported

#error architecture not supported

^

In file included from stdextra.c:32:

In file included from /usr/include/stdio.h:67:

In file included from /usr/include/_types.h:27:

/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_blkcnt_t; /* total blocks */

^

/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_blksize_t; /* preferred block size */

^

/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_dev_t; /* dev_t */

^

/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_gid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_id_t; /* [XSI] pid_t, uid_t, or gid_t*/

^

/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'

typedef __uint64_t __darwin_ino64_t; /* [???] Used for 64 bit inodes */

^

/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'

typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */

^

/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'

typedef __uint16_t __darwin_mode_t; /* [???] Some file attributes */

^

/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'

typedef __int64_t __darwin_off_t; /* [???] Used for file sizes */

^

/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_pid_t; /* [???] process and group IDs */

^

/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_sigset_t; /* [???] signal set */

^

/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'

typedef __int32_t __darwin_suseconds_t; /* [???] microseconds */

^

/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_uid_t; /* [???] user IDs */

^

/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'

typedef __uint32_t __darwin_useconds_t; /* [???] microseconds */

^

In file included from stdextra.c:32:

In file included from /usr/include/stdio.h:71:

/usr/include/sys/_types/_va_list.h:31:9: error: unknown type name '__darwin_va_list'; did you

mean '__builtin_va_list'?

typedef __darwin_va_list va_list;

^

note: '__builtin_va_list' declared here

In file included from stdextra.c:32:

In file included from /usr/include/stdio.h:72:

/usr/include/sys/_types/_size_t.h:30:9: error: unknown type name '__darwin_size_t'; did you mean

'__darwin_ino_t'?

typedef __darwin_size_t size_t;

^

/usr/include/sys/_types.h:64:26: note: '__darwin_ino_t' declared here

typedef __darwin_ino64_t __darwin_ino_t; /* [???] Used for inodes */

^

In file included from stdextra.c:32:

In file included from /usr/include/stdio.h:436:

/usr/include/sys/_types/_ssize_t.h:30:9: error: unknown type name '__darwin_ssize_t'

typedef __darwin_ssize_t ssize_t;

^

fatal error: too many errors emitted, stopping now [-ferror-limit=]

20 errors generated.

make: *** [all] Error 1


go edit the Makefile again, remove -arch ppc, we're no longer used it anyway, :)
/Users/nugroho/Downloads/avra-1.3.0/src

Nugrohos-MacBook-Air:src nugroho$ nano makefiles/Makefile.osx

Nugrohos-MacBook-Air:src nugroho$ make -f makefiles/Makefile.osx

llvm-gcc -arch i386 -arch x86_64 -o avra args.c avra.c coff.c device.c directiv.c expr.c file.c macro.c map.c mnemonic.c parser.c stdextra.c

Nugrohos-MacBook-Air:src nugroho$ avr

avr-addr2line avr-elfedit avr-gcc-ranlib avr-info avr-objdump avr-strings

avr-ar avr-g++ avr-gcc-select avr-ld avr-project avr-strip

avr-as avr-gcc avr-gcov avr-ld.bfd avr-ranlib avrdude

avr-c++ avr-gcc-4.8.1 avr-gdb avr-man avr-readelf

avr-c++filt avr-gcc-ar avr-gprof avr-nm avr-run

avr-cpp avr-gcc-nm avr-help avr-objcopy avr-size

Nugrohos-MacBook-Air:src nugroho$ ls

Makefile.am avra.c config.log directiv.c map.c stdextra.c

Makefile.in avra.h configure expr.c misc.h

args.c bootstrap configure.in file.c mnemonic.c

args.h coff.c device.c macro.c parser.c

avra coff.h device.h makefiles stab.h

Nugrohos-MacBook-Air:src nugroho$ ./avra

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.



usage: avra [-f][O|M|I|G] output file type

[-o ] output file name

[-l ] generate list file

[-m ] generate map file

[--define [=]] [--includedir ] [--listmac]

[--max_errors ] [--devices] [--version]

[-h] [--help] general help





--listfile -l : Create list file

--mapfile -m : Create map file

--define -D : Define symbol.

--includepath -I : Additional include paths.

--listmac : List macro expansion in listfile.

--max_errors : Maximum number of errors before exit

(default: 10)

--devices : List out supported devices.

--version : Version information.

--help, -h : This help text.



Just replace the AVRASM32.EXE with AVRA.EXE in your

AVRStudio directories to avra's binary.



Yes, I'm cool, :)

Nugrohos-MacBook-Air:src nugroho$ cp avra /usr/local/bin/

cp: /usr/local/bin/avra: Permission denied

Nugrohos-MacBook-Air:src nugroho$ sudo cp avra /usr/local/bin/

Nugrohos-MacBook-Air:src nugroho$ avr

avr-addr2line avr-elfedit avr-gcc-ranlib avr-info avr-objdump avr-strings

avr-ar avr-g++ avr-gcc-select avr-ld avr-project avr-strip

avr-as avr-gcc avr-gcov avr-ld.bfd avr-ranlib avra

avr-c++ avr-gcc-4.8.1 avr-gdb avr-man avr-readelf avrdude

avr-c++filt avr-gcc-ar avr-gprof avr-nm avr-run

avr-cpp avr-gcc-nm avr-help avr-objcopy avr-size

Nugrohos-MacBook-Air:src nugroho$ cd

back to ATTiny folder
Nugrohos-MacBook-Air:~ nugroho$ cd Desktop/mikrocontroller/ATTiny/

.DS_Store Makefile main.bin main.elf main.lst main.o output.txt

ATTiny13A/ blink/ main.c main.hex main.map main.srec

Nugrohos-MacBook-Air:~ nugroho$ cd Desktop/mikrocontroller/ATTiny/ATTiny13A/

Nugrohos-MacBook-Air:ATTiny13A nugroho$ ls

coba.s tn13Adef.inc

Nugrohos-MacBook-Air:ATTiny13A nugroho$ avra

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.



usage: avra [-f][O|M|I|G] output file type

[-o ] output file name

[-l ] generate list file

[-m ] generate map file

[--define [=]] [--includedir ] [--listmac]

[--max_errors ] [--devices] [--version]

[-h] [--help] general help





--listfile -l : Create list file

--mapfile -m : Create map file

--define -D : Define symbol.

--includepath -I : Additional include paths.

--listmac : List macro expansion in listfile.

--max_errors : Maximum number of errors before exit

(default: 10)

--devices : List out supported devices.

--version : Version information.

--help, -h : This help text.



Just replace the AVRASM32.EXE with AVRA.EXE in your

AVRStudio directories to avra's binary.

Nugrohos-MacBook-Air:ATTiny13A nugroho$ ls

coba.s tn13Adef.inc

Nugrohos-MacBook-Air:ATTiny13A nugroho$ mv coba.asm

usage: mv [-f | -i | -n] [-v] source target

mv [-f | -i | -n] [-v] source ... directory

Nugrohos-MacBook-Air:ATTiny13A nugroho$ mv coba.s coba.asm

Nugrohos-MacBook-Air:ATTiny13A nugroho$ ls

coba.asm tn13Adef.inc

Nugrohos-MacBook-Air:ATTiny13A nugroho$ avra -o coba.o coba.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...

tn13Adef.inc(44) : PRAGMA directives currently ignored

tn13Adef.inc(48) : PRAGMA directives currently ignored

tn13Adef.inc(53) : PRAGMA directives currently ignored

tn13Adef.inc(54) : PRAGMA directives currently ignored

tn13Adef.inc(451) : PRAGMA directives currently ignored

tn13Adef.inc(452) : PRAGMA directives currently ignored

tn13Adef.inc(453) : PRAGMA directives currently ignored

tn13Adef.inc(454) : PRAGMA directives currently ignored

coba.asm(3) : Error : Unknown mnemonic/macro: //pin

coba.asm(9) : Error : Unknown mnemonic/macro: //configure

Nugrohos-MacBook-Air:ATTiny13A nugroho$ nano coba.asm

Nugrohos-MacBook-Air:ATTiny13A nugroho$ nano coba.asm

Nugrohos-MacBook-Air:ATTiny13A nugroho$ avra -o coba.o coba.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...

tn13Adef.inc(44) : PRAGMA directives currently ignored

tn13Adef.inc(48) : PRAGMA directives currently ignored

tn13Adef.inc(53) : PRAGMA directives currently ignored

tn13Adef.inc(54) : PRAGMA directives currently ignored

tn13Adef.inc(451) : PRAGMA directives currently ignored

tn13Adef.inc(452) : PRAGMA directives currently ignored

tn13Adef.inc(453) : PRAGMA directives currently ignored

tn13Adef.inc(454) : PRAGMA directives currently ignored

Pass 2...

tn13Adef.inc(44) : PRAGMA directives currently ignored

tn13Adef.inc(48) : PRAGMA directives currently ignored

tn13Adef.inc(53) : PRAGMA directives currently ignored

tn13Adef.inc(54) : PRAGMA directives currently ignored

tn13Adef.inc(451) : PRAGMA directives currently ignored

tn13Adef.inc(452) : PRAGMA directives currently ignored

tn13Adef.inc(453) : PRAGMA directives currently ignored

tn13Adef.inc(454) : PRAGMA directives currently ignored

done



Used memory blocks:

Code : Start = 0x0000, End = 0x0004, Length = 0x0005



Assembly complete with no errors.

Segment usage:

Code : 5 words (10 bytes)

Data : 0 bytes

EEPROM : 0 bytes

Nugrohos-MacBook-Air:ATTiny13A nugroho$ ls

coba.asm coba.cof coba.eep.hex coba.hex coba.obj tn13Adef.inc

Nugrohos-MacBook-Air:ATTiny13A nugroho$ nano tn13Adef.inc

Nugrohos-MacBook-Air:ATTiny13A nugroho$ avra -o coba.o coba.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:

Code : Start = 0x0000, End = 0x0004, Length = 0x0005



Assembly complete with no errors.

Segment usage:

Code : 5 words (10 bytes)

Data : 0 bytes

EEPROM : 0 bytes


It compile, but not without the mountain of warning

What the heck is PRAGMA? So avra's not fully compatible with ATMEL Assembler (of course, :) ) comment out the code in tn13Adef.inc and we're good to go

And it seems avra directly compile to hex file, not the .o file so



Nugrohos-MacBook-Air:ATTiny13A nugroho$ avra -o coba.hex coba.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:
Code : Start = 0x0000, End = 0x0004, Length = 0x0005
Assembly complete with no errors.
Segment usage:
Code : 5 words (10 bytes)
Data : 0 bytes
EEPROM : 0 bytes


Yup, it's hex file. Check it with vavrdisasm
Nugrohos-MacBook-Air:ATTiny13A nugroho$ vavrdisasm coba.hex 
0: c0 00 rjmp .+0 ; 0x2
2: e0 01 ldi R16, 0x01
4: bb 08 out $18, R16
6: bb 07 out $17, R16
8: cf ff rjmp .-2 ; 0x8
Nugrohos-MacBook-Air:ATTiny13A nugroho$



And all is well, :)
(will upload the hex using avrdude next, maybe trying AVRFuse)


AVRStudio atau Atmel studio tidak tersedia untuk OS X Yosemite, sehingga kita harus menggunakan avr-gcc atau avr-as untuk melakukannya. 

Dan avr-as tidak kompatibel dengan perintah-perintah assembler dari ATMEL. Solusinya di OS X adalah dengan menginstall avra. Namun avra adalah program lama, update terbarunya pada tahun 2010 sehingga susah dicompile. (ada binary untuk os x tetapi tidak disarankan)

gcc tidak dapat mengcompile avra; kita harus menggunakan llvm-gcc punya apple dengan mengedit file Makefile, mengubah CC=gcc ke CC=llvm-gcc, juga hilangkan -arch ppc karena akan mengakibatkan error.

Dan kita dapat memprogram ATTiny di OS X. :)


Monday, May 11, 2015

Getting Started with AtTiny13A on My Macbook Air with Yosemite


 After several success attempt with arduino mini and nano (both using ATMega328), I’m curious about programming some chip in assembler. Yeah, I know we could use arduino board to do it. But I prefer to do it the “right way”, as pure assembler novice, :) 

So I grab the 1$ ATTiny13A and 2$ USBASP knockoff. Almost forgot the second as I think I already have one used on my Arduino Pro Mini (no, it’s USB-to-TTL, PL2303HX, only have vcc-gnd-tx-rx pins, completely different device).

Turn out that my ‘other’ have some use in my system (my usbasp couldnt provide 5v power, atleast at my system, so I use usb-to-ttl instead)

USBASP already detected on My Macbook Air, so no driver needed, :)


Test Programmer and connectivity

Nugrohos-MacBook-Air:ATTiny nugroho$ avrdude -p t13 -c usbasp

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9007

avrdude: safemode: Fuses OK (H:FF, E:FF, L:6A)

avrdude done.  Thank you.

Create the file main.c, a code to blink LED on Port B0. (Okay, it's not assembly yet, just to test if my minimal system works, will do in assembler next)
#include <avr/io.h>
#include <util/delay.h>

/*

Blinks an LED connected to pin B0.

Assumes the positive pin of the LED is connected to B0.
The negative pin is connected through a resistor to GND.

A 1K resistor works well for most LEDs.
Decrease if too dim.

*/

int main(void) {
    DDRB = 255U; // Make all PB* -- PORT B -- pins output
    PORTB = 0x0// turn all PB* -- PORT B -- pins off.
    
    while (1) {
        PORTB = 0x1// high 
        _delay_ms(250);  // 1/4 second on
        PORTB = 0X0// low
        _delay_ms(2500); // 2.5 seconds off
    }

}


create the Makefile

PRG            = main
OBJ = main.o
PROGRAMMER = usbasp
PORT = usb
MCU_TARGET = attiny13
AVRDUDE_TARGET = attiny13
OPTIMIZE = -Os
DEFS =
LIBS =

HZ = 9600000


CC = avr-gcc


override CFLAGS = -g -DF_CPU=$(HZ) -Wall $(OPTIMIZE) -mmcu=$(MCU_TARGET) $(DEFS)
override LDFLAGS = -Wl,-Map,$(PRG).map

OBJCOPY = avr-objcopy
OBJDUMP = avr-objdump

all: $(PRG).elf lst text #eeprom

$(PRG).elf: $(OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

clean:
rm -rf *.o $(PRG).elf *.eps *.png *.pdf *.bak *.hex *.bin *.srec
rm -rf *.lst *.map $(EXTRA_CLEAN_FILES)

lst: $(PRG).lst

%.lst: %.elf
$(OBJDUMP) -h -S $< > $@

text: hex bin srec

hex: $(PRG).hex
bin: $(PRG).bin
srec: $(PRG).srec

%.hex: %.elf
$(OBJCOPY) -j .text -j .data -O ihex $< $@

%.srec: %.elf
$(OBJCOPY) -j .text -j .data -O srec $< $@

%.bin: %.elf
$(OBJCOPY) -j .text -j .data -O binary $< $@


eeprom: ehex ebin esrec


ehex: $(PRG)_eeprom.hex
esrec: $(PRG)_eeprom.srec

%_eeprom.hex: %.elf
$(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O ihex $< $@


%_eeprom.bin: %.elf
$(OBJCOPY) -j .eeprom --change-section-lma .eeprom=0 -O binary $< $@


install: $(PRG).hex
avrdude -p $(AVRDUDE_TARGET) -c $(PROGRAMMER) -P $(PORT) -v \
-U flash:w:$(PRG).hex

(note: although we use ATTiny13A, we have to declare it as ATTiny13 or it won’t upload :) )
compile it

Nugrohos-MacBook-Air:ATTiny nugroho$ make
avr-gcc -g -DF_CPU=9600000 -Wall -Os -mmcu=attiny13     -c -o main.o main.c
avr-gcc -g -DF_CPU=9600000 -Wall -Os -mmcu=attiny13   -Wl,-Map,main.map -o main.elf main.o 
avr-objdump -h -S main.elf > main.lst
avr-objcopy -j .text -j .data -O ihex main.elf main.hex
avr-objcopy -j .text -j .data -O binary main.elf main.bin
avr-objcopy -j .text -j .data -O srec main.elf main.srec

Nugrohos-MacBook-Air:ATTiny nugroho$
upload it to ATTiny13 using make install

Nugrohos-MacBook-Air:ATTiny nugroho$ make install
avrdude -p attiny13 -c usbasp -P usb -v  \
         -U flash:w:main.hex

avrdude: Version 6.0.1, compiled on Dec 16 2013 at 17:26:24
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "/usr/local/CrossPack-AVR-20131216/etc/avrdude.conf"
         User configuration file is "/Users/nugroho/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : usb
         Using Programmer              : usbasp
         AVR Part                      : ATtiny13
         Chip Erase delay              : 4000 us
         PAGEL                         : P00
         BS2                           : P00
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65     5     4    0 no         64    4      0  4000  4000 0xff 0xff
           flash         65     6    32    0 yes      1024   32     32  4500  4500 0xff 0xff
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          2    0      0     0     0 0x00 0x00
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00

         Programmer Type : usbasp
         Description     : USBasp, http://www.fischl.de/usbasp/

avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9007
avrdude: safemode: lfuse reads as 6A
avrdude: safemode: hfuse reads as FF
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: auto set sck period (because given equals null)
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "main.hex"
avrdude: input file main.hex auto detected as Intel Hex
avrdude: writing flash (88 bytes):

Writing | ################################################## | 100% 0.08s

avrdude: 88 bytes of flash written
avrdude: verifying flash memory against main.hex:
avrdude: load data flash data from input file main.hex:
avrdude: input file main.hex auto detected as Intel Hex
avrdude: input file main.hex contains 88 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.05s

avrdude: verifying ...
avrdude: 88 bytes of flash verified

avrdude: safemode: lfuse reads as 6A
avrdude: safemode: hfuse reads as FF
avrdude: safemode: Fuses OK (H:FF, E:FF, L:6A)

avrdude done.  Thank you.

Nugrohos-MacBook-Air:ATTiny nugroho$

And we're good to go
















Setelah beberapa sukses dengan Aarduino pro mini dan nano (keduanya menggunakan ATMega328), saya tertarik dengan  memprogram beberapa chip menggunaka bahasa assembly (atau assembler). Tentu saja kita bisa menggunakan arduino untuk melakukan itu namun saya ingin merasakan pemrograman asembler dengan cara klasik, menggunakan sistem minimal dan upload manual, :)

(di post ini saya masih menggunakan c untuk mengetes bahwa sistem telah bekerja, dapat mengupload hex file)

Jadilah saya memakai ATTiny13A, ISP programmer atau downloader SPI palsu, USBASP. Yang ini hampir lupa karena saya pikir telah punya PL2303HX ,USB-To-TTL yang biasa saya gunakan untuk mengupload sketch arduino, dengan pin vcc-gnd-tx-rx.

Ternyata USB-to-TTL saya memang berguna juga karena USBASP saya tak bisa memberi tegangan 5v ke sistem minimal, hanya dapat digunakan untuk upload file hex ke ATTiny13A.

Tak perlu driver, OS X telah mendeteksi USBASP saya secara otomatis

Friday, May 8, 2015

Rembulan Sepasi

 Rembulan antara purnama dan separo akhir.

 Alfa tetap menyebut sebagai bulan purnama kalo pagi-pagi kuantar ke rumah budhe, gandeng tangan kiriku, belum mandi, sambil ditambah "bulan purnama-nya dimakan jerapah", yeah, kebanyakan lihat Gazoon.

 Beta, sudah mandi, ikut-ikutan mas-nya, tapi belum cukup fasih bicara tuk melafalkan bulan purnama, jadinya dia baru bisa bilang " hua.. mama.." sambil lepas gandengan tangan kanan ayahnya dan segera minta gendong, tujuannya agar bisa dadah bulan sambil maksa narik tangan ayahnya tuk ikut dadah juga " dadah, hua...".

Dia ingat kebiasaan mas-nya yang selalu menyapa dengan dadah kalo lihat bulan sabit sore hari di barat atau pagi hari di timur, setelah bangun tidur, sambil nunggu pus berwarna calico entah punya siapa yang selalu menyapa Beta tiap jam lima pagi dan berlalu setelah beta nongol dari pintu garasi.

Eh iya, si calico punya anak tiga, dan salah satunya ikut kebiasaan induknya manggil-manggil Beta tiap jam lima pagi. Bahkan sering kulihat satu anak si calico ini, yang juga berwarna calico, tidur di keset depan rumah. Sampai-sampai Alfa, kalo ketemu si calico kecil, mulai bilang "loh ada pus kecil punya adik Kinan". Kalo kutanya "lha yang besar punya siapa", dia langsung mengklaim "punya mas Yayan", :)













Thursday, May 7, 2015

Evolusi Musik Sheila On 7


 Ada apa dengan musik Sheila On 7? 

 Ingat lagu Dan di album pertama? Lagu yang sederhana dengan akord/kunci standar. Tapi banyak yang kesulitan meniru sound yang khas di lagu itu. Beberapa tahun berikutnya, setelah beberapa kali melihat performance live mereka, baru sadar bahwa Anton tidak memukul hihat di separuh pertama lagu, dia memukul floor Tom. Itu yang membuat suara khas intro Dan, juga membuat seakan-akan tempo setengah lagu lebih lambat dari paruh berikutnya yang tiba-tiba sekan jadi lebih cepat (padahal tetap sama) dan jadi lebih segar (Anton mulai menggunakan HiHat).

Yang jadi fokus saya dulu adalah melodi gitar Eross. Di Dan, not demi not bisa saya tiru, namun lagi-lagi tidak bisa memiliki feel yang sama dengan aslinya (tentu saja, namun setidaknya saya ingin bisa mendekati, dan ternyata susah). Sebulan yang lalu (artinya hampir 16 tahun kemudian), saya menemukan bahwa Eross melakukan melodi itu hampir selalu di senar nomor dua sembari memetik senar pertama (nada e tinggi) terus menerus, memberi efek khas Dan. (Itu juga saat saya menemukan bahwa Slash pun melakukan itu di melodi Welcome to The Jungle)

Ohya, di tiga album pertama Sheila On 7 mereka melakukan detuning pada gitar mereka. Nada diturunkan satu fret, jadi misal ingin mengikuti lagu-lagu Sheila On 7 di periode ini, senar gitar kita harus kita kendorkan hingga setem-an kita turun setengah nada. (Ini yang membuat saya menghubungkan mereka dengan Guns n Roses, meski tidak ada persamaan sama sekali :D , Slash merekam Appetite for Destruction dan Use Your Illusion menggunakan gitar yang tuning-nya diturunkan satu semitone).

Suara gitar Eross susah ditiru; setidaknya bagi saya dulu. Saya sebagai gitaris band metal saat SMU dan  susah sekali  meniru sound Sheila On 7 yang khas itu. (Eit, lagipula ngapain gitaris metal memainkan lagu pop? Heheh..). 

Ternyata kuncinya adalah “metal”. Efek yang saya gunakan adalah Boss Metal Zone dan drive/gain hampir selalu diputar penuh untuk menghasilkan melodi seempuk dan sustain sepanjang mungkin. Dengan drive/gain maksimal gitar juga jadi gampang untuk ‘menjerit’, baik itu pakai natural, artificial maupun pinched harmonik. 

Tetapi dengan drive/gain dibuka penuh akord akan kehilangan nada penyusunnya, kita hanya bisa mendengar “zet zet zet", atau "djent djent djent”  yang menjadi ciri khas metal/hardrock. Sound Sheila sama sekali lain, meski jelas memakai efek gitar (stompbox atau built in ampli), namun not individu yang membentuk akord masih terdengar, rahasianya, drive jangan dibuka penuh sehingga meskipun kita mengocok gitar pakai akord bar (semua senar), suara not individu tetap terdengar. 

(Eross memakai Ampli Tabung Bad Cat, secara alami memiliki sedikit distorsi/clipping meski tanpa efek pedal. Eross memakai StompBox eDrive buatan lokal)

Tentu saja banyak yang tidak suka setting seperti itu, termasuk saya dulu, karena dengan drive/gain yang cuma separo (di lima, atau maksimal tujuh), gitar akan kehilangan sustain. Saat mengocok powerchord dengan palmmute juga menjadi “grok grok grok” atau “grung grung grung”. Di sisi lain, dengan not individu yang terdengar jelas, kita bisa mengeksplor beragam kemungkinan melodi, termasuk menyisipkan lick-lick di sela-sela riff saat “bertugas” sebagai gitaris rhythm. Itu yang (sepertinya) dilakukan Eross, yang jadi ciri khas sound Sheila hingga sekarang. 

Tentang kunci gitar, Eross sepertinya memiliki kebiasaan membiarkan senar nomor satu terbuka. Bagian dari blues style atau memang menyukai tantangan “seberapa kuat aku mendegarkan dissonant nada E ini”. Namun hasilnya terdengar unik dan sampai saat ini menurut saya dia berhasil, :)

Contohnya pada Perhatikan Rani, kunci A memang punya nada E secara alami namun G dan F tidak dan dengan membiarkan senar E terbuka maka kita akan mendapatkan progresi akord A G6 Fmaj7 dengan cuma-cuma, :)

Juga di lagu Saat Aku Lanjut Usia di bagian reff”genggam tanganku”

Kunci normal A C#m/G# F#m E D E A 

Namun dengan semua kunci ditambah dengan senar pertama terbuka yang dipetik maka hasilnya adalah

A C#m/G# F#m7 E Dadd9 E A 

hasilnya adalah sebuah semiblues/jazz instan, atau malah punk, bagi saya terdengar seperti itu, :)

Di Pejantan Tangguh, kita bisa mendengar sedikit perbedaan sound musik SO7. Saya ingat saat itu adalah saat di mana banyak iklan Eross yang memainkan Epiphone. Sepertinya ini adalah masa-masa Eross menggunakan gitar dengan pickup humbucker; bisa dilihat di rekaman live pada saat-saat itu; Eross menggunakan Les Paul, bahkan Gibson Flying V. 

Juga ini titik saat Anton pergi dari SO7.

Kepergian Sakti  sedikit merubah karakteristik sound Sheila. Yang paling mencolok adalah pada saat mereka membawakan lagu-lagu tertentu yang dobel rhytmnya dominan seperti lagu Jangan Beritahu Niah secara live.

Saat live, ketika ada Sakti, kedua gitaris bisa "jual-beli" rhythm, juga tandem melodi pada bagian "bagaimana lagi, yang harus kukatakan…” suara gitar Eross dan Sakti saling melengkapi (satu memainkan meladi root, satu memainkan nada harmonik ketiga).

Tak bisakah Eross memainkan dua nada tersebut sendirian? Tentu saja bisa, namun satu gitar dengan overdrive memainkan dua nada sekaligus akan beda dengan dua gitar dengan overdrive memainkan masing-masing satu nada.

Kan bisa drive/gain dikurangi? No no no. Karakteristik Sheila on 7, drive separo. Jika satu gitar akan jadi sepi. Tergantung lagunya juga sih. Beberapa lagu seperti Dan, Kita Melompat Lebih Tinggi, Pejantan Tangguh tetap baik-baik saja dimainkan dengan satu gitar.

Tentu saja lagu Itu Aku juga baik-baik saja dimainkan dengan satu gitar, karena basisnya adalah piano. Hanya saja saya merindukan saat Sakti memainkan melodi bareng Eross sebelum melodi utama. 

Album berikutnya, meski tanpa Sakti,  tetap memakai dua gitar di sebagian besar musiknya, seperti di Pasti Ku Bisa; meski menggunakan rhythm dengan gitar akustik. Eross sepertinya tak rela meninggalkan Sakti. Saya membayangkan saat recording atau menciptakan lagu dia masih mengikutkan "gitar Sakti" di sana. Tentu saja agak keteteran saat tampil live dan terasa sepi.

Di sini juga Eross mulai terlihat dominan menggunakan Gitar Telecaster (entah Fender atau Squier by Fender)

Di album Musim Yang Baik kita bisa melihat dari lagu Lapang Dada; Sheila On 7 kini memiliki style 4 piece band, dengan satu gitar. Yang juga terlihat beda dan baru adalah  drum yang sepertinya menggunakan trigger atau malah elektrik sepenuhnya.

Sepi? Tidak juga, hal ini karena absennya gitar Sakti dikompensasi dengan permainan gitar  Eross yang lebih rapat di album ini (seperti di intro selamat datang). Biasanya permainan gitar Eross terkesan santai (atau malas-malasan, hehehe) karena ada Sakti. Sekarang jadi terdengar seperti "pekerja keras” atau gitaris yang “rajin”, :)

Bagi saya sih, setelah membandingkan penampilan SO7 live secara akustik, lagu-lagu di Musim yang Baik lebih enak didengarkan versi akustiknya. Tapi tetap menyukai permainan di album versi original, :)

Apa iya? Jangan-jangan musik terdengar lebih ramai karena ada piano, string section atau brass section? Tidak, karena piano, string atau brass selalu ada sejak album pertama jadi tidak begitu berpengaruh. Yang berbeda di album Musim yang Baik ini adalah gitar yang terdengar hanya satu bagian.

Yeah, Eross telah merelakan Sakti untuk mengejar tujuannya (Pencariannya? Cita-citanya? Hasrat terpendamnya? Takdirnya? Kepuasan batin?) dan telah mantap tuk jadi single-guitarist tuk Sheila On 7.

Semakin ke sini kita bisa melihat Eross lebih sering memakai Telecaster, kita bisa melihat karakterestik Tele yang nge-twang di lagu-lagu SO7 di album terakhir. Di Musim yang Baik bahkan hampir seluruhnya memiliki karakteristik sound Telecaster.

Telecaster. Gitar yang sulit dijinakkan. Klasik memang, namun jika kita lihat, pegang dan mainkan, telecaster seperti gitar buatan sendiri, tanpa banyak fitur dan ketika kita genjreng untuk lagu pop maka tetangga akan protes, (tak peduli walau akord kita sudah benar). Yeah Tele memang ’suaranya aneh’. Jika setting ampli kita tepat suaranya bisa crispy, mengeram, seksi; jika tidak suaranya seperti gitar yang tidak di-stem nama sekali, hehehe. Tapi eross berhasil menjinakkannya. Eross juga di-endorse oleh Squier dengan menerbitkan gitar Squier by Fender Telecaster Eross Candra Signature Series. Sebuah Telecaster Klasik dengan bodi Pine namun memakai bridge pickup stacked-humbucker (humbucker yang berbentuk single-coil seperti pick up bridge tele standart). Suara pickup bridge jadi lebih garang karena menggunaka humbucker.

Evolusi? Sheila? Yup 

Eross? Gitar? Yup. 

Eross? Style? No. He's the most consistent guitarist I knew

video (dari akun sheilaVEVO)
.


The Evolution of Sheila On 7 s Music


What's with the music of Sheila On 7?

Remember the song Dan on the first album? Simple song with standard chords / keys. But many have difficulty imitating the unique sound in the song. The next few years, after several times seeing their live performances, realized that Anton had not hit the hi-hat for first half of the song, he hit Tom's floor. That makes Dan's intro distinctive sound, it also makes it seem as if the tempo of a half song is slower than the next half, which suddenly becomes faster (even though it remains the same) and becomes more refreshed (Anton starts using HiHat).

What became my focus was the melody of Eross's guitar. In Dan, I can copy the notes for notes, but again I can't have the same feel as the original (of course, but at least I want to be able to approach, and it turns out to be difficult). A month ago (meaning almost 16 years later), I discovered that Eross did the melody almost always in the second string while picking the first string (high e-tone) continuously, giving Dan's distinctive effect. (That was also when I discovered that Slash did it in the Welcome to The Jungle melody)

Oh yeah, in the first three albums of Sheila On 7 they detuned their guitars. The guitar tuning was lowered by one fret, so for example if I wanted to follow the songs of Sheila On 7 in this period, we had to let our guitar strings go down so that our tunes dropped by half the tone. (This is what makes me connect them to Guns n Roses, even though there are no similarities at all: D, Slash records Appetite for Destruction and Use Your Illusion using a guitar that is tuned down by one semitone).

Eross's guitar sound is hard to imitate; at least for me first. I was a metal band guitarist during high school and was very difficult to imitate the distinctive Sheila On 7 sound. (uh oh.., after all, why the metal guitarist play pop songs? Heheh ...).

Apparently the key is "metal". The effect I use is the Boss Metal Zone and the drive / gain is almost always fully rotated to produce a melody that compressed and had sustain as long as possible. With the maximum drive / gain of the guitar, it's also easy to "scream", whether it's using natural, artificial or pinched harmonics.

But with the drive / gain opened fully the chord will lose its individual tone, we can only hear "zet zet zet", or "djent djent djent" which characterize the hard rock metal. Sheila's sound is completely different, although it clearly uses guitar effects (stomp-box or built in amps), but individual notes that form chords are still heard, the secret is  the drive should not be fully opened so that even if we shake the guitar using chord bar (all strings), the sound of individual notes still heard.

(Eross using Bad Cat Tube Amp, naturally has little distortion / clipping even without pedal effects. Eross uses locally made StompBox eDrive)

Of course many don't like such settings, including me first, because with only half the drive / gain (at five, or a maximum of seven), the guitar will lose sustain. When shaking the powerchord with the palm mute it also becomes "grok grok grok" or "grung grung grung". On the other hand, with clear individual notes, we can explore a variety of possible melodies, including inserting lick-licks between riffs when "in charge" as a rhythm guitarist. That is what Eross looks like, which has become the trademark of Sheila's sound until now.

About the key to the guitar, Eross seems to have a habit of letting the number one string open. Parts of the blues style or indeed like the challenge of "how long can I listen to this dissonant tone of E before going crazy". But the results sound unique and until now I think he succeeded, :)

For example, in Perhatikan Rani, A  Chord does have an E  naturally but not on G and F chord  and by left the E string  open all the time we will get the A-G6-Fmaj7 chord progression for free, :)

Also in the song Saat Aku Lanjut Usia in the reff section "genggam tanganku..."

Normal chord: A C#m/G# F#m E D E A

But with all the keys added with the first string opened, the result is

A C#m/G# F m7 E Dadd9 E A

the result is a semi-blues / jazz instant, or even punk, (for me it sounds like that), :)

In Pejantan Tangguh, we can hear a little difference in SO7 music sound. I remember when it was a time when there were lots of Eross advertisements that played Epiphone. Looks like this is a time when Eross used a guitar with a humbucker pickup; can be seen on live recordings at those times; Eross uses Les Paul, even the Gibson Flying V.

Also this is the point when Anton goes from SO7.

Sakti's departure slightly changed Sheila's sound characteristics. The most striking thing is when they bring certain songs that are dominantly rhythmic like the song Jangan Beritahu Niah live.

When live, when Sakti is still in the band, both guitarists can "trade-off" rhythms, as well as tandem melodies in the "bagaimana lagi, yang harus kukatakan ..." Eross and Sakti guitar sounds complement each other (one play root, one plays a third harmonic tone) .

Can't Eross play these two notes alone? Of course you can, but one guitar with overdrive plays two tones at the same time it will be different from the two guitars with overdrive playing each one tone.

Can the drive/gain be reduced? No no. The characteristics of Sheila on 7, half drive. If one guitar will be quiet. It depends on the song too. Some songs like Dan, Melompat Lebih Tinggi, Pejantan  Tangguh is still fine playing with one guitar.

Of course the song Itu Aku also fine played with one guitar, because the base is piano. It's just that I miss when Sakti plays the melody with Eross before the main melody.

The next album, even without Sakti, still uses two guitars in most of its music, like in Pasti Ku Bisa; even though using a rhythm with an acoustic guitar. Eross seemed not willing to leave Sakti. I imagine when recording or creating songs, he still includes "Sakti's guitar" there. Of course it is rather tough when performing live and feels lonely.

Here also Eross starts to look dominant using Telecaster (either Fender or Squier by Fender)

On the album Musim Yang Baik we can see from the Lapang Dada song; Sheila On 7 now has a 4 piece band style, with one guitar. What also looks different and new is the drum that seems to use trigger or even completely electric.

Quiet? Not really, this is because the absence of the Sakti guitar is compensated by Eross's tighter  guitar playing on this album (as in the welcome intro). Usually Eross's guitar playing seems relaxed (or lazy, hehehe) because there is Sakti. Now it sounds like "hard worker" or a guitarist who is "diligent", :)

For me, after comparing SO7's live performance in acoustic format, songs in Musim Yang Baik are better heard by the acoustic version. But I still like  the original version of the album, :)

Is it true? Could it be that the music sounds more crowded because there is a piano, string section or brass section? No, because pianos, strings or brass have always been there since the first album, so it didn't really matter. What's different in this Musim Yang Baik album is a guitar that sounds just one part.

Yeah, Eross has let Sakti go to pursue his goal (his search? His goal? His hidden desire? His destiny? Inner satisfaction?) And has been determined to become a single-guitarist for Sheila On 7.

Recently we can see Eross more often using a Fender Telecaster, we can see Tele characters twirling on SO7 songs on the last album. In Musim Yang Baik almost all of them have Telecaster sound characteristics.

Telecaster. A guitar that is hard to tame. Classic indeed, but if we look, hold and play, the Telecaster is like a homemade guitar, without many features and when we go for pop songs the neighbors will protest, (no matter even if our chords are correct). Yeah Tele, 'the voice is weird'. If the setting of our amps is right, the sound can be crispy, growling, sexy; if not, the sound is like an un-tuned guitar, heheh... . But eross managed to tame it. Eross was also endorsed by Squier by publishing the Squier guitar by Fender Telecaster Eross Candra Signature Series. A Classic Telecaster with a Pine body but uses a stacked-humbucker pickup bridge (a humbucker in single-coil-form that fit in standard Tele pick-up bridge hole). The bridge pickup sound becomes more ferocious because it uses humbucker.

Evolution? Sheila? Yup

Eross? Guitar? Yup.


Eross? Style? No. He's the most consistent guitarist I knew

Wednesday, May 6, 2015

Adding Analog Sensor on My Arduino Nano LCD Project

 I add the code from previous project so it could read analog sensor from pin A0 and display it on second row LCD.

I use a potentiometer to emulate the sensor.

 So as result, this ATMEGA328 based device could:
- read digital sensor from pin 7, display it on second rowLCD
- if pin 7 is high, LED connected to pin 10 will turned on, otherwise it'll turned off
- communicate via bluetooth using dedicated serial port (RX= 8 , TX = 9)
- write any string sent from bluetooth to first row LCD
- read string length sent from bluetooth, display it on second row LCD.
- embedded LED connected to pin 13 is on if there's bluetooth serial communication





#include <SoftwareSerial.h>
#include <LiquidCrystal.h>
.
SoftwareSerial mySerial(8, 9); // RX, TX
int t=1;
int i=1;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);//rs e d4 d5 d6 d7
String tulisan = "Tadaa..., heheh...., hihihi :)";
String info =":)";
void setup() {
pinMode(7,INPUT);
pinMode(6,OUTPUT);
pinMode(10,OUTPUT);
pinMode(13,OUTPUT);
lcd.begin(16, 2);
lcd.print(tulisan);
mySerial.begin(9600);
Serial.begin(9600);//port serial resmi
delay(1000);
}


void loop() {
//lcd.clear();
if (digitalRead(7)==1){
digitalWrite(10,HIGH);
}else{
digitalWrite(10,LOW);
}
if (mySerial.available()){
digitalWrite(13,HIGH);
while(mySerial.available()>0){
t=1;
lcd.clear();
tulisan=mySerial.readString();
mySerial.println(tulisan);
}
}
lcd.setCursor(1,0);
lcd.print(tulisan);
int l= tulisan.length()-12;
info ="P7=";
info+=digitalRead(7);
info+=",l=";
info+=tulisan.length();
info+=",a=";
info+=analogRead(A0);
lcd.setCursor(t,1);
lcd.print(info);
digitalWrite(13,LOW);
if (l>16){
lcd.scrollDisplayLeft();
t++;
if (t>=l){
t=1;
lcd.clear();
}
}
delay(1000);
}
//PWM: 3, 5, 6, 9, 10, and 11

.


here my fritzing sketch (couldn't found the HC05 bluetooth module on partlist, :) )


Saya tambah dari proyek sebelumnya sehingga dapat membaca sensor analog dari pin A0 dan menampilkannya di LCD baris kedua.

Saya menggunakan potensiometer untuk mewakili sensornya.

Jadi, hasil akhir dari proyek ini adalah sebuah alat berbasis ATMega328 yang dapat:
- membaca sensor digital dari pin 7 dan menampilkannya di baris kedua LCD
- jika pin 7 high, LED yang terhubung ke pin 10 akan menyala, jika tidak LED tetap padam
- berkomunikasi via bluetooth menggunakan port serial tersendiri (RX=8, TX=9)
- menulis sebarang string yang dikirim dari bluetooth ke baris pertama LCD
- membaca panjang string yang dikirim lewat LCD dan menampilkannya di baris kedua LCD
- LED di board yang terhubung ke pin 13 menyala jika ada komunikasi serial via bluetooth





323f (5) amp (1) android (12) apple (7) arduino (18) art (1) assembler (21) astina (4) ATTiny (23) blackberry (4) camera (3) canon (2) cerita (2) computer (106) crazyness (11) debian (1) delphi (39) diary (286) flash (8) fortran (6) freebsd (6) google apps script (8) guitar (2) HTML5 (10) IFTTT (7) Instagram (7) internet (12) iOS (5) iPad (6) iPhone (5) java (1) javascript (1) keynote (2) LaTeX (6) lazarus (1) linux (29) lion (15) mac (28) macbook air (8) macbook pro (3) macOS (1) Math (3) mathematica (1) maverick (6) mazda (4) microcontroler (35) mountain lion (2) music (37) netbook (1) nugnux (6) os x (36) php (1) Physicist (29) Picture (3) programming (189) Python (109) S2 (13) software (7) Soliloquy (125) Ubuntu (5) unix (4) Video (8) wayang (3) yosemite (3)