Re: [fpc-devel] Proposal for implementing named address space support

2021-03-06 Thread Christo Crause via fpc-devel
On Sun, Jan 24, 2021 at 10:13 PM Christo Crause wrote: > > On Tue, Jan 19, 2021 at 8:52 AM Sven Barth via fpc-devel < > fpc-devel@lists.freepascal.org> wrote: > >> >> It isn't that hard. You essentially need to make sure that the necessary >> information is written in tpointerdef.ppuwrite and rea

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-31 Thread Florian Klämpfl via fpc-devel
Am 31.01.21 um 16:54 schrieb Christo Crause via fpc-devel: On Sun, Jan 24, 2021 at 10:13 PM Christo Crause mailto:christo.cra...@gmail.com>> wrote: My next challenge is to extend error checking so that call parameters are checked for section incompatibility. Is there a way to define a

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-31 Thread Christo Crause via fpc-devel
On Sun, Jan 24, 2021 at 10:13 PM Christo Crause wrote: > My next challenge is to extend error checking so that call parameters are > checked for section incompatibility. > Is there a way to define and run specific new tests only (say in a tests/testfolder/avr), in the compiler test folder? At th

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-24 Thread Christo Crause via fpc-devel
On Tue, Jan 19, 2021 at 8:52 AM Sven Barth via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > > It isn't that hard. You essentially need to make sure that the necessary > information is written in tpointerdef.ppuwrite and read again in > tpointerdef.ppuload. You also need to increase the PPU

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-18 Thread Sven Barth via fpc-devel
Christo Crause via fpc-devel schrieb am Di., 19. Jan. 2021, 05:37: > > > On Sun, Jan 17, 2021 at 3:51 PM Florian Klämpfl via fpc-devel < > fpc-devel@lists.freepascal.org> wrote: > >> Am 08.01.21 um 22:00 schrieb Christo Crause via fpc-devel: >> > On Sun, Oct 4, 2020 at 1:49 PM Christo Crause > >

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-18 Thread Christo Crause via fpc-devel
On Sun, Jan 17, 2021 at 3:51 PM Florian Klämpfl via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > Am 08.01.21 um 22:00 schrieb Christo Crause via fpc-devel: > > On Sun, Oct 4, 2020 at 1:49 PM Christo Crause > > wrote: > > var > >w: word = $BEEF; section

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-17 Thread Florian Klämpfl via fpc-devel
Am 08.01.21 um 22:00 schrieb Christo Crause via fpc-devel: On Sun, Oct 4, 2020 at 1:49 PM Christo Crause > wrote: FPC can use the section modifier to specify which address space should be used for data. I've made some progress in certain areas (basicall

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-10 Thread Jonas Maebe via fpc-devel
On 2021-01-09 16:01, Christo Crause via fpc-devel wrote: On Sat, Jan 9, 2021 at 3:52 PM Jonas Maebe via fpc-devel wrote: Could your idea not be simplified by allowing the use of the section directive when defining a pointer? type Peeprom = pointer; section '.eeprom'; This way when a parame

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-09 Thread Christo Crause via fpc-devel
On Sat, Jan 9, 2021 at 3:52 PM Jonas Maebe via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > On 08/01/2021 22:00, Christo Crause via fpc-devel wrote: > > However I see problems with propagating section information through > > reference type parameters. I'm not sure how to propagate the sect

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-09 Thread Jonas Maebe via fpc-devel
On 08/01/2021 22:00, Christo Crause via fpc-devel wrote: > On Sun, Oct 4, 2020 at 1:49 PM Christo Crause > wrote: > > FPC can use the section modifier to specify which address space > should be used for data. > > > I've made some progress in certain area

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-08 Thread Christo Crause via fpc-devel
On Sun, Oct 4, 2020 at 1:49 PM Christo Crause wrote: > FPC can use the section modifier to specify which address space should be > used for data. > I've made some progress in certain areas (basically static variables), the following type of AVR code example works: var w: word = $BEEF; section

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-01 Thread Christo Crause via fpc-devel
On Fri, Jan 1, 2021 at 7:01 PM Christo Crause wrote: > > On Fri, Jan 1, 2021 at 3:59 PM Florian Klämpfl via fpc-devel < > fpc-devel@lists.freepascal.org> wrote: > >> - you need to get the value of EECR: I would try with >> symtable.searchsym_in_module >> > Thanks for this hint. Settled on search

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-01 Thread Christo Crause via fpc-devel
On Fri, Jan 1, 2021 at 3:59 PM Florian Klämpfl via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > - you need to get the value of EECR: I would try with > symtable.searchsym_in_module > - for ideas how a load node could generate code for a variable access as > above, I would take the various

Re: [fpc-devel] Proposal for implementing named address space support

2021-01-01 Thread Florian Klämpfl via fpc-devel
Am 31.12.20 um 21:35 schrieb Christo Crause via fpc-devel: On Thu, Dec 31, 2020 at 9:42 PM Jonas Maebe via fpc-devel mailto:fpc-devel@lists.freepascal.org>> wrote: On 31/12/2020 20:32, Christo Crause via fpc-devel wrote: > For example I do not know how to generate the equivalent to t

Re: [fpc-devel] Proposal for implementing named address space support

2020-12-31 Thread Christo Crause via fpc-devel
On Thu, Dec 31, 2020 at 9:42 PM Jonas Maebe via fpc-devel < fpc-devel@lists.freepascal.org> wrote: > On 31/12/2020 20:32, Christo Crause via fpc-devel wrote: > > > For example I do not know how to generate the equivalent to the > > following user assembler code: > > lds r0, EECR > > where EECR i

Re: [fpc-devel] Proposal for implementing named address space support

2020-12-31 Thread Jonas Maebe via fpc-devel
On 31/12/2020 20:32, Christo Crause via fpc-devel wrote: > For example I do not know how to generate the equivalent to the > following user assembler code: >   lds r0, EECR > where EECR is defined as follows in a different unit: > var EECR: byte absolute $1F; > > The following line illustrates wh

Re: [fpc-devel] Proposal for implementing named address space support

2020-12-31 Thread Christo Crause via fpc-devel
I'm busy adding EEPROM access to the code generator for AVR. Although the general code required is relatively straight forward, the problem I ran into is that the EEPROM access registers are not at the same addresses for the different controllers. The register names and addresses are included in

[fpc-devel] Proposal for implementing named address space support

2020-10-04 Thread Christo Crause via fpc-devel
The AVR architecture uses different address spaces with potentially different access methods [1]. Currently constant data (messages, bitmaps etc.) are stored in flash and copied to RAM by the start-up code. Data access makes use of the LD* instructions (and ST* if the data is writeable). Accessi