Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DS203 missing shell.elf #28

Closed
Compycompy opened this issue Nov 4, 2020 · 79 comments
Closed

DS203 missing shell.elf #28

Compycompy opened this issue Nov 4, 2020 · 79 comments

Comments

@Compycompy
Copy link

Hello,
I have a DS203 currently with wildcat 6.5 hw 2.81 sys 1.64
I went in DSU mode and copied the ds203.hex file, all went fine.
Disconnected, restarted and asked for shell.elf, I copied the elf files but still keeps on asking for the shell.elf file.
I believe there is some issue with the memory location as it seems to look in another part but I am not sure.
Any suggestion?

@gabonator
Copy link
Owner

Try this firmware:
system_ds203.hex.zip

And copy these files to devices:
ds203apps.zip

If it won't work, please send here screenshot of the root of the device's filesystem

@Compycompy
Copy link
Author

Hi gab,
I tried to flash clean with the RS232 port, all was smooth, I copied the sys_b164.hex and all started correctly.
I loaded the system_ds203.hex, it was accepted. Turned off, then on asking for shell.elf (which at this point is fine).
I copied the ds203apps (uncompressed), turned off then on but still asking for shell.elf :-(
On the device directory I have the seven elf files, CALIB.DAT and CONFIG.DAT
Thanks for the help

@gabonator
Copy link
Owner

I just tried the files I provided and with the same result as in your case. For some strange reason, the filesystem gets corrupted when I copied all the files at once. After reconnecting I saw only empty root folder. But when I copied only the shell.elf to the disk, it worked. And then when the shell was loaded I copied remaining elf files. So please try to delete all *.elf files you copied before and copy only "shell.elf". Or try copying the file until the device will find it, possibly device format could help (dont forget to backup your CALIB.DAT and CONFIG.DAT)

@Compycompy
Copy link
Author

Unfortunately no luck always missing shell.elf (tried to format both quick and standard). I tried either pressing f1 directly after copying or doing power cycle (several times).
I will try with another PC/OS maybe it helps.
Thank you!

@gabonator
Copy link
Owner

Just out of curiosity, please drop here screenshot of the disk root and hex view of the shell.elf

@Compycompy
Copy link
Author

Compycompy commented Nov 5, 2020

Hi,
this is the shell.elf hex view and the folder.
image

image

thank you!

@gabonator
Copy link
Owner

gabonator commented Nov 5, 2020

try running "fsutil fsinfo sectorInfo e:" and "fsutil fsinfo ntfsinfo e:", this should show us how the disk is formatted, the disk should have 4096 sectors and every sector should have 512 bytes, on OSX:

$ sudo diskutil info /dev/disk2                                      ↑
   Device Identifier:         disk2
   Device Node:               /dev/disk2
   Whole:                     Yes
   Part of Whole:             disk2
   Device / Media Name:       Flash Disk

   Volume Name:               DS203
   Mounted:                   No

   Content (IOContent):       None
   File System Personality:   MS-DOS FAT12
   Type (Bundle):             msdos
   Name (User Visible):       MS-DOS (FAT12)

   OS Can Be Installed:       No
   Media Type:                Generic
   Protocol:                  USB
   SMART Status:              Not Supported
   Volume UUID:               FC397130-DDE8-3700-94A9-F8B250F2079E

   Disk Size:                 2.1 MB (2097152 Bytes) (exactly 4096 512-Byte-Units)
   Device Block Size:         512 Bytes

   Volume Total Space:        0 B (0 Bytes) (exactly 0 512-Byte-Units)
   Volume Free Space:         0 B (0 Bytes) (exactly 0 512-Byte-Units)

   Read-Only Media:           No
   Read-Only Volume:          Not applicable (not mounted)

   Device Location:           External
   Removable Media:           Removable
   Media Removal:             Software-Activated

   Solid State:               Info not available
   Virtual:                   No

@Compycompy
Copy link
Author

Hello gab,
my disk size is 8mb not 2, could that be a problem?
I try to run the command later today from linux.
thank you

@gabonator
Copy link
Owner

Yes that is a problem, the disk parameters are hard coded in the firmware. I do not own DS203 with 8MB disk, but if you can tell me what is the sector size and how many sectors are in that disk, I can prepare a build for you (and for others who own this newer version of DSO203), on linux try this command "fdisk -l"

@Compycompy
Copy link
Author

From what I can see from windows it is exactly 8.388.608 byte with 4096 byte/sector and 2048 total sectors.
I can look with the command under linux if needed.

@gabonator
Copy link
Owner

Try this
system_ds203hd.hex.zip
ds203apps.zip

@Compycompy
Copy link
Author

Copied in DFU mode the new system, now it goes directly in file manager mode.
Reboot and in normal mode I copied the shell.elf
Reboot and goes into file manager, if I choose the shell.elf some text appears quickly at the bottom (cannot see what is coming up) and then goes back to the file manager like if nothing happened.
I copied all the other elf files, they all work with the exception of miniosc.elf which gives an hardware error.

image

@gabonator
Copy link
Owner

Try one of these, maybe it will work. Their (minidso's) bios use different memory layout, because it needs bigger buffer for the filesystem (4k vs. 512), so I tried to build the app for different memory locations:
Archive.zip

@Compycompy
Copy link
Author

No luck always hardware fault :-(
Btw I noticed that since I flashed the new system file it quickly says at boot FPGA configuration error, but then it continues without problems.

@gabonator
Copy link
Owner

Without having access to your device it is very difficult to fix this issue. And when it says that there is problem with FPGA, then also the oscilloscope functions wont work even when the application was running.

@Compycompy
Copy link
Author

Ok thanks a lot anyway. The FPGA error has been resolved with the recovery with serial. Do you know if I can copy the old version of your system on the 8m version? (the GAB_N1.hex, N2, N3 and N4)

@acidg
Copy link

acidg commented Nov 13, 2020

I did quite the same as @Compycompy and ended up with the FPGA configuration error and corrupted logo. I have HW version 2.72. Any chance to get this working or revert to the old version?

First try:

Next try:

  • Flashed system_ds203hd.hex from above in DFU mode
  • Rebooted normally (without holding F1-button)
  • Copied shell.elf from ds203apps.zip above
  • Copied webosc.elf from ds203apps.zip

Starting webosc using the file manager didn't work with Chrome and https://l.valky.eu/webusbds203v2. So I tried with PulseView and selecting "Openbench ...(ols)" as input and got this error:
IMG20201113182912

Trying to revert:
I tried to flash a lot of different firmwares, including the old https://github.com/gabonator/DS203 GAB_N1.hex and GAB_O1.hex and the latest original firmware from http://minidso.com/forum.php?mod=viewthread&tid=666&extra=page%3D1
This resulted in the FPGA configuration error.

//edit:
tried one more time to flash GAB_N1.hex and was successful 🙂 Still would be interested in trying the new version though!

@acidg
Copy link

acidg commented Nov 18, 2020

@Compycompy can you tell me how you did the recovery with serial? Where did you get the binaries for the FPGA?

@gabonator
Copy link
Owner

Hello guys, do any of you have working 8MB device with original fw? Could you please share flash image of your device? I am trying to put together all flash images for recovery purposes. Thank you! (fyi: @nutz88)

@Sergio-
Copy link

Sergio- commented Dec 15, 2020

Hi.
I wish I saw this earlier. I had a DSO203 8Mb working until few minutes ago. I tried to updated the firmware and now I'm stuck on the "Image 'shell.elf' not found" message. :-(

@acidg
Copy link

acidg commented Dec 15, 2020

You can find the original fw for HW version <= 2.72 here: http://jpa.kapsi.fi/dsoquad/ as DS203.V2.72.zip

@Sergio-
Copy link

Sergio- commented Dec 16, 2020

Forgot to mention: My Hardware version is 2.82, Sys ver 1.64.
Is there firmware out there I can use to put the device back to work? I tried putting the GAB_N1.hex into the DFU disk, but only got the ERR file back. I'm using Ubuntu 20.04 as Environment.
Thank you.

@acidg
Copy link

acidg commented Dec 16, 2020

You can find Firmware 2.81 with FPGA binaries for HW version >= 2.82 here: http://minidso.com/forum.php?mod=viewthread&tid=666&extra=page%3D1
I repacked the files for you: DS203_2.81_HW2.82.zip

@Sergio-
Copy link

Sergio- commented Dec 17, 2020

You can find Firmware 2.81 with FPGA binaries for HW version >= 2.82 here: http://minidso.com/forum.php?mod=viewthread&tid=666&extra=page%3D1
I repacked the files for you: DS203_2.81_HW2.82.zip

Hello @acidg Thanks so much for putting this together. Really appreciate it.
All went well, except the last file (PA1_V113.hex). I tried putting it in several times, it always return as ERR. I even tried the dfuload method, but I was not able to put the device back to work. It always returns the "FPGA configuration error" message.
Do you guys think this is permanent damaged or do we still have ways to recover it?
Thank you.
image
By the way, I'm adding a dmesg portion of when the device is connected, to the PC, if that helps somehow....
image

@Sergio-
Copy link

Sergio- commented Dec 17, 2020

Ok thanks a lot anyway. The FPGA error has been resolved with the recovery with serial. Do you know if I can copy the old version of your system on the 8m version? (the GAB_N1.hex, N2, N3 and N4)

Hi @Compycompy Could you please point us or share how to proceed with the serial recovery to fix the FPGA issue? Thank you.

@gabonator
Copy link
Owner

@Sergio- it is nearly impossible to brick the device, DS203 can be recovered using the internal uart connection: https://github.com/gabonator/LA104/tree/master/tools/stm32flash
You will need uart converter (3.3V) for this

@Sergio-
Copy link

Sergio- commented Dec 17, 2020

@Sergio- it is nearly impossible to brick the device, DS203 can be recovered using the internal uart connection: https://github.com/gabonator/LA104/tree/master/tools/stm32flash
You will need uart converter (3.3V) for this

Hi @gabonator! First of all, thanks for the reply.
It's a good relief to know that the device can be restored. I believe it's just a matter to find the correct firmware combination now. :-)

I'll explain below what I did to recover from UART, hoping that others can user the information too.
Before starting, I took a picture of my device first screen, where it shows the license (I'm not sure if that's useful or not).
I compiled a Linux version of the stm32flash utility (download from sources, build it replace the bin at the same location I had the one from your repository).
I removed the cover and battery of the DSO203, and soldered some wires on the BOOT0 and UART ports (I didn't have any pin bars available) :-)
image
image
I connected the RX, TX and GND pins into USB to Serial adapter (3.3V) and to enter the Bootloader mode, just jumped the B0 with VCC, then powered on the device (the screen was just white at this point).
Then I run:
sudo ./stm32flash -w ./ds203_2mb_full/dso_quad_bootloader_flash_modified.bin /dev/ttyUSB0
and got this output

stm32flash 0.5

http://stm32flash.sourceforge.net/

Using Parser : Raw BINARY
Interface serial_posix: 57600 8E1
Version      : 0x22
Option 1     : 0x00
Option 2     : 0x00
Device ID    : 0x0414 (STM32F10xxx High-density)
- RAM        : 64KiB  (512b reserved by bootloader)
- Flash      : 512KiB (size first sector: 2x2048)
- Option RAM : 16b
- System RAM : 2KiB
Write to memory
Erasing memory
Wrote address 0x08040000 (100.00%) Done.

I then disconnected the B0 from VCC, powered off the device and on again.
I got an Invalid License screen:
image
Even inputting the number I recorder earlier, it didn't work. Anyway, you can press the top keys to move to the next steps.
Once the main application is loaded. I noticed something strange: The 2 channels (CHA, CHB) are not displaying. Not sure how to solve that.
image

The other issue is that, when booting pressing F1, the DFU disk is not being mounted anymore. The logs shows the message below:

106093.808621] usb 1-3: new full-speed USB device number 61 using xhci_hcd
[106093.957735] usb 1-3: New USB device found, idVendor=0483, idProduct=5720, bcdDevice= 2.00
[106093.957738] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[106093.957740] usb 1-3: Product: STM32 Mass Storage
[106093.957743] usb 1-3: Manufacturer: STMicroelectronics
[106093.957744] usb 1-3: SerialNumber: 6ÿÛMW60 cQ
[106093.958882] usb-storage 1-3:1.0: USB Mass Storage device detected
[106093.959063] scsi host2: usb-storage 1-3:1.0
[106094.973067] scsi 2:0:0:0: Direct-Access     Mini_DSO Flash Disk            PQ: 0 ANSI: 2
[106094.973316] sd 2:0:0:0: Attached scsi generic sg1 type 0
[106094.973576] sd 2:0:0:0: [sdb] 4096 512-byte logical blocks: (2.10 MB/2.00 MiB)
[106094.973720] sd 2:0:0:0: [sdb] Write Protect is off
[106094.973724] sd 2:0:0:0: [sdb] Mode Sense: 03 00 00 00
[106094.973865] sd 2:0:0:0: [sdb] No Caching mode page found
[106094.973869] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[106095.045694] sd 2:0:0:0: [sdb] Attached SCSI removable disk
[106095.988819] sd 2:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[106095.988823] sd 2:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 0d 58 00 00 08 00
[106095.988827] blk_update_request: I/O error, dev sdb, sector 3416 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
[106095.988832] usb 1-3: USB disconnect, device number 61
[106095.988895] blk_update_request: I/O error, dev sdb, sector 3416 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[106095.988898] Buffer I/O error on dev sdb, logical block 427, async page read
[106096.888682] usb 1-3: new full-speed USB device number 62 using xhci_hcd
[106097.037671] usb 1-3: New USB device found, idVendor=0483, idProduct=5720, bcdDevice= 2.00
[106097.037673] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[106097.037674] usb 1-3: Product: STM32 Mass Storage
[106097.037675] usb 1-3: Manufacturer: STMicroelectronics
[106097.037676] usb 1-3: SerialNumber: 6ÿÛMW60 cQ
[106097.038736] usb-storage 1-3:1.0: USB Mass Storage device detected
[106097.038840] scsi host2: usb-storage 1-3:1.0
[106098.045137] scsi 2:0:0:0: Direct-Access     Vertual  DFU Disk              PQ: 0 ANSI: 2
[106098.045408] sd 2:0:0:0: Attached scsi generic sg1 type 0
[106098.046502] sd 2:0:0:0: [sdb] 1024 512-byte logical blocks: (524 kB/512 KiB)
[106098.046644] sd 2:0:0:0: [sdb] Write Protect is off
[106098.046647] sd 2:0:0:0: [sdb] Mode Sense: 03 00 00 00
[106098.046789] sd 2:0:0:0: [sdb] No Caching mode page found
[106098.046793] sd 2:0:0:0: [sdb] Assuming drive cache: write through
[106098.088458] sd 2:0:0:0: [sdb] Attached SCSI removable disk

To summarize: The device now boots up, but it seems it's not working as intended still.
I'm looking for any advice on how to proceed from here.
Thanks a lot.

@gabonator
Copy link
Owner

@Sergio- During powerup, what does it say about FPGA configuration? When you connect CH1 to signal generator, does it show any signal?

If you are using FW from jpa, he made there a little hack that skips license verification, with original fw it wouldn't let you go further.

If you are having problems with DFU drive, you can try uploading new firmwares (HEX files) through this utility https://github.com/gabonator/LA104/tree/master/tools/dfuload

It seems you just need to find the right fw for your device. Or maybe just fpga image. Maybe we could ask guys here for a help: Anyone here with working DS203 V2.82 8MB and willing to share its flash dump with us?

@Sergio-
Copy link

Sergio- commented Dec 18, 2020

@Sergio- During powerup, what does it say about FPGA configuration? When you connect CH1 to signal generator, does it show any signal?

If you are using FW from jpa, he made there a little hack that skips license verification, with original fw it wouldn't let you go further.

If you are having problems with DFU drive, you can try uploading new firmwares (HEX files) through this utility https://github.com/gabonator/LA104/tree/master/tools/dfuload

It seems you just need to find the right fw for your device. Or maybe just fpga image. Maybe we could ask guys here for a help: Anyone here with working DS203 V2.82 8MB and willing to share its flash dump with us?

Hi @gabonator Thanks for the reply!
1 - No it doesn't show any FPGA error now. It jumps directly to that license screen where it shows 0000000.I even recorded it in slow motion to make sure I'm losing any quick message. It jumps directly to the license screen.
2 - Connecting CHA or CHB to a generator doesn't show up anything, changing the channel parameters have not effect.
3 - FW from jpa? I'm loaded via USART the one that one you here on the repository (dso_quad_bootloader_flash_modified.bin) is there any other one that I should consider? I found this repository (http://jpa.kapsi.fi/dsoquad/) but, as I don't have the DFU disk mounting anymore, I don't know how I can load these...
4 - I tried the dfuload method. It seems to work sometimes, but I'm not 100% sure as I cannot read the output file response (ERR, RDY, etc). I tried loading a couple of files, event a FPGA firmware available on the repository here (https://github.com/gabonator/LA104/tree/master/tools/fpga/ds203_8mb_hwV272-V261FPGA), but, still not luck. Devices boots up on the license screen, i press f1 twice to skip it, it load the oscilloscope app, but CHA and CHB doesn't show up. DFU disk is also not mounted when boot holding F1.

@gabonator
Copy link
Owner

@Sergio-
then it explains everything - the dso_quad_bootloader_flash_modified.bin is from jpa (http://jpa.kapsi.fi/dsoquad/) and the "modified" means, he skipped the license verification. The problem is, this flash dump is for 2MB device. So that is probably the reason why you are unable to mount it. Just continue try to find proper fw, and if you won't find anything, I will try to ask the guys at miniware if they can help. But I am not giving much hope they will be able to help us

@Quas7
Copy link

Quas7 commented Dec 23, 2020

not sure, if this is worth anything but seems related and maybe it gets you a tiny bit closer: #26
You would have do adapt the command a bit for the 8MB, I guess.

@gabonator
Copy link
Owner

gabonator commented Dec 23, 2020

I am using this command to format LA104 fs, and the DS203 8MB has the same sector size, so maybe it will help:

sudo newfs_msdos -F 12 -v la104 -O "MSDOS5.0" -S 4096 /dev/disk2

-F 12 (fat12)
-v la104 (volume label)
-O "MSDOS5.0" (oem name, otherwise it will use BSD, but the device does not care anyway)
-S 4096 (sector size)

edit: @Quas7 shows in his post how to format on ubuntu if newfs_msdos is not available, so just ignore my message

@Sergio-
Copy link

Sergio- commented Dec 23, 2020

Hi Folks. Thanks for the suggestions.

The command below did the trick on my Linux machine:
sudo mkfs.msdos -s 1 -n DSO203 -f 2 -v -F 12 -S 4096 -r 512 -I /dev/sdb

I believe with that all the functions are back to normal. I didn't start using the device, but I believe it should be fine.

Thanks a lot @MotoMaxis @gabonator @Quas7 for the effort in helping restoring the device. I believe this thread now contains a good knowledge to help others with similar issues. :-)

@gabonator Back to the original theme of this thread... Is there a way to install your version on the v2.82 Hardware? Is there any information I can extract from my device that can help you with that?

Thanks a lot.

@MotoMaxis
Copy link
Contributor

MotoMaxis commented Dec 23, 2020

@sergio, Finally words of success. I am glad to have been able to participate.

@gabonator I am also interested in beta testing your firmware on my DS203 HW2.83 8MB flash.

The DFU V3.46C stores the License code of a device at 0xFC to 0xFF in reverse (Little Endian) format. You can use a hex editor to enter your own code. A stock DFU has FFFFFFFF in said location. As far as I know, the only known way to flash DFU is by UART.

WARNING
If you decide to flash a stock or another device's full dump bin, you will lose your License code. As mentioned above the code is part of DFU.
Sergio's example DFU = 3.46C ser: 8726B9A3 lic: 7A9457A7
Screenshot_3

@MotoMaxis
Copy link
Contributor

MotoMaxis commented Dec 24, 2020

Hi Sergio and anyone else, could you test this Wildcat V6.5 modified firmware on a 2.81 or 2.82 device?

Make sure there are no CONF00x.CFG files on 8MB drive. We are testing new file creation.
Then try to Save CFG (press&hold button 3) then choose 001 to 009 (left wheel) and press button 3, do you get OK now?

WC6.5testapp1.zip

Thank you.

@Sergio-
Copy link

Sergio- commented Dec 24, 2020

Hi @MotoMaxis Yes. It worked.
I also must say that, the WildCat 6.5 you had prepared for me before, also worked after I formatted the disk with mkfs.msdos.
Have a nice day!

@MotoMaxis
Copy link
Contributor

MotoMaxis commented Dec 24, 2020

Actually the before version only works for default 000.cfg. But fails for others unless conf001.cfg to 009 already exist. The test version has a minor update to automatically create new files for 001 to 009.

Edit:
I also found another bug. If you try to Load CFG with the filemager with no .cfg files, it will show None but still lets you load it. Then if go to Save CFG instead of CONF you see weird characters.

Uploaded both fixes to https://github.com/MotoMaxis/DS203-DSOQuad as well as compiled hex.

@MotoMaxis
Copy link
Contributor

Also trying to run webosc on my DS203 hw2.83 8mb.

Windows 7 can't find the driver.
Screenshot_4

@gabonator
Copy link
Owner

@MotoMaxis it is mentioned in the project readme: https://github.com/gabonator/LA104/blob/master/system/apps_featured/69_webusbosc/readme.md

On windows machine you will need to generate "winusb" driver. And this tool does it for you: https://zadig.akeo.ie/

@Sergio-
Copy link

Sergio- commented Dec 25, 2020

Uploaded both fixes to https://github.com/MotoMaxis/DS203-DSOQuad as well as compiled hex.

@MotoMaxis What's the link to the compiled Hex files?

@MotoMaxis
Copy link
Contributor

MotoMaxis commented Dec 25, 2020

@gabonator

Thank you for the tip.

While testing yesterday I noticed one issue. After flashing the system_ds203hd.hex and trying all the elf files I flashed back the Wildcat6.5 expecting it to work but it was stuck on FPGA error. Flashing the FPGA fixed the error. So it seems it got corrupted somehow. The area in question is 0805C800 - FPGA - 0807D7FF. You main app loads to 0800C000 - 08012740.

@sergio
Im 6.5 folder https://github.com/MotoMaxis/DS203-DSOQuad/blob/master/WildcatV6.5/app1.hex
or
WC6.5_122420_app1.zip

@gabonator
Copy link
Owner

@MotoMaxis
Interesting, here is a list of used ram/rom range for each app and I cannot find any that would overlap the fpga code:

100i2ct.elf   ram: 20004800-20004928   1K, rom: 0801ed00-0801f6bc   3K, entry: 0801ed00 
101radio.elf  ram: 20004800-20004bc8   1K, rom: 0801ed00-0801f669   3K, entry: 0801ed00 
102oled.elf   ram: 20004800-20006f64  10K, rom: 0801ed00-08020dd4   9K, entry: 0801ed00 
103servo.elf  ram: 20004800-20005adc   5K, rom: 0801ed00-08023510  19K, entry: 0801ed00 
104avris.elf  ram: 20004800-200055b8   4K, rom: 08064300-08066dd0  11K, entry: 08064300 
105avrfl.elf  ram: 20005000-20006470   6K, rom: 08020400-08022b90  10K, entry: 08020400 
106mpr12.elf  ram: 20004800-20004938   1K, rom: 0801ed00-0801f694   3K, entry: 0801ed00 
107schem.elf  ram: 20004800-20005024   3K, rom: 0801ed00-08021490  10K, entry: 0801ed00 
108si11.elf   ram: 20004800-20004930   1K, rom: 0801ed00-0801fe78   5K, entry: 0801ed00 
10i2c.elf     ram: 20005000-20005508   2K, rom: 08018000-0801b604  14K, entry: 08018000 
11i2c.elf     ram: 20005088-200050c0   1K, rom: 08018000-08018ce4   4K, entry: 08018000 
12uart.elf    ram: 20005088-200050b8   1K, rom: 08018000-08018238   1K, entry: 08018000 
13mp3.elf     ram: 20005000-20005450   2K, rom: 08020000-08022810  11K, entry: 08020000 
14apds1.elf   ram: 200050a0-20005198   1K, rom: 08018000-08019490   6K, entry: 08018000 
14apds2.elf   ram: 200050a0-20005194   1K, rom: 08018000-08019474   6K, entry: 08018000 
15chards.elf  ram: 20007000-200071c4   1K, rom: 08020000-08020f84   4K, entry: 08020000 
15charla.elf  ram: 20007000-200071c4   1K, rom: 08020000-08020f84   4K, entry: 08020000 
16cc1101.elf  ram: 20004088-200040b8   1K, rom: 08020000-0802197c   7K, entry: 08020000 
17analys.elf  ram: 20002700-20007d38  22K, rom: 08040000-08048588  34K, entry: 08040000 
18onew.elf    ram: 20006090-2000613c   1K, rom: 0801a000-0801bafc   7K, entry: 0801a000 
19rtc.elf     ram: 20006000-20006140   1K, rom: 0801a000-0801baf8   7K, entry: 0801a000 
1noimp.elf    ram: 20004000-20004000   0K, rom: 08020000-08020134   1K, entry: 08020000 
20uplay.elf   ram: 20004088-200040c0   1K, rom: 08020000-0802063c   2K, entry: 08020000 
21mplay2.elf  ram: 20005000-20006144   5K, rom: 08020000-080224f8  10K, entry: 08020000 
21mplayd.elf  ram: 20005000-20006144   5K, rom: 08020000-08022508  10K, entry: 08020000 
21mplayl.elf  ram: 20005000-2000614c   5K, rom: 08020000-08022518  10K, entry: 08020000 
22seqen.elf   ram: 20005000-200054cc   2K, rom: 08020000-080226a8  10K, entry: 08020000 
23screen.elf  ram: 20009f8c-20009fd0   1K, rom: 0802f000-0802f62c   2K, entry: 0802f000 
24ncdc.elf    ram: 2000a000-2000aa18   3K, rom: 08020000-08020b00   3K, entry: 08020000 
25hid.elf     ram: 20005000-20005330   1K, rom: 08020000-08020c50   4K, entry: 08020000 
26midi.elf    ram: 20005000-200054ec   2K, rom: 08020000-08020e3c   4K, entry: 08020000 
27irsend.elf  ram: 20005000-20005194   1K, rom: 08020000-08021a98   7K, entry: 08020000 
28shell.elf   ram: 20004800-20007908  13K, rom: 0801f000-08022bfc  15K, entry: 0801f000 
29fileman_ds203.elf ram: 20005200-20005c8c   3K, rom: 08019000-0801af90   8K, entry: 08019000 
29fileman_ds213.elf ram: 20004800-2000528c   3K, rom: 08013e00-08015e30   9K, entry: 08013e00 
29fileman_la104.elf ram: 20004800-2000528c   3K, rom: 08013e00-08015e30   9K, entry: 08013e00 
2import.elf   ram: 20006088-200060a0   1K, rom: 08020000-080201ec   1K, entry: 08020000 
30dcf77.elf   ram: 20004800-20004a44   1K, rom: 08014000-080156a0   6K, entry: 08014000 
31testg.elf   ram: 20009f90-20009fbc   1K, rom: 0802f000-0802f234   1K, entry: 0802f000 
32graph.elf   ram: 20007000-20007988   3K, rom: 08020000-08023f00  16K, entry: 08020000 
32sump.elf    ram: 20005000-200066b0   6K, rom: 08020000-08020ee0   4K, entry: 08020000 
33temper.elf  ram: 20005000-200070f4   9K, rom: 08020200-080230a8  12K, entry: 08020200 
34scope.elf   ram: 20007000-20008058   5K, rom: 08020000-08021c28   8K, entry: 08020000 
35view13.elf  ram: 20004888-200058d0   5K, rom: 08040000-08041438   6K, entry: 08040000 
35viewds.elf  ram: 20004888-20004ad0   1K, rom: 08040000-08041438   6K, entry: 08040000 
35viewla.elf  ram: 20004888-200058d0   5K, rom: 08040000-08041438   6K, entry: 08040000 
36espwww.elf  ram: 20004800-20004b30   1K, rom: 0801a000-0801bbb0   7K, entry: 0801a000 
37icscan.elf  ram: 20004888-20004960   1K, rom: 0801a000-0801acdc   4K, entry: 0801a000 
38oregon.elf  ram: 20004800-20004dac   2K, rom: 0801a000-0801b2fc   5K, entry: 0801a000 
39lcd.elf     ram: 20007088-2000709c   1K, rom: 08020000-080218bc   7K, entry: 08020000 
3gui.elf      ram: 20007088-200070a8   1K, rom: 08020000-080208dc   3K, entry: 08020000 
40anal.elf    ram: 20007000-200070c8   1K, rom: 08020000-08020204   1K, entry: 08020000 
41alche.elf   ram: 20004400-20005af4   6K, rom: 0801ee00-0802aabc  48K, entry: 0801ee00 
43dump.elf    ram: 20004888-200048ac   1K, rom: 0801a000-0801a50c   2K, entry: 0801a000 
44fault.elf   ram: 20004888-20004898   1K, rom: 0801a000-0801a1bc   1K, entry: 0801a000 
45simcom.elf  ram: 20004800-20004fbc   2K, rom: 0801ed00-08021780  11K, entry: 0801ed00 
46consol.elf  ram: 20004800-200048f8   1K, rom: 0801ee00-0801f254   2K, entry: 0801ee00 
48scroll.elf  ram: 20004800-20007ae8  13K, rom: 0801ee00-0801fbe4   4K, entry: 0801ee00 
49gpio.elf    ram: 20004800-20005094   3K, rom: 0801ed00-08023a74  20K, entry: 0801ed00 
4snake.elf    ram: 20007000-20007278   1K, rom: 08020000-080214a0   6K, entry: 08020000 
50mpr121.elf  ram: 20005000-2000512c   1K, rom: 08018000-08018c68   4K, entry: 08018000 
51osc.elf     ram: 20005000-20007914  11K, rom: 08020000-0802478c  18K, entry: 08020000 
52osc213.elf  ram: 20005000-20007904  11K, rom: 08020000-08024980  19K, entry: 08020000 
52uart.elf    ram: 20005000-200050e4   1K, rom: 08018000-08018708   2K, entry: 08018000 
53fpga1.elf   ram: 20004800-20004f54   2K, rom: ffffffff-00000000   1K, entry: 20004800 
54shell.elf   ram: 20005000-2000550c   2K, rom: 08014000-08016f00  12K, entry: 08014000 
55gosc.elf    ram: 20002b00-20008fac  26K, rom: 08013100-08023860  66K, entry: 08013100 
56ds1307.elf  ram: 20005000-20005108   1K, rom: 08018000-08018610   2K, entry: 08018000 
57ds3231.elf  ram: 20005000-20005108   1K, rom: 08018000-08018620   2K, entry: 08018000 
58gmin03.elf  ram: 20005000-2000a7a8  22K, rom: 08012c00-0801bf70  37K, entry: 08012c00 
58gmin13.elf  ram: 20002800-20007fa4  22K, rom: 08013100-0801c420  37K, entry: 08013100 
59memtst.elf  ram: 20005000-20006930   7K, rom: 08024000-0802525c   5K, entry: 08024000 
60gagen0.elf  ram: 20005000-20005f8c   4K, rom: 08017000-0801dc48  28K, entry: 08017000 
60gagen1.elf  ram: 20005000-20005f8c   4K, rom: 08017000-0801dc48  28K, entry: 08017000 
61devin.elf   ram: 20004800-200058ec   5K, rom: 0801ed00-0801fab4   4K, entry: 0801ed00 
62memvw.elf   ram: 20005000-200052f8   1K, rom: 0801c000-0801cebc   4K, entry: 0801c000 
63ws_104.elf  ram: 20004800-20005544   4K, rom: 08064000-080670d4  13K, entry: 08064000 
63ws_203.elf  ram: 20004800-20005548   4K, rom: 08064000-0806729c  13K, entry: 08064000 
63ws_213.elf  ram: 20004800-20005548   4K, rom: 08064000-0806729c  13K, entry: 08064000 
64remote.elf  ram: 20005000-200060b4   5K, rom: 08020000-08023459  14K, entry: 08020000 
66webusb.elf  ram: 20005000-200055f0   2K, rom: 08020000-08021648   6K, entry: 08020000 
67-6wusb.elf  ram: 20005000-200053dc   1K, rom: 08020000-080219e0   7K, entry: 08020000 
68webdrw.elf  ram: 20004800-20005510   4K, rom: 08064800-080675c8  12K, entry: 08064800 
69webos0.elf  ram: 20005200-20006c84   7K, rom: 08064100-08067c54  15K, entry: 08064100 
69webos1.elf  ram: 20005200-20006e44   8K, rom: 08064100-08067c80  15K, entry: 08064100 
70webana.elf  ram: 20004800-20005634   4K, rom: 08064800-080684bc  16K, entry: 08064800 
70wildca.elf  ram: 20004300-2000b998  30K, rom: 08040000-0805ad60 108K, entry: 08040000 
71strm.elf    ram: 20004800-2000591c   5K, rom: 0801ed00-08020cac   8K, entry: 0801ed00 
72uartm.elf   ram: 20004800-20004a68   1K, rom: 0801ed00-08020d70   9K, entry: 0801ed00 
73invt.elf    ram: 20004800-2000496c   1K, rom: 0801ed00-0801fd8c   5K, entry: 0801ed00 
74invt.elf    ram: 20004800-200050d0   3K, rom: 0801ee00-08022368  14K, entry: 0801ee00 
75invtem.elf  ram: 20004800-20004988   1K, rom: 0801ed00-08020154   6K, entry: 0801ed00 
76sender.elf  ram: 20004400-2000598c   6K, rom: 08014400-080187a4  17K, entry: 08014400 
77dma.elf     ram: 20004450-20004e44   3K, rom: 08014500-08014b90   2K, entry: 08014500 
78ugen.elf    ram: 200044d8-20004504   1K, rom: 08014500-08014700   1K, entry: 08014500 
79ccosc.elf   ram: 20005200-200072bc   9K, rom: 08064300-08069c50  23K, entry: 08064300 
7pwm.elf      ram: 20007088-200070bc   1K, rom: 08020000-08020bd0   3K, entry: 08020000 
80rftool.elf  ram: 20004800-20007b18  13K, rom: 08040300-08049bcc  39K, entry: 08040300 
81image.elf   ram: 20005000-20006a7c   7K, rom: 0801f000-08020b90   7K, entry: 0801f000 
82sanal.elf   ram: 20005000-20005948   3K, rom: 0801f400-08021488   9K, entry: 0801f400 
84maxdis.elf  ram: 20004800-20004908   1K, rom: 0801ed00-0801f398   2K, entry: 0801ed00 
85eetest.elf  ram: 20004800-20004b68   1K, rom: 0801ed00-08020a3c   8K, entry: 0801ed00 
86keyb.elf    ram: 20004800-20004aec   1K, rom: 0801ed00-0801f3b4   2K, entry: 0801ed00 
87mlx906.elf  ram: 20004800-2000491c   1K, rom: 0801ed00-08020214   6K, entry: 0801ed00 
88eink.elf    ram: 20004800-20004d20   2K, rom: 0801ed00-0802344c  18K, entry: 0801ed00 
89fancy.elf   ram: 20004800-2000729c  11K, rom: 0801ed00-0802133c  10K, entry: 0801ed00 
8ds.elf       ram: 20007088-200070bc   1K, rom: 08020000-08021050   5K, entry: 08020000 
90eink.elf    ram: 20004800-20005d18   6K, rom: 08040300-08042e44  11K, entry: 08040300 
91mfrc.elf    ram: 20004800-20004910   1K, rom: 0801ed00-0801f2b4   2K, entry: 0801ed00 
92bmp180.elf  ram: 20004800-20004d68   2K, rom: 0801ed00-08021ce8  12K, entry: 0801ed00 
93mfrc.elf    ram: 20004800-20006518   8K, rom: 0801f000-080242a4  21K, entry: 0801f000 
95sht20.elf   ram: 20004800-2000491c   1K, rom: 0801ef00-0801ffe0   5K, entry: 0801ef00 
96tm1637.elf  ram: 20004800-20004908   1K, rom: 0801ef00-0801fa70   3K, entry: 0801ef00 
97backl.elf   ram: 20004800-200049fc   1K, rom: 0801ef00-0801f45c   2K, entry: 0801ef00 
99cube03.elf  ram: 20005000-20007548  10K, rom: 08020200-08022580   9K, entry: 08020200 
99cube04.elf  ram: 20005000-20007548  10K, rom: 08020200-08022580   9K, entry: 08020200 
99cube13.elf  ram: 20005000-20007548  10K, rom: 08020200-08022580   9K, entry: 08020200 
9dht.elf      ram: 20007088-200070bc   1K, rom: 08020000-08020cc4   4K, entry: 08020000 

@MotoMaxis
Copy link
Contributor

MotoMaxis commented Dec 26, 2020

@gabonator

What about these? They fit in 0805C800 - FPGA - 0807D7FF 135K

104avris.elf  ram: 20004800-200055b8   4K, rom: 08064300-08066dd0  11K, entry: 08064300 
63ws_104.elf  ram: 20004800-20005544   4K, rom: 08064000-080670d4  13K, entry: 08064000 
63ws_203.elf  ram: 20004800-20005548   4K, rom: 08064000-0806729c  13K, entry: 08064000 
63ws_213.elf  ram: 20004800-20005548   4K, rom: 08064000-0806729c  13K, entry: 08064000 
68webdrw.elf  ram: 20004800-20005510   4K, rom: 08064800-080675c8  12K, entry: 08064800 
69webos0.elf  ram: 20005200-20006c84   7K, rom: 08064100-08067c54  15K, entry: 08064100 
69webos1.elf  ram: 20005200-20006e44   8K, rom: 08064100-08067c80  15K, entry: 08064100 
70webana.elf  ram: 20004800-20005634   4K, rom: 08064800-080684bc  16K, entry: 08064800 
79ccosc.elf   ram: 20005200-200072bc   9K, rom: 08064300-08069c50  23K, entry: 08064300 

Only DS203 Hardware Ver 2.81 and 2.82 8MB flash
08000000 - DFU 16K
08004000 - SYS 32K
0800C000 - APP 349K
0805C800 - FPGA 135K
0807D800 - LOGO 10K

Perhaps these elfs can be moved to
Available space that starts at 08080000.

@gabonator
Copy link
Owner

Aaah, I see now. I put wrong addresses in the script which checks the collision. Yes, they can be moved. Or in better, I will make separate builds for ds213 hd, sice at those addresses it was tested on ds203/ds213.
In the flashing code I have some strange bug which sometimes fails. And the only thing I can do is moving a little bit the ROM code in the linker script - that's the reason why is every app at different memory location.

@MotoMaxis
Copy link
Contributor

Sorry, I was wrong in saying that available space starts at 08080000. That is actually the end of the eeprom on a 512KB chip.

We can possibly use 1.9KB after the LOGO at 0807F880 to 0807FFF . About 11.7KB after SYS at 08009190 to 0800BFFF. And all of 329.7KB of APP space from 0800C000 to 0805C7FF. As far as I know, thats it.

Happy New Year everyone.

@MotoMaxis
Copy link
Contributor

MotoMaxis commented Jan 1, 2021

So I've relocated WebOsc to 08023000 to not corrupt the FPGA at 0805C800 on DS203 2.82 8MB. Now flashing back WC6.5 works.

Anyways, after opening the site, it shows DS203 paired but stuck saying Connecting... Now not sure whats wrong.

If anyone want to try, DFU copy the system. Restart normally nd copy 2 elf files. Restart the run webosc. Fyi, I had to format 8MB before files showed up.
ds203hd8mb.zip

@gabonator
Copy link
Owner

Happy New Year everyone! I hope all of you and your families are safe and healthy.

@MotoMaxis, what does chrome say in the debug console? When you try to connect (through the webosc html interface), does it show the DS203 in list of available devices? I dont know if it is the same in windows, but the firmware just uses a regular CDC (serial link) usb. So you can open the port as serial port and then communicate with it. And you can easily verify if it is communicating by sending

"OSC::Ready();\n"

and it should reply

"{ret:0}"

Do you have memory layouts also for other DSxxx devices? I would like to put together this information from each device to improve the app placement. Ideal case would be achieved when no application would be overlapping any other, so you can switch between them even without flashing the eeprom.

@MotoMaxis
Copy link
Contributor

MotoMaxis commented Jan 2, 2021

Happy New 2021 Year everyone.

@gabonator, Thank you for the tip. Originally I installed WebUSB driver using zadig-2.5.exe but now installed CDCSerial and see Com34 in device manager. I no longer get the popup when plugging in the DSO.
Screenshot_6

Here is what chrome says.
Screenshot_7

So next I used HyperTerminal to connect to that port. As soon as I press a key, it Hard Faults. Happens with stock and relocated webosc.
Screenshot_8

I do not have info about other devices. But do own DS201, DS202 and DS203.

Thank you for your hard work.

Update:
Some info from disassembler. Here is Unstripped elf.
weboscunstripped.zip

I don't understand why failing at 080233A8. A Push command. Maybe stack overflow?
Screenshot_10

Segmentation from elf
Screenshot_11

@gabonator
Copy link
Owner

GetRpcAddress is called when a line was received over serial link (line ended with \n). After typing a single letter, it should not call this function. I looked at the disassembly and got different one. Mine says 080233A8 is in _ZN4BIOS3LOW8SetParamEii after relocating ROM begin to 0x08023000 (compiling with gcc-arm-none-eabi-9-2020-q2-update on osx)

In the build folder, there is also assembly listing file, just for such cases when we need to trace the error. It could be caused by stack size. Hard to tell, you can try changing the stack size here, if it helps:

system/os_host/app_ds203.ld:

/* Define memory regions. */
MEMORY
{
  rom (rx) : ORIGIN = 0x0800C000, LENGTH = 32K
  ram (rwx) : ORIGIN = 0x20003000, LENGTH = 34K
}

_estack = ORIGIN(ram)+LENGTH(ram)-0x100;

Reading the documentation about HFSR/CFSR (https://www.keil.com/appnotes/files/apnt209.pdf), it says this:
image

@MotoMaxis
Copy link
Contributor

MotoMaxis commented Jan 4, 2021

I came across a nice small FLDump utility by bobtidey that lets you make a full image dump of your DSO. I modified it to dump 512KB instead of 256KB. You simply copy FL_DUMP4.HEX or (FL_DUMP4.ADR then FL_DUMP4.BIN) to device.

Reboot with Button 4 pressed. When it's done you should see FLASH.BIN on the drive.

credits: bobtidey
FlDumpHD.zip

@szmolnar
Copy link

szmolnar commented Feb 7, 2021

Hi!

Have you got this fw running on DS203 2.82 hw?
Me too I was facing the same issue, whatever I did I'm just getting missing shell.elf, so I went back to MotoMaxis fw, which runs ok.

In spite the fact that I could not use our fw. I'm still interested in an potion how I could use it on my device. I need a solution to be able to make long time aquisitions, and I hope taht I will be able to do that with your fw or at least that It I will be able to write an app to to that.

Another question would be if it is possible to run four fw. in slot 3 or 4?
Slots 3,4 are open in w6.5, so theoretically I could be possible to run both fw. on this device.

Thanks!

@MotoMaxis
Copy link
Contributor

MotoMaxis commented Feb 7, 2021

Hi,

I was not able to make webosc.elf to work on DS203 2.82 hw. Always get HARDFAULT. I tried moving it to different area but it didn't help. We are waiting for gabonator to look into it.

On a side note, Wildcat fw has the Chart mode with extended time base of 100mS/div to 10min/div and the ability to Auto save to .csv until memory full. Check out -CHART MODE: in https://github.com/MotoMaxis/DS203-DSOQuad/blob/master/WildcatV6.5/User%20Guide%20V5.6-6.5.pdf

I am not sure if we can squeeze both firmwares on same device. It will require recompiling Wildcat to shift it to unused areas. But gabonator is one to know the answer.

@szmolnar
Copy link

szmolnar commented Feb 7, 2021

On a side note, Wildcat fw has the Chart mode with extended time base of 100mS/div to 10min/div and the ability to Auto save to .csv until memory full. Check out -CHART MODE: in https://github.com/MotoMaxis/DS203-DSOQuad/blob/master/WildcatV6.5/User%20Guide%20V5.6-6.5.pdf

Oh, thanks for that!
I totally missed that somehow. What is the longest period we can capture in practice?

@MotoMaxis
Copy link
Contributor

MotoMaxis commented Feb 7, 2021

On screen with meters off we see 13 divisions so that's 130 minutes. But if you enable auto log to .csv files then its until the flash drive becomes full.

I think its over 6 full days on a 8MB device. Each file has 4094 samples that are about 100KB in size.

@szmolnar
Copy link

szmolnar commented Feb 8, 2021 via email

@MotoMaxis
Copy link
Contributor

MotoMaxis commented Feb 8, 2021

Oh 24 hours is easy to do.
It will depend on how fast you tell it to acquire a reading. The fastest time in Chart mode is 100ms/div and slowest is 10min/div which is a range of 13sec to about 20 hours to fill in the buffer. This will use up about 100KB of space. So I think you could max our in 20 minutes with fastest speed to something like 60 days with slowest speed. .

Chart mode works only in Full size buffer mode orange with scrolling rectangle at the bottom. . Which is 13 divisions times about 10 screens. That's about 4094 samples I think.

@szmolnar
Copy link

szmolnar commented Feb 8, 2021 via email

@MotoMaxis
Copy link
Contributor

Once the screen fills up it will start scrolling through 10 more screens then loop back to the beginning. .

Repository owner locked and limited conversation to collaborators Feb 8, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants