My Cargo bike build.

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
I've followed this thread since it started and now that my TSDZ2 is with Parcel Force as I write, I've been looking to understand the motor configuration/programming side more.

STEP 1 - I am going to stick with one of the stock displays (VLCD6) for the moment, only venturing on to one of the other possibilities once I've experienced the kit in it's 'as supplied' form for a while.
STEP 2 - have a play around with the Java based configuration tool to see how much I can change and improve the stock configuration
STEP 3 - if curiosity gets the better of me, I'll maybe move on to a more comprehensive display and toy with the Open Source Firmware that is out there.

As a precursor to the above, I set about installing the necessary software in my Windows 10 laptop as per the instructions given in this link here and as provided by the OP (@Swizz ).

It didn't all go to plan as I'll explain in case others have had a similar experience - I'm no computer boffin and so the measure I've taken to resolve the issues I found, may not be the best, but here goes:

The info in the link says
Para (1) - yup, straight forward - box ticked
Para (2) - installed SDCC ok but I didn't get presented with any choices about 'full version' etc., I just downloaded and installed what was at the linked site.
Para (3) - installing ST Visual Development - this is where the fun began in that the above instructions say to install in the root directory C:\ - If I did this, then the installation always failed, so I let Windows install the program where it thought best, i.e. C:\Progam Files (x86). So far so good but see later, as all wasn't quite well.
Para (4) - Github is a new thing to me so I'm easily confused. The link took me to a configurator version v20.1C.3 the latest version at the time of writing and SUSPENDED. So I faffed around and found the previous configurator version v20.1C.1 here.

OK - time to start up the configurator as in Para (5) above - yup, all well so far. For the hell of it I decided to hit the 'Compile and Flash' button to see what would happen (bearing in mind that I don't have the TSDZ2 motor yet.) Well the compiling started but came to an end with the error message saying:

View attachment 44237

Going back to Para (3) above, it says "Alternatively you can set the correct path in the file _TSDZ2-Smart-EBike/src/controller/compile_and_flash.bat" So I opened the .bat file in a text editor only to find:

View attachment 44238

Now, I'm very rusty on this stuff, but given the error message above, I thought the line STVP_CmdLine should end with .exe to I changed it to

View attachment 44239

and in the Configurator I hit the 'Compile and Flash' button again - this time the program ran correctly until of course it found that I had no programming lead (tool) or motor connected.

View attachment 44240

OK, enough for now - I await delivery of the TSDZ2 and also the ST-Link V2 and speed sensor cable.
@Bikes4two Did you have to edit the Path to include:

C:\Progam Files (x86)\STMicroelectronics\st_toolset\stvp

...before it worked?
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
You can copy a path to a folder, to paste into a .bat file - here's how to copy a path using file explorer in Windows 10:

 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
Do you have 32 bit or 64 bit Windows 10? If 64 bit, your browsers can be 32 or 64 bit. If you have both, you'll need both 32 bit and 64 bit versions of JAVA, as mentioned on this download page (for JAVA programs/apps running within the browser and on the OS):


Here's how to check if you have 32 bit or 64 bit Windows 10:


After you have installed JAVA, you might need to associate .jar files with JAVA, as in post #47. Otherwise when you double-click any file with a .jar extension it won't won't be opened by JAVA.
 
Last edited:

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
An aside bit about bits

 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
@Nealh - Have things gone well, badly, stalled, or reversed? :oops:
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
What's happening? Have you given up? I hope not! What are you having problems with at the moment?

There are two different types of download: from the internet and from devices directly. I'm not sure which you mean when you mention download.

A manual download of JAVA is available, regardless of what browser you are using to download it with.

If .jar files are opening in IE when you double click them, that can be fixed using the instructions in post #47, after you have installed JAVA.

Editing the .bat file is fairly straighforward - I think Bike4Two left the part out, where he edits the .bat file to edit the path, pointing to where Windows 10 allowed the installation of that software package, namely in program files. Other than that and his other edit, I don't see why it wouldn't work - at least at the software end. You can edit a .bat file using Notepad, then restart the program which relies on finding the file you've edited the path for it to find.

There are paths, and file associations. Paths are defined by text, either in the form of a file or in a console (DOS box in Windows). In your case a path is defined by the .bat file, so that a program can be called from anywhere in the computer, because it's path has been defined, and can located relative to a known point (in this case C:\) on a hard drive. File associations define which file is opened by which program, otherwise Windows will define a file association (but not always) which might be IE for .jar files running within a JAVA browser plugin, instead of the JAVA runtime.
 
Last edited:

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,917
8,533
61
West Sx RH
I'm no longer posting as I find your manner is ott/too demanding in trying to help me, I have little understanding of files this that and the other. I know you are trying to be helpful but the obsossive linking of stuff is no use to be.
I have no idea about bat or exe files and simply don't see them when I open the file programmes.
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
I'm no longer posting as I find your manner is ott/too demanding in trying to help me, I have little understanding of files this that and the other. I know you are trying to be helpful but the obsossive linking of stuff is no use to be.
I have no idea about bat or exe files and simply don't see them when I open the file programmes.
Sorry about that Nealh, I just cannot stand things on computers not working and get obsessed. The hardware part I have no idea about. I often find that very bright people have trouble understanding computers - it's just terminology and practise that's needed. Actually talking to people as they are attempting things, with them describing things as they go generally goes well. If you'd like to try that just PM me your phone number and I'll call you. People often think I'm nicer by phone.
 
Last edited:

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
I'm no longer posting as I find your manner is ott/too demanding in trying to help me, I have little understanding of files this that and the other. I know you are trying to be helpful but the obsossive linking of stuff is no use to be.
I have no idea about bat or exe files and simply don't see them when I open the file programmes.
It could be that Windows 10 File Explorer isn't showing the file extensions, if you can't see .exe or .bat files. That's just a setting I could link a video about, which shows you how?
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
Here's an explanatory video about how to show file extensions such as .bat files, in Windows 10 File Explorer:

 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
I'd use a burner SIM card lol. Best to use a temporary number to prevent me calling you up with bbs01b problems at some later date.
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,917
8,533
61
West Sx RH
I tried that link and the file ext's now show, but I'm non the wiser how to preoceed.
I see 1 x bat file and no exe files in the extracted zip download.
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
I tried that link and the file ext's now show, but I'm non the wiser how to preoceed.
I see 1 x bat file and no exe files in the extracted zip download.
Fantastic! Now you can open up Notepad, then drag and drop that .bat file into it, edit and save.

Your configirator seems to be a .jar file, which will be run by the JAVA .exe - lets worry about that later if it doesn't run... but you can see the configurator so that must be running ok? Close the configurator down before you edit the .bat, then start it up again after you've saved the .bat after editing..
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
I tried that link and the file ext's now show, but I'm non the wiser how to preoceed.
I see 1 x bat file and no exe files in the extracted zip download.
If there isn't an installer (that will be an .exe if it exists), make a folder on C:\ called "STMicroelectronics", and extract the files onto the c:\ drive into it, as in the wiki. You can extract the files by selecting the files inside the .zip file, then dragging and dropping.
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,917
8,533
61
West Sx RH
The java jre file is an exe file.
The jar configurator file that opens the java bit is located in the guthub tsdz2 zip file.

In #50 when I had success initially and the x2 clicks on the jar configurator, it opened nicely. I noticed the file type said jar exe file but then it simply reverted to simply saying jar file later when I went back in.
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
There are a few different downloads - this download referred to in the wiki (Step 3), is a .Zip file containing an installer (.exe), and you can choose where to install it. I've downloaded it:


Step 3 in this wiki:

 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
In #50 when I had success initially and the x2 clicks on the jar configurator, it opened nicely. I noticed the file type said jar exe file but then it simply reverted to simply saying jar file later when I went back in.
What happens when you double click that file now? If nothing happens, it's lost it's association with JAVA. If it opens in Internet Explorer or another browser, it also needs reassociating with JAVA, as in post #47.
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,917
8,533
61
West Sx RH
Are you getting this error message?



If so, have you tried editing the .bat file as he did? From this:



To this:



If you did the above and it didn't work, then perhaps the line above beginning with PATH is incorrect, and it's been installed in the wrong folder by Windows 10. In which case you'll need to edit that .bat file to include the full path of where it was installed, which @Bikes4two mentioned was in program files, therefore the path would be:

C:\Program Files\STMicroelectronics\st_toolset\stvp


Afte the "PATH = %" etc portion of that line.

It depends on where it's been installed. Windows 10 may have installed it in "Program files", looks like it didn't give Bike4Two any other option.
Going back to this post, I don't get the black error message coming up.
But in the Compile and flash bat file, if I right click and open it, it does show that line in the Cmd exe file. And says exactly as in the black box.

It is the path bit that I don't understand, it is likely to simple for me to comprehend.
 
Last edited:

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
Going back to this post, I don't get the balck error message coming up.
But in the Compile and flash bat file, if I right click and open it, it does show that line in the Cmd exe file. And says exactly as in the black box.
If it says that, it can't find that file either because:

1. This hasn't been installed:


or

2. You need to edit the .bat file as Bike4Two has done. There also might be an additional step he hasn't mentioned, where he may have needed to add the correct path to the program, pointing to where he said he installed that package in C:\ Program files (x86).
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,396
3,237
But in the Compile and flash bat file
Which file is that exactly? I hope we're looking at the same wiki. If you post a link to it, I can have a look.
 

Related Articles

Advertisers