You can clone with
If you're providing a third-party boards.txt file (to be added to the sketchbook hardware folder), you shouldn't need to provide a platfom.txt file. Instead, the IDE should use the platform.txt file from the package containing the core used by the board.
For example, if I have: attiny45.build.core=arduino:arduino in a boards.txt file, the IDE should use the platform.txt file in the "arduino" folder.
Otherwise, we're going to have a bunch of identical copies of the platform.txt files floating around, which will be a problem if we ever have to make any changes to them.
When using cores from other packages also the referenced platforms.tx…
…t is imported
Fixed check for referenced cores. See #1157
May you check if the branch ide-1.5-cores solves this issue?
There are some other changes in custom menu format, for example:
must be changed in:
in other words the 3rd "element" must be moved to be the first.
Oops, I mean the branch lib-1.5-cores:
I'm getting a null pointer exception:
[exec] [JavaAppLauncher] Requested [1.5*], launching in [1.6] instead.
[exec] [LaunchRunner Error] processing.app.Base.main(String) threw an exception:
[exec] at processing.app.debug.TargetBoard.<init>(TargetBoard.java:41)
[exec] at processing.app.debug.TargetPlatform.<init>(TargetPlatform.java:91)
[exec] at processing.app.debug.TargetPackage.<init>(TargetPackage.java:50)
[exec] at processing.app.Base.loadHardware(Base.java:1686)
[exec] at processing.app.Base.<init>(Base.java:291)
[exec] at processing.app.Base.main(Base.java:206)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[exec] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[exec] at java.lang.reflect.Method.invoke(Method.java:597)
[exec] at apple.launcher.LaunchRunner.run(LaunchRunner.java:116)
[exec] at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51)
[exec] at apple.launcher.JavaApplicationLauncher.launch(JavaApplicationLauncher.java:52)
[exec] Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
[exec] at processing.app.Base.handleQuit(Base.java:949)
[exec] at processing.app.macosx.ThinkDifferent.handleQuit(ThinkDifferent.java:122)
[exec] at com.apple.eawt._AppEventLegacyHandler$7.dispatchEvent(_AppEventLegacyHandler.java:146)
[exec] at com.apple.eawt._AppEventLegacyHandler.sendEventToEachListenerUntilHandled(_AppEventLegacyHandler.java:168)
[exec] at com.apple.eawt._AppEventLegacyHandler.handleQuitRequestWith(_AppEventLegacyHandler.java:144)
[exec] at com.apple.eawt._AppEventHandler$_QuitDispatcher.performUsing(_AppEventHandler.java:387)
[exec] at com.apple.eawt._AppEventHandler$_QuitDispatcher.performUsing(_AppEventHandler.java:380)
[exec] at com.apple.eawt._AppEventHandler$_AppEventDispatcher$1.run(_AppEventHandler.java:489)
[exec] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
[exec] at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:708)
[exec] at java.awt.EventQueue.access$400(EventQueue.java:82)
[exec] at java.awt.EventQueue$2.run(EventQueue.java:669)
[exec] at java.awt.EventQueue$2.run(EventQueue.java:667)
[exec] at java.security.AccessController.doPrivileged(Native Method)
[exec] at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
[exec] at java.awt.EventQueue.dispatchEvent(EventQueue.java:678)
[exec] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
[exec] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
[exec] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
[exec] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
[exec] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
[exec] at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
I'm guessing this has something to do with the changes to the boards.txt format, etc. It's not obvious which sketchbook folder is being used, though. I see the Arduino15 folder being created in ~/Library, but the preferences.txt file there doesn't have a key/value for the sketchbook location. I'll keep digging.
Looks like the problem is that the TargetBoard code (line 40 and 41) assumes that the "build.core" preference is in the top-level preferences for a board, not the menu-specific ones. That is, "attiny.build.core=arduino:arduino" works but "attiny.menu.cpu.attiny45.build.core=arduino:arduino" doesn't. I'm not sure if you'd really need different cores for the sub-boards but it would probably be good to support them. I made this issue 1304: #1304
I got programming to work for the ATtiny (https://github.com/damellis/attiny/commits/lib-1.5-cores) but not yet bootloader burning. I need to test selective overriding of the platform.txt keys (so that "burn bootloader" writes fuses but not a .hex file), if it's supported.
You should be able to override single platforms.txt values.
I've looked at your attiny boards (in lib-1.5-cores branch), the following definition is missing:
after adding it, it seems to work fine.