[fpc-devel] Arm Thumb2 - Stellaris status

David Welch dwelch at dwelch.com
Sat Aug 20 18:02:08 CEST 2011


right, when I build for stellaris or stm32f103re I get the cortex-m like 
vector table that uses arm 32 bit instruction startup code that branches 
to a pascalmain that is thumb2.  something that wont execute on 
hardware.  Had it been a thumb target with a traditional exeception 
table that would have been good and in fact desirable for some platforms 
(nintendo gba for example).  but the arm/thumb2 combination doesnt mix 
very well.

Maybe I need to re-try everything from scratch to see if I skipped a 
step or left out something and specified the wrong target or cpu.

Note you are giving up a stack location by using addresses in the form 
0x10007FFC instead of 0x10008000.  Minor point but it stands out in the 
binary.

This is all clearly a work in progress, I understand that...

David

On 08/20/2011 11:49 AM, John Clymer wrote:
> The thumb2 is meant to support Cortex M3 devices (STM32, Stellaris,
> etc.) AFAIK - the mixing of modes is not currently an option.
>
>
> ------------------------------------------------------------------------
> *From:* Jeppe Græsdal Johansen <jjohan07 at student.aau.dk>
> *To:* FPC developers' list <fpc-devel at lists.freepascal.org>
> *Sent:* Sat, August 20, 2011 7:23:39 PM
> *Subject:* Re: [fpc-devel] Arm Thumb2 - Stellaris status
>
> Den 20-08-2011 16:46, David Welch skrev:
>  > I was hoping for thumb support but I now see that the choices are
> limited to arm and thumb+thumb2 (without any separation between thumb
> and thumb2). Actually thumb2 wasnt working for me, I got an arm+thumb2
> mix, so I will ride this along for a while and see what comes up,
> otherwise limit my use to ARM targets, or start working on a thumb
> backend. Adding backends as well as arm embedded are of interest to me
> so I may work on a little of both.
> Why thumb support? The choices are indeed currently only either ARM or
> Thumb2(which is Thumb+32 bit extensions). Thumb2 is a variable length
> instruction set that looks like an arm+thumb mix, so I guarantee you
> that it works :)
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> <mailto:fpc-devel at lists.freepascal.org>
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>
>
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel




More information about the fpc-devel mailing list