Go Down

Topic: [SOLVED] Arduino 1.0.1 no longer compiles using a custom core (tiny) (Linux) (Read 611 times) previous topic - next topic

ElectroNick

Has something changed between 1.0 and 1.0.1 which would change processing of the pins_arduino.h file?

I've had 1.0 setup to work with the tiny core (in ~/sketchbook/hardware/) and it was working fine. After the change to 1.0.1 the boards.txt from ~/sketchbook/hardware/tiny is being used (I can see the boards only present there) but compiling fails with errors like these (same for every pin used)

Code: [Select]
... error: 'A0' was not declared in this scope
... error: 'PORTC' was not declared in this scope

and so on.

I am assuming it can no longer find the pins_arduino.h file. So, 1.0 was finding it, 1.0.1 cannot. I haven't moved any files (outside of the Arduino's own directory of course) .

Does anyone have any idea about what's changed between 1.0 and 1.0.1 in regards to pinouts and how to fix it?

 /\_/\      ARDUINO
((@v@))     CNC
()~|~()

Coding Badly


What is the target processor?

What is the very first error message?

ElectroNick

Thanks, CB. The MCU is ATtiny2313, here is the part of the board.txt I'm using:
Code: [Select]

###########################################################################

attiny2313at8.name=ATtiny2313 @ 8 MHz

# The following do NOT work...
# attiny2313at8.upload.using=avrispv2
# attiny2313at8.upload.using=Pololu USB AVR Programmer

# The following DO work (pick one)...
#attiny2313at8.upload.using=arduino:arduinoisp
attiny2313at8.upload.protocol=avrispv2
# attiny2313at8.upload.using=pololu

attiny2313at8.upload.maximum_size=2048

# Default clock (slowly rising power; long delay to clock; 8 MHz internal)
# Int. RC Osc. 8 MHz; Start-up time: 14 CK + 65 ms; [CKSEL=0100 SUT=10]; default value
# Brown-out detection disabled; [BODLEVEL=111]
# Serial program downloading (SPI) enabled; [SPIEN=0]
# Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0]

attiny2313at8.bootloader.low_fuses=0xE4
attiny2313at8.bootloader.high_fuses=0x9F
attiny2313at8.bootloader.extended_fuses=0xFF
attiny2313at8.bootloader.path=empty
attiny2313at8.bootloader.file=empty2313at8.hex

attiny2313at8.build.mcu=attiny2313
attiny2313at8.build.f_cpu=8000000L
attiny2313at8.build.core=tiny


not sure what you meant by "very first error message". I just omitted specifics of the program for brevity, perhaps I should not have. Here is the complete listing of all the errors that come up on compiling. They look like they all stem from the missing pins_arduino.h file, which is still at its original place of course.
Code: [Select]

DVD_CNC_Stepper_Controller:16: error: 'A0' was not declared in this scope
DVD_CNC_Stepper_Controller:16: error: 'A1' was not declared in this scope
DVD_CNC_Stepper_Controller:16: error: 'A2' was not declared in this scope
DVD_CNC_Stepper_Controller:16: error: 'A3' was not declared in this scope
DVD_CNC_Stepper_Controller:31: error: 'A4' was not declared in this scope
DVD_CNC_Stepper_Controller:32: error: 'A5' was not declared in this scope
DVD_CNC_Stepper_Controller.cpp: In function 'void moveY()':
DVD_CNC_Stepper_Controller:138: error: 'PORTC' was not declared in this scope

 /\_/\      ARDUINO
((@v@))     CNC
()~|~()

Coding Badly


The ATtiny2313 processor does not have an analog-to-digital converter so...

• The A* constants are not defined (which explains the first set of errors)

• PORTC does not exist (which explains the second error)


The good news is that your development environment appears to be fine.  The bad news is that the code in DVD_CNC_Stepper_Controller.cpp does not appear to usable on an ATtiny2313 processor.

ElectroNick

CB, sharp eye!
These are the dangers of coming back to a long neglected project  :smiley-eek-blue: . I started the development on 2313 for one stepper and later switched to 328P to do all three on one MCU - 2313 did not have enough I/O. Fast forward 8 months and I forgot which MCU is plugged in there (and the names of the sketches corresponding to the MCUs).
Feel like an idiot, really. But, thanks to you, the mystery is solved!
Cheers!

 /\_/\      ARDUINO
((@v@))     CNC
()~|~()

Go Up