> Jeff's linkscript is simply more flexible than SNSys' and Nintendo's
> standard linkscript (which all place the .data section in ROM and don't
copy
> it to RAM)...
Which leads me to say something that I feel doesn't get said on here enough:
Hi, I have one more question about the linkscript.. or GCC, ld? I don't understand why this is happening. Maybe you can put some light on this. Is there...
I think it will help if you give up an array size. Currently the linker/compiler assumes that it is not 'const' because it doesn't know 'size to reserve in...
Jan-Lieuwe Koopmans
jan-lieuwe@...
May 29, 2002 4:56 pm
Hello Jan-Lieuwe, Wednesday, May 29, 2002, 6:36:14 PM, you wrote: JLK> I think it will help if you give up an array size. Currently the JLK> linker/compiler...
What do you mean it does not know the size. How come this works with empty arrays of type int? Besides compiler have access to struct definition. I just don't...
Looking at it again I found another problem: you say that you implemented those arrays in 'data.h'. There should only be a declaration (i.e.: extern const int...
Jan-Lieuwe Koopmans
jan-lieuwe@...
May 29, 2002 5:40 pm
Well all data is exported in data.h no cpp data files. So once again const int Array1[] = {}; const tObj Array2[] = {}; How come Array1 is in 0x8000000 and...
Maybe the keyword 'const' is the problem? Maybe when it's const it assumes it is a global variable, and globals are in RAM? Just guessing here :-) I use In the...
Hi, Jeff's linkscript works differently. SNSys' linkscript (which you are using) places the .data section in ROM (which is incorrect in my point of view......
Jan-Lieuwe Koopmans
jan-lieuwe@...
May 29, 2002 6:37 pm
Hi! Ah... that explains alot of why it works with my code :-) The data I use are in fact initialized globals, but I really don't want them to be in RAM at all,...
Hello Martijn, Wednesday, May 29, 2002, 9:15:50 PM, you wrote: MR> Hi! MR> Ah... that explains alot of why it works with my code :-) The data I use are MR> in...
Hi, Well, I think you would have a problem when implementing this function, for instance: void function (void) { static u32 calls = 0; calls++; printf("I've...
Jan-Lieuwe Koopmans
jan-lieuwe@...
May 29, 2002 7:50 pm
Forgot to mention: if I do: const int array[] = { 1,2,3 }; I don't have to specify a size either and it will go into ROM. int array[] = { 1,2,3 }; Will put {...
Jan-Lieuwe Koopmans
jan-lieuwe@...
May 29, 2002 7:50 pm
With the latest GCC compiler and using Nintendo's libs global variables work, kind of. The vars do go in to memory but they are always initialised to 0...
if I put the following code in a .c / .cpp file: typedef struct { int a,b; } test; const test t[100] = {}; const int t2[100] = {}; Both arrays end up in ROM...
Jan-Lieuwe Koopmans
jan-lieuwe@...
May 30, 2002 1:03 pm
Did you try const test t[] = {}; const int t2[] = {}; You are asking why to have empty arrays. Well the engine is generic. It will pickup whatever you export...