TinyCircuits

Tiny Screen + example compile fail missing sam.h

Tiny Screen + example compile fail missing sam.h
« on: January 12, 2017, 01:25:02 PM »
Libraries and board manager updated per Tinyscreen+ setup guide. Compile fails

Compiler output...


Arduino: 1.6.10 (Windows 10), Board: "TinyScreen+, Default"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\whmck\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\whmck\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\whmck\Documents\Arduino\libraries" -fqbn=TinyCircuits:samd:tinyscreen:BuildOption=normal -vid-pid=0X03EB_0X8009 -ide-version=10610 -build-path "C:\Users\whmck\AppData\Local\Temp\buildf3895659169830604ee55e7f9fcb332f.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\whmck\Documents\Arduino\sketch_jan12a\sketch_jan12a.ino"
C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\whmck\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\whmck\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\whmck\Documents\Arduino\libraries" -fqbn=TinyCircuits:samd:tinyscreen:BuildOption=normal -vid-pid=0X03EB_0X8009 -ide-version=10610 -build-path "C:\Users\whmck\AppData\Local\Temp\buildf3895659169830604ee55e7f9fcb332f.tmp" -warnings=none -prefs=build.warn_data_percentage=75 -verbose "C:\Users\whmck\Documents\Arduino\sketch_jan12a\sketch_jan12a.ino"
Using board 'tinyscreen' from platform in folder: C:\Users\whmck\AppData\Local\Arduino15\packages\TinyCircuits\hardware\samd\1.0.5
Using core 'arduino' from platform in folder: C:\Users\whmck\AppData\Local\Arduino15\packages\TinyCircuits\hardware\samd\1.0.5
Detecting libraries used...
"C:\Users\whmck\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions  -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD  -D__SAMD21G18A__ -DUSB_VID=0x03EB -DUSB_PID=0x8009 -DUSBCON '-DUSB_MANUFACTURER="TinyCircuits"' '-DUSB_PRODUCT="TinyScreen+"' "-IC:\Users\whmck\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\whmck\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/Device/ATMEL/" "-IC:\Users\whmck\AppData\Local\Arduino15\packages\TinyCircuits\hardware\samd\1.0.5\cores\arduino" "-IC:\Users\whmck\AppData\Local\Arduino15\packages\TinyCircuits\hardware\samd\1.0.5\variants\tinyscreen_p" "C:\Users\whmck\AppData\Local\Temp\buildf3895659169830604ee55e7f9fcb332f.tmp\sketch\sketch_jan12a.ino.cpp" -o "nul"
"C:\Users\whmck\AppData\Local\Arduino15\packages\arduino\tools\arm-none-eabi-gcc\4.8.3-2014q1/bin/arm-none-eabi-g++" -mcpu=cortex-m0plus -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions  -w -x c++ -E -CC -DF_CPU=48000000L -DARDUINO=10610 -DARDUINO_SAMD_ZERO -DARDUINO_ARCH_SAMD  -D__SAMD21G18A__ -DUSB_VID=0x03EB -DUSB_PID=0x8009 -DUSBCON '-DUSB_MANUFACTURER="TinyCircuits"' '-DUSB_PRODUCT="TinyScreen+"' "-IC:\Users\whmck\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/CMSIS/Include/" "-IC:\Users\whmck\AppData\Local\Arduino15\packages\arduino\tools\CMSIS\4.5.0/Device/ATMEL/" "-IC:\Users\whmck\AppData\Local\Arduino15\packages\TinyCircuits\hardware\samd\1.0.5\cores\arduino" "-IC:\Users\whmck\AppData\Local\Arduino15\packages\TinyCircuits\hardware\samd\1.0.5\variants\tinyscreen_p" "C:\Users\whmck\AppData\Local\Temp\buildf3895659169830604ee55e7f9fcb332f.tmp\sketch\sketch_jan12a.ino.cpp" -o "C:\Users\whmck\AppData\Local\Temp\buildf3895659169830604ee55e7f9fcb332f.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
In file included from C:\Users\whmck\AppData\Local\Temp\buildf3895659169830604ee55e7f9fcb332f.tmp\sketch\sketch_jan12a.ino.cpp:1:0:

C:\Users\whmck\AppData\Local\Arduino15\packages\TinyCircuits\hardware\samd\1.0.5\cores\arduino/Arduino.h:47:17: fatal error: sam.h: No such file or directory

 #include "sam.h"

                 ^

compilation terminated.

exit status 1
Error compiling for board TinyScreen+.


Sketch

#include <Wire.h>
#include <SPI.h>
#include <TinyScreen.h>

TinyScreen display = TinyScreen(TinyScreenPlus);


void setup() {
  // put your setup code here, to run once:
 display.begin();
  //setBrightness(brightness);//sets main current level, valid levels are 0-15
  display.setBrightness(10);
}

void loop() {
  // put your main code here, to run repeatedly:

}
Bill

Retired industrial controls engineer

Andy

Re: Tiny Screen + example compile fail missing sam.h
« Reply #1 on: January 19, 2017, 11:32:08 PM »
Is this the demo from the File->Examples menu?

If so, I just compiled / deployed it.

A couple of things to double check, since the IDE can reset your settings to an old one. I am copying down some things I have set on my IDE for uploading the demo. Hopefully it will help you. Kind of tough to get help here on this forum.

Off the menu

Tools->Board:TinyScreen+
Tools->Programmer->AVRISP mkII
Tools->Build Option: Default

I hope that helps (it may be thinking the older board perhaps).

Re: Tiny Screen + example compile fail missing sam.h
« Reply #2 on: January 23, 2017, 03:44:25 PM »
I'm not able to reproduce this issue unfortunately- can you try upgrading your IDE? Looks like I'm pretty behind on 1.6.12 right now, but that seems to be working fine with the latest board manager files.

dulsi

Re: Tiny Screen + example compile fail missing sam.h
« Reply #3 on: September 08, 2017, 05:46:20 PM »
I encountered the same problem. Fedora 26 has arduino 1.6.6. I installed arduino 1.8.4 from the testing repository. That allows me to compile my viobyte game for Tinyscreen+ but it doesn't work for some reason. Additionally it fails to compile for the Arduino Pro so I can't build for the video game kit with 1.8.4 installed. I've reverted back to 1.6.6 for now.

Grimstone

  • ****
  • 64
  • Still downloading...
    • View Profile
Re: Tiny Screen + example compile fail missing sam.h
« Reply #4 on: September 12, 2017, 10:09:14 AM »
You have a library/IDE mismatch. In the newer IDE versions, they moved where the library include files are stored and addressed. The updated library code reflects that, but since you do not have an updated IDE, it cannot compile correctly. Update the IDE, make sure you are on the latest library editions and you should be fine.


Re: Tiny Screen + example compile fail missing sam.h
« Reply #5 on: September 14, 2017, 04:17:39 AM »
Which way to use it. Because I have not tried.