Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
C code in WRAM SOLUTION!   Message List  
Reply | Forward Message #5966 of 15019 |
Re: [gbadev] C code in WRAM SOLUTION!

Hello James,

Wednesday, August 01, 2001, 1:42:02 PM, you wrote:

JB> Right, here's a working solution for putting ARM code in WRAM:
JB> Use a simple linker script which looks something like this:

[snip]

nice to see atleast some ppl bother to dig into this stuff ;=)

got two little questions though, never used these options myself (but
you can never know if they could be useful sometime eh? ;))

JB> MEMORY
JB> {
JB> iram (wx) : ORIGIN = 0x3000000, LENGTH = 32K
JB> eram (wx) : ORIGIN = 0x2000000, LENGTH = 256K
JB> rom (rx) : ORIGIN = 0x8000000, LENGTH = 8M
JB> }

whats that (wx) / (rx) attribute ? is that to mark entire memory
regions as read-only or writeable? (and uhm... WHY you do this that
way? wouldnt it be the same if you'd leave those out and take care
about that yourself -in the script- so sections end up where they
belong? will the linker issue warnings/errors if you try to put eg
data section in a memory region marked as read-only?)

JB> .text : AT(0x8000000)
JB> {
JB> *.o(.text)
JB> *(.data)
JB> *(.rodata)
JB> *(.glue_7t)
JB> *(.glue_7)
JB> }
JB> > rom

do i take that right that anything without paranthesis in a
section-definition refers to a file and everything in paranthesis
refers to a section? so

*.o => refers to all object files, regardless what they contain
(or should this be *.o(*) or sth !?)
*.o(.data) => refers to all sections marked as data in all object
files

oh and at last.... why do you put AT(0x08000000) for text-section?
text-section will be the first thing in the final binary anyway =)

--
Best regards,
groepaz mailto:groepaz@...






Wed Aug 1, 2001 12:15 pm

groepaz@...
Send Email Send Email

Forward
Message #5966 of 15019 |
Expand Messages Author Sort by Date

Right, here's a working solution for putting ARM code in WRAM: Use a simple linker script which looks something like this: OUTPUT_FORMAT("elf32-littlearm",...
James Boulton
jim@...
Send Email
Aug 1, 2001
11:45 am

Hello James, Wednesday, August 01, 2001, 1:42:02 PM, you wrote: JB> Right, here's a working solution for putting ARM code in WRAM: JB> Use a simple linker...
groepaz
groepaz@...
Send Email
Aug 1, 2001
4:48 pm

... Your solution seems likely to cause so many other problems :) .data should be writable, so you should not put its VMA in ROM How do you clear the bss...
Jason Wilkins
fenix@...
Send Email
Aug 1, 2001
4:51 pm

... Yep. W = read/write and X = execute. The only reason for doing this is so if the linker doesnt have somewhere to put an object, it can have a good guess...
James Boulton
jim@...
Send Email
Aug 1, 2001
9:42 pm

Hello James, Wednesday, August 01, 2001, 8:06:26 PM, you wrote: JB> The only reason for doing this is so if the linker doesnt have somewhere to JB> put an...
groepaz
groepaz@...
Send Email
Aug 2, 2001
6:26 am

holla tob(i|y) ! ... wondering how many "so-called" PC coders even _KNOW_ what a linker script is ... the same goes for most non-handheld consoles ... ... ......
Markus Glanzer
markus.glanzer@...
Send Email
Aug 2, 2001
5:36 pm

Hello Markus, ... MG> wondering how many "so-called" PC coders even _KNOW_ what a linker MG> script is ... oh well... i am not going into some anti-pc war, but...
groepaz
groepaz@...
Send Email
Aug 2, 2001
6:22 pm

... Where can I find Silph's modplayer? Greetings, Jan-Lieuwe...
Jan-Lieuwe Koopmans
jan-lieuwe@...
Send Email
Aug 2, 2001
8:50 pm

Hello Jan-Lieuwe, ... JLK> Where can I find Silph's modplayer? on www.hitmen-console.org there's a demo -- Best regards, groepaz...
groepaz
groepaz@...
Send Email
Aug 2, 2001
9:31 pm

... Then you basically repeated Jason Wilkin's argument in your original post that seemed to be disagreeing with him. Charlie ck@......
Charlie Kilian
ck@...
Send Email
Aug 2, 2001
8:59 pm

... oh?! he's moving back?! damn, neither he or Sergio told me ... anyway, last time i was playing around with the player & gcc 3.0 it sounded realy nice with...
Markus Glanzer
markus.glanzer@...
Send Email
Aug 3, 2001
1:23 pm

... I don't feel so bad now. I don't have much free time to work on GBA stuff and I have been on the scene only 2 months, so all of my time has been spent...
Jason Wilkins
fenix@...
Send Email
Aug 3, 2001
2:59 pm

... In our setup it wasnt. Allowing data to be writable caused far more problems. I'm not going through all the code marking stuff as const when there is no...
James Boulton
jim@...
Send Email
Aug 1, 2001
9:49 pm

... Did I really say anything to warrant this kind of response? I only critiqued your script, I felt that it would end up being more trouble than its worth, a...
Jason Wilkins
fenix@...
Send Email
Aug 2, 2001
6:25 am

Hello Jason, JW> I AM writing the "mother of all linker scripts," and I believe that all JW> this linker script nonsense is silly, its like asking people to...
groepaz
groepaz@...
Send Email
Aug 2, 2001
10:28 am

... I think that linker scripts are only simple if you are already bringing a lot of knowledge about how tool chains work to the table. On top of that, it...
Jason Wilkins
fenix@...
Send Email
Aug 2, 2001
3:06 pm

Hello Jason, Thursday, August 02, 2001, 4:21:59 PM, you wrote: ... JW> I think that linker scripts are only simple if you are already bringing a JW> lot of...
groepaz
groepaz@...
Send Email
Aug 2, 2001
6:14 pm

greopaz, we agree almost 100 percent except on your notion about being a true "coder" To use your phrase, thats nonsense. My whole point was: Good programmers...
Jason Wilkins
fenix@...
Send Email
Aug 2, 2001
8:57 pm

Hello Jason, JW> My whole point was: Good programmers should be smart enough to write JW> linker scripts, but they shouldn't have to. my impression is, even...
groepaz
groepaz@...
Send Email
Aug 2, 2001
9:45 pm

... As amusing of a pseudo-flame war as this has become =) I'd like to point out that half the problem with creating a linker script is that the documentation...
Dan Potter
bard@...
Send Email
Aug 2, 2001
11:08 pm

Hello Dan, Friday, August 03, 2001, 12:52:07 AM, you wrote: ... DP> As amusing of a pseudo-flame war as this has become =) I'd like to point DP> out that half...
groepaz
groepaz@...
Send Email
Aug 3, 2001
1:15 pm

... maybe ... Wow, it looked to me as if he was just being a goof. I'm amazed on how serious your taking that....
mike@...
Send Email
Aug 3, 2001
1:25 pm

... Serious? Not really. I do enjoy the way he writes as long as he is not out of line. But there could be more heat and less light if you know what I mean....
Jason Wilkins
fenix@...
Send Email
Aug 5, 2001
4:01 pm

... Half of what makes a good programmer is knowing when NOT to write something on their own. gcc -o wheel wheel.c...
Jason Wilkins
fenix@...
Send Email
Aug 2, 2001
8:59 pm

Hello Jason, ... JW> Half of what makes a good programmer is knowing when NOT to write JW> something on their own. JW> gcc -o wheel wheel.c thats not the...
groepaz
groepaz@...
Send Email
Aug 2, 2001
9:13 pm

... This statement is (of course) utter rubbish. ... Indeed, I've never used GCC before, but it all seems fairly straight forward once you know what's kicking...
Jay
Jay@...
Send Email
Aug 2, 2001
9:11 pm

Having said that it looks like the assembler is a bit bobbins :( I feel an assembler pre-processor comming on :) Regards Jay...
Jay
Jay@...
Send Email
Aug 5, 2001
3:55 pm

Hello Jay, Friday, August 03, 2001, 7:27:53 PM, you wrote: J> Having said that it looks like the assembler is a bit bobbins :( J> I feel an assembler...
groepaz
groepaz@...
Send Email
Aug 5, 2001
4:47 pm

... I worked for an archemedes software conversion house years ago and have lots of source in armcode, Speedball2, Cannon Fodder, quite a few others. The...
Jay
Jay@...
Send Email
Aug 5, 2001
9:16 pm

Hello Jay, J> I worked for an archemedes software conversion house years ago J> and have lots of source in armcode, Speedball2, Cannon Fodder, quite a ...
groepaz
groepaz@...
Send Email
Aug 6, 2001
6:33 am
First  | < Prev  |  Last 
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help