How can I locate const variables at specific address?
For example: I would like to place: const int Tab[1,2,3]; const long lo=123435; starting at address 0x1200, and be sure that there is free space up to 0x13ff (whole memory segment); If your source file is called “myfile.c”, then you can place all const data starting at location 0x1200 using the linker command line option “ldseg=myfile_data_const=0x1200”. There is no way to reserve the balance of the space between the end of the const data and 0x13ff, however, except perhaps by declaring a const array of a suitable size follow your declarations or by just writing the whole thing in assembler. To locate a program segment at a particular address: For example the code corresponding to: void loader(void) { ….. } should be located from 0xFC00 to 0xFFDF If the source code is “myfile.c”, then you can put all code from that file starting at location 0xfc00 by using the command line option “ldseg=myfile_code=0xfc00”.