* fxload to restictive with address range
@ 2003-05-18 19:40 Kay Sievers
2003-05-18 20:39 ` Kay Sievers
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kay Sievers @ 2003-05-18 19:40 UTC (permalink / raw)
To: linux-hotplug
Hello,
i have a DSL-USB-Modem:
http://www.devolo.de/produkte/adsl/mladslfunusb/index.php
inside is the 6485 Chip from Aanalog Devices:
http://www.analog.com/Analog_Root/productPage/productHome/0%2C2121%2CAD6485%2C00.html
A part of the chip is some kind of ezusb 8051.
(in the same chip is Ethernet and DSL-Pump)
I have extracted the firmware by sniffing Windows USB,
then converted to Intel-Hex-File.
http://vrfy.org/eagle6485.ihx
I've successfull loaded the firmware into the device with a modified fxload.
Unfortunately fxload does not support the address range of this chip.
I changed the following lines and everything is working well.
--- ezusb.c 2002-01-14 19:59:40.000000000 +0100
+++ ezusb.c.orig 2003-05-18 19:56:13.000000000 +0200
@@ -242,8 +242,8 @@
/* with 8KB RAM, 0x0000-0x1b3f can be written
* we can't tell if it's a 4KB device here
*/
- if (off <= 0x1b3f) {
- if ((off + len) > 0x1b40) {
+ if (off <= 0x7b3f) {
+ if ((off + len) > 0x7b40) {
fprintf(stderr, need2stage, off);
return -5;
} /* else OK */
I expect more devices of this kind to appear in the future.
Maybe somebody can check, how to be prepared for larger RAM sizes.
Have a good day
Kay Sievers
-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful,
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* fxload to restictive with address range
2003-05-18 19:40 fxload to restictive with address range Kay Sievers
@ 2003-05-18 20:39 ` Kay Sievers
2003-05-19 0:17 ` David Brownell
2003-05-19 1:16 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2003-05-18 20:39 UTC (permalink / raw)
To: linux-hotplug
---
Sorry, i diffed a old version. Here is the same mail with new diff.
btw: Are you expecting CR/LF in the record lines?
It raises "record to short?". Please see patch.
---
Hello,
i have a DSL-USB-Modem:
http://www.devolo.de/produkte/adsl/mladslfunusb/index.php
inside is the 6485 Chip from Aanalog Devices:
http://www.analog.com/Analog_Root/productPage/productHome/0%2C2121%2CAD6485%2C00.html
A part of the chip is some kind of ezusb 8051.
(in the same chip is Ethernet and DSL-Pump)
I have extracted the firmware by sniffing Windows USB,
then converted to Intel-Hex-File.
http://vrfy.org/eagle6485.ihx
I've successfull loaded the firmware into the device with a modified fxload.
Unfortunately fxload does not support the address range of this chip.
I changed the following lines and everything is working well.
--- ezusb.c 2003-05-18 22:15:20.000000000 +0200
+++ ezusb.c.orig 2002-04-12 06:08:01.000000000 +0200
@@ -64,8 +64,8 @@
/* with 8KB RAM, 0x0000-0x1b3f can be written
* we can't tell if it's a 4KB device here
*/
- if (addr <= 0x7b3f)
- return ((addr + len) > 0x7b40);
+ if (addr <= 0x1b3f)
+ return ((addr + len) > 0x1b40);
/* there may be more RAM; unclear if we can write it.
* some bulk buffers may be unused, 0x1b3f-0x1f3f
@@ -361,7 +361,7 @@
return -3;
}
- if ((len * 2) + 11 > strlen(buf)) {
+ if ((len * 2) + 11 >= strlen(buf)) {
fprintf (stderr, "record too short?\n");
return -4;
}
I expect more devices of this kind to appear in the future.
Maybe somebody can check, how to be prepared for larger internal RAM sizes.
Have a good day
Kay Sievers
-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful,
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fxload to restictive with address range
2003-05-18 19:40 fxload to restictive with address range Kay Sievers
2003-05-18 20:39 ` Kay Sievers
@ 2003-05-19 0:17 ` David Brownell
2003-05-19 1:16 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: David Brownell @ 2003-05-19 0:17 UTC (permalink / raw)
To: linux-hotplug
Kay Sievers wrote:
>
> I've successfull loaded the firmware into the device with a modified fxload.
> Unfortunately fxload does not support the address range of this chip.
> I changed the following lines and everything is working well.
Better to teach it about that particular chip,
rather than break every standard an21 or fx chip;
just add a new "-t type" option. "fxload" is
100% correct for the devices it claims to support!
I glanced briefly at that analog.com webpage and
couldn't find any technical specs whatever; so it's
not clear how to handle your particular chip.
Or as a workaround, just use the two stage loader.
If it's EZ-USB compatible, "a3load.hex" should work.
- Dave
> --- ezusb.c 2003-05-18 22:15:20.000000000 +0200
> +++ ezusb.c.orig 2002-04-12 06:08:01.000000000 +0200
> @@ -64,8 +64,8 @@
> /* with 8KB RAM, 0x0000-0x1b3f can be written
> * we can't tell if it's a 4KB device here
> */
> - if (addr <= 0x7b3f)
> - return ((addr + len) > 0x7b40);
> + if (addr <= 0x1b3f)
> + return ((addr + len) > 0x1b40);
>
> /* there may be more RAM; unclear if we can write it.
> * some bulk buffers may be unused, 0x1b3f-0x1f3f
> @@ -361,7 +361,7 @@
> return -3;
> }
>
> - if ((len * 2) + 11 > strlen(buf)) {
> + if ((len * 2) + 11 >= strlen(buf)) {
> fprintf (stderr, "record too short?\n");
> return -4;
> }
>
>
>
> I expect more devices of this kind to appear in the future.
> Maybe somebody can check, how to be prepared for larger internal RAM sizes.
>
>
> Have a good day
>
> Kay Sievers
>
>
-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful,
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: fxload to restictive with address range
2003-05-18 19:40 fxload to restictive with address range Kay Sievers
2003-05-18 20:39 ` Kay Sievers
2003-05-19 0:17 ` David Brownell
@ 2003-05-19 1:16 ` Kay Sievers
2 siblings, 0 replies; 4+ messages in thread
From: Kay Sievers @ 2003-05-19 1:16 UTC (permalink / raw)
To: linux-hotplug
On Sun, May 18, 2003 at 05:17:58PM -0700, David Brownell wrote:
> Kay Sievers wrote:
> >
> >I've successfull loaded the firmware into the device with a modified
> >fxload.
> Or as a workaround, just use the two stage loader.
> If it's EZ-USB compatible, "a3load.hex" should work.
Yes, you are right.
Two stage loading is possible.
I didn't expected this, cause the Windows driver programms all at once.
So i'm happy now.
Thank you, for your help.
Kay
pim:/home/kay/dslmodem# fxload -v -s /usr/share/usb/a3load.hex -I /usr/share/usb/eagle6485.ihx -D /proc/bus/usb/002/111
microcontroller type: fx
1st stage: load 2nd stage loader
open RAM hexfile image /usr/share/usb/a3load.hex
stop CPU
write on-chip, addr 0x0357 len 23 (0x0017)
write on-chip, addr 0x01b5 len 297 (0x0129)
write on-chip, addr 0x0080 len 309 (0x0135)
write on-chip, addr 0x02de len 71 (0x0047)
write on-chip, addr 0x0003 len 3 (0x0003)
write on-chip, addr 0x0325 len 50 (0x0032)
write on-chip, addr 0x0043 len 3 (0x0003)
write on-chip, addr 0x0400 len 4 (0x0004)
write on-chip, addr 0x0000 len 3 (0x0003)
write on-chip, addr 0x036e len 12 (0x000c)
... WROTE: 775 bytes, 10 segments, avg 77
reset CPU
open RAM hexfile image /usr/share/usb/eagle6485.ihx
2nd stage: write external memory
write external, addr 0x3184 len 695 (0x02b7)
write external, addr 0x343b len 813 (0x032d)
write external, addr 0x3800 len 1010 (0x03f2)
write external, addr 0x3bf2 len 184 (0x00b8)
write external, addr 0x3caa len 646 (0x0286)
write external, addr 0x3000 len 388 (0x0184)
stop CPU
2nd stage: write on-chip memory
write on-chip, addr 0x109e len 149 (0x0095)
write on-chip, addr 0x09ee len 389 (0x0185)
write on-chip, addr 0x0f15 len 164 (0x00a4)
write on-chip, addr 0x0800 len 494 (0x01ee)
write on-chip, addr 0x0033 len 3 (0x0003)
write on-chip, addr 0x1597 len 4 (0x0004)
write on-chip, addr 0x0063 len 3 (0x0003)
write on-chip, addr 0x1426 len 45 (0x002d)
write on-chip, addr 0x0fb9 len 60 (0x003c)
write on-chip, addr 0x0e6c len 169 (0x00a9)
write on-chip, addr 0x0722 len 198 (0x00c6)
write on-chip, addr 0x1000 len 158 (0x009e)
write on-chip, addr 0x07ff len 1 (0x0001)
write on-chip, addr 0x02e3 len 583 (0x0247)
write on-chip, addr 0x0080 len 611 (0x0263)
write on-chip, addr 0x14a5 len 36 (0x0024)
write on-chip, addr 0x14ed len 34 (0x0022)
write on-chip, addr 0x11bf len 116 (0x0074)
write on-chip, addr 0x13c2 len 50 (0x0032)
write on-chip, addr 0x0ffe len 1 (0x0001)
write on-chip, addr 0x14c9 len 36 (0x0024)
write on-chip, addr 0x0fff len 1 (0x0001)
write on-chip, addr 0x12fe len 2 (0x0002)
write on-chip, addr 0x159b len 13 (0x000d)
write on-chip, addr 0x147f len 38 (0x0026)
write on-chip, addr 0x12c5 len 57 (0x0039)
write on-chip, addr 0x1530 len 30 (0x001e)
write on-chip, addr 0x0ff5 len 8 (0x0008)
write on-chip, addr 0x0b73 len 269 (0x010d)
write on-chip, addr 0x1586 len 9 (0x0009)
write on-chip, addr 0x1233 len 81 (0x0051)
write on-chip, addr 0x052a len 504 (0x01f8)
write on-chip, addr 0x150f len 16 (0x0010)
write on-chip, addr 0x07e8 len 23 (0x0017)
write on-chip, addr 0x158f len 8 (0x0008)
write on-chip, addr 0x1358 len 54 (0x0036)
write on-chip, addr 0x13f4 len 50 (0x0032)
write on-chip, addr 0x138e len 52 (0x0034)
write on-chip, addr 0x004b len 3 (0x0003)
write on-chip, addr 0x0c80 len 262 (0x0106)
write on-chip, addr 0x1453 len 44 (0x002c)
write on-chip, addr 0x1284 len 65 (0x0041)
write on-chip, addr 0x154e len 56 (0x0038)
write on-chip, addr 0x151f len 17 (0x0011)
write on-chip, addr 0x0043 len 3 (0x0003)
write on-chip, addr 0x1300 len 88 (0x0058)
write on-chip, addr 0x0000 len 3 (0x0003)
write on-chip, addr 0x1133 len 12 (0x000c)
write on-chip, addr 0x0d86 len 230 (0x00e6)
write on-chip, addr 0x113f len 128 (0x0080)
write on-chip, addr 0x0ffd len 1 (0x0001)
... WROTE: 9167 bytes, 57 segments, avg 160
reset CPU
pim:/home/kay/dslmodem#
-------------------------------------------------------
This SF.net email is sponsored by: If flattening out C++ or Java
code to make your application fit in a relational database is painful,
don't do it! Check out ObjectStore. Now part of Progress Software.
http://www.objectstore.net/sourceforge
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-05-19 1:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-18 19:40 fxload to restictive with address range Kay Sievers
2003-05-18 20:39 ` Kay Sievers
2003-05-19 0:17 ` David Brownell
2003-05-19 1:16 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).