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.

TMS320F28379D: FATFs initialization error

Part Number: TMS320F28379D


i am working on F28379D and current working on read and write operation for SD card while working i encounter an issue with the program where i facing error while using f_mount  first i used fresult = f_mount(0, &fs); while using this i encountered the following error 

Descrip

/*
 * main.c
 *
 *  Created on: 19-Mar-2024
 *      Author: Admin
 */
//
// Included Files
//
#include "F28x_Project.h"
#include "ff.h"
#include "diskio.h"
#include "ff.c"
#include "diskio.c"
//
// Defines
//

FATFS fs;
FIL fl;

#define BLINKY_LED_GPIO 31
void main(void)
{
//
// Step 1. Initialize System Control:
// PLL, WatchDog, enable Peripheral Clocks
// This example function is found in the F2837xD_SysCtrl.c file.
//
InitSysCtrl();
//
// Step 2. Initialize GPIO:
// This example function is found in the F2837xD_Gpio.c file and
// illustrates how to set the GPIO to it’s default state.
//
InitGpio();
GPIO_SetupPinMux(BLINKY_LED_GPIO, GPIO_MUX_CPU1, 0);
GPIO_SetupPinOptions(BLINKY_LED_GPIO, GPIO_OUTPUT, GPIO_PUSHPULL);
//
// Step 3. Loop to blink LED
FRESULT fresult;
fresult = f_mount(&fs,"",0);

//
for(;;)
{
//
// Turn on LED
//
GPIO_WritePin(BLINKY_LED_GPIO, 0);
//
// Delay for a bit.
//
DELAY_US(1000*500);
//
// Turn off LED
//
GPIO_WritePin(BLINKY_LED_GPIO, 1);
//
// Delay for a bit.
//
DELAY_US(1000*500);
}
}




tion Resource Path Location Type
#167 too few arguments in function call main.c /sdcard line 40 C/C++ Problem

Description Resource Path Location Type
gmake: *** [main.obj] Error 1 sdcard C/C++ Problem

Description Resource Path Location Type
gmake: Target 'all' not remade because of errors. sdcard C/C++ Problem

so after i read the f_mount declaration which is FRESULT f_mount (FATFS* fs, const TCHAR* path, BYTE opt); /* Mount/Unmount a logical drive */  and after i programed the device as the following fresult = f_mount(&fs,"",0);

then i encounted this following error

Description Resource Path Location Type
#10010 errors encountered during linking; "sdcard.out" not built sdcard C/C++ Problem

Description Resource Path Location Type
<a href="file:/C:/ti/ccs1250/ccs/tools/compiler/dmed/HTML/10234.html">#10234-D</a> unresolved symbols remain sdcard C/C++ Problem

Description Resource Path Location Type
gmake: *** [all] Error 2 sdcard C/C++ Problem

so help me solve this error

  • Hello Siva,

    Based on your Problems window, it looks like you have 2 types of errors. The first one is that the program will not fit into available memory; for this you will need to double-click the row to see which section of your linker command file needs more memory allocated to it and make the proper adjustment.

    The second error is for unresolved symbols. You can go to the file where the symbol is located and verify that the proper header file or declaration is made within the scope of the file itself. If you do CTRL + Click on the variable/function, it should lead you to the proper declaration if configured correctly (if it points to an extern declaration, you will need to make sure to declare the variable somewhere as the extern simply states that the function is to be declared elsewhere).

    Let me know if you still have errors beyond this.