storing calculated values into PROGMEM

I am trying to generate a look up table of calculated values and store them in PROGMEM but all the examples show static data (e.g. you already know the data to be stored and you are putting it in the variable declaration).

Here is an example of what I would like to do (but does not work):

#include <avr/pgmspace.h>

#define TABLESIZE 1024

PROGMEM prog_uint16_t dataTable[TABLESIZE];


void setup() {
  for (int i=0; i<256; i++) {
    dataTable[m] = int(float(m*m/1023.0));

   Serial.begin(9600);
 } 

void loop() {
unsigned int displayInt;
int k;    // counter variable

// read back a 2-byte int
for (int k=0; k<TABLESIZE; k++) {
 displayInt = pgm_read_word_near(dataTable + k)
Serial.println(displayInt);
}

}

should I use one of the PROGMEM libraries?
Should I just write an app to generate these values and then copy them in to the program before compiling?

I am trying to generate a look up table of calculated values and store them in PROGMEM but all the examples show static data (e.g. you already know the data to be stored and you are putting it in the variable declaration).

The PROGMEM is unable to store non-const data as far as I know.

Should I just write an app to generate these values and then copy them in to the program before compiling

Yes. :)

I am curious: Why can't you simply use a function like the one I proposed here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1248272002/10#1 ? :)