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.
Hello,
I have to read text file from SD card. I have written simple file handling code of file handling to read text file. This code works fine in Turbo C++ compiler. For executing this code in CCSv4, I have include functions like initialization of USBSTK5515 and SD card. This gives me error as below:
In Problem Window:
"C:/Program Files (x86)/Texas Instruments/ccsv4/emulation/boards/usbstk5515_v1/lib/usbstk5515bsl.lib<usbst k5515.obj>" has a Tag_Memory_Model attribute value of "2" that is different than one previously seen ("3"); combining incompatible files text line 0 1351948471265 456
In Console Window:
fatal error: file "C:/Program Files (x86)/TexasInstruments/ccsv4/emulation/boards/usbstk5515_v1/lib/usbstk5515bsl.lib<usbstk5515.obj>" has a Tag_Memory_Model attribute value of "2" that is different than one previously seen ("3"); combining incompatible files
>> Compilation failure
C:\Program Files (x86)\Texas Instruments\ccsv4\utils\gmake\gmake: *** [text.out] Error 1
C:\Program Files (x86)\Texas Instruments\ccsv4\utils\gmake\gmake: Target `all' not remade because of errors.
Build complete for project text
Please help me correct this issue.
Thank you!
Regards,
Ritesh
For C55x, Tag_Memory_Model==2 means "large memory model" and Tag_Memory_Model==3 means "huge memory model."
That error message says that usbstk5515bsl.lib uses large memory model. In order to use that library, you must compile all files in the project with large memory model.
Hello,
we got success in booting image file.
In console Window:
C5515 eZDSP...Input <filepath>
C:\Users\Documents\workspace\sd_new\Debug\boot_image_file_name.bin
NOR Flash...
Erasing chip (NOR)...
Opening C:\Users\Documents\workspace\sd_new\Debug\boot_image_file_name.bin...
Input file opened
Programming Complete
I have written the code to read text file from SD.
Code:
#include <stdio.h>
#include <stdlib.h>
int main () {
FILE * pFile;
long lSize;
char * buffer;
size_t result;
pFile = fopen ( "nm2.txt","r" );
if (pFile==NULL) {fputs ("File error",stderr); exit (1);}
// obtain file size:
fseek (pFile , 0 , SEEK_END);
lSize = ftell (pFile);
rewind (pFile);
// allocate memory to contain the whole file:
buffer = (char*) malloc (sizeof(char)*lSize);
if (buffer == NULL) {fputs ("Memory error",stderr); exit (2);}
// copy the file into the buffer:
result = fread (buffer,1,lSize,pFile);
if (result != lSize) {fputs ("Reading error",stderr); exit (3);}
/* the whole file is now loaded in the memory buffer. */
// terminate
fclose (pFile);
free (buffer);
return 0;
}
I have load sd_new.out file in C5515. It gives me message:
C55xx: GEL Output: Reset Peripherals is complete.
C55xx: GEL Output: Configuring PLL (100 MHz).
C55xx: GEL Output: PLL Init Done.
C55xx: GEL Output: Target Connection Complete.
C55xx: Loader: One or more sections of your program falls into a memory region that is not writable. These regions will
not actually be written to the target. Check your linker configuration and/or memory map.
C55xx: Loader: One or more sections of your program falls into a memory region that is not writable. These regions will
not actually be written to the target. Check your linker configuration and/or memory map.
This is unable to read text file and gives "File error" and come back by exit(1) Suggest me how to proceed.
Regards,
Ritesh
The loader cannot write to ROM. If you have linked any part of your program into ROM, you must arrange for that memory to be initialized some other way, such as an EEPROM writer.
For experimentation purposes, you can adjust your linker command file to place all of the program's sections in RAM. What linker command file are you using?
Hello Sir,
We are using lnkx.cmd linker command file. We have tried the same procedure to create boot image of led_test.out which is exiting in CCSv4 using programmer_C5515_eZdsp.out
As I said, it gives
C5515 eZDSP...Input <filepath>
C:\Users\Documents\workspace\led\Debug\boot_image_file_name.bin
NOR Flash...
Erasing chip (NOR)...
Opening C:\Users\Documents\workspace\led\Debug\boot_image_file_name.bin...
Input file opened
Programming Complete
After running program, it does not blink LED. I think, this is the problem regarding to linking cmd file and memory map. Which linker file should i use? How can i load my program in writable section of program memory (How to assign memory map)? Suggest if any other problem.
Thank You!
Regards,
Ritesh
I don't know. This is a bit beyond me. You need someone with experience with the C5515 eZDSP.
I can tell you that you want to use a linker command file which matches the memory layout of the C5515, and I don't know whether lnkx.cmd does.
Ritesh Khodaskar said:After running program, it does not blink LED. I think, this is the problem regarding to linking cmd file and memory map. Which linker file should i use? How can i load my program in writable section of program memory (How to assign memory map)? Suggest if any other problem.
This forum is probably not the best place to get help on how the examples provided with your 5515 USB stick work or creating boot images. I would suggest posting a new question regarding this specific question to the C5000 device forum.