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 Re: memset/memcpy error (Read 2246 times)
TheStallionMang
Junior Member
**
Offline


Posts: 11
Joined: Jul 11th, 2018
Re: memset/memcpy error
Jul 12th, 2018 at 7:45pm
Print Post  
I had a similar thing happen to me this morning with memcpy.  

I had to typecast the size argument, and it stopped complaining. 

Notice the first use of memcpy has the error, but if I typecast it as what the function is asking for (in my case a size_t) or used the sizeof() function that returns a size_t, everything was fine.  

  

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


Posts: 11
Joined: Jul 11th, 2018
Re: memset/memcpy error
Reply #1 - Jul 13th, 2018 at 3:56pm
Print Post  
Dang... 

Did you check out the file in the __vm directory that Tim mentioned? 

I installed the Arduino Zero board from the visual micro board manager, and wrote a quick program that used your data types, and maybe I did something wrong because I only got a red line under the first argument.  It was complaining about too many arguments, which is a different error than yours so I'm not sure if the following steps will help you out.   
I followed Tim's instructions, and then added a prototype to the intellisense_fix file.  That fixed the intellisense error. 

Then I commented out the line and rebuilt so I could take some screenshots, and the error wouldn't come back.  So I don't have any pictures for you this time.  

I've attached the project so you can see what I did.  (You're allowed to post source code here right?)  Hope it helps!
  

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


Posts: 11
Joined: Jul 11th, 2018
Re: memset/memcpy error
Reply #2 - Jul 13th, 2018 at 5:06pm
Print Post  
Quote:
When I add the fix file and build, I assume that it will populate it with a template of data?  Currently its not doing anything - still 0KB


Yes, when I built after adding the fix file it looked like VM copied the contents of the .vsarduino.h file to the fix file.
I added the prototype, and it fixed the problem.  

Edit:  
Man... I am sorry.  I just did it again and realized that the reason all that extra code is in there is that I copied the .vsarduino.h file and renamed it to the fix file, but I forgot to delete the contents after I did it.  I should probably stop giving advice on here and leave it to the pros.  Lips Sealed

I'm a noob with Visual Micro so I don't want to lead you down the wrong path, but personally I would start a new project and add a few lines of code in the loop that does what you are trying to do in your more complicated project.  See if you end up with the same problem.  

I'm interested in what you figure out. Keep me posted.
« Last Edit: Jul 13th, 2018 at 5:36pm by TheStallionMang »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: memset/memcpy error
Reply #3 - Jul 13th, 2018 at 6:25pm
Print Post  
Sorry I think you are confusing things a bit Smiley

The contents of the intellisense-fix file are copied into the vsarduino.h by visual micro. Visual Micro recreated the vsarduino.h whenever it needs to.

All that is needed would be to place the overloads from your screen shot into the intellisense-fix file.

Please also try to post text instead of images when posting code so that is can be used to give you examples using your own code.

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: memset/memcpy error
Reply #4 - Jul 13th, 2018 at 6:44pm
Print Post  
@TheStallionMang I have split your post into a new thread so that I can sort milesf out directly.

The Zero board (samd) might have a fair bit of syntax that the vs intellisense doesn't like. If so we can switch to one of a few alternative systems. Plus arduino are working on something that will give us better hints for the intellisense engine.

So I'll sort out miles then look at your overloads. In the meantime if you have some code with multiple intellisense errors  to test with that will be useful.

Finally you can switch off red squiggles in the options if you have too many. The toolchains do change every so often that sometimes means some adjustments.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint