<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel">
    <title>gmane.comp.embedded.fx2lib.devel</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/88"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/87"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/86"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/85"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/84"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/83"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/82"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/81"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/80"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/79"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/78"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/77"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/76"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/75"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/74"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/73"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/72"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/71"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/70"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/69"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/88">
    <title>[ fx2lib-Issues-2909385 ] segmentation fault</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/88</link>
    <description>&lt;pre&gt;Issues item #2909385, was opened at 2009-12-05 11:45
Message generated for change (Comment added) made by maartenbrock
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&amp;amp;atid=1126193&amp;amp;aid=2909385&amp;amp;group_id=247216

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: segmentation fault

Initial Comment:
Receive segmentation fault from sdcclib due to a bad memory access when making fx2.lib.

Using sdcclib v1.2 and sdcc v2.9.0 on Mac OS X i386 (Snow Leopard v10.6.2).

Do not receive this error when using sdcclib for building other libraries, also for the FX2.

----------------------------------------------------------------------

Comment By: Maarten Brock (maartenbrock)
Date: 2013-01-25 02:17

Message:
Since the p&lt;/pre&gt;</description>
    <dc:creator>SourceForge.net</dc:creator>
    <dc:date>2013-01-25T10:17:54</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/87">
    <title>(no subject)</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/87</link>
    <description>&lt;pre&gt;http://www.bbv-jugend.de/tmp/liketd.php !------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712_______________________________________________
Fx2lib-devel mailing list
Fx2lib-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fx2lib-devel
&lt;/pre&gt;</description>
    <dc:creator>Tim michals</dc:creator>
    <dc:date>2013-01-17T01:06:12</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/86">
    <title>Re: FX2 firmware</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/86</link>
    <description>&lt;pre&gt;Are you installing the driver that Cypress provides? You need to update the
driver inf with the VID/PID pair of the device your firmware loads up with.
Can you check and see if your device is even giving a VID/PID pair? In
device manager, you can go into the details tab and look under "Device
Instance ID" to see the VID/PID pair.

Zohair Ahmad


On Mon, Apr 30, 2012 at 9:12 PM, ANDRONIC BOANARIJESY &amp;lt;androjes-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;wrote:

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Fx2lib-devel mailing list
Fx2lib-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/l&lt;/pre&gt;</description>
    <dc:creator>Zohair Ahmad</dc:creator>
    <dc:date>2012-05-01T00:36:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/85">
    <title>Re: FX2 firmware</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/85</link>
    <description>&lt;pre&gt;If you're using the Makefile under "fw" directory, You will get an ihx file
as output.


On Mon, Apr 30, 2012 at 1:10 PM, ANDRONIC BOANARIJESY &amp;lt;androjes-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;wrote:



&lt;/pre&gt;</description>
    <dc:creator>ANDRONIC BOANARIJESY</dc:creator>
    <dc:date>2012-04-30T13:12:57</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/84">
    <title>Re: FX2 firmware</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/84</link>
    <description>&lt;pre&gt;Normally sdcv generates an ihx file. So, you need to convert it to hex file
using packihx before loading.
On Apr 30, 2012 12:09 PM, "Marco Casadio" &amp;lt;marco.casadio10-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Fx2lib-devel mailing list
Fx2lib-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fx2lib-devel
&lt;/pre&gt;</description>
    <dc:creator>ANDRONIC BOANARIJESY</dc:creator>
    <dc:date>2012-04-30T13:10:29</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/83">
    <title>Re: FX2 firmware</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/83</link>
    <description>&lt;pre&gt;Thank you for your reply.

No, i generate a Hex file directly from a makefile with sdcc but the
options used are the same you've provided.

-Marco
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Fx2lib-devel mailing list
Fx2lib-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fx2lib-devel
&lt;/pre&gt;</description>
    <dc:creator>Marco Casadio</dc:creator>
    <dc:date>2012-04-30T12:08:49</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/82">
    <title>Re: FX2 firmware</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/82</link>
    <description>&lt;pre&gt;It works for me!!! I use the Cypress devBoard (CY3684)

Did you use the "packihx.exe" for converting *.ihx to *.hex?

Otherwise, ensure your compiler option fits with your target.
The default option :
DSCR_AREA?=-Wl"-b DSCR_AREA=0x3e00"
INT2JT?=-Wl"-b INT2JT=0x3f00"
CODE_SIZE?=--code-size 0x3c00
XRAM_SIZE?=--xram-size 0x0200
XRAM_LOC?=--xram-loc 0x3c00

On Mon, Apr 30, 2012 at 11:10 AM, Marco Casadio
&amp;lt;marco.casadio10-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt;wrote:



&lt;/pre&gt;</description>
    <dc:creator>ANDRONIC BOANARIJESY</dc:creator>
    <dc:date>2012-04-30T11:36:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/81">
    <title>FX2 firmware</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/81</link>
    <description>&lt;pre&gt;I've tried to build fx2-lib basic firmware from fw directory and the hex
file has been generated correctly. But, if i run this firmware on my FX2LP,
the device is not able to enumerate in the rigth way. In particular,
Windows says "USB Unknown device".
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/_______________________________________________
Fx2lib-devel mailing list
Fx2lib-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f&amp;lt; at &amp;gt;public.gmane.org
https://lists.sourceforge.net/lists/listinfo/fx2lib-devel
&lt;/pre&gt;</description>
    <dc:creator>Marco Casadio</dc:creator>
    <dc:date>2012-04-30T11:10:23</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/80">
    <title>Re: View program size</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/80</link>
    <description>&lt;pre&gt;Hello Andronic,


My apologies. On a second look it appears that it was me who replied 
off-list.

Maarten


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
&lt;/pre&gt;</description>
    <dc:creator>Maarten Brock</dc:creator>
    <dc:date>2012-04-23T21:14:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/79">
    <title>Re: View program size</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/79</link>
    <description>&lt;pre&gt;Hello Andronic,


No, I cannot, because on an FX2 they DO create a conflict. But SDCC was
not written for the FX2, but for the Intel 8051 instead. And the original
8051 has separate XRAM and separate CODE memory. So YOU must split the
memory using the --code-loc and --xdata-loc command line switches. And
while you're at it also supply SDCC with --code-size and --xdata-size so
it will warn of memory overflows.

Apart from reading the FX2 datsheets and the SDCC manual I advise you to
also read the original 8051 datasheet, a.k.a. the 8051 bible, to get
familiar with the architecture. Google it you will find it.

And please do not reply to me personally, but to the whole list so
everyone can benefit. If you want my personal guidance I expect you to pay
my salary.

Maarten



------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http:&lt;/pre&gt;</description>
    <dc:creator>Maarten Brock</dc:creator>
    <dc:date>2012-04-23T20:37:47</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/78">
    <title>Re: View program size</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/78</link>
    <description>&lt;pre&gt;I can't see where are the code, xram sizes in my .mem file.
Could you show me?

################################################
firmware.mem
################################################
Internal RAM layout:
      0 1 2 3 4 5 6 7 8 9 A B C D E F
0x00:|0|0|0|0|0|0|0|0|a|a|a|a|a|a|a|Q|
0x10:|Q|Q| | | | | | | | | | | | | | |
0x20:|B|T|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x30:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x40:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x50:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x60:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x70:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x80:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0x90:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0xa0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0xb0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0xc0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0xd0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0xe0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0xf0:|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|S|
0-3:Reg Banks, T:Bit regs, a-z:Data, B:Bits, Q:Overlay, I:iData, S:Stack,
A:Absolute

Stack starts at: 0x22 (sp set to 0x21) with 222 bytes available&lt;/pre&gt;</description>
    <dc:creator>ANDRONIC BOANARIJESY</dc:creator>
    <dc:date>2012-04-15T10:21:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/77">
    <title>Re: View program size</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/77</link>
    <description>&lt;pre&gt;Hi,

Just open the .mem file.

Maarten




------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
&lt;/pre&gt;</description>
    <dc:creator>Maarten Brock</dc:creator>
    <dc:date>2012-04-15T09:06:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/76">
    <title>View program size</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/76</link>
    <description>&lt;pre&gt;Hi everyone,

How can I see the program size (xram, code, data) on SDCC after compiling?

with Keil, we could see:
Program Size: data=90.0 xdata=4492 code=5455

Build target 'RAM'
assembling dscr.a51...
compiling fw.c...
Source\fw.c(34): warning C317: attempt to redefine macro '_IFREQ'
compiling device.c...
linking...
Program Size: data=90.0 xdata=4492 code=5455
[...]


&lt;/pre&gt;</description>
    <dc:creator>ANDRONIC BOANARIJESY</dc:creator>
    <dc:date>2012-04-15T07:23:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/75">
    <title>Re: Isochronous Streaming Using LibUSB from FPGA</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/75</link>
    <description>&lt;pre&gt;Hi.

&amp;lt;offtopic&amp;gt;
Sorry, this message is not properly threaded: I just happened to find the 
original thread in archives, and I cannot find a way to get relevant mail 
headers.
I hope this mail will catch original poster's attention.
&amp;lt;/offtopic&amp;gt;

Nice to see someone using my python-libusb1 for isochronous with (some) 
success ! I must admit I haven't tested isochronous transfers support properly 
myself.

I have some comments on the python script from original post which might help 
improving the situation, if that's still relevant:
- You are creating one transfer object per actual transfer. You should
  probably reuse them instead by calling "newxfer.submit()" in
  SubmitThread.createDataThread. In turn, you should remove the infinite loop
  in SubmitThread.run, so that you only create a fixed amount of transfers,
  submit them, and do nothing (actually just looping over handleEvents()).
  In turn, this means you don't need to have 2 threads for creating transfers
  and handling events: just do that sequentia&lt;/pre&gt;</description>
    <dc:creator>Vincent Pelletier</dc:creator>
    <dc:date>2012-01-22T11:10:44</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/74">
    <title>Re: Setupdata at 0xe000</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/74</link>
    <description>&lt;pre&gt;Hi,

Daniel wrote:

Ah yes, I forgot about this.

Chris wrote;

It works because the descriptors are initialized in assembly.


I admit I did not read further than 3.2 EZ-USB Startup Modes which 
states:
Note: Although the EZ-USB can perform C2 Loads from EEPROMs as large 
as 64 KB, code can only be downloaded to the 16K of on chip RAM.

On second thought I think "code" here means code space since 0xe000 
is xdata only. I had read it as 'binary data'.

Sorry for the noise,
Maarten

------------------------------------------------------------------------------
BlackBerry&amp;amp;reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
&lt;/pre&gt;</description>
    <dc:creator>Maarten Brock</dc:creator>
    <dc:date>2011-09-17T19:30:35</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/73">
    <title>Re: Setupdata at 0xe000</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/73</link>
    <description>&lt;pre&gt;Apologies, re-sending from correct account.

On Fri, 2011-09-16 at 21:55 +0200, Maarten Brock wrote:
My compile lines look like this:

sdcc -mmcs51 --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00
-Wl"-b DSCR_AREA=0xe000" -Wl"-b INT2JT=0x3f00" -DEEPROM -c
--disable-warning 85 -I sdcc -I../../../3rd/fx2lib/include
-I../../../common firmware.c

And my link lines look like this:

sdcc -mmcs51 --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00
-Wl"-b DSCR_AREA=0xe000" -Wl"-b INT2JT=0x3f00" -DEEPROM -o firmware.hex
app.rel firmware.rel infra.rel jtag.rel prom.rel sync.rel
descriptors.rel -L../../../3rd/fx2lib/lib fx2.lib

I tried a RAM-load and a 0xC2 EEPROM load. 

The final 0xC2 record for *code* does a load of 0x185 bytes at 0x21AB.
That is immediately followed by a 0xC2 record to load 0xB8 bytes of
xdata at 0x3f00, followed by a 0xC2 record to load 0xAC bytes of xdata
descriptors at 0xe000. This is naturally before any SDCC init code has
been called.

The init code I get from SDCC (2.9.0) looks li&lt;/pre&gt;</description>
    <dc:creator>Chris McClelland</dc:creator>
    <dc:date>2011-09-17T08:35:26</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/72">
    <title>Re: Setupdata at 0xe000</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/72</link>
    <description>&lt;pre&gt;My compile lines look like this:

sdcc -mmcs51 --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00
-Wl"-b DSCR_AREA=0x3e00" -Wl"-b INT2JT=0x3f00" -DEEPROM -c
--disable-warning 85 -I sdcc -I../../../3rd/fx2lib/include
-I../../../common firmware.c

And my link lines look like this:

sdcc -mmcs51 --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00
-Wl"-b DSCR_AREA=0x3e00" -Wl"-b INT2JT=0x3f00" -DEEPROM -o firmware.hex
app.rel firmware.rel infra.rel jtag.rel prom.rel sync.rel
descriptors.rel -L../../../3rd/fx2lib/lib fx2.lib

I tried a RAM-load and a 0xC2 EEPROM load. 

The final 0xC2 record for *code* does a load of 0x185 bytes at 0x21AB.
That is immediately followed by a 0xC2 record to load 0xB8 bytes of
xdata at 0x3f00, followed by a 0xC2 record to load 0xAC bytes of xdata
descriptors at 0xe000. This is naturally before any SDCC init code has
been called.

The init code I get from SDCC (2.9.0) looks like this:

894 ;--------------------------------------------------------
895 ; global &amp;amp; static initial&lt;/pre&gt;</description>
    <dc:creator>Chris McClelland</dc:creator>
    <dc:date>2011-09-17T08:29:06</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/71">
    <title>Re: Setupdata at 0xe000</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/71</link>
    <description>&lt;pre&gt;Evelyn the modified dog asks "why?"


Done. Works fine (I tested a RAM load and a 0xC2 EEPROM load, declared
xdata at 0x3e00 and 0xe000).


Thanks!



------------------------------------------------------------------------------
BlackBerry&amp;amp;reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
&lt;/pre&gt;</description>
    <dc:creator>Chris McClelland</dc:creator>
    <dc:date>2011-09-17T08:25:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/70">
    <title>Re: Setupdata at 0xe000</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/70</link>
    <description>&lt;pre&gt;
On 17/09/2011, at 5:25, Maarten Brock wrote:

Yes, you can't put code there.


Hmm I didn't consider this, however I just examined the output file and I don't think it is doing that.
ie I did this..
gobjcopy -I ihex -O binary obj/ugsio.ihx obj/ugsio.bin
hexdump -Cv obj/ugsio.bin

and I see..
&amp;lt;snip&amp;gt;
0000e000  12 01 00 02 ff ff ff 40  53 47 01 00 01 00 01 02  |.......&amp;lt; at &amp;gt;SG......|
0000e010  04 01 0a 06 00 02 ff ff  ff 40 01 00 09 02 35 00  |.........&amp;lt; at &amp;gt;....5.|
&amp;lt;snip&amp;gt;
0000e080  07 05 08 02 00 02 00 00  04 03 09 04 22 03 47 00  |............".G.|
0000e090  65 00 6e 00 65 00 73 00  69 00 73 00 20 00 53 00  |e.n.e.s.i.s. .S.|
0000e0a0  6f 00 66 00 74 00 77 00  61 00 72 00 65 00 0c 03  |o.f.t.w.a.r.e...|
&amp;lt;snip&amp;gt;


I think it probably "just works" in this case because the descriptor table is defined in assembly and its address is forced in the linker.

Hence the declaration only affects how the C code accesses it.


I am using C2 mode, and the firmware is loaded into RAM using fxload.

EEPROM has a PID of 0xff01 and devd&lt;/pre&gt;</description>
    <dc:creator>Daniel O'Connor</dc:creator>
    <dc:date>2011-09-17T01:55:17</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/69">
    <title>Re: Setupdata at 0xe000</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/69</link>
    <description>&lt;pre&gt;
On 16/09/2011, at 22:43, Chris McClelland wrote:

Yes.


Hmm I'm not sure, I can't try it declared as __xdata at 0x3e00 because my code is too big :)


OK. can you try declaring it as __xdata but still at 0x3e00?


Yes, I changed them because my version of sdcc complains that code/xdata/etc is deprecated and you should use __code/__xdata/etc.

See this github pull request..
https://github.com/mulicheng/fx2lib/pull/2/files



Nice project :)

--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C







------------------------------------------------------------------------------
BlackBerry&amp;amp;reg; DevCon Americas, Oct. 18-20, San Francisco, CA
http://p.sf.net/sfu/rim-devcon-copy2
&lt;/pre&gt;</description>
    <dc:creator>Daniel O'Connor</dc:creator>
    <dc:date>2011-09-17T01:31:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/68">
    <title>Re: Setupdata at 0xe000</title>
    <link>http://permalink.gmane.org/gmane.comp.embedded.fx2lib.devel/68</link>
    <description>&lt;pre&gt;
But these can only be used as RAM accordign to the 
datasheet.


And how is that xdata filled? SDCC assumes the code 
memory is stored in a ROM-like memory and xdata is 
volatile. So during startup it copies initialized data 
from code to xdata. So you have two copies in memory and 
thus your memory footprint has grown. If you use --no-
xinit-opt it is not copied but initialized by lots of 
instructions, usually taking even more code memory.

I guess it works because SDCC's initialization code 
copied it from lower memory to xdata at 0xe000. I also 
guess you missed the downside.

SDCC does not support the concept of preinitialized 
xdata as the FX2 has when it gets the firmware from the 
driver or the I2C eeprom.


Are you using C0 or C2 mode? C2 mode cannot load 0xe000 
according to the datasheet. Can the driver download to 
0xe000 directly?

My advice is to keep these constants in code memory. And 
if you do want to change them at runtime cast a code 
pointer to xdata pointer to access them.

If the driv&lt;/pre&gt;</description>
    <dc:creator>Maarten Brock</dc:creator>
    <dc:date>2011-09-16T19:55:55</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.embedded.fx2lib.devel">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.embedded.fx2lib.devel</link>
  </textinput>
</rdf:RDF>
