Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Electric Motors and Controllers
mbrusa   100 W

100 W
Posts: 149
Joined: Dec 11 2019 12:13am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by mbrusa » Jul 13 2020 1:53am

Elinx wrote:
Jul 11 2020 10:09am
Waynemarlow wrote:
Jul 11 2020 7:37am
...I think the S19 and the hex files re the same ?

https://drive.google.com/drive/folders/ ... jMrpW2ZqvH
The S19 file is identical to my backups. With STVP I see some differences (AFR5 and AFR3) with "option_no_prot.ihx"
But the only thing I can do is comparing files, not interpretating.

OptionByte.jpg

TSDZ2_36v_Stock_Option_Byte.zip
Hi Elix
I will try to replace the option_no_prot.ihx file with stock.hex
But there is something I don't understand, in all my backups of the stock versions, the options file are identical to each other even with binary comparison.
The OptionByte.S19 files, option_no_prot.ihx, stock_36V.hex, with binary comparison are all different, but open with STVP GUI they are the same, I don't see the difference you have reported.
Maybe it depends on the version of STVP GUI?
I have version 3.2.7, what version do you use?
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

Elinx   1 kW

1 kW
Posts: 359
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » Jul 13 2020 3:05am

mbrusa wrote:
Jul 13 2020 1:53am
.....
..... in all my backups of the stock versions, the options file are identical to each other even with binary comparison.
The OptionByte.S19 files, option_no_prot.ihx, stock_36V.hex, with binary comparison are all different, but open with STVP GUI they are the same,.....
I have version 3.2.7, what version do you use?
All my backups, downloads and the S19 file are binary and with STVP the same (also with the first source (aug 2018) of HurzHurz), but different with "option_no_prot.ihx".
Other differences are the extentions of the files (hex, S19 and ihx)
I use STVP version 3.4.1

Waynemarlow   1 kW

1 kW
Posts: 476
Joined: Jul 09 2016 7:22am
Location: Bucks, England

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Waynemarlow » Jul 13 2020 5:07am

Guys, thanks for the quick look at this for me.

I still have one of the problematic motors here ( kept it back for a few days whilst you were looking at the problem ) and can reprogram the motor with any changes you make to verify the changes ?

Let me know as I should get the bike back to the owner.

kallt_kaffe   10 mW

10 mW
Posts: 33
Joined: Jun 06 2020 11:06am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by kallt_kaffe » Jul 13 2020 5:39am

mbrusa wrote:
Jul 13 2020 1:53am
The OptionByte.S19 files, option_no_prot.ihx, stock_36V.hex, with binary comparison are all different, but open with STVP GUI they are the same, I don't see the difference you have reported.
Maybe it depends on the version of STVP GUI?
I have version 3.2.7, what version do you use?
STVP 3.4.1 here.

For me the file from eco-bikes and the one I backuped from my motor (48V) before doing anything else to it is identical. All bytes 0x00 except for byte 2 that is 0x28.

The option_no_prot.ihx on the other hand has all bytes as 0x00 which changes the settings of AFR5 and AFR3.

stock/eco-bikes:
eco-bikes.PNG
eco-bikes.PNG (7.66 KiB) Viewed 1896 times
option_no_prot.ihx:
option_no_prot.PNG
option_no_prot.PNG (7.27 KiB) Viewed 1896 times
However, my motor doesn't seem to care. Works fine as far as I can tell.

I notice that casainho's firmware doesn't flash data and option at all so couldn't we just skip flashing option bytes?

User avatar
stancecoke   100 kW

100 kW
Posts: 1332
Joined: Aug 02 2017 2:56pm

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by stancecoke » Jul 13 2020 7:48am

kallt_kaffe wrote:
Jul 13 2020 5:39am
I notice that casainho's firmware doesn't flash data and option at all so couldn't we just skip flashing option bytes?
Hm, in the Kunteng-Project we had to write the option byte once to disable the readout protection bit. If Tonsheng has not set this bit in the factory settings, there is no need to write the option bytes. As people can read out the factory firmware, the bit seems not to be set.
I think qmarco didn't knew this, when he took the Java-configurator from the Kunteng-Project as base for the TSDZ2 Project. The data (=EEPROM) memory should be written each time to prevent inconsistent settings.

So we just have to delete the entries in the src/controller/compile_and_flash.bat
STVP_CmdLine -BoardName=ST-LINK -ProgMode=SWIM -Port=USB -Device=STM8S105x6 -FileOption=option_no_prot.ihx -verbose -verif -no_loop
if errorlevel == 1 goto FAIL


STVP_CmdLine -BoardName=ST-LINK -ProgMode=SWIM -Port=USB -Device=STM8S105x6 -FileProg=main.ihx -FileData=data.ihx -FileOption=option_no_prot.ihx -verbose -no_loop -verif -no_warn_protect
if errorlevel == 1 goto FAIL
regards
stancecoke

mbrusa   100 W

100 W
Posts: 149
Joined: Dec 11 2019 12:13am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by mbrusa » Jul 13 2020 8:39am

Of course, the reason to write the option byte file at least once is to disable the read protection bit.
I had seen that in the stock file the protection was off, but not knowing if it had always been so and if it always will be, I preferred to rewrite it as provided by marcoq.
The strange thing is that with STVP GUI v. 3.2.7 there is no difference between the files, while installing the v. 3.4.1 is there, as reported by Elinx.
But even stranger is that after flashing option_no_prot.ihx, reading on the controller, the option byte is correct, it does not correspond to that of option_no_prot.ihx
So flashing, or does not write the file because it is wrong, or writes it after correcting it.
I will try to replace option_no_prot.ihx with stock_36V.hex
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

kallt_kaffe   10 mW

10 mW
Posts: 33
Joined: Jun 06 2020 11:06am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by kallt_kaffe » Jul 13 2020 8:42am

mbrusa wrote:
Jul 13 2020 8:39am
Of course, the reason to write the option byte file at least once is to disable the read protection bit.
I had seen that in the stock file the protection was off, but not knowing if it had always been so and if it always will be, I preferred to rewrite it as provided by marcoq.
The strange thing is that with STVP GUI v. 3.2.7 there is no difference between the files, while installing the v. 3.4.1 is there, as reported by Elinx.
But even stranger is that after flashing option_no_prot.ihx, reading on the controller, the data is correct, it does not correspond to that of option_no_prot.ihx
So flashing, or does not write the file because it is wrong, or writes it after correcting it.
I will try to replace option_no_prot.ihx with stock_36V.hex
For me reading my options byte show option byte as 0x20 and only AFR5 is different than stock settings. Weird since option_no_prot should set it to 0x00 and stock was 0x28.

EDIT: Just tried programming my stock option file (my own backup that has option byte as 0x28) which went fine with no complaints. Then I re-read the tab from the bike again and it's back to 0x20.

Waynemarlow   1 kW

1 kW
Posts: 476
Joined: Jul 09 2016 7:22am
Location: Bucks, England

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Waynemarlow » Jul 13 2020 11:26am

Following this as best as I can.

Sometimes I find on some motors that I cannot read the option byte to start with, but if you keep trying to read the option byte, it suddenly seems to allow the read. From that point you can then read and write all tabs as much as you want, but that is only on some motors.

Maybe we should keep that initial read and write in there ?

mbrusa   100 W

100 W
Posts: 149
Joined: Dec 11 2019 12:13am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by mbrusa » Jul 13 2020 12:05pm

kallt_kaffe wrote:
Jul 13 2020 8:42am
For me reading my options byte show option byte as 0x20 and only AFR5 is different than stock settings. Weird since option_no_prot should set it to 0x00 and stock was 0x28.

EDIT: Just tried programming my stock option file (my own backup that has option byte as 0x28) which went fine with no complaints. Then I re-read the tab from the bike again and it's back to 0x20.
Yes, that's right, both using the option_no_prot file and the stock option, when reading it is always 0x20.
Even with the S19 file it is the same.
I can't give an explanation, I don't have enough knowledge.
We should understand what the correct setting of AFR3 is.
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

vass   1 W

1 W
Posts: 56
Joined: Jul 07 2020 3:57am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by vass » Jul 14 2020 5:20pm

Hello all.
Newbie stuff bellow :)
the good news is i have received the motor and battery and the ST-Link :)

The not so good news is that i had a damn hard time to program it. It could easily use the st software to read (and backup) my stock firmware but a damn hard time to use the Java frontend on my old windows 7 32 bits (i had to install cygwin 32 and use the .bat files com configure compile and flash).

Right now i have the battery, (52v) screen and throthle connected on my table , the screen lights up, but nothing happens if i use the throthle :mrgreen: , how can i test this on a table? Do i need to have all the stuff connected and simulate pedaling?

PS - When i press power it displays a E02 error (img bellow) is this the normal behaviour (from what i read in eco mode this code should be displayed)
Attachments
tsdz2.PNG
tsdz2.PNG (389.78 KiB) Viewed 1809 times

ilu   100 W

100 W
Posts: 108
Joined: Oct 18 2019 10:51am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by ilu » Jul 14 2020 6:05pm

vass wrote:
Jul 14 2020 5:20pm
Right now i have the battery, (52v) screen and throthle connected on my table , the screen lights up, but nothing happens if i use the throthle :mrgreen: , how can i test this on a table? Do i need to have all the stuff connected and simulate pedaling?

PS - When i press power it displays a E02 error (img bellow) is this the normal behaviour (from what i read in eco mode this code should be displayed)
This error code is showing if you dont have the speed sensor connected.

vass   1 W

1 W
Posts: 56
Joined: Jul 07 2020 3:57am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by vass » Jul 14 2020 6:16pm

ilu wrote:
Jul 14 2020 6:05pm
vass wrote:
Jul 14 2020 5:20pm
Right now i have the battery, (52v) screen and throthle connected on my table , the screen lights up, but nothing happens if i use the throthle :mrgreen: , how can i test this on a table? Do i need to have all the stuff connected and simulate pedaling?

PS - When i press power it displays a E02 error (img bellow) is this the normal behaviour (from what i read in eco mode this code should be displayed)
This error code is showing if you dont have the speed sensor connected.
T
But i do have it connected, does it need to be with a exact distance from the magnet to stop the error?
Also the motor wont start without it?
(will also try to discharge a bit of the 52v battery and put stock firmware in to see if it does anything different)


Edit - I have put stock back and i can use the throtle to spin the motor even without the speed sensor attached... strange


Edit2 - Installed all on my win10 pc and could program from java frontend. The end result was the same :oops: .
No wanting to give up i started pushing some buttons and now i can use the throttle, what i always need to to let the speed seetle (its all messed up in the begining) and then i have to use the power button one time to choose E02 or E03 and let it flash 3 times (it doesnt matter if e2 or e3) and it start magicaly working, i have to do this every time i power down .

Also i only get 3 battery bars altough the batt is almost full, could a guru please help me with the settings :) ( i have a 16s52v13AH battery, specs from seller)

after that next step is to put it in the bike to check if it works even without the throthle (can i test this without being on the bike ?
Attachments
unnamed.png
unnamed.png (63.61 KiB) Viewed 1780 times

kallt_kaffe   10 mW

10 mW
Posts: 33
Joined: Jun 06 2020 11:06am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by kallt_kaffe » Jul 15 2020 5:39am

vass wrote:
Jul 14 2020 6:16pm
Also i only get 3 battery bars altough the batt is almost full, could a guru please help me with the settings :) ( i have a 16s52v13AH battery, specs from seller)
52v battery means 14s, not 16s. Change that and battery bars should be correct. Also change capacity to 655W (50.4v*13Ah).

On the second tab, check "Throttle on street mode". E02 in Eco-mode means you switch to off-road mode. Read manuals for more info on display settings.

You also might want to increase battery power max to 750W if you want off-road mode to have some more power than street-mode.

Oh, and voltage cut off should probably be 40 or 41 for your battery.

ilu   100 W

100 W
Posts: 108
Joined: Oct 18 2019 10:51am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by ilu » Jul 15 2020 5:45am

vass wrote:
Jul 14 2020 6:16pm
Edit2 - Installed all on my win10 pc and could program from java frontend. The end result was the same :oops: .
No wanting to give up i started pushing some buttons and now i can use the throttle, what i always need to to let the speed seetle (its all messed up in the begining) and then i have to use the power button one time to choose E02 or E03 and let it flash 3 times (it doesnt matter if e2 or e3) and it start magicaly working, i have to do this every time i power down .

Also i only get 3 battery bars altough the batt is almost full, could a guru please help me with the settings :) ( i have a 16s52v13AH battery, specs from seller)

after that next step is to put it in the bike to check if it works even without the throthle (can i test this without being on the bike ?
Litium batteries rated as 52V are 14s. Also check the voltage when fully charged and adjust the cell voltage settings accordingly (battery voltage / 14 = cell voltage) if needed.
Disable the 'street mode on startup' setting on the main page or enable throttle in the street mode on the advanced settings.

When you power up the motor, first you see the battery state of charge % for a few seconds instead of the speed. It's best to read through the documentation files although they can seem quite complicated in the beginning.

vass   1 W

1 W
Posts: 56
Joined: Jul 07 2020 3:57am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by vass » Jul 15 2020 7:02am

Many thanks guys, with both infos i have now a working motor, throtle and battery level :).
I have read (again) the docs and i think i understand now, by default my config lets me change stuff (set parameter on startup), and i can now have the throtle on eco (altough i will install later on the temp sensor).

But i have another newbie question that i couldnt find an answer :), cant i test the torque assist mode or cadence assist mode with the motor out of the bike? if i put it on tour and E03 or E04 i shoud be able to fell the assist when spining by hand or do i need alot more force (or a working speed sensor)?

Andrew707   100 mW

100 mW
Posts: 48
Joined: Feb 26 2020 10:10pm

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Andrew707 » Jul 17 2020 4:25am

I'm running 36V TSDZ2 with VLCD5 OSF and 48V battery. In the past two and a half months I biked over 2000km. So far so good.

I just received spare blue gear just in case I need to replace it soon. One odd thing I noticed is that when pedalling quickly uphill it seems like motor "slips" (can't really explain it) and won't help until I stop pedalling for a second and then everything is back to normal again. It happens every now and then but not too often... Could this be the sign that blue gear is wearing down?

Also, as per someone's suggestion here a couple of months ago, I've ordered these two lights from Aliexpress. They should support 4-85V. I think I've soldered the wires properly (was my first time) and put the shrink wrap on. I flashed the motor with the lights setting on. Everything worked great once I connected it - the lights were very bright and I was extremely happy!
However, when I was adjusting them on my handlebar they suddenly turned off. Then I noticed a very odd thing - one (or sometimes both) light are on (but very very weak) when the system is off. When the system is on then lights are off. If I turn on the lights (the screen lights up) then both lights turn off. If I turn off the lights (the screen lights off) then both lights are on but very very weak - barely visible at night and seems like they're lightly pulsing... Any idea what the hell is happening here and why? How can I fix it?
Last edited by Andrew707 on Jul 17 2020 12:17pm, edited 1 time in total.

ilu   100 W

100 W
Posts: 108
Joined: Oct 18 2019 10:51am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by ilu » Jul 17 2020 7:34am

Andrew707 wrote:
Jul 17 2020 4:25am
Also, as per someone's suggestion here a couple of months ago, I've ordered these two lights from Aliexpress. They should support 4-85V. I think I've soldered the wires properly (was my first time) and put the shrink wrap on. I flashed the motor with the lights setting on. Everything worked great once I connected it - the lights were very bright and I was extremely happy!
However, when I was adjusting them on my handlebar they suddenly turned off. Then I noticed a very odd thing - one (or sometimes both) light are on (but very very weak) when the system is off. When the system is on then lights are off. If I turn on the lights (the screen lights up) then both lights turn off. If I turn off the lights (the screen lights off) then both lights are on but very very weak - barely visible at night and seems like they're lightly pulsing... Any idea what the hell is happening here and why? How can I fix it?
Did you connect the lights straight to the 5V output? I have those lights connected straight to 52V battery (controlled by relay from the lights connection) and together they use about 10W power. If they try to draw the same power from the 5V source, some component might have been damaged, as the current would be 2A, I think the light connection manages only about 0.5A. Is it possible for you to connect the lights straight to the battery to check wether there's problem with them or if the problem is in the motor controller.

Andrew707   100 mW

100 mW
Posts: 48
Joined: Feb 26 2020 10:10pm

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Andrew707 » Jul 17 2020 12:17pm

ilu wrote:
Jul 17 2020 7:34am
Did you connect the lights straight to the 5V output? I have those lights connected straight to 52V battery (controlled by relay from the lights connection) and together they use about 10W power. If they try to draw the same power from the 5V source, some component might have been damaged, as the current would be 2A, I think the light connection manages only about 0.5A. Is it possible for you to connect the lights straight to the battery to check wether there's problem with them or if the problem is in the motor controller.
Yes, my motor came with dual connector - one end goes to the speed sensor and another end splits into 4 cables for 2 lights.
So I'm just wondering how bright the light from a 5V source can be? Maybe at first, it was running much more V and then somehow defaulted to 5V...
I have a shark pack with a nicely hidden connector and soldered connector so plugging the lights directly to the battery would be complicated but not impossible (I'll do it if nobody else will have any better ideas).
Can you please share what kind of relay do you use? Did you also connect a separate button to turn on/off the lights?
I really liked the idea of being able to control the lights from VLCD5 display. I hope I didn't damage anything and will be able to fix it somehow.

HughF   100 W

100 W
Posts: 206
Joined: Jan 23 2020 6:13pm

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by HughF » Jul 17 2020 12:22pm

My experience with the tsdz2 light output is that it is barely adequate. I think it will manage 5w, no more.

Any 5v relay can be used. This can be turned on and off from the vlcd5 by using the light output to trigger the relay
Genesis iOiD Alfine8 Hard tail MTB, 36v TSDZ2, 13s battery, SW102 display
Raleigh reynolds road frame from the 80's, TSDZ2, SW102 display, 1x10 drivetrain, gravel tyres

Anikea   100 µW

100 µW
Posts: 7
Joined: Jun 11 2020 10:02pm

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Anikea » Jul 17 2020 2:42pm

Andrew707 wrote:
Jul 17 2020 4:25am
Also, as per someone's suggestion here a couple of months ago, I've ordered these two lights from Aliexpress. They should support 4-85V. I think I've soldered the wires properly (was my first time) and put the shrink wrap on. I flashed the motor with the lights setting on. Everything worked great once I connected it - the lights were very bright and I was extremely happy!
However, when I was adjusting them on my handlebar they suddenly turned off. Then I noticed a very odd thing - one (or sometimes both) light are on (but very very weak) when the system is off. When the system is on then lights are off. If I turn on the lights (the screen lights up) then both lights turn off. If I turn off the lights (the screen lights off) then both lights are on but very very weak - barely visible at night and seems like they're lightly pulsing... Any idea what the hell is happening here and why? How can I fix it?
I Had exact the same issue with a pair of lights drawing about 5W. I had to buy a new controller :-(

Charlie Whiskey   1 mW

1 mW
Posts: 15
Joined: Jun 28 2020 9:50am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Charlie Whiskey » Jul 18 2020 10:49am

I was trying setup OSF for the first time today and ran into this error while compiling via the Java configurator. Any advice appreciated.

Code: Select all

Cleaning files...
Done.
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_iwdg.c ../common/STM8S_StdPeriph_Lib/src/stm8s_iwdg.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_itc.c ../common/STM8S_StdPeriph_Lib/src/stm8s_itc.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_clk.c ../common/STM8S_StdPeriph_Lib/src/stm8s_clk.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_gpio.c ../common/STM8S_StdPeriph_Lib/src/stm8s_gpio.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_uart2.c ../common/STM8S_StdPeriph_Lib/src/stm8s_uart2.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_tim1.c ../common/STM8S_StdPeriph_Lib/src/stm8s_tim1.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_tim2.c ../common/STM8S_StdPeriph_Lib/src/stm8s_tim2.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_tim3.c ../common/STM8S_StdPeriph_Lib/src/stm8s_tim3.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_exti.c ../common/STM8S_StdPeriph_Lib/src/stm8s_exti.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_adc1.c ../common/STM8S_StdPeriph_Lib/src/stm8s_adc1.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_flash.c ../common/STM8S_StdPeriph_Lib/src/stm8s_flash.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/common.c ../com
mon/common.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -owatchdog.c watchdog.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -otorque_sensor.c torque_se
nsor.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -ouart.c uart.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -opwm.c pwm.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -omotor.c motor.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -owheel_speed_sensor.c whee
l_speed_sensor.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -obrake.c brake.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -opas.c pas.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -oadc.c adc.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -otimers.c timers.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -oebike_app.c ebike_app.c
ebike_app.c:1980: syntax error: token -> ';' ; column 65
ebike_app.c:1983: error 56: Duplicate label 'case'
ebike_app.c:1983: syntax error: token -> ';' ; column 71
ebike_app.c:1983: error 63: 'break/continue' statement out of context
ebike_app.c:1984: error 61: 'case/default' found without 'switch'. Statement ign
ored
ebike_app.c:1984: syntax error: token -> ';' ; column 71
ebike_app.c:1984: error 63: 'break/continue' statement out of context
ebike_app.c:1986: error 63: 'break/continue' statement out of context
ebike_app.c:2028: error 1: Syntax error, declaration ignored at 'ui8_menu_functi
on_enabled'
ebike_app.c:2028: syntax error: token -> '=' ; column 31
ebike_app.c:2031: error 1: Syntax error, declaration ignored at 'ui8_assist_leve
l_temp'
sdcpp.exe: fatal error: when writing output to : Invalid argument
make: *** [ebike_app.rel] Error 1
Press any key to continue . . .
I've also attached the .ini file.
Attachments
20200719-004306AEST.ini
(606 Bytes) Downloaded 35 times

kallt_kaffe   10 mW

10 mW
Posts: 33
Joined: Jun 06 2020 11:06am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by kallt_kaffe » Jul 19 2020 5:59am

Charlie Whiskey wrote:
Jul 18 2020 10:49am
I was trying setup OSF for the first time today and ran into this error while compiling via the Java configurator. Any advice appreciated.

Code: Select all

Cleaning files...
Done.
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_iwdg.c ../common/STM8S_StdPeriph_Lib/src/stm8s_iwdg.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_itc.c ../common/STM8S_StdPeriph_Lib/src/stm8s_itc.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_clk.c ../common/STM8S_StdPeriph_Lib/src/stm8s_clk.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_gpio.c ../common/STM8S_StdPeriph_Lib/src/stm8s_gpio.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_uart2.c ../common/STM8S_StdPeriph_Lib/src/stm8s_uart2.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_tim1.c ../common/STM8S_StdPeriph_Lib/src/stm8s_tim1.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_tim2.c ../common/STM8S_StdPeriph_Lib/src/stm8s_tim2.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_tim3.c ../common/STM8S_StdPeriph_Lib/src/stm8s_tim3.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_exti.c ../common/STM8S_StdPeriph_Lib/src/stm8s_exti.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_adc1.c ../common/STM8S_StdPeriph_Lib/src/stm8s_adc1.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/STM8S_StdPeriph
_Lib/src/stm8s_flash.c ../common/STM8S_StdPeriph_Lib/src/stm8s_flash.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -o../common/common.c ../com
mon/common.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -owatchdog.c watchdog.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -otorque_sensor.c torque_se
nsor.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -ouart.c uart.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -opwm.c pwm.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -omotor.c motor.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -owheel_speed_sensor.c whee
l_speed_sensor.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -obrake.c brake.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -opas.c pas.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -oadc.c adc.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -otimers.c timers.c
sdcc -c -I../common/STM8S_StdPeriph_Lib/inc -I../common -I. -I../ -mstm8 -Ddoubl
e=float --std-c99 --nolospre  --out-fmt-ihx --debug  -oebike_app.c ebike_app.c
ebike_app.c:1980: syntax error: token -> ';' ; column 65
ebike_app.c:1983: error 56: Duplicate label 'case'
ebike_app.c:1983: syntax error: token -> ';' ; column 71
ebike_app.c:1983: error 63: 'break/continue' statement out of context
ebike_app.c:1984: error 61: 'case/default' found without 'switch'. Statement ign
ored
ebike_app.c:1984: syntax error: token -> ';' ; column 71
ebike_app.c:1984: error 63: 'break/continue' statement out of context
ebike_app.c:1986: error 63: 'break/continue' statement out of context
ebike_app.c:2028: error 1: Syntax error, declaration ignored at 'ui8_menu_functi
on_enabled'
ebike_app.c:2028: syntax error: token -> '=' ; column 31
ebike_app.c:2031: error 1: Syntax error, declaration ignored at 'ui8_assist_leve
l_temp'
sdcpp.exe: fatal error: when writing output to : Invalid argument
make: *** [ebike_app.rel] Error 1
Press any key to continue . . .
I've also attached the .ini file.
I do not have access to the java configurator right now so I cannot check the ini-file. Your config.h could help. However my guess is that you accidently blanked LIGHTS_CONFIGURATION_2 in the java configurator. I think if that is not set to anything this would happen when you try to compile.

Charlie Whiskey   1 mW

1 mW
Posts: 15
Joined: Jun 28 2020 9:50am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Charlie Whiskey » Jul 19 2020 11:32am

kallt_kaffe wrote:
Jul 19 2020 5:59am
I do not have access to the java configurator right now so I cannot check the ini-file. Your config.h could help. However my guess is that you accidently blanked LIGHTS_CONFIGURATION_2 in the java configurator. I think if that is not set to anything this would happen when you try to compile.
Got it. I only wanted one light mode so filled the first box with option 6 and left the other three boxes blank. I've now filled all boxes with "6" and that compiled. Thanks.

vass   1 W

1 W
Posts: 56
Joined: Jul 07 2020 3:57am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by vass » Jul 19 2020 2:32pm

N00b attack part 2, sorry guys :).

I completed my bike today.
I think almost all things are working :mrgreen: (at least i can feel some help from the motor) but i dont have the speed display working.
I thought i had put the sensor badly, or had a bad sensor, but when i put stock back everything works.
I tried different option on the Java configurator to no avail (mostly the lights , ebrakes and sensor stuff).
So can anyone help me with this :D ?

PS - I have the sensor with the Y connection

kallt_kaffe   10 mW

10 mW
Posts: 33
Joined: Jun 06 2020 11:06am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by kallt_kaffe » Jul 19 2020 2:54pm

vass wrote:
Jul 19 2020 2:32pm
N00b attack part 2, sorry guys :).

I completed my bike today.
I think almost all things are working :mrgreen: (at least i can feel some help from the motor) but i dont have the speed display working.
I thought i had put the sensor badly, or had a bad sensor, but when i put stock back everything works.
I tried different option on the Java configurator to no avail (mostly the lights , ebrakes and sensor stuff).
So can anyone help me with this :D ?

PS - I have the sensor with the Y connection
It'll start working after a while. The odometer compensation will display 00.0km/h until it has compensated for the time it has shown other stuff (like the 99.9% battery it shows everytime you turn in on).

Post Reply