windowsvisual-studio-codesonymsys2spresense

Sony Spresense SDK -VS code Extension - Invalid argument # include <arch/types.h> on fresh Build of HelloWorld


Well as life tends to be frustrating, i have found yet another interesting bug in the great conglomerate of which makes up VS-Code and it's list of 'useful' extensions...

Back Story:

To begin - i purchased a new Sony - Spresense Main Board and Expansion Board for development and testing purposes. Everything arrived in great shape with the highest quality of product and packaging.

The First Step:

As with every micro-controller purchased, I always test every aspect offered with the device when it comes to programming. I used the well known Arduino ide to throw a few basic examples on the Spresense main board. They all flashed correctly, worked properly and i was happy to see the device works!

The Problem:

At this point i had gotten my fill of using the arduino ide... I decided to download the vscode extension , following the vscode setup guide provided by Sony Spresense Web Site.

The All Stop Error:

Excited to see my first hello world printf statment cruise thru the serial terminal i began the project spresense application build.

The Makefile proceeds thru the steps checking directories and performing required duties.

make[3]: Entering directory '/c/msys64/home/Anon/spresense/sdk/apps/builtin' In file included from C:/msys64/home/Anon/spresense/nuttx/include/sys/types.h:47:0, from C:/msys64/home/Anon/spresense/nuttx/include/nuttx/lib/builtin.h:51, from ./builtin_list.c:44: C:/msys64/home/Anon/spresense/nuttx/include/stdint.h:49:12: fatal error: C:/msys64/home/Anon/spresense/nuttx/include/arch/types.h: Invalid argument

include <arch/types.h>

compilation terminated. ERROR: arm-none-eabi-gcc failed: 1 command: arm-none-eabi-gcc -M -fno-builtin -mabi=aapcs -ffunction-sections -fdata-sections -Wall -Wstrict-prototypes -Wshadow -Wundef -g -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer -mcpu=cortex-m4 -mthumb -mfpu=fpv4-sp-d16 -mfloat-abi=hard -I. -isystem /c/msys64/home/Anon/spresense/nuttx/include -isystem /c/msys64/home/Anon/spresense/nuttx/../sdk/include -D__KERNEL__ -pipe -gdwarf-3 -I /c/msys64/home/Anon/spresense/sdk/apps/include ./builtin_list.c make[3]: *** [/c/msys64/home/Anon/spresense/sdk/apps/Application.mk:209: .depend] Error 1 make[3]: Leaving directory '/c/msys64/home/Anon/spresense/sdk/apps/builtin'

The Make proceeds to throw 10 or so more errors of the same variety, all invalid argument..

I feel like this should be working... I mean with all the fan fair behind this product line one would think the basic setup guide and IDE should work out of the box...

I think i am figuring out why this product line is failing miserably in the public realm...

The Most Basic of Code

#include <sdk/config.h>
#include <stdio.h>

int myAppS_main(int argc, char *argv[])
{
  printf("Hello Spresense!!!");
  return 0;
}

I have spent a few days trying to make heads or tails of this but from what i can tell, Sony has a broken extension offered thru vscode.

I have to admit i am a bit stumped....

Developing under win10, may try using linux as this appears to be an issue with Win10 using MSYS2 terminal.


Solution

  • Well,

    Thanks to @cmm for the confirmation on the build integrity.

    I was able to install the dev stack on another windows 10 computer, without the latest feature update. Just to be sure that was not creating an issue.

    In my great quest for knowledge, i feel i may have found a solution to my problem after researching this in great length.

    What I could verify:

    What I Think Happened

    During the install of MSYS2 and Vs Code ext i was not paying close attention to the install process. I simply let it run as i went about my work. During this process unbeknownst to me a number of attempts were made and blocked by my firewall and internet security protocols.. I really cannot believe how stupid this whole issue might actually be...

    Always Watch Your INSTALL!!

    After whitelisting the flagged connection attempts and full dev stack refresh/re install i was able to build past the issues that plagued me so intensively...

    To anyone that encounters this issue, i believe the issue lies in the install process and ensuring proper connections to external servers during MSYS install.

    I have to say... This one threw me for one heck of a loop.... :P