Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2010-04

Re: arm embedded (Jonas Maebe)

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Geoffrey Barton
Show quoted text 13 lines
On 19 Apr 2010, at 13:29, Geoffrey Barton wrote: > 1 In the rtl/embedded/arm directory are three target processor > files. The one for stm32f103 does not get compiled into the units/ > arm-embedded/rtl directory. I added it to the CPU_UNITS line in the > makefile.fpc in the embedded directory before building ppcrossarm, > but this does not fix it. You have to run "fpcmake -Tall" after modifying makefile.fpc to regenerate the makefile (and make sure you are using an fpcmake from FPC 2.5.1).

ok, thanks. Now I understand the relationship between the 'make' files!

Geoffrey

Reply by email

Geoffrey Barton
Show quoted text 13 lines
Date: Mon, 19 Apr 2010 15:06:23 +0200 From: Jeppe Johansen Subject: Re: [fpc-devel] arm embedded To: FPC developers' list Message-ID: Content-Type: text/plain; charset=ISO-8859-1; format=flowed 1) stm32f103 is a thumb2 only device, and you cannot generate a rtl for both <=armv5 and thumb2. You need to modify the makefile to generate either a thumb2 rtl or a arm rtl. You can do that by removing the arm core units from CPU_UNITS

I assume this is the one in 'ifeq ($ARCH),arm)' in makefile.fpc

and overriding the FPC_OPT to include -Cpcortexm3

I understand the crosscompiler option -Cpcortexm3, but how do I regenerate the rtl?

Geoffrey

Reply by email

Jeppe Johansen
to Geoffrey Barton

Yes, change Makefile.fpc so instead of:
"ifeq ($(ARCH),arm)
CPU_UNITS=lpc21x4 at91sam7x256
endif"

it says:
"ifeq ($(ARCH),arm)
CPU_UNITS=stm32f103
endif"

Then run fpcmake -Tall in the rtl/embedded dir

Then you can build the compiler and rtl again using "make buildbase CPU_TARGET=arm OS_TARGET=embedded CROSSINSTALL=1 CROSSOPT="-Cpcortexm3 -O-""

Geoffrey Barton wrote 27 lines
> > Date: Mon, 19 Apr 2010 15:06:23 +0200 > From: Jeppe Johansen > Subject: Re: [fpc-devel] arm embedded > To: FPC developers' list > Message-ID: > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > 1) > stm32f103 is a thumb2 only device, and you cannot generate a rtl for > both <=armv5 and thumb2. You need to modify the makefile to generate > either a thumb2 rtl or a arm rtl. You can do that by removing the arm > core units from CPU_UNITS I assume this is the one in 'ifeq ($ARCH),arm)' in makefile.fpc > and overriding the FPC_OPT to include -Cpcortexm3 I understand the crosscompiler option -Cpcortexm3, but how do I regenerate the rtl? Geoffrey _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Geoffrey Barton
to Jeppe Johansen

Thanks, I would never have guessed the CROSSOPT in quotes. I can now see thumb2 code in the object file.
Next step try it with hardware :-)

Geoffrey

Jeppe Johansen wrote 49 lines
Yes, change Makefile.fpc so instead of: "ifeq ($(ARCH),arm) CPU_UNITS=lpc21x4 at91sam7x256 endif" it says: "ifeq ($(ARCH),arm) CPU_UNITS=stm32f103 endif" Then run fpcmake -Tall in the rtl/embedded dir Then you can build the compiler and rtl again using "make buildbase CPU_TARGET=arm OS_TARGET=embedded CROSSINSTALL=1 CROSSOPT="- Cpcortexm3 -O-"" Geoffrey Barton skrev: >> >> Date: Mon, 19 Apr 2010 15:06:23 +0200 >> From: Jeppe Johansen >> Subject: Re: [fpc-devel] arm embedded >> To: FPC developers' list >> Message-ID: >> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >> >> 1) >> stm32f103 is a thumb2 only device, and you cannot generate a rtl for >> both <=armv5 and thumb2. You need to modify the makefile to generate >> either a thumb2 rtl or a arm rtl. You can do that by removing the >> arm >> core units from CPU_UNITS > > I assume this is the one in 'ifeq ($ARCH),arm)' in makefile.fpc > >> and overriding the FPC_OPT to include -Cpcortexm3 > > I understand the crosscompiler option -Cpcortexm3, but how do I > regenerate the rtl? > > Geoffrey > > > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Jeppe Johansen
to Geoffrey Barton

What kind of hardware are you going to test it on?

Geoffrey Barton wrote 60 lines
Thanks, I would never have guessed the CROSSOPT in quotes. I can now see thumb2 code in the object file. Next step try it with hardware :-) Geoffrey On 21 Apr 2010, at 10:18, Jeppe Johansen wrote: > Yes, change Makefile.fpc so instead of: > "ifeq ($(ARCH),arm) > CPU_UNITS=lpc21x4 at91sam7x256 > endif" > > it says: > "ifeq ($(ARCH),arm) > CPU_UNITS=stm32f103 > endif" > > Then run fpcmake -Tall in the rtl/embedded dir > > Then you can build the compiler and rtl again using "make buildbase > CPU_TARGET=arm OS_TARGET=embedded CROSSINSTALL=1 > CROSSOPT="-Cpcortexm3 -O-"" > > Geoffrey Barton skrev: >>> >>> Date: Mon, 19 Apr 2010 15:06:23 +0200 >>> From: Jeppe Johansen >>> Subject: Re: [fpc-devel] arm embedded >>> To: FPC developers' list >>> Message-ID: >>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >>> >>> 1) >>> stm32f103 is a thumb2 only device, and you cannot generate a rtl for >>> both <=armv5 and thumb2. You need to modify the makefile to generate >>> either a thumb2 rtl or a arm rtl. You can do that by removing the arm >>> core units from CPU_UNITS >> >> I assume this is the one in 'ifeq ($ARCH),arm)' in makefile.fpc >> >>> and overriding the FPC_OPT to include -Cpcortexm3 >> >> I understand the crosscompiler option -Cpcortexm3, but how do I >> regenerate the rtl? >> >> Geoffrey >> >> >> _______________________________________________ >> fpc-devel maillist - >> http://lists.freepascal.org/mailman/listinfo/fpc-devel > > _______________________________________________ > fpc-devel maillist - > http://lists.freepascal.org/mailman/listinfo/fpc-devel _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email