Setting up development environment for DSO QUAD

Moderators: lily.li, violet, jeremy882, crail.lyu969

Post Reply
drpadawan
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Fri Nov 30, 2018 12:23 pm

Setting up development environment for DSO QUAD

Post by drpadawan » Fri Nov 30, 2018 12:31 pm

I have some little background in MCU programming, but I'm not a great expert at it. I can build the firmware from sources using GCC. But if I decide to change it, what are the debugging techniques?

1) In the best case, I would expect to have a visual IDE with debugger. But that requires physical debugging interface, such as SWD/JTAG. How can I get started with this? So far I have some experience with STM evaluation boards, they have done the hardware job.

2) I may need dozens of Update/run/debug cyles. That will tear down the flash memory. Can I boot from UART? (Well, I'm sure the bootloader does not support this). Is there a bootloader source available? I have only 1.60 version, but my device is at 1.64.

3) Maybe I can tweak the bootloader and run my custom binaries from RAM disk. But I need to be sure that I do not interfere with the main software. I need to read more about the "Slots" architecture, what lies behind it. As I see, most popular custom firmwares do work with slots. PAWN interpreter probably not enough for my plans - as I want to implement a usb protocol for remote control via bluetooth dongle.

Maybe I won't need a usb protocol. I can start with existent mass storage protocol and just use an android smartphone via usb OTG. I saw that gabonator is adopting this approach.

I know the USB protocol is coded inside BIOS, so if I modify BIOS, that will change its layout in memory and therefore all other firmwares will become uncompatible with my BIOS version.

4) Maybe I can take custom firmware code to my STM evaluation board. There I can have my own bootloader and implement stubs for interface peripheral calls, this will allow me to debug the firmware up to some extent.

I'm just looking for some guide, but I doubt it exists. Can anyone share the experience?

Thanks

motopasscode
Kindergarten
Kindergarten
Posts: 85
Joined: Tue Mar 27, 2012 3:44 am

Re: Setting up development environment for DSO QUAD

Post by motopasscode » Sat Dec 01, 2018 4:05 pm

Sorry I can't offer much help but I would love to see your progress. I think you will have to flash every time and then debug.

Here is something I found on DSO Nano

http://wiki.seeedstudio.com/DSO_Nano-OpenOCD_gdb/

http://wiki.seeedstudio.com/DSO_Nano-Qemu_gdb/

drpadawan
Pre-kindergarten
Pre-kindergarten
Posts: 2
Joined: Fri Nov 30, 2018 12:23 pm

Re: Setting up development environment for DSO QUAD

Post by drpadawan » Sun Dec 02, 2018 12:56 pm

Thanks.

I found most recent resources for 2.81 hardware from http://www.minidso.com/forum.php?mod=vi ... 666&page=1
I have not found FPGA source code, but I'm not going to need this. The latest wildcat 6.5 firmware is built on the same set of sources:

- That includes SYS v1.64 (bios)
- Fpga v2.81 (wildcat's firmware has the source with a patch)
- Schematics v2.81

I'm still missing the bootloader source (aka DFU). So far I only found a thread viewtopic.php?f=26&t=2519&start=20 where they access the internal STM eeprom to dump the bootloader to hex. As I understand, it's based on STM dfu, but has additional routines to start FPGA. It's not opensourced, rewriting this part would be obviously difficult. I hope I won't need that anyways. Famous QuadPawn interpreter can reinitialize FPGA without the help of bootloader (http://essentialscrap.com/dsoquad/usb.html) and its sources available.

My hardware version is 2.82 and it works with wildcat's firmware that was written for v2.81. On minidso forums they tell 2.82 has only minor changes in board layout, so it's not different in other aspects.

I uploaded opensource "Black Magic Probe" debugger into cheap Bluepill stm board. To my knowledge it's the best opensource debugger, as it runs gdb server on STM. There's a lot of tutorials, I started with this one https://satoshinm.github.io/blog/171223 ... libopencm3

Now I'm looking how to connect to the dso. It seems that the SWJ-DP debug port is accessible, but from the dso schematics it's not completely clear how it is organized.
Last edited by drpadawan on Sun Dec 02, 2018 3:30 pm, edited 1 time in total.

motopasscode
Kindergarten
Kindergarten
Posts: 85
Joined: Tue Mar 27, 2012 3:44 am

Re: Setting up development environment for DSO QUAD

Post by motopasscode » Sun Dec 02, 2018 3:19 pm

Looks like you are making good progress!

I also have DS203 hw 2.82 with DFU v3.46C running Wildcat 6.5 from https://github.com/MotoMaxis/DS203-DSOQuad

I have never seen any source code of any DFU, its private in my opinion. But there is DFU v3.45C hex can be found inside dso_hw281_dfu_pack.rar at http://www.minidso.com/forum.php?mod=vi ... a=page%3D1 And it looks like they provided a complete eeprom with D3.46C S1.64 A1.13 http://www.minidso.com/forum.php?mod=vi ... 202&page=1 which I uploaded here https://www72.zippyshare.com/v/CKdgLW8w/file.html

P.S. I have been wishing to update Wildcat 6.5 so that when in HOLD mode, changing v/div and t/div updates the waveform on the screen so I can zoom in/out.

Post Reply