What's the easiest way to implement FAT library out there that will fit in the small 128-KB flash of TMS320F28035? All I need is read and write in FAT16.
There are several FAT stacks out there that will fit in the flash of the 2803x devices. FATFS is the one we use and it has a smaller derivative called Petite FATFS.
It appears the webpage has been taken down, but it is still available in the Google Cached copy:
I also zipped up a copy of the version we use with the 2806x devices. This should port over without any major modifications to the 2803x devices.
Hope this helps!
C2000 Software Applications
I notice a few things that I am concerned about in the linker output.
Let me know if this helps or if you have further questions.
I have installed control Suite and that has cleared up the first problem of the cmd linker file. However, for some reason mmc-c28x.c is not wanting to link to the right library. I'm using CCS3.3, the program that came with the micro controller. Is there a way to make CSS3 link to the library in
I'm not sure I fully understand your problem. If you compile mmc-c28x.c with your project it will automatically be linked in to your project. Could you further elaborate on the problem you are having?
I should have also mentioned earlier that I made the assumption that you wanted to talk to an SD card with your filesystem. The mmc-c28x.c file is a driver for the SPI peripheral that allows the FAT filesystem to talk to the SD card. If you intend to access a filesystem that isn't on an SD card you will need to provide your own driver file.
Actually, what we need is capability to read from and write to SD card formatted in FAT32 filesystem. If we do need our own driver file, is there any pointer on how to implement this?
This software will do that. The SD card will connect to the micro through SPI and then you will use ff.c or tff.c (smaller memory footprint) along with mmc-c28x.c. mmc-c28x.c provides drivers for ff.c to access the SPI peripheral.
I've attached an example application. This was originally written for a Cortex M3 device and will not run as is on a C28x device. It should provide a good example of how to use FatFS, and with a few modifications it should run on your device.
I got the following error (after adjusting the GPIOs)
undefined first referenced
symbol in file
Wondering where that spi_xmit() function is. The return type of spi_xmit is BYTE, which makes me curious.
Its just a simple SPI transmit/receive function. Data to be transmitted is passed into spi_xmit and any data that is received is returned by the function. I found the file where that came from and I've attached it at the end of this message. Keep in mind this code is untested and unpolished.
I am getting this error. What should I do ?
Error connecting to the target:
Error during: OCS, Target,
Device driver: Problem with the Emulation Controller.
It is recommended to RESET EMULATOR. This will disconnect each
target from the emulator. The targets should then be power cycled
or hard reset followed by an emureset and reconnect to each target.
I/O Port = 0
Board Name: F28035 XDS100USB
Cpu Name: TMS320C2800_0
Abort: Close Code Composer Studio.
Retry: Try to connect to the target again.
Cancel: Remain disconnected from the target
Diagnostic: Run diagnostic utility.
Have you connected to the board you are using previously? If so what has changed between now and then? Have you messed with any of the switches on the controlCARD? Is the controlCARD powered correctly? Is this even a controlCARD or is this a custom board? Without more information I can't make a hypothesis as to what is wrong.
Looks like one of my teammate was posting using my account. Please ignore that post above.
Anyway, I do have a question.
I could successfully do f_open using the FatFS. However, after that, any f_open results in FR_WRITE_PROTECTED error. I make sure that the lock is not in place. Any idea what went wrong as I get this error? Why would the card become write protected all of a sudden?
I'm not an expert on FATFs so I can't give you an exact answer, but if you look around in the source code a little bit I bet you can find your answer.
Given that FR_WRITE_PROTECTED isn't anywhere in the f_open function I would bet that the issue is in the auto_mount function. I bet you could step though this code and figure out where the problem is...
I'm just curious, I was using the mmc-c28x.c that you gave, but I used the ff.c from ELM-ChaN's website. I'm wondering if this would lead to problem? The ff.c in your zip file doesn't have f_printf() function that I need in my project, that's why I'm replacing it with the original files.
Also, have you been able to at least read and write to the SD card with this file that you provided?
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.