[fpc-devel] Need an elegant way to preset a specific memory area in elf files

Michael Ring mail at michael-ring.org
Wed Apr 23 14:56:04 CEST 2014


this code is for PIC32 ;-) , Florian has merged my initial work a few 
weeks ago and Segger has created a new version of their J-Link probe 
which supports pic32, so I am currently fine-tuning the code so that 
Florian can merge the missing parts.

I have already started a page in the FPC-Wiki:

http://wiki.freepascal.org/TARGET_Embedded_Mipsel

Michael

Am 23.04.14 14:19, schrieb Michael Schnell:
> On 04/23/2014 10:34 AM, Michael Ring wrote:
>> Thanks,
>> but does not solve the problem, it's not about reading the data, it's 
>> about defining the data so that it is included in the elf file in the 
>> correct section so that the microcontroller is programmed with the 
>> values when the elf file is uploaded to the microcontroller.
> Hmm.
>
> The said method allows for writing to such data as well. Of course 
> only after some initialization is done.
>
> If I need such stuff during the initialization, I would use ASM.
>
> Anyway, by creating true constants (as you seem to aim for), the data 
> would reside in FLASH, and never be touched by any software.
>
> Certain processors with on-chip flash memory indeed use hardware to 
> read such configuration data before the processor starts, but the only 
> I know of, that might be usable with fpc (and which I in fact am eager 
> to use with fpc) is PIC32 (a MIPS architecture).
>
> -Michael
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>




More information about the fpc-devel mailing list