From: Patrick Calmettes <C<almettes@mi...> - 2002-03-08 09:14:06
>From: paul <paul@...>
>Date: Thu, 7 Mar 2002 14:09:09 -0500 (EST)
>Subject: [Sdcc-user] combined code and data segment
>I'm using sdcc to program an 8032ah. It's working great. Great work
>As described in the Intel MCS-50 Microcontroller Family User's manual,
>I have combined the Code and External Data Segment:
>"External Program Memory and external Data Memory may be combined if
>desired by applying the RD/ and PSEN/ signals to the inputs of an AND
>gate and using the output of the gate as the read strobe to the
>external Program/Data memory. "
>I tie this line line to a SRAM chip. This combined model allows me to
>test code out without burning a prom/ eprom or flash. So far all of
>my code is in the external RAM, but all of my variables are in the
>(small) internal RAM. I'd like to get the variables out into external
>SRAM, and start using the SRAM for storage as well as code. My
>question is, are there command line options to support this memory
>model? I guess I want my data segment to follow my my code segment
>(or vice versa). I haven't tested it yet, but I'm assuming without
>the correct options, the code will be placed at the same locations as
>the data, which in my case obviously won't work.
You can use the --xram-loc sdcc option to choose where you put your external
datas and the --code-loc for the code.