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) Code compiled in VM wont access SD card (Read 2577 times)
Drew
Newbies
*
Offline


Posts: 4
Location: Michigan,USA
Joined: Jun 2nd, 2018
Code compiled in VM wont access SD card
Jun 2nd, 2018 at 12:43am
Print Post  
I am unable to get code that I compile using VM to access an SD card. A copy paste of the same code into the arduino IDE works as expected.  Sad
  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Code compiled in VM wont access SD card
Reply #1 - Jun 2nd, 2018 at 1:07am
Print Post  
Thanks for the files, saves a lot of time.

At first glance everything looks okay except you have a different cpu speed set in Visual Micro v's Arduino.

Can you try Visual Micro at 96mhz instead of 72?

  
Back to top
WWW  
IP Logged
 
Drew
Newbies
*
Offline


Posts: 4
Location: Michigan,USA
Joined: Jun 2nd, 2018
Re: Code compiled in VM wont access SD card
Reply #2 - Jun 2nd, 2018 at 1:13am
Print Post  
Thank you for the quick response!
Changing the CPU speed had no effect. 
Also the same problem occurs using an arduino nano.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Code compiled in VM wont access SD card
Reply #3 - Jun 2nd, 2018 at 1:37am
Print Post  
Oh actually it was arduino at 72mhz and vm at 96 in your test.

It sounds like the speed isn't the issue if the Nano also fails.

Are you sure you are compiling exact same code in your test?

Possible to email a simple project or .ino that fails? email info[at]visualmicro.com along with link to this post

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Code compiled in VM wont access SD card
Reply #4 - Jun 2nd, 2018 at 4:30pm
Print Post  
Thanks for the email.

Would you please install the 1806.2 download from the new releases section 

The latest release does contain a fix for the order that libraries and library paths are compiled and linked. It might not help you but it is an important fix and it is difficult to see what else the problem could be. 

It seems such a basic problem that many users should be hitting it.

Thanks for sending so much clear info. Generally it's really tough to get clear problem reports!


« Last Edit: Jun 2nd, 2018 at 4:40pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Drew
Newbies
*
Offline


Posts: 4
Location: Michigan,USA
Joined: Jun 2nd, 2018
Re: Code compiled in VM wont access SD card
Reply #5 - Jun 4th, 2018 at 4:04pm
Print Post  
Thank you so much for all your help.
I have it working now. The short short version is that update fixed the SD issue for the Nano, but I was then unable to compile the Teensy in either IDE. After lots of beer and google I found that somewhere the SD library that the arduino IDE had been using had gotten either re-linked or updated to  a newer version which apparently doesnt work with Teensy 3.2.
Sooo I downgraded the library in arduino's IDE which got the Teensy code working again. Now that I have removed all of the newer versions of the SD library from the computer the VM compiler uses the only one it can find which seems to be working properly now as well.

Thanks again for your help!!! 
I really love the Visual Micro software!!

« Last Edit: Jun 4th, 2018 at 4:06pm by Drew »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Code compiled in VM wont access SD card
Reply #6 - Jun 4th, 2018 at 4:15pm
Print Post  
Great thanks for the update.

fyi: There are 3 possible locations for libs ...

When you install libs yourself they go into mydocuments/arduino/libraries. This location overrides the [arduino ide]\libraries folder.

Libraries can also be located below the toolchain which have the highest priority. for nano example this is usually [arduino ide]\hardware\arduino\avr\libraries

If you install avr via board manager instead of using the avr included with the arduino ide then things get a little more complicated because board manager stores stuff in "c:\users\your name\appdata\local\arduino15\packages"

« Last Edit: Jun 4th, 2018 at 4:17pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Drew
Newbies
*
Offline


Posts: 4
Location: Michigan,USA
Joined: Jun 2nd, 2018
Re: Code compiled in VM wont access SD card
Reply #7 - Jun 4th, 2018 at 5:01pm
Print Post  
Ah, that is useful info. So I can copy ally of the current SD library stuff that is working into the teensy hardware directory, and then update the main SD library to use with everything else?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Code compiled in VM wont access SD card
Reply #8 - Jun 4th, 2018 at 5:18pm
Print Post  
Yes as long as it's the \libararies folder.

When you run the teensy windows installer it asks if you want to install libraries. I thought the SD was installed and I thought the installer puts them in the correct priority libraries area for the hardware. I do recall that for backward compat reasons Teensy3 pretends it is AVR at some point(s). Maybe this is part of the confusion but you will easily find out.

Don't forget to click rescan or  restart the ide if you move things around with windows explorer.
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Code compiled in VM wont access SD card
Reply #9 - Jun 4th, 2018 at 5:18pm
Print Post  
Yes as long as it's the \libararies folder.

When you run the teensy windows installer it asks if you want to install libraries. I thought the SD was installed and I thought the installer puts them in the correct priority libraries area for the hardware. I do recall that for backward compat reasons Teensy3 pretends it is AVR at some point(s). Maybe this is part of the confusion but you will easily find out.

Don't forget to click rescan or  restart the ide if you move things around with windows explorer.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint