Pages: [1]   Go Down
Author Topic: Custom configuration in sketchbook folder -- how to use default arduino core?  (Read 2004 times)
0 Members and 1 Guest are viewing this topic.
Ukraine
Offline Offline
Full Member
***
Karma: 2
Posts: 192
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Good day!

I've a custom hardware configuration in my Sketchbook, like this:
%Sketchbook%\hardware\arduino-addons\boards.txt

Code:
##############################################################

atmega8noxtalfast.name=ATmega8A (8MHz int. RC osc, short bootloader delay, 38400 baud rate)

atmega8noxtalfast.upload.protocol=stk500
atmega8noxtalfast.upload.maximum_size=7168
atmega8noxtalfast.upload.speed=38400

atmega8noxtalfast.bootloader.low_fuses=0xe4
atmega8noxtalfast.bootloader.high_fuses=0xc2
atmega8noxtalfast.bootloader.path=atmega8a
atmega8noxtalfast.bootloader.file=ATmegaBOOT.hex
atmega8noxtalfast.bootloader.unlock_bits=0x3F
atmega8noxtalfast.bootloader.lock_bits=0x0F

atmega8noxtalfast.build.mcu=atmega8
atmega8noxtalfast.build.f_cpu=8000000L
atmega8noxtalfast.build.core=arduino
atmega8noxtalfast.build.variant=standard

The problem is that on compilation it tries to found arduino core files in subfolder of my Sketchbook, like this:

Code:
C:\Tools\avr\arduino-1.0\hardware\tools\avr\bin\avr-g++
-c
-g
-Os
-Wall
-fno-exceptions
-ffunction-sections
-fdata-sections -mmcu=atmega8
-DF_CPU=8000000L
-DARDUINO=100
-IC:\Users\ArtVolk\Documents\Arduino\hardware\arduino-addons\cores\arduino
-IC:\Users\ArtVolk\Documents\Arduino\hardware\arduino-addons\variants\standard C:\Users\ArtVolk\AppData\Local\Temp\build4338802608793804970.tmp\Blink.cpp
-oC:\Users\ArtVolk\AppData\Local\Temp\build4338802608793804970.tmp\Blink.cpp.o
Blink.cpp:8:21: error: Arduino.h: No such file or directory

How can I force it to look into default include folders?

Thanks!
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8975
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you tried moving the file from

        %Sketchbook%\hardware\arduino-addons\boards.txt

to

        %Sketchbook%\hardware\boards.txt

I also notice that some boards.txt files use the syntax:

        atmega8noxtalfast.build.core=arduino:arduino

I'm not sure what that does but it might do what you want.
« Last Edit: May 15, 2012, 04:45:48 pm by johnwasser » Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Ukraine
Offline Offline
Full Member
***
Karma: 2
Posts: 192
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you tried moving the file from

        %Sketchbook%\hardware\arduino-addons\boards.txt

to

        %Sketchbook%\hardware\boards.txt
Yes, I've tried. In that case only my boards.txt is processed (no default boards appear in menu in IDE).

I also notice that some boards.txt files use the syntax:

        atmega8noxtalfast.build.core=arduino:arduino

I'm not sure what that does but it might do what you want.
Such syntax (and my overall configuration) worked on the IDE versions (older than 1.0). For 1.0 it has to be separated to:

Code:
atmega8noxtalfast.build.core=arduino
atmega8noxtalfast.build.variant=standard
Logged

Ukraine
Offline Offline
Full Member
***
Karma: 2
Posts: 192
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I've found a solution here: http://arduino.cc/forum/index.php?topic=91890.0

It should be specified in the following form:

Code:
atmega8noxtalfast.build.core=arduino:arduino
atmega8noxtalfast.build.variant=arduino:standard
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8975
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I also notice that some boards.txt files use the syntax:

        atmega8noxtalfast.build.core=arduino:arduino

I'm not sure what that does but it might do what you want.

So my guess was correct?  Too bad you didn't try it when I suggested it 12 days ago. smiley-sad
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Ukraine
Offline Offline
Full Member
***
Karma: 2
Posts: 192
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, but the whole trick is only achieved with undocumented second part:

Code:
atmega8noxtalfast.build.variant=arduino:standard
Logged

Pages: [1]   Go Up
Jump to: