0

I'm not finding many resources out there. I already tried using new versions of "TFTv2.h" and "TFTv2.cpp", but I don't think much of anything changed in my output.

These are the libraries I'm trying to use. The sketch I'm trying to compile for the 101 is empty except for these lines and an empty setup() and loop().

#include <stdint.h>
#include <TFTv2.h>//For Seedstudio Touch
#include <SPI.h>
#include <SeeedTouchScreen.h>   //Seedstudio LCD touch screen Library File
#include <SD.h>//For Seedstudio Touch
#include <XBee.h>   //Zigbee Wireless transciever Library File
#include <Printers.h>   //Zigbee Wireless transciever Library File

Basically I need to know whether I need to find replacements or workarounds for these libraries. Compiling for the 101 in Visual Studio, I get a lot of output messages that I don't get when compiling for the Mega. I have more-or-less no idea what they mean.

I'll go ahead and paste the non-verbose output here. Thanks for your advice! Let me know if I should add the verbose output, and I'll post it right away.

output (non-verbose);

Compiling debug version of 'Arduino_101trial' for 'Arduino/Genuino 101'
Sd2Card.cpp:In member function 'uint8_t Sd2Card::readData(uint32_t, uint16_t, uint16_t, uint8_t*)
Sd2Card.cpp:379:12: warning: unused variable 'n' [-Wunused-variable]
:uint16_t n
SdFile.cpp:In static member function 'static uint8_t SdFile::make83Name(const char*, uint8_t*)
SdFile.cpp:261:15: warning: unused variable 'b' [-Wunused-variable]
:uint8_t b
SdFile.cpp:In member function 'uint8_t SdFile::rmRfStar()
SdFile.cpp:907:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
:if (curPosition_ != (32*(index + 1))) {
TFTv2.cpp:In member function 'void TFT::drawString(char*, short unsigned int, short unsigned int, short unsigned int, short unsigned int)
TFTv2.cpp:388:18: warning: value computed is not used [-Wunused-value]
:*string++
SeeedTouchScreen.cpp:In file included from
pins_arduino.h:39:14: error: 'uint8_t' does not name a type
:static const uint8_t SS   = 10
pins_arduino.h:40:14: error: 'uint8_t' does not name a type
:static const uint8_t MOSI = 11
pins_arduino.h:41:14: error: 'uint8_t' does not name a type
:static const uint8_t MISO = 12
pins_arduino.h:42:14: error: 'uint8_t' does not name a type
:static const uint8_t SCK  = 13
pins_arduino.h:44:14: error: 'uint8_t' does not name a type
:static const uint8_t SDA = 18
pins_arduino.h:45:14: error: 'uint8_t' does not name a type
:static const uint8_t SCL = 19
pins_arduino.h:46:14: error: 'uint8_t' does not name a type
:static const uint8_t LED_BUILTIN = 13
pins_arduino.h:48:14: error: 'uint8_t' does not name a type
:static const uint8_t A0 = 14
pins_arduino.h:49:14: error: 'uint8_t' does not name a type
:static const uint8_t A1 = 15
pins_arduino.h:50:14: error: 'uint8_t' does not name a type
:static const uint8_t A2 = 16
pins_arduino.h:51:14: error: 'uint8_t' does not name a type
:static const uint8_t A3 = 17
pins_arduino.h:52:14: error: 'uint8_t' does not name a type
:static const uint8_t A4 = 18
pins_arduino.h:53:14: error: 'uint8_t' does not name a type
:static const uint8_t A5 = 19
pins_arduino.h:55:14: error: 'uint8_t' does not name a type
:static const uint8_t ATN = 20
Arduino.h:In file included from
wiring_private.h:from
SeeedTouchScreen.cpp:from
SeeedTouchScreen.cpp:In member function 'Point TouchScreen::getPoint()
SeeedTouchScreen.cpp:94:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
:*portOutputRegister(yp_port) &= ~yp_pin
variant.h:in definition of macro 'portOutputRegister
:#define portOutputRegister(port)  (uint32_t*)port
SeeedTouchScreen.cpp:95:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
:*portOutputRegister(ym_port) &= ~ym_pin
variant.h:in definition of macro 'portOutputRegister
:#define portOutputRegister(port)  (uint32_t*)port
SeeedTouchScreen.cpp:100:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
:*portOutputRegister(xp_port) |= xp_pin
variant.h:in definition of macro 'portOutputRegister
:#define portOutputRegister(port)  (uint32_t*)port
SeeedTouchScreen.cpp:101:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
:*portOutputRegister(xm_port) &= ~xm_pin
variant.h:in definition of macro 'portOutputRegister
:#define portOutputRegister(port)  (uint32_t*)port
SeeedTouchScreen.cpp:127:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
:*portOutputRegister(xp_port) &= ~xp_pin
variant.h:in definition of macro 'portOutputRegister
:#define portOutputRegister(port)  (uint32_t*)port
SeeedTouchScreen.cpp:130:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
:*portOutputRegister(yp_port) |= yp_pin
variant.h:in definition of macro 'portOutputRegister
:#define portOutputRegister(port)  (uint32_t*)port
SeeedTouchScreen.cpp:153:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
:*portOutputRegister(xp_port) &= ~xp_pin;            \\ Set X+ to ground
variant.h:in definition of macro 'portOutputRegister
:#define portOutputRegister(port)  (uint32_t*)port
SeeedTouchScreen.cpp:154:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
:*portOutputRegister(ym_port) |=  ym_pin;            \\ Set Y- to VCC
variant.h:in definition of macro 'portOutputRegister
:#define portOutputRegister(port)  (uint32_t*)port
SeeedTouchScreen.cpp:155:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
:*portOutputRegister(yp_port) &= ~yp_pin;            \\ Hi-Z X- and Y+
variant.h:in definition of macro 'portOutputRegister
:#define portOutputRegister(port)  (uint32_t*)port
Error compiling libraries
1
  • @Gerber- Thanks for fixing my formatting! Commented Dec 14, 2016 at 23:03

1 Answer 1

1

So it looks like you have some warnings in Sd2Card.cpp, SdFile.cpp, TFTv2.cpp
For the most part you can ignore these warnings

As for SeeedTouchScreen.cpp it looks like you're getting Errors for pins. does not name a type means that uint8_t is not a type Visual Studio understands.

Then further down you're getting another warning for SeeedTouchScreen.cpp
cast to pointer from integer of different size

Did you make sure that whatever board you're using is compatible with these libraries?


The Arduino Mega has 54 digital input/output pins (of which 14 can be used as PWM outputs), 16 analog inputs, 4 UARTs (hardware serial ports)

The 101 comes with 14 digital input/output pins (of which 4 can be used as PWM outputs), 6 analog inputs.

This means that if your libraries are designed for the Mega and no other board you will run into these errors

1
  • I think you're right, because despite some other loading issues which I now believe are unrelated (waiting for board and port reconnecting), I was finally able to compile and load a simple sketch. The one thing I had to do was comment out SeeedTouchScreen.h, so I suppose it did ignore all of those other issues. I'm now looking for a new version of this library, but if it has something to do with the pins, perhaps i can improvise a solution and modify the existing library. Perhaps I'll submit a pull request! Commented Dec 14, 2016 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.