Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Visual Micro not finding Arduino Keyboard library (Read 6140 times)
wolf
Junior Member
**
Offline


Posts: 33
Joined: Sep 19th, 2014
Visual Micro not finding Arduino Keyboard library
Nov 5th, 2014 at 9:00pm
Print Post  
The sketch library calls Keyboard.press().
It compiles and runs on Arduino IDE, and Keyboard.press(KEY_B) prints 'b' as intended.

On Micro Studio the sketch compiles with warning:
Keyboard.h: No such file or directory
It runs, but there is no output from Keyboard.press(KEY_B).
Here is the verbose output:

Code
Select All
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mmcu=atmega32u4 -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -felide-constructors -I"C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy" -o "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\new.cpp.o"  "C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy\new.cpp"  -DF_CPU=16000000L -DUSB_SERIAL_HID -DLAYOUT_US_ENGLISH -DVISUALMICRO_COMPILER_VER=1  -DTEENSYDUINO=120
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mmcu=atmega32u4 -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -felide-constructors -I"C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy" -o  "C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy\Print.cpp"  -DF_CPU=16000000L -DUSB_SERIAL_HID -DLAYOUT_US_ENGLISH -DVISUALMICRO_COMPILER_VER=1  -DTEENSYDUINO=120
Print.cpp:In member function 'size_t Print::print(const __FlashStringHelper*)'
Print.cpp:90: warning: '__progmem__' attribute ignored
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mmcu=atmega32u4 -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -felide-constructors -I"C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy" -o   "C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy\Stream.cpp"  -DF_CPU=16000000L -DUSB_SERIAL_HID -DLAYOUT_US_ENGLISH -DVISUALMICRO_COMPILER_VER=1  -DTEENSYDUINO=120
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mmcu=atmega32u4 -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -felide-constructors -I"C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy" -o "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\Tone.cpp.o"  "C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy\Tone.cpp"  -DF_CPU=16000000L -DUSB_SERIAL_HID -DLAYOUT_US_ENGLISH -DVISUALMICRO_COMPILER_VER=1  -DTEENSYDUINO=120
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mmcu=atmega32u4 -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -felide-constructors -I"C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy" -o   "C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy\usb_api.cpp"  -DF_CPU=16000000L -DUSB_SERIAL_HID -DLAYOUT_US_ENGLISH -DVISUALMICRO_COMPILER_VER=1  -DTEENSYDUINO=120
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mmcu=atmega32u4 -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -felide-constructors -I"C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy" -o  "C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy\WMath.cpp"  -DF_CPU=16000000L -DUSB_SERIAL_HID -DLAYOUT_US_ENGLISH -DVISUALMICRO_COMPILER_VER=1  -DTEENSYDUINO=120
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mmcu=atmega32u4 -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -felide-constructors -I"C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy" -o   "C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy\WString.cpp"  -DF_CPU=16000000L -DUSB_SERIAL_HID -DLAYOUT_US_ENGLISH -DVISUALMICRO_COMPILER_VER=1  -DTEENSYDUINO=120
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mmcu=atmega32u4 -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -felide-constructors -I"C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy" -o  "C:\Program Files (x86)\Arduino\hardware\teensy\cores\teensy\yield.cpp"  -DF_CPU=16000000L -DUSB_SERIAL_HID -DLAYOUT_US_ENGLISH -DVISUALMICRO_COMPILER_VER=1  -DTEENSYDUINO=120
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" "
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\malloc.c.o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\usb.c.o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\wiring.c.o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" .cpp.o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\main.cpp.o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\new.cpp.o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\Print.cpp.o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\Stream.cpp.o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\Tone.cpp.o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Buil 

« Last Edit: Nov 6th, 2014 at 5:37am by wolf »  
Back to top
 
IP Logged
 
wolf
Junior Member
**
Offline


Posts: 33
Joined: Sep 19th, 2014
Re: Visual Micro not finding Aruduino Keyboard library
Reply #1 - Nov 5th, 2014 at 9:01pm
Print Post  
Here is the remaining verbose message:
Code
Select All
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\WMath.cpp.o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-ar rcs "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\yield.cpp.o"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-gcc -Os -Wl,--gc-sections,--relax -mmcu=atmega32u4 -L"C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2" -o "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\blink2.elf" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\blink2.cpp.o" .cpp.o" .cpp.o" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\core.a" -lm
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\blink2.elf" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\blink2.eep"
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-objcopy -O ihex -R .eeprom "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\blink2.elf" "C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2\blink2.hex"
C:\Program Files (x86)\Arduino\hardware\tools\teensy_post_compile.exe -board=teensy2 -tools="C:\Program Files (x86)\Arduino\hardware\tools" -path="C:\Users\wolf\AppData\Local\VMicro\Arduino\Builds\blink2\teensy2" -file=blink2
Binary sketch size: 4,980 bytes (used 15% of a 32,256 byte maximum) (4.60 secs)
 



How to export a Solution so it can be attached to the thread?
    Solution Explorer r> Solution > Export Solution as Extension (is dimmed)
« Last Edit: Nov 5th, 2014 at 9:05pm by wolf »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro not finding Aruduino Keyboard library
Reply #2 - Nov 6th, 2014 at 12:52am
Print Post  
Did you first try with a define different to USB_SERIAL_HID? Try clicking Build>Clean Solution then running the build again.

If that works then you can either click clean after you change defines or switch on the project property that forces a rebuild of the core when you change a define.

If that doesn't work we will look for something different?
  
Back to top
IP Logged
 
wolf
Junior Member
**
Offline


Posts: 33
Joined: Sep 19th, 2014
Re: Visual Micro not finding Aruduino Keyboard library
Reply #3 - Nov 6th, 2014 at 3:14am
Print Post  
At first the "Defines - Project" was set to USB_SERIAL.  Later I changed it to USB_SERIAL_HID and clicked "Clean Solution" and then "Rebuild Solution".  The resulting error message is in the original post.

What else can I try?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro not finding Arduino Keyboard library
Reply #4 - Nov 6th, 2014 at 2:11pm
Print Post  
Okay please do build clean then email the entire output to info [at] visualmicro.com

Thanks
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro not finding Arduino Keyboard library
Reply #5 - Nov 7th, 2014 at 2:40pm
Print Post  
Thanks for the compiler info from the arduino ide

1)

I note you have set the option to use USB_HID in Arduino, you should use the same in Visual Micro (I know you use menus in arduino so this is not obvious)

In Visual Micro, please use USB_HID instead of USB_SERIAL_HID

2)

I also recommend uploading in Visual Micro without debug until you have a working and understood teensy system. Switch the tool bar from "Debug" to "Release" or click "Debug>Start without debugging"

Look forward to hearing the results.



  
Back to top
IP Logged
 
wolf
Junior Member
**
Offline


Posts: 33
Joined: Sep 19th, 2014
Re: Visual Micro not finding Arduino Keyboard library
Reply #6 - Nov 7th, 2014 at 9:53pm
Print Post  
Thank you for the help.  That fixed it.  My Visual Micro works now Smiley.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint