Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
tandrews
PostPosted: Aug 18, 2011 - 12:21 PM
Rookie


Joined: Mar 11, 2006
Posts: 41


Hi,

If I include the ASF module 'MEMORY - SD/MMC card access using SPI' in my EVK1100 project then I get the errors below. I've tried to find these missing dependencies, but they just don't seem to exist in the ASF drivers. What am I missing here? There is no indication in the ASF release notes that this functionality is missing. I'm using the current version of AVRStudio (5.0.1163) which has ASF version 2.5.1-17860.53. Here are the errors:


usb_drv.h: No such file or directory
scsi_decoder.h: No such file or directory
implicit declaration of function 'Is_usb_in_ready'
'g_scsi_ep_ms_in' undeclared (first use in this function)
implicit declaration of function 'Usb_reset_endpoint_fifo_access'
implicit declaration of function 'usb_write_ep_txpacket'
implicit declaration of function 'Usb_ack_in_ready_send'
implicit declaration of function 'Is_usb_out_received'
'g_scsi_ep_ms_out' undeclared (first use in this function)
implicit declaration of function 'usb_read_ep_rxpacket'
implicit declaration of function 'Usb_ack_out_received_free'


Many thanks,
Thomas
 
 View user's profile Send private message  
Reply with quote Back to top
sma
PostPosted: Aug 18, 2011 - 12:33 PM
Posting Freak


Joined: Jan 14, 2007
Posts: 1836
Location: Nantes, France

I'm using AS5 build 5.0.1157, started a new project, using EVK1100 template.
Adding SD/MMC card with SPI drivers, build project => all good.
How did you add the SD card driver's code?

-sma
 
 View user's profile Send private message  
Reply with quote Back to top
tandrews
PostPosted: Aug 18, 2011 - 12:48 PM
Rookie


Joined: Mar 11, 2006
Posts: 41


I think that you will not see the error unless ACCESS_USB_ENABLED is set.

Thanks,
Thomas
 
 View user's profile Send private message  
Reply with quote Back to top
sma
PostPosted: Aug 19, 2011 - 09:24 AM
Posting Freak


Joined: Jan 14, 2007
Posts: 1836
Location: Nantes, France

hmm good point, please report it to http://asf.atmel.com/bugzilla/

-sma
 
 View user's profile Send private message  
Reply with quote Back to top
mrniemand
PostPosted: Oct 13, 2011 - 08:49 PM
Newbie


Joined: Sep 13, 2011
Posts: 8


Did you get any solution for this problem?
 
 View user's profile Send private message  
Reply with quote Back to top
tandrews
PostPosted: Oct 14, 2011 - 05:54 AM
Rookie


Joined: Mar 11, 2006
Posts: 41


No, I haven't solved the problem yet - I've just been focusing on different parts of the project. But I'll have to solve it at some point. No doubt the solution is in one of the example projects...
 
 View user's profile Send private message  
Reply with quote Back to top
mrniemand
PostPosted: Oct 14, 2011 - 02:52 PM
Newbie


Joined: Sep 13, 2011
Posts: 8


I just posted another bug by atmel, which seems to be similar to your problem.

http://asf.atmel.com/bugzilla/show_bug.cgi?id=1228
 
 View user's profile Send private message  
Reply with quote Back to top
mrniemand
PostPosted: Oct 16, 2011 - 11:06 AM
Newbie


Joined: Sep 13, 2011
Posts: 8


I replaced the following functions in sd_mmc_spi_mem.c as seen below :
Code:
void sd_mmc_spi_read_multiple_sector_callback(const void *psector)
{
   udi_msc_trans_block(true, (uint8_t*)psector, MMC_SECTOR_SIZE, NULL);
}
   

void sd_mmc_spi_write_multiple_sector_callback(void *psector)
{
    udi_msc_trans_block( false, (uint8_t*)psector, MMC_SECTOR_SIZE, NULL);
}


and changed the includes below #if ACCESS_USB.. to #include "udi_msc.h"

Seems to be sucessfull
 
 View user's profile Send private message  
Reply with quote Back to top
tandrews
PostPosted: Oct 20, 2011 - 10:34 AM
Rookie


Joined: Mar 11, 2006
Posts: 41


I can confirm that the changes work for me too. I'm attaching a patch file for anyone who prefers to see diffs. (I also removed an unused variable to get rid of a warning.)

Thanks to everyone for saving me the hard work!
Thomas
 
 View user's profile Send private message  
Reply with quote Back to top
Leodox
PostPosted: Nov 04, 2011 - 12:43 AM
Newbie


Joined: Nov 04, 2011
Posts: 1


Has anyone verified this for the EVK1105?

I attempted this with the EVK1105 USB MSC example project. The example works great with just flash enabled. But when I add the SD over SPI Component, make the changes listed here, and enable access to the SD card, it stops working properly. It compiled and ran just fine, but it takes a long time for Windows to detect the device driver. When the removable disk finally shows up and I try to open it, I get the message, "Please insert a disk into removable disk (H: )." Even the flash component, which was working prior to the change, generates this message.

Jon
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits