This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi everyone!
I try to debug mmcsd example for c6748-evm from the biospsp_03_00_01_00 package under evmomapl137. I think this should work, because used hardware parts are identical.
Initially, this example used prebuild EDMA3 drivers and resource manager from the edma3_lld_02_11_04_01 package. When I run debug session, following message are observed:
[C674X_0]
[C674X_0] MMCSD_SAMPLE: mmcsdStorageInit fails.
[C674X_0] PSP HrtBt 0
[C674X_0] PSP HrtBt 1
Ok, I started to look for the cause...
An error appears in the mmcsdStorageInit() which returns value -139. For debug into this function I added to project the mmcsd-driver source files from PSP
After rebuild it, I running debug session again. So, after step-by-step debugging into mmcsdStorageInit(), I can see what edma3init(0, &edmaResult) returned incorrect hEdma pointer.
I unlinked the edma3_lld_drv_sample.ae674 pre-build library and added the source code from ti\sdo\edma3\drv\sample\src directory into my project.
To my surprise it turned out that now edma3init(0, &edmaResult) returned a correct pointer, and variable edmaResult= EDMA3_DRV_SOK. Also the project is successfully working!
[C674X_0]
[C674X_0] MMCSD_SAMPLE : Starting Sample Application Using BLOCK MEDIA
[C674X_0] MMCSD_SAMPLE:Card is inserted
[C674X_0] MMCSD_SAMPLE: Media is registered with FATfs
[C674X_0] MMCSD_SAMPLE: Create Fat format on MMCSD
[C674X_0] MMCSD_SAMPLE: create partition successful
[C674X_0] MMCSD_SAMPLE: FILE Data write-read matching passed
[C674X_0] MMCSD_SAMPLE: FILE Data write-read matching passed
[C674X_0] MMCSD_SAMPLE: FILE Data write-read matching passed
[C674X_0] MMCSD_SAMPLE: FILE Data write-read matching passed
[C674X_0] MMCSD_SAMPLE: FILE Data write-read matching passed
[C674X_0] MMCSD_SAMPLE: Media for remote client is unregsitered
[C674X_0]
[C674X_0] MMCSD_SAMPLE: mmcsdStorageDeInit success
[C674X_0] MMCSD_SAMPLE: Sample Application Ends Using BLOCK MEDIA
[C674X_0]
[C674X_0] PSP HrtBt 0
[C674X_0] PSP HrtBt 1
I do not understand what was happening, why the pre-built library is not working properly?
Thanks!
Additionally, I compared the global symbol's *.map files for both projects with linked pre-build library and with edma source code.
In the project with edma source code additionally contains the following entries:
EDMA3_DRV_close
EDMA3_DRV_create
EDMA3_DRV_delete
EDMA3_DRV_open
which is not available in another project (with pre-build edma library).
This is working project 3324.psp_mmcsd2.zip
Nikolay
Hi,
I guess, you are trying to use the C6748 mmcsd sample application on the OMAPL137. To do so, you are linking the OMAPL137 edma library with the existing C6748 mmcsd application. Am i right?
Regards,
Sandeep k
No, I built this example in two ways:
In first case, I used a pre-build edma3_lld_drv_sample.ae674 library. in this case result is wrong.
In next case, I copy the driver sample source code from "${EDMA3_LLD_INSTALL_DIR}\ti\sdo\edma3\drv\sample\src" directory into my project and rebuilt it.
In this case example is successfully worked.
I do not understand it!
Regards, Nikolay
Nikolay,
Since the PSP 3.00.01.00 has been tested with the EDMA 2.11.02.04. I had rebuilt the mmcsd sample application by relinking the EDMA libraries from EDMA 2.11.04.01. The binary has been tried on the dsp of OMAPL137, and it worked. I do not know why it is not happening at your setup.
Are you using the EVM or the custom board? If you are using the EVM, then please mention the revision?
Have you made any modification in the sample application?
Thanks and Regards,
Sandeep K
Hi Sandeep,
Thanks for your reply. Yes, I use EVMOMAP-L137 board, and did not change the source code of sample application.
I found the couse, but do not understand the reason.
In both cases described above, I used additionl linker.cmd file in the project for link pre-builded library:
/* "${EDMA3_LLD_INSTALL_DIR}/packages" */
-l"ti\sdo\edma3\rm\lib\c6748-evm\674\debug\edma3_lld_rm.ae674"
-l"ti\sdo\edma3\rm\sample\lib\c6748-evm\674\debug\edma3_lld_rm_sample.ae674"
-l"ti\sdo\edma3\drv\lib\674\debug\edma3_lld_drv.ae674"
-l"ti\sdo\edma3\drv\sample\lib\c6748-evm\674\debug\edma3_lld_drv_sample.ae674"
/* "${BIOSPSP_INSTALL_DIR}/drivers" */
-l"blkmedia\lib\c6748-evm\674\debug\bios_psp_blkmedia.ae674"
-l"gpio\lib\c6748-evm\674\debug\bios_psp_gpio.ae674"
-l"mmcsd\lib\c6748-evm\674\debug\bios_psp_mmcsd.ae674"
-l"psc\lib\c6748-evm\674\debug\bios_psp_psc.ae674"
/* "${BIOSPSP_INSTALL_DIR}" */
-l"platforms\evm6748\lib\c6748-evm\674\debug\bios_psp_platform_evm6748.ae674"
And after I had succesfully built the sample application with it, the application did not work.
Now, I exluded linker.cmd file from build and changed the project settings and linked this pre-build library
After that the application started sucessfully.
You can test it with this project.
Thanks!
Nikolay,
There are two ways to build a sample application.
1. Using the "gmake" command in the command prompt. In this case, you have to refer the section 1.5 of the doc C6748_BIOSPSP_Userguide.pdf. Anything missing here might cause the build related issue.
2. If you are using the CCS project to build the app. Then there is a demo video "biospsp_03_00_01_00\docs\C6748\C6748_BIOSPSP_CCSProjectCreation.wmv" which you can refer to create the project for any of the sample app. Here also, if you miss some of the libraries or link any other libraries, then it can cause the problem.
For me, at present, it looks like the configuration issue rather than the EDMA or the PSP issue. Do you agree?
Thanks and Regards,
Sandeep K
Sandeep,
I'm not sure that you understand me properly.
Thanks, I know those ways. But I do not understand why when I use the linker command file to link the pre-built library into the project then the sample application doesn't work (in spite it has been successfully built without any errors and warning messages).
Can you explain to me why this is happening?
Regards, Nikolay
I agree that it is rather a configuration bug. But what is the reason?
Thanks
Hi Nikolay,
I am having the same issue that you encountered.
MMCSD_SAMPLE: mmcsdStorageInit fails.
mmcsdStorageInit() returns value -139
U mentioned that removing the drv.ae67 and add the drv src files will help.
Can i have more details on how to do it?
I am very new in this.
*Edit* I use your sample code as a guide and copy the 2 folders (bios_psp & edma3) into the working directory.
I got 2 unresolved symbol. PSP_blkmediaFATFSRegister & PSP_blkmediaFATFSUnRegister not found. But they are in the bios_psp/drivers/blkmedia folder and i included the folder.
Any idea why?
*Edit 2 * Solved. Forget to define PSP_FILE_SYSTEM
Thanks.
Amy