Author Topic: Rigol DS10xxZ firmware re-write  (Read 51338 times)

0 Members and 1 Guest are viewing this topic.

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 261
  • Country: england
Re: Rigol DS10xxZ firmware re-write
« Reply #100 on: June 16, 2017, 10:45:01 am »

Question: Is it necessary to reprogram the FPGA in the initial phase? Can't you leave the FPGA as-is and just work on the main firmware?
I was thinking that I might output a square wave on each FPGA output to help me trace the wiring - since I cannot get to BGA pins.

Where is the main firmware stored?   ...  and what device is firmware run on please?

Many thanks for the help with my understanding, which is improving steadily.

By the way.....   I have no illusions of writing new scope software - I am simply learning, experimenting and having fun. Sorry to disappoint  ;)
« Last Edit: June 16, 2017, 10:52:41 am by hexreader »
 

Offline Rerouter

  • Super Contributor
  • ***
  • Posts: 4694
  • Country: au
  • Question Everything... Except This Statement
Re: Rigol DS10xxZ firmware re-write
« Reply #101 on: June 16, 2017, 02:04:19 pm »
Out of curiosity, could you not toggle the pins through a normal jtag boundary scan? rather than trying to re flash it? it would only need to be 2-3Hz
 

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 261
  • Country: england
Re: Rigol DS10xxZ firmware re-write
« Reply #102 on: June 16, 2017, 05:22:15 pm »
Out of curiosity, could you not toggle the pins through a normal jtag boundary scan? rather than trying to re flash it? it would only need to be 2-3Hz
No idea.....

Seems you know far more than I do  :)

Tell me what to do and I will give it a go...

I am just a hobby programmer with a lot of enthusiasm and spare time, but limited knowledge and skill.

Where is the main firmware stored?   ...  and what device is firmware run on please?     .... many thanks, hexreader
« Last Edit: June 16, 2017, 05:46:35 pm by hexreader »
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16628
  • Country: 00
Re: Rigol DS10xxZ firmware re-write
« Reply #103 on: June 16, 2017, 06:43:14 pm »
You could start by watching this:


 
The following users thanked this post: hexreader

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 261
  • Country: england
Re: Rigol DS10xxZ firmware re-write
« Reply #104 on: June 16, 2017, 06:50:54 pm »
Got it - thanks

Looks like there is another dev board to buy and a tool-chain to download.

This is a seriously big task :(
« Last Edit: June 16, 2017, 06:53:11 pm by hexreader »
 

Offline dorin

  • Contributor
  • Posts: 39
  • Country: ro
Re: Rigol DS10xxZ firmware re-write
« Reply #105 on: June 17, 2017, 09:10:21 am »
First of all, I'd like to applaud this initiative, as any ambitious open source project.  :-+
Now, I don't know if someone mentioned this already but before embarking on such a bold journey I think it's good to understand all its aspects such as to prevent bitter disappointment.

Designing good software for an oscilloscope is more complex than designing good hardware. Listen to Siglent CEO answer to Dave's question at 03:23 :
https://youtu.be/v9M397sUkEA?t=3m23s
« Last Edit: June 17, 2017, 09:11:55 am by dorin »
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13726
  • Country: gb
    • Mike's Electric Stuff
Re: Rigol DS10xxZ firmware re-write
« Reply #106 on: June 17, 2017, 09:23:11 am »
Out of curiosity, could you not toggle the pins through a normal jtag boundary scan? rather than trying to re flash it? it would only need to be 2-3Hz
FPGA code is held externally, so you can load a new bitstream over JTAG for reversing which only lasts until power cycle
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline hexreader

  • Frequent Contributor
  • **
  • Posts: 261
  • Country: england
Re: Rigol DS10xxZ firmware re-write
« Reply #107 on: June 17, 2017, 10:14:06 am »
FPGA code is held externally, so you can load a new bitstream over JTAG for reversing which only lasts until power cycle
Thanks, that works great on dev board, so presumably it will work just as well on scope.

I think I will wait until I have a SPI flash image before trying it though - just to be doubly sure.

Progress is slow, but headed the right way....
 

Online mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13726
  • Country: gb
    • Mike's Electric Stuff
Re: Rigol DS10xxZ firmware re-write
« Reply #108 on: June 17, 2017, 10:23:32 am »
FPGA code is held externally, so you can load a new bitstream over JTAG for reversing which only lasts until power cycle
Thanks, that works great on dev board, so presumably it will work just as well on scope.

I think I will wait until I have a SPI flash image before trying it though - just to be doubly sure.

Progress is slow, but headed the right way....
Doing an SRAM download won't affect anything
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline theorbtwo

  • Newbie
  • Posts: 2
  • Country: gb
Re: Rigol DS10xxZ firmware re-write
« Reply #109 on: July 26, 2017, 12:55:38 pm »
Hello, folks!
I've recently got a ds1054z, and have been poking in the firmware in IDA, and researching what tidbits of useful information have been posted already.  My file full of random notes can be seen at https://github.com/theorbtwo/rigol-ds1000z-stuff/blob/master/info.  A dump of the SCPI command table, along with a bit of code to expand out the tree and attempt to find the command in the documentation, is at https://github.com/theorbtwo/rigol-ds1000z-stuff/blob/master/commands.pl, and finally the output of that script is at https://github.com/theorbtwo/rigol-ds1000z-stuff/blob/master/commands3.txt, along with a (very small) amount of notes from reverse-engineering the firmware inline.  Undocumented commands are marked with a leading "!".  Particularly intersting-looking ones include :vendor:configure (and ?), :system:udevice (and ?), :system:flash:write, :system:information?, :test:{progress,lower,upper,mode,operate}?, with non-? versions of mode and operate, :calibrate:output? and :calibrate:lfstart.

Pull requests for information I've missed *very* welcome.  Replies to this post with information I have missed are also welcome.  Information on how to share my work in IDA without putting myself out on a limb legally *very* welcome.  Ideas on what I should be looking for also welcome.
 
The following users thanked this post: hexreader

Offline ivi_yak

  • Regular Contributor
  • *
  • Posts: 76
  • Country: 00
Re: Rigol DS10xxZ firmware re-write
« Reply #110 on: July 27, 2017, 01:20:20 pm »
hi, i have bricked rigol ds1302 and i am want to test your firmware. How i can upload firmware to oscill ?
eevblog
 

Offline zl2wrw

  • Regular Contributor
  • *
  • Posts: 63
  • Country: nz
Re: Rigol DS10xxZ firmware re-write
« Reply #111 on: August 03, 2017, 10:01:28 am »
[SNIP] Information on how to share my work in IDA without putting myself out on a limb legally *very* welcome.  [SNIP]

I'll admit that I haven't used IDA (but I am aware of what it is and what it does).

I am not an IP lawyer, but what about distributing the delta between your commented, reverse engineered IDA file and a plain IDA file of the firmware that anyone can easily produce from their own 'scope?  ;)

That way you would not be distributing Rigol's copyrighted code, merely a file which contains your comments etc and (machine readable) information on where to insert it into a locally generated file which already contains Rigol's code. Persons using your diff would of course have to obtain their own dump of the same firmware version that you used.


Another approach (which works for people without IDA licenses) is to distribute a symbol table of memory addresses and what you think they are used for (variables, subroutines, interrupt handlers, etc), which someone can then use to understand locally produced disassembly of the copyrighted code (again, you do not distribute Rigol's code, just a list of what addresses do what).
 

Offline DC1MC

  • Super Contributor
  • ***
  • Posts: 1882
  • Country: de
Re: Rigol DS10xxZ firmware re-write
« Reply #112 on: February 04, 2018, 02:07:22 pm »
Hello everybody, I'm resurrecting this dead thread to ask for your help, I've got somehow a (semi)defective Rigol DS1104Z main board and I would like to reactivate it just for fun.
this being the most "low-level" thread that I could found, I want to ask for your help regarding the LCD connector (pinout) and eventually finding a compatible LCD, plus the same for the power-supply.
Also if there are some schematics and in the end if somebody has a bricked device and wants to part of front panel, power/supply and case, pleas ePM me.

 Thanks,
 DC1MC
 
 

Offline Datman

  • Regular Contributor
  • *
  • Posts: 108
  • Country: it
Re: Rigol DS10xxZ firmware re-write
« Reply #113 on: February 06, 2018, 09:47:46 pm »
This topic is about a new firmware. Please open a thread in Repair.
 
The following users thanked this post: tooki

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6177
  • Country: ro
Re: Rigol DS10xxZ firmware re-write
« Reply #114 on: April 08, 2018, 08:31:51 am »
Thank you all for sharing the work.

Here's a random dump of things that need to be done (and with an estimation of difficulty), non-exhaustive of course.

  • S: Figure out JTAG port to Xilinx FPGA pinout (Thank you, JJalling! https://www.eevblog.com/forum/projects/rigol-ds10xxz-firmware-re-write/msg1195497/#msg1195497)
  • S: document findings in more details (frontpanel, IO, ...) in a public wiki
  • S: find a better serial port for debug spew than the frontpanel IO
  • M: Figure out connections between FPGA and iMX
  • M: figure out existing iMX<>FPGA protocotol
  • M: reverse input stage (analog stage etc., similar to what has been done for other scopes) Done, thanks Dave and Ink (https://www.eevblog.com/forum/projects/rigol-ds10xxz-firmware-re-write/msg1202261/#msg1202261)
  • M: figure out, and reverse, role of the Actel FPGA
  • M: figure out FPGA pinout to ADC
  • M: figure out FPGA to memory pinout
  • M: figure out how to easily (i.e. without risk to brick the thing) run custom code without opening the case
  • L: reverse full scope PCB to schematics
  • L: write host demo code to interface with existing FPGA and drive basic scope functionality
  • L: re-implement FPGA firmware
  • XL: architect and implement a "scope application"

Awesome news:
konnor found a way for running custom code (plugins) without opening the case: https://www.eevblog.com/forum/testgear/rigol-ds1000z-firmware-patch-plugins/


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf