John,

--- John Marshall <[EMAIL PROTECTED]> wrote:
> On Tue, Sep 17, 2002 at 01:18:28PM -0700, Mike McCollister wrote:
> > m68k-palmos-gcc -Wall -W -O2 -palmos4 -nostartfiles \
> >         -o obj/code03e8.out src/code03e8.c -lPalmOSGlue -Lobj   -lcommon
> > m68k-palmos-objcopy -O binary obj/code03e8.out obj/code03e8.bin
> > 
> > my .bin file is 16 Mbytes in size (not a type, real large).
> 
> When Aaron said "something like this", he forgot to show you the
> --only-section (a.k.a. -j) option.  Probably you want "-j .text".

Yep, "-j .text" made it work.  Thanks.

> (Use "m68k-palmos-objdump -h" to see where ~16Mb came from.  In a column
> of numbers that is implicitly in hex, 01000000 = 16Mb.)
> 
> Just as using a while for a typical loop is better than doing the job
> manually with gotos (less scope for silly mistakes with big consequences,
> and the compiler can catch mistakes better), using the linker output
> directly with build-prc for the typical situations is better than doing
> the job manually with obj-res or objcopy (less scope for silly mistakes
> with big consequences, and the post-linker can catch mistakes better).

That is what I normally do for my non-hack programs.

I'm am still needing to have the TRAP in the .rcp file.  Just for review, this
is what I am doing:

1) All of my trap files have something like this in it right before the first
function:

HACKMASTER_TRAP(sysTrapEvtProcessSoftKeyStroke);
STANDALONE_CODE_RESOURCE_ID(0x03e8); // 1000

2) The compile line for one of my traps will look like this:

m68k-palmos-gcc -Wall -W -O2 -palmos4 -nostartfiles \
        -o obj/code03e8.out src/code03e8.c -lPalmOSGlue -Lobj   -lcommon
m68k-palmos-objcopy -O binary -j .text obj/code03e8.out obj/code03e8.bin

Couple of questions here, are .out and .bin the appropriate extension names?

3) pilrc looks like this:

pilrc -q -I src -ro -o obj/McPhling.ro src/McPhling.rcp

3) build-prc looks like this:

build-prc  -o McPhling4.prc -n "McPhling" \
        src/McPhling.def -c McPg -t 'HACK' obj/McPhling.ro \
        obj/*.bin

I still need to specify the following in my .rcp file:

TRAP ID 1000 VALUE 0xA121 // sysTrapEvtProcessSoftKeyStroke

It seems as if build-prc is not seeing the trap information in the .c file. 
I'm missing one little thing in this puzzle and I think that I will be able to
get the TRAP stuff out of the .rcp file.  Any ideas?

Again, thanks for your patience and time.

Mike McCollister

__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to