@ D. Helfenstein - It sounds like you are using VS2012, so did you create a new project?
If so, you need to add this post-build event: to the Music Shield project:
cd $(ProjectDir)Native
make rebuild
@ D. Helfenstein - It sounds like you are using VS2012, so did you create a new project?
If so, you need to add this post-build event: to the Music Shield project:
cd $(ProjectDir)Native
make rebuild
Hi jasdev
I did that and âmake rebuildâ failed, so I tried to build it with the developer command prompt to see where exactly it fails (because âexited with code 2â isnât a really helpful error message)
@ D. Helfenstein - Sorry, I was half asleep when I responded to your question. After re-reading your post, I see that you do have the post-build event, and it is failing.
I also noticed that you are referring to this project âJDI.NETMF.Modules.Musicâ. This project is not part of the Panda II Music Player. Are you compiling the Cobra 1 version of the music player?
These are the versions of Yargato that I am using:
yagarto-bu-2.23.1_gcc-4.7.2-c-c++_nl-1.20.0_gdb-7.5.1_eabi_20121222.exe
yagarto-tools-20121018-setup.exe
I didnât have Yargato installed. Now I can compile it.
I also replaced the VSDriver.h file.
What I donât get so far is which Socket it uses or how I could set that. I assume the socket is given by the content of the VSDriver.h file but I donât know the socket this file sets.
//Edit: I believe itâs socket 9. Can you confirm that?
@ D. Helfenstein - It looks like you are close to achieve great results! While you remember, can you make a list of stuff to do, to be able to use the RLP based driver from jasdev on the Spider. It looks like it is not a simple walk in the parkâŚ
Excited!
@ D. Helfenstein - Sorry for the delay in responding. Iâve been at my real job all day, and just got home. I donât have a Spider controller board, but the pin-out I defined in the VSDriver.h file should match the pins available in socket x9 on the Spider (see the schematic), so you should be able to plug the Music Module into that socket. If there is a problem with this, please let me know.
Hi jasdev
Thank you so much for your help so far!
Unfortunately my program wonât start when I deploy a software to the spider containing the JDI.NETMF.Shields.Music lib. On the T35 it says: âwaiting for debug commandsâ.
It doesnât make any difference if I use the MusicShield class or if I just deploy my SW with the libâŚ
@ D. Helfenstein - I think you are mixing the Panda 2 music player and the Cobra music player. You must use the Cobra 1 music player project with the Spider. The Panda 2 player will not work. In your post you refer to the JDI.NETMF.Shields.Music lib. That is for the Panda 2 only. You should be using JDI.NETMF.Modules.Music instead.
Ah ok, these two versions confused me a little.
After a little change on the VSDriver.h- file (VSDriver.c was expecting SSP1_ but the file contained SSP0_ definitions) I was able to deploy the program to my spider and gadgeteer was able to run it.
However, the MusicModule initialization failed. I debugged it so now I can tell you that vsInit.Invoke() (on line 559 in the initDriver method) returns 1.
This is quite strange because this is an unexpected Error/Event Code (I saw your definitions).
Now I donât know what to do nextâŚ
@ D. Helfenstein - the VSDriver.h file (listed below) is a version written for the Spider and Music Module using Gadgeteer connector X9 on the Spider board. This connector uses SP1, which is SSP0. You should not need to make any changes to this version of VSDriver.h:
///////////////////////////////////////////////////////////////////////////////
//
// VS1053b RLP Driver Header for Spider Micro Controller
//
///////////////////////////////////////////////////////////////////////////////
//-----------------------------------------------------------------------------
// Spider (EMX) connected to VS1053b on Gadgeteer connector X9
//-----------------------------------------------------------------------------
//
// DREQ Gadgeeter.X9.Pin.03 EMX.IO46 P0.13
// RESET Gadgeeter.X9.Pin.04 EMX.IO6 P0.25
//
// XDCS Gadgeeter.X9.Pin.05 EMX.IO7 P0.26
// XCS Gadgeeter.X9.Pin.06 EMX.IO15 P3.25
//
// SCK Gadgeeter.X9.Pin.09 EMX.IO27 P0.15
// MISO Gadgeeter.X9.Pin.08 EMX.IO25 P0.17
// MOSI Gadgeeter.X9.Pin.07 EMX.IO24 P0.18
//
// RED none
// GREEN none
//
//-----------------------------------------------------------------------------
// VS1053b interface config for SSP0 (SPI1)
//-----------------------------------------------------------------------------
//
#define DREQ_GPIO_CLR PINSEL0 &= ~((0x03 << 26)) // set as GPIO
#define RESET_GPIO_CLR PINSEL1 &= ~((0x03 << 18)) // set as GPIO
#define DREQ_GPIO_SET FIO0DIR &= ~(1 << 13) // set as input
#define RESET_GPIO_SET FIO0DIR |= (1 << 25) // set as output
#define XDCS_GPIO_CLR PINSEL1 &= ~((0x03 << 20)) // set as GPIO
#define XCS_GPIO_CLR PINSEL7 &= ~((0x03 << 18)) // set as GPIO
#define XDCS_GPIO_SET FIO0DIR |= (1 << 26) // set as output
#define XCS_GPIO_SET FIO3DIR |= (1 << 25) // set as output
#define SCK_GPIO_CLR PINSEL0 &= ~((0x03 << 30)) // set as GPIO
#define MISO_GPIO_CLR PINSEL1 &= ~((0x03 << 2)) // set as GPIO
#define MOSI_GPIO_CLR PINSEL1 &= ~((0x03 << 4)) // set as GPIO
#define SCK_GPIO_SET PINSEL0 |= ((0x02 << 30)) // set as SCK
#define MISO_GPIO_SET PINSEL1 |= ((0x02 << 2)) // set as MISO
#define MOSI_GPIO_SET PINSEL1 |= ((0x02 << 4)) // set as MOSI
#define SCI_CLOCKF_CFG 0x8800 // 3.5x multiplier, 1.0 add, 12.288 MHz clk
#define SCI_MODE_CFG 0x0802 // allow MPEG I & II, VS1002 native mode
//-----------------------------------------------------------------------------
// VS1053b Control
//-----------------------------------------------------------------------------
//
#define DREQ (FIO0PIN & (1UL << 13)) // is DREQ high?
#define RESET_SET (FIO0SET = (1UL << 25))
#define RESET_CLR (FIO0CLR = (1UL << 25))
#define XDCS_SET (FIO0SET = (1UL << 26))
#define XDCS_CLR (FIO0CLR = (1UL << 26))
#define XCS_SET (FIO3SET = (1UL << 25))
#define XCS_CLR (FIO3CLR = (1UL << 25))
//-----------------------------------------------------------------------------
// SSP0 (SPI1) config and control
//-----------------------------------------------------------------------------
//
#define SSP0_PWR_ON PCONP |= (1 << 21) // power on
#define SSP0_INT 10 // TFE interrupt
#define SSP0_INT_OFF 0x00 // disable interrupts
#define SSP0_INT_ON 0x08 // enable TFE interrupt
#define SSP0_CR0 0x07 // set DSS data to 8-bit, Frame format SPI, CPOL = 0, CPHA = 0
#define SSP0_CR1 0x02 // enable in master mode, normal operation
#define SSP0_CLKP_RD 0x12 // clk prescalar for reads = 18 yields 4.0 MHz
#define SSP0_CLKP_WR 0x0A // clk prescalar for writes = 10 yields 7.2 MHz
#define SSP0_CLKP_RST 0x48 // clk prescalar for reset = 72 yields 1.0 MHz
#define SSP0_TFE (1 << 0) // transmit fifo empty
#define SSP0_TNF (1 << 1) // transmit fifo not full
#define SSP0_RNE (1 << 2) // receive fifo empty
#define SSP0_RFF (1 << 3) // receive fifo full
#define SSP0_BSY (1 << 4) // SSP0 busy
//-----------------------------------------------------------------------------
// LED Config
//-----------------------------------------------------------------------------
//
#define RED_GPIO_SET // none
#define GREEN_GPIO_SET // none
//-----------------------------------------------------------------------------
// LED Control
//-----------------------------------------------------------------------------
//
#define RED_ON
#define RED_OFF
#define GREEN_ON
#define GREEN_OFF
//-----------------------------------------------------------------------------
// RLP Constants
//-----------------------------------------------------------------------------
//
#define TASK_INTERVAL 10000 // (uSec)
Are you sure? If I take a look at the VSDriver.c code there is a need for SSP1_xyz definitions all over the place. This is the reason I changed the definitions in the VSDriver.h file from SSP0_xyz to SSP1_xyzâŚ
With an unchanged version of the VSDriver.h file you posted itâs not possible (at least for me) to compile the project.
@ D. Helfenstein - Sorry, you are right. You also need to change âSSP1â to âSSP0â in the VSDriver.c file.
Thank you guys for struggling with this. Its getting exciting!
@ njbuch - Thanks. I wish I had a Spider board to test this on, then I could just publish the finished project. Hopefully you and @ D. Helfenstein will make it work soon!
/start{terminator voice}
Could someone at GHI please ship this man a Spider mainboard and a music module asap!
/end{terminator voice}
In the name of the community!
@ jasdev -
Hi, jasdev,
you should implement a botton for PayPal donations on your homepage jasdev.com. Iâm sure there will be some community members who are willing to give some dollars to support your projects.
Thanks for your work, looking forward for a version for the Spider mainbord.
Kind regards Roland
@ njbuch and @ RoSchmi - Thank you, but right now I have three Panda 2âs and 3 Cobra 1âs that I need to do something with. Eventually, I want to buy the new FEZ Raptor, but that can waitâŚ
@ D. Helfenstein - Have you made any progress on porting the driver to the Spider?
Now this time I have to apologyse for the delay. Sorry guys, but there came some other things with a higher priority upâŚ
Anyway, I couldnât make it work so far. Now if I leave the VSDriver.h as you posted here and change the VSDriver.c to use the SSP0_xyz from the VSDriver.h I just get the âwaiting for debug commandsâ message after deployment.
Right now, I donât know what to doâŚ