Simple Arduino 101 project build failure

OS: Ubuntu 16.04
PlatformIO (updated) version:
IDE: 1.3.4
CLI: 2.11.1

First I create a new project:

PlatformIO -> Initialize new PlatformIO project or modify existing -> Selected board: Intel: Arduino/Genuino 101 -> Choose a directory -> BlahBlah

NOTE: Choose a directory is flakey! If I choose an existing directory and change its and do OK, the selector shows the existing directory name in the final selection. I had to go back and select my desired directory which was now created for my by PlatformIO/Atom.

Clicking does nothing!

Then I create src/counter.cpp:

#include <Arduino.h>
uint32_t c = 0;
void setup()
{
    Serial.begin(9600);
}
void loop()
{
    delay(1000);
    Serial.print(c, DEC);
    Serial.println();
    c++;
}

Attempt to build:
GUI: PlatformIO -> Build
Error: No eligible build target. No configuration to build this target exists.

I start a new PlatformIO terminal: PlatformIO -> Terminal -> New Terminal
The terminal start with pwd as ~/.atom
I do: cd
Second attempt at build via GUI fails: PlatformIO -> Build
Error: No eligible build target. No configuration to build this target exists.

Now I attempt a build via CLI method:
NOTE: --verbose option seems to be broken. It does the opposite. No --verbose option displays verbose compilation.

platformio run --verbose
[Thu Jul 21 21:20:20 2016] Processing genuino101 (platform: intel_arc32, board: genuino101, framework: arduino)
------------------------------------------------------------------------------------------------------
.
arc-elf32-g++: error: unrecognized argument in option ‘-mcpu=quarkse_em’
..
arc-elf32-g++: error: unrecognized argument in option ‘-mcpu=quarkse_em’
..
arc-elf32-g++: error: unrecognized argument in option ‘-mcpu=quarkse_em’
.
scons: *** [.pioenvs/genuino101/src/counter.o] Error 1
scons: *** [.pioenvs/genuino101/FrameworkArduinoVariant/variant.o] Error 1
scons: *** [.pioenvs/genuino101/FrameworkArduino/CDCSerialClass.o] Error 1
.
arc-elf32-g++: error: unrecognized argument in option ‘-mcpu=quarkse_em’
.
scons: *** [.pioenvs/genuino101/FrameworkArduino/IPAddress.o] Error 1
==================================== [ ERROR ] Took 0.32 seconds ====================================

The failing compilation cmd:

arc-elf32-g++ -o .pioenvs/genuino101/src/counter.o -c -fno-rtti -std=c++11 -fno-exceptions -g -Os -ffunction-sections -fdata-sections -Wall -mlittle-endian -mcpu=quarkse_em -fno-reorder-functions -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -fno-defer-pop -Wno-unused-but-set-variable -Wno-main -ffreestanding -fno-stack-protector -mno-sdata -fsigned-char -DF_CPU=32000000L -DARDUINO_ARC32_TOOLS -D__CPU_ARC__ -DCLOCK_SPEED=32 -DCONFIG_SOC_GPIO_32 -DCONFIG_SOC_GPIO_AON -DINFRA_MULTI_CPU_SUPPORT -DCFW_MULTI_CPU_SUPPORT -DHAS_SHARED_MEM -DPLATFORMIO=021101 -DARDUINO_ARCH_ARC32 -D__ARDUINO_ARC__ -DUSB_VID=0x8087 -DUSB_PID=0x0AB6 "-DUSB_PRODUCT=\"Genuino 101\"" -DUSB_MANUFACTURER=\"Intel\" -DARDUINO=10608 -I/home/asifhh/.platformio/packages/framework-arduinointel/system/libarc32_arduino101/drivers -I/home/asifhh/.platformio/packages/framework-arduinointel/system/libarc32_arduino101/common -I/home/asifhh/.platformio/packages/framework-arduinointel/system/libarc32_arduino101/framework/include -I/home/asifhh/.platformio/packages/framework-arduinointel/system/libarc32_arduino101/bootcode -I.pioenvs/genuino101/IntelDrivers -I.pioenvs/genuino101/FrameworkArduino -I.pioenvs/genuino101/FrameworkArduinoVariant -Isrc src/counter.cpp

Error: As depicted the incorrect architecture flag quarkse_em is used instead of -mARCv2EM.

So I manually successfully run the compile command: (I replace -mcpu=quarkse_em with -mARCv2EM)

arc-elf32-g++ -o .pioenvs/genuino101/src/counter.o -c -fno-rtti -std=c++11 -fno-exceptions -g -Os -ffunction-sections -fdata-sections -Wall -mlittle-endian -mARCv2EM -fno-reorder-functions -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -fno-defer-pop -Wno-unused-but-set-variable -Wno-main -ffreestanding -fno-stack-protector -mno-sdata -fsigned-char -DF_CPU=32000000L -DARDUINO_ARC32_TOOLS -D__CPU_ARC__ -DCLOCK_SPEED=32 -DCONFIG_SOC_GPIO_32 -DCONFIG_SOC_GPIO_AON -DINFRA_MULTI_CPU_SUPPORT -DCFW_MULTI_CPU_SUPPORT -DHAS_SHARED_MEM -DPLATFORMIO=021101 -DARDUINO_ARCH_ARC32 -D__ARDUINO_ARC__ -DUSB_VID=0x8087 -DUSB_PID=0x0AB6 "-DUSB_PRODUCT=\"Genuino 101\"" -DUSB_MANUFACTURER=\"Intel\" -DARDUINO=10608 -I/home/asifhh/.platformio/packages/framework-arduinointel/system/libarc32_arduino101/drivers -I/home/asifhh/.platformio/packages/framework-arduinointel/system/libarc32_arduino101/common -I/home/asifhh/.platformio/packages/framework-arduinointel/system/libarc32_arduino101/framework/include -I/home/asifhh/.platformio/packages/framework-arduinointel/system/libarc32_arduino101/bootcode -I.pioenvs/genuino101/IntelDrivers -I.pioenvs/genuino101/FrameworkArduino -I.pioenvs/genuino101/FrameworkArduinoVariant -Isrc src/counter.cpp

So I thought I needed to change this compile time architecture flag in .gcc-flags.json.
And then I try the CLI to compile, but it fails in the same way:

arc-elf32-g++: error: unrecognized argument in option ‘-mcpu=quarkse_em’

NOTE: All this was working before I upgraded to the latest version.

Where else is -mcpu=quarkse_em being used for compilation?
I could find no reference to this flag in my project directory and in ~/.platformio

Any help is much appreciated. I would like to continue to use PlatformIO instead of Arduino IDE.
_
Asif

I did a complete uninstallation:

sudo pip uninstall platformio
atp-get purge atom
/bin/rm -rf ~/.platformio

Then I did a complete installation:

sudo dpkg --install atom-amd64.deb
atom &

In atom, I installed:

  • platformio-ide
  • platformio-ide-terminal
  • platformio-aia

Then I did an update and upgrade and installed the platform intel_arc32:
NOTE: You need to ensure that platformio is in your PATH.

set PATH=$PATH:~/.atom/packages/platformio-ide/penv/bin
platformio update
platformio upgrade
platformio platforms install intel_arc32

Then I was able to init my project:

mkdir <PorjectDir>
cd <ProjectDir>
platformio init --ide emacs --board genuino101

At this point I copied the counter.cpp (please see in the previous post of this thread) app into the src dir and I was able to build:

platformio run --target clean
platformio run

NOTE: --verbose still seems to give the opposite result.
_
Asif

Does it work from IDE now?

Fixed in Print human-readable information when processing environments · Issue #721 · platformio/platformio-core · GitHub