Kicking it around in the back of my head at work today... I tried doing a compile to assembly language for the stellaris - and it choked giving the error from t_embed.pas. The error comes from the portion of the program trying to generate a linker script.
Looking at t_embed.pas, it looks like every single flavor of ARM controller will require it's own subsection of the case() statement. This can easily get long and ugly. As the only thing that changes between most of the arm variants is the memory layout - why not provide a generic "stellaris" switch - with reads in a text file containing the memory map and stack top (the rest of the link file remains the same for all variants of ARM) ? This way - switching to a new variant of stellaris only requires tweaking a memory map file - rather than a re-build and patch of t_embed.pas ? For that matter - entirely foreign Cortex M3 parts could be easily supported without requiring changes to the compiler. Just pondering how to make it easier and more flexible ... ________________________________ From: Geoffrey Barton <m...@periphon.net> To: FPC developers' list <fpc-devel@lists.freepascal.org> Sent: Mon, August 8, 2011 12:17:03 PM Subject: Re: [fpc-devel] Arm Thumb2 - Stellaris status On 7 Aug 2011, at 11:14, John Clymer wrote: Ok. Give me a week or so (very hectic schedule right now...) And I will see if I can't patch it up some. To save you some time perhaps, the following was for lm3s9b92 and rtl/embedded/arm/stellaris.pas; I only tested with that device:- 1in cpuinfo.pas, tcontrollertype should include, ct_lm3s9b92 rather than stellaris 2also 'stellaris' in controllerunitstr should be 'lm3s9b92 3in compiler/systems/t_embed.pas add:- ct_lm3s9b92: with linkres do begin Add('ENTRY(_START)'); Add('MEMORY'); Add('{'); Add(' flash : ORIGIN = 0x00000000, LENGTH = 256K'); Add(' ram : ORIGIN = 0x20000000, LENGTH = 96K'); Add('}'); Add('_stack_top = 0x20017FFC;'); end; I also found I needed to comment out the controller types other than stellaris in rtl/embedded/makefile.fpc. Then remake make,and make the compiler. New to this - what is procedure to generate and submit patch set ? > +1 but Florian did offer to integrate any updates himself :) Geoffrey >Thanks ! > > > > > > ________________________________ From: Florian Klämpfl <flor...@freepascal.org> >To: FPC developers' list <fpc-devel@lists.freepascal.org> >Sent: Sun, August 7, 2011 12:15:02 AM >Subject: Re: [fpc-devel] Arm Thumb2 - Stellaris status > >Am 06.08.2011 13:35, schrieb John Clymer: >> Ok, maybe I'm missing something... >> >> I can compile and get a binary for an STM32F103RE. However, if I >> attempt for the STELLARIS target, I get an error. I see where the error >> is coming from in t_embed.pas. It looks like the t_embed.pas file is >> missing linking information for the Stellaris. > >Yes. arm embedded devices are only supported as far as somebody >contributed the compiler and rtl support. Problem is: we don't have any >chance to test it, so only users of these devices can contribute the >support. > >> Can someone confirm this >> is the case before I go on a wild chase changing things ? > > > >_______________________________________________ >fpc-devel maillist - fpc-devel@lists.freepascal.org >http://lists.freepascal.org/mailman/listinfo/fpc-devel >_______________________________________________ >fpc-devel maillist - fpc-devel@lists.freepascal.org >http://lists.freepascal.org/mailman/listinfo/fpc-devel >
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel