when copy pins_arduino.h doesn't compile

Hi.. I have the attiny45 core files installed and compiles and upload fine.

The problem is that when I need to compile my atmega328-pu....

Its like attiny45 is using the 28 Pins "arduino_pin.h" file.. because when I delete "the arduino_pins.h" from "hardware\arduino\cores\arduino\" folder. it works.

I have also copied the "pins_arduino.h" from tiny8 folder to the "Arduino\arduino-1.0.1\hardware\attiny\" and the same error

When Uploading to the atmega328-PU I NEED the "hardware\arduino\cores\arduino\pins_arduino.h" file but when I Select the attiny45 controller, I NEED TO REMOVE the "pins_arduino.h" file in order to continue.

Error when Trying to compile to attiny45 controller when "pins_arduino.h" file exists:

In file included from C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/Arduino.h:213,
                 from C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/wiring_private.h:33,
                 from C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\wiring_digital.c:28:
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:112: error: 'DDRC' undeclared here (not in a function)
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:113: error: 'DDRD' undeclared here (not in a function)
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:120: error: 'PORTC' undeclared here (not in a function)
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:120: error: initializer element is not constant
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:120: error: (near initialization for 'port_to_output_PGM[3]')
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:121: error: 'PORTD' undeclared here (not in a function)
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:121: error: initializer element is not constant
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:121: error: (near initialization for 'port_to_output_PGM[4]')
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:128: error: 'PINC' undeclared here (not in a function)
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:128: error: initializer element is not constant
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:128: error: (near initialization for 'port_to_input_PGM[3]')
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:129: error: 'PIND' undeclared here (not in a function)
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:129: error: initializer element is not constant
C:\Users\Rodrigo\Desktop\arduino-1.0.1-windows\arduino-1.0.1\hardware\arduino\cores\arduino\/pins_arduino.h:129: error: (near initialization for 'port_to_input_PGM[4]')

When I try to compile to Atmega328-PU without the "pins_arduino.h" it returns this error:

ArduinoISP.cpp:46:26: error: pins_arduino.h: No such file or directory
ArduinoISP.cpp: In function 'void start_pmode()':
ArduinoISP:256: error: 'SS' was not declared in this scope
ArduinoISP:258: error: 'SCK' was not declared in this scope
ArduinoISP:263: error: 'MISO' was not declared in this scope
ArduinoISP:264: error: 'MOSI' was not declared in this scope
ArduinoISP.cpp: In function 'void end_pmode()':
ArduinoISP:270: error: 'MISO' was not declared in this scope
ArduinoISP:271: error: 'MOSI' was not declared in this scope
ArduinoISP:272: error: 'SCK' was not declared in this scope
ArduinoISP:273: error: 'SS' was not declared in this scope

Any Idea to get both working?

Tks a lot

Its like attiny45 is using the 28 Pins "arduino_pin.h" file.. because when I delete "the arduino_pins.h" from "hardware\arduino\cores\arduino\" folder. it works.

You should not be in the "real Arduino" path. Your boards.text and any core files should be in the user path... \Users\you\documents\Arduino\hardware\MyArduBoard\board\core....

Using the above, you can have many different board.txt each with their own pin mappings and core files.

Ray

MRBurnetet
You are right
However, I noticed that when I compile for the attiny85 or 45 all is well, finds the pins_arduino.h file in the user path… but the 2313 keeps looking in the core path… where there is no such file and then generates an error on compile, though it has its own pins_arduino.h in the user path
I am sure I made a small stupid error somewhere… but havent foun dit yet.

Ah found it… I was putting it in the wrong attiny2313 folder ( IDE 1.0 structure) rather than in the proper attiny2313 folder (according to IDE 1.6.x structure).