Alternate VM build attempt

Issue #32 resolved
Turgut Guneysu created an issue

Hi John,

Since I have several of the boards Arduino M0 Pro, ESP82666, and ESP32 I tried to load the VM onto each of them.

Every one of the attempts ended in failure with numerous files missing / not found messages. I tried finding the files in my PC install directories for Arduino and load them into the VM library directory to further the compile process. However I had to give up after about 30 mins of copying files.

I must be doing something wrong or my setup must not have the right directory structure. Most of the files reported missing are in fact on my system, but the VM.INO compile cannot locate them. Some were missing all together and I downloaded them from various github locations.

Just to make clear, all three of the boards I have mentioned are installed properly into the Arduino environment and I can compile other programs for them without a problem.

I have not included any log listings since they mainly consist of missing file entries and aborted compile messages.

If you can direct me to what might be wrong, I would very much like to test the microBLocks on these environments.

If any other info is needed, just let me know.

Comments (3)

  1. John Maloney repo owner

    Both Bernat and I use the Arduino IDE to build VM’s, but I use a Mac and Bernat uses Linux so we don’t have direct experience building with the Windows version of the Arduino IDE.

    You shouldn’t need to copy any Arduino files into the vm folder. Check the Arduino IDE docs for the right place to put libraries on Windows. For me, it’s a folder called “libraries” in my Documents/Arduino folder (where other Arduino sketches are kept). I use the “board manager” to install packages.

    Here are some pre-requisites:

    1. A recent Arduino IDE (I was using 1.8.5, recently upgraded to 1.8.9).
    2. The appropriate board packages: ESP32 by Espresif Systems v. 1.0.2, esp8266 by ESP8266 Community, v2.4.2, Arduinio SAMD Boards, v1.6.20. I added these links to my Arduino IDE “additional boards manager URLs”:
    https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json
    https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
    http://arduino.esp8266.com/stable/package_esp8266com_index.json
    https://dl.espressif.com/dl/package_esp32_index.json
    https://github.com/AtmelUniversityFrance/atmel-samd21-xpro-boardmanagermodule/releases/download/v0.3.0/package_atmel-samd21-xpro-boardmanagermodule_0.3.0_index.json
    

    3. Install required libraries. I’m guessing this is where you’re running into problems, especially with the ESP boards. Here are some I think you might need:

    Adafruit-ST7735-Library-master
    Adafruit_GFX_Library
    Adafruit_ILI9341-master
    WiFi101 (not sure which WiFi library is needed, if any)
    WiFi_Link
    XPT2046_Touchscreen-master

    Sorry we haven’t documented the list libraries needed. We’ve been adding them incrementally as we added new features (e.g. WiFi, support for a couple of graphics boards). If you’d like to be helpful you could make a list and we’ll add it to the Wiki.

  2. John Maloney repo owner

    Quick update on this… We’ve been exploring PlatformIO (https://platformio.org) as a tool for building the MicroBlocks VM and, so far, it’s working nicely. Advantages include: (1) automatically fetches all tools and libraries needed for each supported board, (2) few dependencies (just Python), (3) easy installation on Win/Mac/Linux, (4) command line interface to build and install VM’s, and (5) speed.

    To try it, first install PlatformIO. Download the MicroBlocks source from this repository and do a “git pull” to make sure its current. Then change to the “smallvm” folder and do:

    pio run
    

    to build all the supported MicroBlocks virtual machines. PlatformIO will fetch all the tools and libraries needed. To build and install the VM for a specific board (e.g. the BBC micro:bit) do:

    pio run -e microbit -t upload
    

    To see all supported boards (which PlatformIO calls “environments”), check out he platformio.ini file.

  3. Log in to comment