I am using Linux but other developers are using Windows as well.orfait said:Very nice work.
I may join for helping the dev. Are you using linux or windows ?
Concerning 850C, I am not able to find the source code. Did you publish it ?
casainho said:I found this new video on youtube channel of Buba, seems he is busy recently
[youtube]LVqvzC2e2sE[/youtube]
I think I did not release 0.19, I think. I want to review the commit of Buba and maybe, add the code to disable the PWM while resting.thineight said:Good afternoon!
A question for buba and casainho.
I see you both have released a v0.19beta (buba few weeks ago and casainho recently).. is the current casainho's the master one, obtained from buba's + latest torque factors?
I am a bit puzzled which wiki refers to which LCD3/motor release.
I've found the 0.19beta wiki here:
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Features-and-configurations-for-version-0.19.X-%28BETA%29
but i'm not sure if this applies to latest casainho version only.. or buba one.. or both.
Thanks a lot![]()
I think I saw a 0.19beta in your repository.. or maybe that is not yours (I'm not an expert of GitHub).casainho said:I think I did not release 0.19, I think. I want to review the commit of Buba and maybe, add the code to disable the PWM while resting.thineight said:Good afternoon!
A question for buba and casainho.
I see you both have released a v0.19beta (buba few weeks ago and casainho recently).. is the current casainho's the master one, obtained from buba's + latest torque factors?
I am a bit puzzled which wiki refers to which LCD3/motor release.
I've found the 0.19beta wiki here:
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Features-and-configurations-for-version-0.19.X-%28BETA%29
but i'm not sure if this applies to latest casainho version only.. or buba one.. or both.
Thanks a lot![]()
thineight said:What is the setup wiki valid for this one? The 18.2?
So I conclude that the above 0.19beta for LCD3 and motor are not directly from Buba earlier 0.19beta code.![]()
thineight said:A question for buba and casainho.
I see you both have released a v0.19beta (buba few weeks ago and casainho recently).. is the current casainho's the master one, obtained from buba's + latest torque factors?
casainho said:You can see that I am on master branch, with latest code and I can build correctly BUT my SDCC build version seems different from yours, even if is 3.8.0... please give a look:sidmodi said:I am running Ubuntu 18.04 and this is what I see when I type 'sdcc -v':
Code:SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.8.0 #10562 (Linux)
Code:cas@cas:~/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/src/display/KT-LCD3$ git branch 15-rider_pedal_human_power_shown_on_LCD 19-Implement_button_fast_multiple_clicks 21-stall-protection 33-Improving_wheel_speed_sensor_reading 35-Improve_battery_SOC_bars 39-Make_EEPROM_reset_and_writing_variables_robust 46-Assist_level_and_start_power_boost_now_work_as_a_factor_of_rider_pedal_human_power 46-assist_level_and_start_power_boost_now_work_as_a_factor_of_rider_pedal_human_power 49-Implement_battery_current_ramp 50-Stall_protection_kicks_in_on_startup-0.15.0 7-Correct_calculated_value_of_Watts_hour 74-Correct_pedal_human_power 8-cadence-low-pass-filter EEPROM_fail_default_values_fix assist_level_as_factor_of_pedal_power development * master origin/14-walk-assist-mode test_0.17_beta cas@cas:~/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/src/display/KT-LCD3$ git pull Already up to date. cas@cas:~/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/src/display/KT-LCD3$ make -f Makefile_linux clean Cleaning files... Done. cas@cas:~/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/src/display/KT-LCD3$ make -f Makefile_linux sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -ogpio.c gpio.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -oht162.c ht162.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -oadc.c adc.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -otimers.c timers.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -olcd.c lcd.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -ouart.c uart.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -oeeprom.c eeprom.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -obuttons.c buttons.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -outils.c utils.c sdcc -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug main.c ../../common/STM8S_StdPeriph_Lib/src/stm8s_iwdg.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_clk.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_gpio.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_adc1.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_tim1.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_tim3.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_uart2.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_flash.rel gpio.rel ht162.rel adc.rel timers.rel lcd.rel uart.rel eeprom.rel buttons.rel utils.rel main.c:82: warning 126: unreachable code stm8-size main.elf -A main.elf : section size addr DATA 286 1 INITIALIZED 198 287 SSEG 1 4294967295 HOME 99 32768 GSINIT 26 32867 GSFINAL 3 32893 CONST 12 32896 INITIALIZER 198 32908 CODE 32176 33106 .debug_line 31457 0 .debug_loc 40545 0 .debug_abbrev 2401 0 .debug_info 47598 0 .debug_pubnames 9784 0 .debug_frame 34022 0 Total 198806 stm8-objcopy -O binary -R DATA -R INITIALIZED -R SSEG -R .debug_line -R .debug_loc -R .debug_abbrev -R .debug_info -R .debug_pubnames -R .debug_frame main.elf main.bin stm8-objcopy -O ihex -R DATA -R INITIALIZED -R SSEG -R .debug_line -R .debug_loc -R .debug_abbrev -R .debug_info -R .debug_pubnames -R .debug_frame main.elf main.hex cas@cas:~/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/src/display/KT-LCD3$ sdcc -v SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.8.0 #10557 (Linux) published under GNU General Public License (GPL) cas@cas:~/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/src/display/KT-LCD3$
casainho said:I think I did not release 0.19, I think. I want to review the commit of Buba and maybe, add the code to disable the PWM while resting.
Well, maybe you should forget this because the LCD3 project is finnished now because the memory is full, we can't add more code to it.sidmodi said:casainho said:You can see that I am on master branch, with latest code and I can build correctly BUT my SDCC build version seems different from yours, even if is 3.8.0... please give a look:sidmodi said:I am running Ubuntu 18.04 and this is what I see when I type 'sdcc -v':
Code:SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.8.0 #10562 (Linux)
Code:cas@cas:~/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/src/display/KT-LCD3$ git branch 15-rider_pedal_human_power_shown_on_LCD 19-Implement_button_fast_multiple_clicks 21-stall-protection 33-Improving_wheel_speed_sensor_reading 35-Improve_battery_SOC_bars 39-Make_EEPROM_reset_and_writing_variables_robust 46-Assist_level_and_start_power_boost_now_work_as_a_factor_of_rider_pedal_human_power 46-assist_level_and_start_power_boost_now_work_as_a_factor_of_rider_pedal_human_power 49-Implement_battery_current_ramp 50-Stall_protection_kicks_in_on_startup-0.15.0 7-Correct_calculated_value_of_Watts_hour 74-Correct_pedal_human_power 8-cadence-low-pass-filter EEPROM_fail_default_values_fix assist_level_as_factor_of_pedal_power development * master origin/14-walk-assist-mode test_0.17_beta cas@cas:~/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/src/display/KT-LCD3$ git pull Already up to date. cas@cas:~/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/src/display/KT-LCD3$ make -f Makefile_linux clean Cleaning files... Done. cas@cas:~/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/src/display/KT-LCD3$ make -f Makefile_linux sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --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. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -ogpio.c gpio.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -oht162.c ht162.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -oadc.c adc.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -otimers.c timers.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -olcd.c lcd.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -ouart.c uart.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -oeeprom.c eeprom.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -obuttons.c buttons.c sdcc -c -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug -outils.c utils.c sdcc -I../../common/STM8S_StdPeriph_Lib/inc -I. -I../../ -mstm8 -Ddouble=float --std-c99 --nolospre --opt-code-size --out-fmt-elf --debug main.c ../../common/STM8S_StdPeriph_Lib/src/stm8s_iwdg.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_clk.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_gpio.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_adc1.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_tim1.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_tim3.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_uart2.rel ../../common/STM8S_StdPeriph_Lib/src/stm8s_flash.rel gpio.rel ht162.rel adc.rel timers.rel lcd.rel uart.rel eeprom.rel buttons.rel utils.rel main.c:82: warning 126: unreachable code stm8-size main.elf -A main.elf : section size addr DATA 286 1 INITIALIZED 198 287 SSEG 1 4294967295 HOME 99 32768 GSINIT 26 32867 GSFINAL 3 32893 CONST 12 32896 INITIALIZER 198 32908 CODE 32176 33106 .debug_line 31457 0 .debug_loc 40545 0 .debug_abbrev 2401 0 .debug_info 47598 0 .debug_pubnames 9784 0 .debug_frame 34022 0 Total 198806 stm8-objcopy -O binary -R DATA -R INITIALIZED -R SSEG -R .debug_line -R .debug_loc -R .debug_abbrev -R .debug_info -R .debug_pubnames -R .debug_frame main.elf main.bin stm8-objcopy -O ihex -R DATA -R INITIALIZED -R SSEG -R .debug_line -R .debug_loc -R .debug_abbrev -R .debug_info -R .debug_pubnames -R .debug_frame main.elf main.hex cas@cas:~/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/src/display/KT-LCD3$ sdcc -v SDCC : mcs51/z80/z180/r2k/r3ka/gbz80/tlcs90/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8 3.8.0 #10557 (Linux) published under GNU General Public License (GPL) cas@cas:~/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/src/display/KT-LCD3$
Hey Casainho,
I installed the same release of SDCC as you have (v3.8.0 r10557) and I am still seeing the same 'buffer overflow' error after the led.c file as before. In the Makefile, I moved the led.c file to the bottom of the list and tried building again and saw that all the files are building correctly except for the led.c file.
To do some basic debugging, I checkout out an older commit and found that my build was succeeding. After some back and forth, I found that my build is succeeding until the following sha: a3d06ca65f7a3226ddacb321ec1d4c975bb91681. Any commit after this one is causing my build to fail with the 'buffer overflow' error for the led.c file. I am really quite lost as to what exactly changed between this commit and the next one that is causing my builds to fail. Is there a flag or a setting in SDCC or in the source that I need to set prior to compiling? I must be missing something if the builds are working for you guys.
Also, after failing on my Linux computer, I retried the entire process on my Windows 10 computer but in the Windows Subsystem for Linux with Ubuntu 18.04. I saw the exact same results...
I am at a loss as to what could be causing this. Any help would be really appreciated!
Thank you,
Sid
buba said:thineight said:What is the setup wiki valid for this one? The 18.2?
So I conclude that the above 0.19beta for LCD3 and motor are not directly from Buba earlier 0.19beta code.![]()
I think it is best to wait for the official beta that Casainho will release and test it from thereIt will be compatible with the wiki I previously linked in the thread:
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Features-and-configurations-for-version-0.19.X-%28BETA%29
thineight said:A question for buba and casainho.
I see you both have released a v0.19beta (buba few weeks ago and casainho recently).. is the current casainho's the master one, obtained from buba's + latest torque factors?
Wiki:
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Features-and-configurations-for-version-0.19.X-%28BETA%29
Buba wrote this on the change log: * Heavily optimized code size and speed.thineight said:Last question: is the LCD3 display development "officially" closed?
thineight said:Thanks Buba, maybe you meant to say "wait for the stable v.0.19" not the beta, as the latter is already out on casainho repository.
https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/releases/tag/v0.19.0-beta1
I would like to try this out (as I'm currently with your 0.18beta) , but I'm not sure which wiki applies to this new beta.
thineight said:Last question: is the LCD3 display development "officially" closed?
casainho said:Buba wrote this on the change log: * Heavily optimized code size and speed.
I think he must had a lot of work to optimize the code size so it could go to LCD3 memory, so I think not many will want to do that type of optimizations every time they want to change some bits on LCD3. And I really hope there are some free bit there available for maintenance (as there is no point to have the memory full of code with some bugs, in the case that bugs do appear).
buba said:I also think Casainho would really like that all the development is focused on the other displays, 850C and SW102. I respect that decision and think it is the right way forward for future development and the community.
Yes, let's move to the more capable and flexible LCDs.buba said:It was a lot of work and it slows down the development so much. When I tried to add the higher resolution on the assist level multipliers it was like taking one step forward and two steps back.
That would be great!!sidmodi said:Hi casainho, buba,
I would be interested in helping out with the SW102 bluetooth LCD. In one of my past internships, I had to develop a couple of simple Bluetooth applications using an nRF51 board so I have some basic experience with the Nordic uC products. I'll have to order one of those first. Once I receive it, I will reach out to you for some help on getting started. I'll give up on trying to set up the LCD3 for now.
Maybe in 1 or 2 weeks as I need to develop and test the change I mentioned before.thineight said:Hi casainho, just for my information are you planning to release the new 0.19beta soon? should I wait or is it better to install the 18.2 in the meantime?
Thanks