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
Hot Topic (More than 8 Replies) Linkit Smart 7688 Duo compilation errors (Read 4000 times)
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Linkit Smart 7688 Duo compilation errors
Oct 28th, 2018 at 8:31am
Print Post  
The code below compiled and works fine under Arduino IDE and platformio, so I guess that something wrong is in the visualmicro. If I change board type to ArduinoYun, compilation passes OK but downloading destroys board bootloader.
Code (C++)
Select All
#define BLYNK_PRINT Serial
#define BLYNK_DEBUG

#include <BlynkSimpleYun.h>

char auth[] = "65dc98d70cd2419982e7f47b3cf";
// we need no ssid and password because Linkit connected wifi itself
char a;
int LED = 13 ;

void setup() {
  Serial.begin(115200);
  delay(2000);
  Blynk.begin(auth);
  Serial.println("Blynk.begin");
  pinMode(LED, OUTPUT);
  digitalWrite(LED, LOW);
}

void loop() {

  Blynk.run();

}

 


As could bee seen from the attached log, compiler refers to wrong core folder Digilent. I see no resonable explanation to that. 

Also, IDE periodically lost include references, marking red #include <BlynkSimpleYun.h>
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: Linkit Smart 7688 Duo compilation errors
Reply #1 - Oct 28th, 2018 at 10:12am
Print Post  
I patched original Arduino files:
d:\Arduino-ESP32-IDE\hardware\arduino\avr\
boards.txt and programmers.txt
according the contents of these files in:
c:\Users\vlady\AppData\Local\arduino15\packages\LinkIt\hardware\avr\0.1.8\ ,
added corresponding variants\smart7688\pins_arduino.h to arduino variants folder, renamed library folder Linkit to Linkit_
and now both Arduino IDE and Visualmicro compiles and flashes board OK and the code works, but resulting hexes are different, so, I feel some disturbance.

Unfortunatelly, now I see no option to upload files
« Last Edit: Oct 28th, 2018 at 10:18am by Kabron »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linkit Smart 7688 Duo compilation errors
Reply #2 - Oct 30th, 2018 at 2:07pm
Print Post  
Interesting. Please explain how to install your hardware thanks.
  
Back to top
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: Linkit Smart 7688 Duo compilation errors
Reply #3 - Oct 31st, 2018 at 6:10am
Print Post  
Well,
installation procedure here:
https://docs.labs.mediatek.com/resource/linkit-smart-7688/en/get-started/get-sta...
Patched files in attachment.
« Last Edit: Oct 31st, 2018 at 6:11am by Kabron »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: Linkit Smart 7688 Duo compilation errors
Reply #4 - Nov 5th, 2018 at 2:38pm
Print Post  
Damn I pulled to install support  for Digilent boards.
Now after deinstall and reinstall VisualMicro, and deleting Arduino15 folder every lauch VM creates a set of folders:
.43\pic32mx\include\
and  installs there every new package, e.g. esp8266. Naturally compilation does not work.
Nothing helps to solve it. I searched registry, all related folders and files, but could not figure out where VM stores references to Digilent.
How it could be solved?
« Last Edit: Nov 5th, 2018 at 2:40pm by Kabron »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linkit Smart 7688 Duo compilation errors
Reply #5 - Nov 5th, 2018 at 3:38pm
Print Post  
" deleting Arduino15 folder every lauch VM creates a set of folders"

The arduino15 folder will be created if it does not exist but Visual Micro will not create other folder when it is launched.



I suggest you delete the Arduino15 then use Arduino IDE to install the hardware. Then report any compilation issue here along with any information required to install your hardware and replicate the issue.
  
Back to top
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: Linkit Smart 7688 Duo compilation errors
Reply #6 - Nov 6th, 2018 at 4:38am
Print Post  
I did so. VM does not see hardware esp8266 installed by Arduino  IDE.
« Last Edit: Nov 6th, 2018 at 4:39am by Kabron »  
Back to top
 
IP Logged
 
Kabron
Full Member
***
Offline


Posts: 170
Joined: Nov 1st, 2015
Re: Linkit Smart 7688 Duo compilation errors
Reply #7 - Nov 7th, 2018 at 5:18am
Print Post  
Any ideas?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linkit Smart 7688 Duo compilation errors
Reply #8 - Nov 7th, 2018 at 9:21pm
Print Post  
The build problem is because the hardware incorrectly defines the usb info for the compiler. PlatformIO have their own hardware so won't be affected and I suspect that a change in the arduino ide "fixes" the issue which I will look at doing for the next release of visual micro.

You can solve the issue by adding a board.txt to the project (use the "add code" menu for a shortcut to create board.txt) and then adding this line to it:-

Code
Select All
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}' 



More info ...

Note that we use single quotes around the -D define, because {build.usb_manufacturer} and {build.usb_product} are defined strings that themselves have "double quotes". 

Therefore, the incorrect result for the compiler is as folllows:-

Code (C++)
Select All
 "-DUSB_MANUFACTURER="board usb name"" 



You would see these doubled double quotes in the verbose compiler output in visual micro and in the arduino ide. The board.txt override changes the outer double quotes to single quotes which is how the arduino boards are defined and that works. This is related to how windows runs exe command line processes which is what we do when we compile. The inner double quotes of each -D define should either be escaped  -Dfoo=\"my String\" or the entire -D surrounded with single quotes instead of double quotes as in the fix above.

as concerns the 8266 hardware not showing in visual micro please open a new thread and report which esp8266 hardware and version + .json file you used to install in the arduino ide. It's possible if you have removed the .json from the arduino ide after installing esp8266 then visual micro will no longer list the hardware but please continue this in another thread
« Last Edit: Nov 17th, 2018 at 7:26pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint