michar71 / Open-DSO-150

An open source firmware for JYE Tech DSO-150 Digital Storage Oscilloscope
223 stars 41 forks source link

Installation instructions #19

Open felixtremblay opened 6 years ago

felixtremblay commented 6 years ago

So, I'd like to know if it could be possible to get some basic installation instructions. This firmware looks really interesting but, after about 2-3 hours of tests, I can't figure out how to get it on my scope. I do not own an st-link adapter so I need to flash the firmware with a usb-serial adapter. I downloaded and installed truestudio. I imported this project in truestudio and enabled the output of a hex file in the build settings. When I try to compile the project, only the debug build compiles. When I set the active build to release, the build fails with an error message (..\Src\Adafruit_GFX/../TFTLib/Adafruit_TFTLCD_8bit_STM32.hpp:16:27: fatal error: stm32f1xx_hal.h: No such file or directory

include "stm32f1xx_hal.h")

If I flash the hex file obtained from the debug build to the scope using the basic method described by jyetech, the flashing of the firmware is successful but, even after removing the bridges on jp1 and jp2, powering the scope only leaves me with a blank white screen. Do you have any idea of what I am doing wrong?

sreichholf commented 6 years ago

As for the compile issues. The tftlib sources are spread accross to different Directories (src and Src) but they should all reside in "Src" (with uppercase S).

I do have the same issues when trying to flash it via stm bootloader. All you get is a white blank screen. I do not own an st-link so I can't debug it here.

sreichholf commented 6 years ago

So here's the deal: I got myself a st-link v2. The issue is the OLD config. The code does load invalid values and then crashes in "printConfig" called from zconfig.ccp:77. I guess some kind of config value validation would help here.

From reading the code it should be enough to keep the "OK" Button pressed when power the DSO. That will reset the configuration to it's defaults and most probably fix the issue.

After Calibration it seems to run really smooth here :).

I like it! thx to @michar71

michar71 commented 6 years ago

Hi,

The trick is to wipe out all config data on the first startup by holding the "OK" key down. Yea, I should make that clearer in the instructions..... (The right thing would probably be to have a marker at the beginning of the config that also includes the REV number so whenever the rev is changed it automatically wipes out the config...)

Regarding compilation, need to do a few tests because it seems to work for me. Maybe some strange dependency, will copy it to another machine and see if it compiles there.

felixtremblay commented 6 years ago

@michar71 Holding the OK key on startup after flashing the debug build worked :D

As for the compilation error, what would you consider the "right way" to open and compile this project? My issue probably comes from my complete lack of knowledge of C++ and atollic truestudio.

Here are the steps I did to get to the error message mentioned in my first comment : I downloaded atollic truestudio and did a basic install. From there, I downloaded the .zip project from github (I don't use windows as my main os so I don't have git installed directly on it). From there, I extracted the files from the archive, opened atollic truestudio, went to file, import, general, existing projects into workspace, selected the folder in which i extracted the archive, clicked finish and then clicked build. by default, the debug version was active so this is the one which got built. If I switch to the release version, then I get the mentioned error.

michar71 commented 6 years ago

One possibility is it's an issue with folder/file captialization that doesn't matter under windows but matters for other OS's. (I compile under windows...) "Debug" is the only option I use right now too so there might be something else broken with the release build. There's no functional difference at the moment, I tried to do some optimization but if I optimize the code too much it optimizes the data capture routine away (Not really helpful....;-). Need to figure out if I can do this smarter with pragmas so I can set optimization on a routine level and not only project level.

felixtremblay commented 6 years ago

@michar71 Been playing around with it for like an hour and I have to say, this is a really nice firmware :P

If there are no functional differences then I'll just keep the debug build for now.

As for the os, I am compiling it under windows. I was just referring to the fact that I don't have any proper git client on my windows machine since I don't use it all that much.

rtek1000 commented 6 years ago

[How to generate hex file from Truestudio ver. 9.0.1?]: Go to menu: Project->Build Settings->C/C++ Build -> Settings ->Tool Settings tab ->(scroll down) Other->Output format->(Tick) Convert build output -> (Select desired output file type) Intel Hex.

After compile check folder /Debug/dso_150.hex (if in Configuration was selected Debug) Menu: Project->Build Settings->C/C++ Build -> Settings -> Configuration: Debug

Than, maybe can you upload the Hex file over serial port (USB converter) using Demonstrator: https://www.jyetech.com/Products/LcdScope/DSO150_HowToUpgradeFirmware.pdf

rtek1000 commented 6 years ago

<<< Warning >>> If your device is a clone, you may not be able to restore the firmware. The original firmware requires a 4-digit code (0x000 to 0xFFFF) to be activated, without this code there will be malfunction of the firmware. (To insert this code: Press at same time: SEC/DIV+TRIGGER+ADJ) More at: https://www.jyetech.com/Products/LcdScope/Firmwares_150.php

daividtux commented 6 years ago

I think I found a bug. When switching the AC to DC switch, it remains as AC. Only AC and GND works

MikeLud commented 5 years ago

When compiling I am getting 20 warnings (see below). I did not try flashing yet. Is this normal or something is wrong. I received a response from @michar71 and this is normal see response in #26 image

gregcrago commented 3 years ago

Need help generating .hex file with TrueSTUDIO 9.3 Downloaded latest code (2 days ago) and TrueSTUDIO 9.3. When I load project and go to Project/Build Settings/ C/C++ build/settings/ tool setting tab it is BLANK. I do not know how to specify .hex output. I downloaded .hex from sreichholf (open issue/bin file/ 'dso-150.hex' and flashed with st-link utility and got checksum 0x004F114A. I have ORIGINAL JYE Tech and got the "90 deg display"

gregcrago commented 3 years ago

Removed TrueSTUDIO 9.3 and installed 9.0.1 and still cannot find any settings under C/C++ Build/Settings/Tool Settings tab is still Blank. Can anyone just post the .hex file so I can use this firmware?

gregcrago commented 3 years ago

Please do not refer to the .hex file posted in the OPEN ISSUE/Bin section. I have ORIGINAL DSO Shell and that .hex file gave me the '90 deg' display issue

gregcrago commented 3 years ago

Compiling with STM32CubeIDE and get .bin file in newly created /Debug folder. Flashing with STM32 ST-Link Utility using ST-Link V2 dongle. Need to hold OK while power on DSO-150 to reset eeprom? Then I have to preform 2 AUTOCAL to get Grounded input to actually be calibrated to GND Ref triangle. Just thought I would lay out a sequence that works for me

gregcrago commented 3 years ago

Forgot to add that 1kHz test signal does not seem to generate until after a power cycle beyond AUTOCAL

cjvanlissa commented 3 years ago

I know this issue has been open for a few years, but just wanted to check if there might be more detailed installation instructions?

barthek commented 3 years ago

project builds just fine with st-stm32cubeide_1.6.0_9614_20210223_1703_x86_64.exe. attached is a hex file - compiled a few weeks ago. runs perfectly on my chinese dso150.

dso_150.zip

cjvanlissa commented 3 years ago

@barthek is this in response to my request for installation restructions? If so, thank you for responding - but I'm not sure what the .EXE is or what to do with the hex file, hence the request for some more guidance.

prsdB commented 3 years ago

@barthek thanks for the hex file (version 3.3). I tried it on "real" JYE Tech scope, it worked fine. But I tried it on the clone, it only showed a white screen. I have also connected the reset pin to 3.3V but it still doesn't work. I tried version 3.0 works well on the clone. I read the latest issue from other users, it is mentioned that the clone scope is limited to version 3.1 only. I'm curious about your scope. Is the scope you call Chinese scope a "real" or clone? Is there a JYE Tech label or part number on the PCB of your scope? If there is, it means your scope is a "real" one so version 3.3 works fine there.

One more thing. The STM chip in the "real" scope detected (on the STM Demonstrator GUI) has 64k flash, while the clone scope has 128k flash. Is this the reason why version 3.3 doesn't work on the clone scope?