Hi Ashok,

On Tue, 2015-04-28 at 20:27 +0530, Ashok Das wrote:
>
> Now I moved to SDCC but could not figure out how to tell SDCC to link
> the code from address 0x2000 ?

> sdcc --code-loc 0x2000 serial_101.c

The command you use is correct afaik.
I tried a simple test.c

#include "types.h"
#include "87c591.h"

void main(void)
{
        volatile uint8 rc8;

        rc8 = 0;

        while(1)
        {
                rc8++;
        }
}

compiled with :

roelofh@castle:~/test$ sdcc --code-loc 0x2000 test.c

and this is in the resulting .mem file :

Other memory:
   Name             Start    End      Size     Max     
   ---------------- -------- -------- -------- --------
   PAGED EXT. RAM                         0      256   
   EXTERNAL RAM                           0    65536   
   ROM/EPROM/FLASH  0x2000   0x206c     109    65536   

The program starts at 0x2000 according to the last line.

Also the .ihx file starts at 0x2000 :

:03 2000 00 022006 B5
:03 205F 00 022003 59
<added spaces and snipped>

I am not sure after reading your OP if you used the .ihx
file to load the program at 0x2000 through paulmon2.

roelofh@castle:~/test$ sdcc -v
SDCC : mcs51 3.4.1 #9066 (5 Sep 2014) (Linux)

roelof



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to