I guess, ASM file is generated before linking, so addresses could be relative.
Check .map file.
Ondrej
From: Ashok Das [mailto:ashok.erics...@hotmail.com]
Sent: Tuesday, April 28, 2015 4:58 PM
To: sdcc-user@lists.sourceforge.net
Subject: [Sdcc-user] How to tell SDCC the location of code memory
This problem may be very simple for c programmers but for a assembly guy like
me its very critical. I have a 89S51 trainer board, which have a external
static RAM located at 0x2000. I use this as code memory. I download the code
onto RAM and order the Bootloader (the monitor program PAULMON2) (which is
residing in internal flash of MCU) to jump to the location 0x2000, where my
application program resides. While assembling any program, I use ORG directive
to tell assembler to start the code from 0x2000. This works fine. Now I moved
to SDCC but could not figure out how to tell SDCC to link the code from
address 0x2000 ? I could not find any straight answer. I searched in some
online forum and posted questions also in SDCC source forge forum. I cannot use
the code location from 0x0000 as this is used by Bootloader.
This is the thread I started:
http://sourceforge.net/p/sdcc/discussion/1865/thread/82568b4d/
I used following command
sdcc --code-loc 0x2000 serial_101.c
The program serial_101.c compiles successfully, but starting location is 0x0000
as i observed in generated ASM file. I am using Windows7 64 and WindowsXP 32. I
am completely new to C programming for Microcontroller. I request you to kindly
help me on this.
Thanks & Regards
Ashok Das
Sr. Engineer Radio Access Network
Ericsson India Pvt. Ltd
Monal Tower - 2nd Floor
Guwahati. 781006, Assam, India
Mobile +91 9954161226
ashok....@ericsson.com
ashok.erics...@hotmail.com
www.ericsson.com<http://www.ericsson.com>
[Obrázek byl odebrán
odesílatelem.]<http://img107.imagevenue.com/img.php?image=th_633639580_ericsson_logo_122_128lo.jpg>
-->
------------------------------------------------------------------------------
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