{"action":"created","issue":{"url":"https://api.github.com/repos/ErichStyger/McuOnEclipse_PEx/issues/6","labels_url":"https://api.github.com/repos/ErichStyger/McuOnEclipse_PEx/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/ErichStyger/McuOnEclipse_PEx/issues/6/comments","events_url":"https://api.github.com/repos/ErichStyger/McuOnEclipse_PEx/issues/6/events","html_url":"https://github.com/ErichStyger/McuOnEclipse_PEx/issues/6","id":59113460,"number":6,"title":"SD_Card - SD1.c compile error","user":{"login":"neilh10","id":2766619,"avatar_url":"https://avatars.githubusercontent.com/u/2766619?v=3","gravatar_id":"","url":"https://api.github.com/users/neilh10","html_url":"https://github.com/neilh10","followers_url":"https://api.github.com/users/neilh10/followers","following_url":"https://api.github.com/users/neilh10/following{/other_user}","gists_url":"https://api.github.com/users/neilh10/gists{/gist_id}","starred_url":"https://api.github.com/users/neilh10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neilh10/subscriptions","organizations_url":"https://api.github.com/users/neilh10/orgs","repos_url":"https://api.github.com/users/neilh10/repos","events_url":"https://api.github.com/users/neilh10/events{/privacy}","received_events_url":"https://api.github.com/users/neilh10/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-26T18:11:17Z","updated_at":"2015-02-27T13:04:39Z","closed_at":null,"body":"I'm following WBNR_FTF11_ENT_F0345.pdf \r\n& tutorial \r\nhttp://mcuoneclipse.com/2012/07/30/fatfs-with-kinetis/ and \r\nStarting with a new PE project and PE SD_Card and selecting SM1:SPIMaster_LD\r\n it has a compile error with \r\n../Generated_Code/SD1.c: In function 'SD1_SPI_WRITE':\r\n../Generated_Code/SD1.c:413:26: error: 'SM1_DeviceData' undeclared (first use in this function)\r\n   (void)SM1_ReceiveBlock(SM1_DeviceData, &dummy, sizeof(dummy));\r\n\r\nI'm still a newbie working my way round the PE - but its fantastic. \r\nWhat seems to be happening is SM1:SPI_master_LDD  in SM1.c specifies \r\n/* {FreeRTOS RTOS Adapter} Static object used for simulation of dynamic driver memory allocation */\r\nstatic SM1_TDeviceData DeviceDataPrv__DEFAULT_RTOS_ALLOC;\r\nhowever there isn't a method in SM1.c for getting \r\n\r\nThe fix is possibly SD1.c\r\nLDD_TDeviceData * SM1_GetPtr(void);  (should go in SM1.h)\r\n#define SM1_DeviceData SM1_GetPtr() \r\n\r\nSM1.c:\r\nLDD_TDeviceData * SM1_GetPtr(){\r\n\treturn (LDD_TDeviceData *)&DeviceDataPrv__DEFAULT_RTOS_ALLOC;\r\n}\r\n\r\nHowever I haven't tested it, and seems there are still some holes as it needs to be allocated to a real piece of memory.\r\n"},"comment":{"url":"https://api.github.com/repos/ErichStyger/McuOnEclipse_PEx/issues/comments/76391258","html_url":"https://github.com/ErichStyger/McuOnEclipse_PEx/issues/6#issuecomment-76391258","issue_url":"https://api.github.com/repos/ErichStyger/McuOnEclipse_PEx/issues/6","id":76391258,"user":{"login":"ErichStyger","id":3187954,"avatar_url":"https://avatars.githubusercontent.com/u/3187954?v=3","gravatar_id":"","url":"https://api.github.com/users/ErichStyger","html_url":"https://github.com/ErichStyger","followers_url":"https://api.github.com/users/ErichStyger/followers","following_url":"https://api.github.com/users/ErichStyger/following{/other_user}","gists_url":"https://api.github.com/users/ErichStyger/gists{/gist_id}","starred_url":"https://api.github.com/users/ErichStyger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErichStyger/subscriptions","organizations_url":"https://api.github.com/users/ErichStyger/orgs","repos_url":"https://api.github.com/users/ErichStyger/repos","events_url":"https://api.github.com/users/ErichStyger/events{/privacy}","received_events_url":"https://api.github.com/users/ErichStyger/received_events","type":"User","site_admin":false},"created_at":"2015-02-27T13:04:38Z","updated_at":"2015-02-27T13:04:38Z","body":"In the SM1 component settings, under Properties > Initialization > Auto Inititalization, have you configured that property to 'yes'? Because if set to yes, it will create that SM1_DeviceData variable."}}