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 Arduino Portenta: does not make sense with virtual micro (Read 2334 times)
rheinlaender
Junior Member
**
Offline


Posts: 14
Joined: Oct 15th, 2020
Arduino Portenta: does not make sense with virtual micro
Jan 3rd, 2021 at 3:46pm
Print Post  
Happy new year everybody.

I really do appreciate your quick response and your good support. But today I quit working with visualmicro in combination with Visual Studion and the Arduino Portenta Board.
It just does not make sense, because there are way too many errors reported in compiling process. 
This is the extremly simple code: empty loop and setup and just a few libs, which I need to use. The results are a few hundred errors! (Even without Intellisense it still produces 33 Errors and lots of Warnings) 
Am I the only one, who is compiling this? What do I do wrong? Shouldn't it result in a clean compile without any hassle? 
Code (C++)
Select All
// the setup function runs once when you press reset or power the board
#include <SerialRPC.h>
#include <RPC_internal.h>
#include <RPC_client.h>
#include <SPI.h>
void setup() {

}

// the loop function runs over and over again until power down or reset
void loop() {
 
} 

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12163
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Arduino Portenta: does not make sense with virtual micro
Reply #1 - Feb 5th, 2021 at 9:34pm
Print Post  
Ah sorry we missed this post! We will test the latest core and try to replicate. Update during the next day or so.
  
Back to top
IP Logged
 
rheinlaender
Junior Member
**
Offline


Posts: 14
Joined: Oct 15th, 2020
Re: Arduino Portenta: does not make sense with virtual micro
Reply #2 - Feb 5th, 2021 at 9:35pm
Print Post  
Thanks in advance, looking forward to it!

  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Arduino Portenta: does not make sense with virtual micro
Reply #3 - Feb 6th, 2021 at 2:32pm
Print Post  
If you add a Local Board.txt to the project (vMicro > Add Code > Local board.txt), and add the below entries, the program should compile as expected:
Code
Select All
vm.build.compile-includes-8dot3=false
vm.build.compile-source-8dot3=false 



We will update when there is a build available with out the need to apply this work around.
  
Back to top
IP Logged
 
rheinlaender
Junior Member
**
Offline


Posts: 14
Joined: Oct 15th, 2020
Re: Arduino Portenta: does not make sense with virtual micro
Reply #4 - Feb 6th, 2021 at 4:44pm
Print Post  
Thank your for your quick response, but it still does not work.
See attached output und error
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Arduino Portenta: does not make sense with virtual micro
Reply #5 - Feb 6th, 2021 at 5:00pm
Print Post  
In the top of the RPC_client.h file add in the #ifdef protection to ensure it isn't defined more than once, we found this was needed in the Arduino IDE as well:

File: C:\Users\[UserName]client.h

Code
Select All
#include "Arduino.h"
#include "rpc/dispatcher.h"

#ifndef __ARDUINO_RPCCLIENT__
#define __ARDUINO_RPCCLIENT__

// Rest of code in Class

#endif
 



The portenta is a new tool chain for arduino and has a few rough edges. If you see an error that something is defined twice it will be because the .h file is missing the conditions to ensure it is only run once. This is standard c++. It's worth letting Arduino known when you find missing conditions on .h files. Check all the #includes you have references from your .ino file.
« Last Edit: Feb 6th, 2021 at 5:15pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2441
Joined: Feb 13th, 2019
Re: Arduino Portenta: does not make sense with virtual micro
Reply #6 - Feb 9th, 2021 at 4:53pm
Print Post  
The entries added in the board.txt locally in the project will no longer be required in the latest release (21.01.06.3), available at the top of the board below:
https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES

(The change to the *.h file is still needed)
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint