__FILE__ string uses alot of ram? Can I move that data into the internal eeprom?

The problem is I often run into places where several concepts that are new to me come into conflict at the same time, and I get lost in the syntax.

So using the example I posted here, where I get stuck is:

//at beginning of script
const char codebuild[] PROGMEM =__FILE__; //the compile filename & path

//just before printing the headers
byte b = strlen_P(codebuild);  // https://forum.arduino.cc/index.php?topic=359468.0  
while ((b > 0)&&(pgm_read_byte_near(codebuild[b])!= '\\'))b--;
char *filenameonly = &codebuild[++b];  // this line fails @ compile

file.print(F("CodeBuild:,"));file.println(filenameonly);

char filenameonly = &codebuild[++b]; generates an error:
invalid conversion from 'const char
' to 'char*' [-fpermissive]

but I thought that char *filenameonly was just a pointer rather than a variable, so what is being converted? I'm sure I will figure out where my mistake is eventually, but for now this is still hard for me to follow.


And I'd still like to store calibration constants in the internal eeprom, because the whole point would be putting those very large numbers (eg: thermistor coefficients) somewhere that is persistent through the lifetime of a datalogger, independent of which code is running at any given time. If I could copy just the file name from PROGMEM stored FILE to that same eeprom space, then the routine to flush the eeprom to the SD card would be a simple read & save loop of 512 characters, and the filename could tag along for the ride.