Hi Everyone,
I being trying to follow this demo FatFs_SDHC_KSDK_demo, but I when I reached the end and
tried to compile the demo, I am getting an error.
Error: Pointing to #include "fsl_sdhc_driver.h"
After placing my cursor on it: Multiple markers at this time
- Unresolved inclusions: "fls_sdhc_driver.h"
- fatal error: fsl_sdhc_driver.h : No such file
It is located in file: fatfs->fsl_sd_disk->src->fsl_sd_disk.c
I was wondering is someone had tried this demo and experienced the same thing and
figured out what was wrong? It appears to be looking for this .h file, but it is not in the
project file (just a guess) and where could it be and how do I fix it?
Thank you,
Neil
Ok,
After much searching, I find that fsl_sdhc_driver.h is located under:
KSDK_1.2.0->platform->drivers->inc
I believe that this was omitted/forgotten in the step 2.8 KSDK installation are required for this application section.
I am going to place it on my source folder and see if it takes care of the issue.
Ok,
This is getting more and more crazy!!!
After satisfying the fsl_sdhc_driver.h , which by the way I placed in:
SDK->Composite->inc
After compiling then I got an error/x inside fls_sdhc_driver.h, complaining
about fsl_sdhc_hal.h, once again I searched for this .h file and found it. I
placed it under the same path as the fsl_sdhc_hal.h and it satisfied the error.
I then got another error fsl_i2c_master_driver.h, which I found and placed in:
Source folder
then it complained about fsl_i2c_hal.h which is part of fsl_i2c_master_driver.h,
so I satisfied it by pulling in the same Source folder fsl_i2c_hal.h.
Now its complaining about fsl_i2c_shared_function.h, I can't find this .h file, but
I am afraid what comes after that?
Is someone familiar with this?
Neil
Hello Neil:
I guess you are following the document from this link.
There is no need to copy all of those header files to your project. Just configure the compiler search paths as indicated in Step 2.9.
With these the compiler should find all of the required header files from KSDK installation and not throw any errors.
Let me know how it goes.
:smileyinfo: By the way, the project attached to the document is ready to be used with FRDM-K64F, so you may avoid to follow the guide. I wrote the instructions for the case of using a different target.
Regards!,
Jorge Gonzalez
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Jorge,
I will double check again and see if something is missing, but I'm pretty sure I just copy and paste. Can you tell me which path is the one that targets the .h files mention above?
Second question, if I want to just use the SDHC and the Fatsf driver whats Steps do I need to take and what can I omit from the steps?
Third question, where are the calls to the SDHC driver taken place? Does the driver handle initializing and configuration already?
Fourth question, how do you use the zip project? I tried importing, but that didn't work?
Thank you.
I was able to find the previous errors (not finding the .h files).
Apparently, the following paths are like so:
"${KSDK_PATH}/platform/drivers/inc"
"${KSDK_PATH}/platform/osa/inc"
"${KSDK_PATH}/platform/hal/inc"
"${KSDK_PATH}/platform/system/inc"
In my project, I had to do the following:
"${PROJECT_KSDK_PATH}/platform/drivers/inc"
"${PROJECT_KSDK_PATH}/platform/osa/inc"
"${PROJECT_KSDK_PATH}/platform/hal/inc"
"${PROJECT_KSDK_PATH}/platform/system/inc"
That fixed the issues of the .h files, then I went back and removed the .h files I added to
satisfy the previous errors.
Now, I after compiling I get the following:
and on my Console, it reports this:
make: *** No rule to make target `/lib/ksdk_platform_lib/kds/K64F12/debug/libksdk_platform.a', needed by `FRDM-K64F-FatFs-KSDK.elf'. Stop.
I think it has to do with this portion of the demo step:
2.11 Go to Project -> Properties -> C/C++ Build -> Settings -> Cross ARM C++ Linker -> Miscellaneous and add the KSDK platform library binary to “Other objects”:
"${KSDK_PATH}/lib/ksdk_platform_lib/kds/K64F12/debug/libksdk_platform.a"
so, I changed it to this, since the previous seems to have done the trick:
"${PROJECT_KSDK_PATH}/lib/ksdk_platform_lib/kds/K64F12/debug/libksdk_platform.a"
Unfortunately, this did not take care of it....??? Not sure what to do now!!!
Update:
Apparently:"${PROJECT_KSDK_PATH}/lib/ksdk_platform_lib/kds/K64F12/debug/libksdk_platform.a" was an issue,
the main issue though I was having was that I skipped this step:
4- Build the KSDK platform library for K64F. Refer to Appendix B - Build the KSDK platform library at the end of this guide.
After doing this, the x disappeared from the project file, so its time to debug. I followed the debug instructions as instructed in the video:
Debugging with KDS: https://community.freescale.com/videos/3283
I used the semihosting, changed the "other linker flags" to -specs=rdimon.specs, went through the debug configuration, but I am still having an
issue.
I am not sure if my issue is relating to this, but....... when I load the OpenSDA bean and I am using the P&E OpenSDA, I am loading the eval
board with DEBUG-FRDM-K64F_Pemicro_v108a_for_OpenSDA_v2.0.bin.
I will continue to try.......
I forgot to include the results from the debug:
Initializing.
Initialized.
;version 1.03, 06/02/2014, Copyright 2014 P&E Microcomputer Systems, Inc. All rights reserved. www.pemicro.com [mk64_512k_x_pflash_dflash_eeprom]
;device freescale, k64fx512m12, pflash_dflash_eeprom
;begin_cs device=$00000000, length=$14004000, ram=$20000000
Loading programming algorithm ...
Error enabling module just selected.
Error loading programming algorithm - load aborted.
Error occured during Flash programming.
PE-ERROR: Error downloading to the device.
If anyone knows what is this about, please let me know...
Update,
After much headaches, transferring of PE OpenSDA, going back and forth, resetting pin,
etc... etc....etc... I decided to import the .zip file and to connect the FRDM-K64F to my
P&E Multilink Universal and use the SWD connector instead of using the OpenSDA.
Now, I was able to run the demo and log in the values from the accelerometer, which
by the way are space delimited, not comma delimited (which would have been nice to
load into Excel).
I still don't know what went wrong with following the step by step instructions of the demo?
Now, the most important question of all?
If I would like to incorporate the SDHC + FatsF into an existing project that currently is not
using SDK, how do I go about that?