4 Replies Latest reply on Apr 3, 2015 11:42 AM by KurtE

    Arduino 1.5.3 1.0.4 - Support adding menu items in boards.txt...

    KurtE

      I was wondering if the ability for adding menus to the tools menu is implemented/available in the current Intel Arduino IDE.  In particular, I would think if I modified:

      the boards.txt associated with the Edison board

       

      At the top add:

           menu.ipadr=IP Address

       

      Then down in the Edison area add:

      izmir_ec.menu.ipadr.ser.name=Serial

      izmir_ec.menu.ipadr.ip1.name=192.168.2.115

      izmir_ec.menu.ipadr.ip2.name=192.168.2.116

      izmir_ec.menu.ipadr.ser.build.f_ipadr=Serial

      izmir_ec.menu.ipadr.ip1.build.f_ipadr=192.168.2.115

      izmir_ec.menu.ipadr.ip2.build.f_ipadr=192.168.2.116

       

      That when I would start up the IDE and selected Edison as the board, a new menu item would be added to the tools menu.  I know this works on normal Arduino 1.0.6 and I thought in the beta 1.5.x builds as for example PJRC uses this for adding options for building for Teensy processors.

       

      What I was/am trying to do, is to modify my upload using WiFi script to be able to select the IP address and maybe have option for Serial, which would use the default way of doing Serial ports.   Why?  the wifi is working great for one Edison, but I now have a second Edison (this one with simple breakout board), and would be great to have it work on both.

        • 1. Re: Arduino 1.5.3 1.0.4 - Support adding menu items in boards.txt...
          Intel_Alvarado

          Hi KurtE,

          If you want to change specific libraries or .txt files you can do it by editing the files manually, but you can also try checking out modifying the source code found on this link https://communities.intel.com/docs/DOC-23242 .

          Regards

          Sergio

          • 2. Re: Arduino 1.5.3 1.0.4 - Support adding menu items in boards.txt...
            KurtE

            Since we are now on a new release 1.6.0, thought I would try again.

            What I had above did not work, but, I looked at what Teensyduino (PJRC) has in it's boards.txt and looks like the menu data may have changed slightly.

            I added:

            menu.ipadr=IP Address
            

            At the start of the file.

             

            Later I added:

            izmir_ec.menu.ipadr.ser=Serial
            izmir_ec.menu.ipadr.ser.build.f_ipadr=Serial
            izmir_ec.menu.ipadr.ip1=192.168.2.117
            izmir_ec.menu.ipadr.ip1.build.f_ipadr=192.168.2.117
            izmir_ec.menu.ipadr.ip2=192.168.2.116
            izmir_ec.menu.ipadr.ip2.build.f_ipadr=192.168.2.116
            
            

            at the end of the izmir_ec section.

            Now when I start up the IDE and have the Edison selected as the current board, the "IP Address" menu shows up in the tools menu

            I have not yet updated anything to allow wifi uploads yet for this version of the IDE.  Wondering how far I want to go.

             

            Like reintroduce a Mini board, that IO pins match MRAA?

             

            Also wonder if I should hold off.  First time I started the IDE today it came of with a message saying there is a newer version of the IDE, would you like to go to the Arduino download page?  Not sure if that page is valid for this?  If so should I wait for 1.6.2?  From what I am hearing I would not be surprised if 1.6.3 came out soon as well...

            • 3. Re: Arduino 1.5.3 1.0.4 - Support adding menu items in boards.txt...
              Intel_Alvarado

              Hi,

               

              There should be a future release of the Arduino IDE but there is not ETA.

               

              Sergio

              • 4. Re: Arduino 1.5.3 1.0.4 - Support adding menu items in boards.txt...
                KurtE

                Thanks Sergio,

                 

                Hopefully soon you will be integrated into the new Arduino Boards Manager, which is now part of 1.6.2 and 1.6.3.  From what I have read, if setup properly, all users who download the latest versions of Arduino, could then in theory go to the Board manager and download support for Intel products in much the same way they do with these build for Arduino Due.   Background info.  This is an excerpt from the Arduino Developers mail list that came out today:

                 

                 

                ## Boards Manager

                 

                It eases installation and upgrade of cores and tools by providing a one-click-install experience.

                The Boards Manager is opened from the "Tools > Board > Boards Manager"

                menu and provides a simple way to install/upgrade/downgrade cores in a very similar way the Library Manager do for the libraries.

                 

                The list of available cores is stored in a file called package_index.json and is updated every time the Boards Manager is opened from the following URL:

                http://downloads.arduino.cc/packages/package_index.json

                 

                This file is maintained by Arduino. We are considering doing something similar to what Linux distributions do (adding other urls) or make it work like libraries (list of repos, job, tags and so forth). However we still have to make up our minds about what it's best for everyone.

                 

                The file format is again pretty straightforward: every package is a collection of platforms and tools. Platforms are the contents of hardware folders like hardware/arduino/avr/... (so typically boards.txt, cores, variants, etc.). Tools are the contents of the tools folder (like gcc, avrdude, bossac and so on).

                 

                The interface and user experience are very similar to that of libs manager. Two differences:

                1) while library manager shows your own libs mixed with those coming from the json file, boards manager shows only the ones listed in the json file, because it doesn't look into your SKETCHBOOK/hardware folder.

                2) since boards manager doesn t look into your hardware folder, deleting is safe and you can delete a core (if it's not built in)

                 

                The IDE no longer bundles both AVR and SAM cores and toolchains, but only the AVR one. Bundled AVR core is stored in IDE_FOLDER/hardware folder (as usual). Additional cores (only SAM for now), are available from Boards Manager.

                 

                Boards manager will list bundled core as "built-in". You can still upgrade or downgrade a core by selecting a version and installing it (or clicking update, as soon as an update will be available)

                 

                When you install or upgrade a core, its archive and the archived tools it depends on will be downloaded and stored into ARDUINO15/staging/packages/. The selected core and tools will then be unpacked into ARDUINO15/packages.

                For example, 1.6.2 avr core files are unpacked into ARDUINO15/packages/arduino/hardware/avr/1.6.2/

                and its tools in

                ARDUINO15/packages/arduino/tools/avr-gcc/4.8.1-arduino2/

                and

                ARDUINO15/packages/arduino/tools/avrdude/6.0.1-arduino2/

                 

                Such change of paths causes a change in platform.txt. Taking avr core as an example, compiler.path changed from compiler.path={runtime.ide.path}/hardware/tools/avr/bin/

                to

                1. compiler.path={runtime.tools.avr-gcc.path}/bin/

                 

                In order to help cores migrate to this change (or just shrug and ignore it), a file called platform.keys.rewrite.txt is provided: the IDE uses this file to change cores old values to new values, printing a warning into the IDE bottom area If the result of such rewrite is wrong or you just don't want it to happen, add a rewriting=disabled line to your platform.txt

                 

                A preliminary FAQ is available at [3]

                 

                ## Improvements

                 

                A handful of improvements to both these managers are already scheduled:

                an update notification, installable help files (so for example you can provide a custom reference with your core), a command line interface (in order to install cores and libs from the command line) and a smarter strategy for downloading those json files and avoid bandwidth consumption.

                Some other nice suggestions came out during this week, like adding an "install .zip core" (same as install .zip lib but for cores/boards) and supporting package_my-own-cores_index.json and library_my-own-libs_index.json files so that you can leverage both managers for your own stuff.

                 

                ## Additional noteworthy changes

                 

                1) 1.6.3 introduces pre and post build hooks. By adding entries like recipe.hooks.prebuild.0.pattern=echo "Hello {build.source.path}"

                to your platform.txt, that command will be executed before starting compilation Other examples:

                1. recipe.hooks.prebuild.0.pattern=echo one recipe.hooks.prebuild.1.pattern=echo two recipe.hooks.postbuild.0.pattern=echo three

                 

                2) ports list is generated in background. This has the effect that Tools menu is no longer slow BUT the ports list may be empty right after having started the IDE. You'll have to wait the same amount of time you waited before this fix. Meanwhile, tools menu will remain responsive and if you're doing anything else than selecting a port, it will be much easier to use

                 

                3) there is a new EEPROM lib, and some fixes to SD, Ethernet, Bridge and SPI. SPI fix is actually causing some headaches to my colleague Martino Facchin, because of https://github.com/arduino/Arduino/issues/2868 (also see https://github.com/arduino/Arduino/pull/2659)

                 

                4) When having the same lib stored in different locations (for example a copy of the SPI library in SKETCHBOOK/libraries and one bundled with the IDE avr core), the IDE will report which lib it actually used. This gives a hint about why things broke and helps support

                 

                [1]

                https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification

                 

                [2] https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ

                 

                [3] https://github.com/arduino/Arduino/wiki/Boards-Manager-FAQ

                 

                [4] https://github.com/arduino/Arduino/labels/Library%20Manager

                 

                --

                 

                Note: I have not yet read the documents at the end as, I mentioned in another posting, currently I can not get to github.com...