> I'm trying to convert my app to use sections.  Following the instructions
> that came with prc-tools 2.0, I did three things.  First I created a
> definition file:
> 
>       application { "appname" xxxx copy-prevention version=1.0 }
>       multiple code { set1 set2 }
> 
> Next, I added definitions into my .c:
> 
> 
>       #define SECTION1 __attribute__ ((section ("set1")))
>       #define SECTION2 __attribute__ ((section ("set2")))
> 
>       Err RomVersionCompatible(DWord, Word) SECTION1;
>       .
>       .
>       .
> 
> I also reworked my Makefile, but I don't think I need to show that.

  now.. that stuff looks perfect
 
> When I do a make, I get errors that look like the following:
> 
>       m68k-palmos-coff-gcc -static -g -O3   -c check.c -o check.o
>       appname.c:194: section attributes are not supported for this target
>       appname.c:195: section attributes are not supported for this target
> 
> What am I not doing?

  m68k-palmos-gcc <--- thats prc-tools 2.0

  check your paths and make sure you have prc-tools 2.0 installed :)

  your make file should look something like this:

---
# compiler commands
PREFIX   =
CC       = $(PREFIX)m68k-palmos-gcc
PILRC    = $(PREFIX)pilrc
BUILDPRC = $(PREFIX)build-prc

# source / outputs
MSEG    = $(EXEC)-sections.o $(EXEC)-sections.ld
OBJS    = palm.o device.o graphics.o editor.o game.o help.o gccfix.o
$(MSEG)
EXEC    = loderunner

# compiler flags
CCFLAGS = -O2 -Wall -palmos3.5

# compile requirements
$(EXEC).prc: $(EXEC) $(EXEC).def bin.stamp
        $(BUILDPRC) $(EXEC).def $(EXEC) *.bin
        make clean
        cp $(EXEC).prc ..

$(EXEC): $(OBJS)
        $(CC) $(OBJS) $(CCFLAGS) -o $(EXEC)

$(MSEG): $(EXEC).def
        multigen $(EXEC).def
        $(CC) -c -o $(EXEC)-sections.o $(EXEC)-sections.s

bin.stamp: $(EXEC).rcp
        $(PILRC) -q $(EXEC).rcp

# compile rules
.SUFFIXES: .c .o

.c.o:
        $(CC) -c $(CCFLAGS) $<

# clean-up funtions
clean:
        rm -f *.[oa] $(EXEC)-sections.* *.bin *.hdr bin.res *.grc *~
$(EXEC)
---

  ignore the word wrapping of email of course :))

  let me know if you have any problems

az 
--
Aaron Ardiri 
Java Certified Programmer      http://www.hig.se/~ardiri/
University-College i G�vle     mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN       
Tel: +46 26 64 87 38           Fax: +46 26 64 87 88
Mob: +46 70 656 1143           A/H: +46 8 668 78 72

if you enjoy it, then it aint work :) - rule #106 of life


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

Reply via email to