KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

ThierryGTLTS said:
Fine interface.

So, the mysterious P1 parameter in the LCD3 manual is related to motor rotor offset angle :!:

And other parameters after are there to tweak and improve the FOC behaviour if I understand, right :?: :!:
That software is for configuring our OpenSource firmware that we implemented from scratch - that options are for our firmware only.
 
I did finish the design, next I will make it generating the config.h file (also there are not instructions yet). The sources are on the branch "netbeans-configuration_tool".

The jar file have the look and feel of Linux but should have the Windows look and feel when running on Windows, can someone please test and share a screenshot?

Actual state on Linux:






 

Attachments

  • Flexible_OpenSource_EBike_firmware-Configuration_tool.zip
    56.2 KB · Views: 29
Nice pastime over christmas :). It works on windows. I personally prefer not to have to scroll down, to see all parameters and buttons, but that's just my personal opinion.

regards
stancecoke
 

Attachments

  • Configuration Tool.PNG
    Configuration Tool.PNG
    9.6 KB · Views: 4,533
No to good looking on Windows but not bad at all.

I started to reuse your code, for the action buttons and for OS detection, and it seams to works :)





 
Stancecoke,

It works now, but only on Windows since I reused your code. The write options bytes should work as also the write configuration - can you please test? View attachment Flexible_OpenSource_EBike_firmware-Configuration_tool.zip

and build the firmware? (you will need to checkout the latest firmware).

Missing:
- Linux commands
- Help text for each option

I really like this way, seems only one long sheet with all options... maybe that is how my brain is formatted...
 
Stancecoke,

I added the Linux commands and they seem to work. I used shell scripts and you did on Windows. But I also moved the tool to the folder: firmware_configuration_tool

Can you please pull the firmware and try use the configuration tool on Windows? please look at the paths for the scritps as I changed them, you can see for instance the changes I did for make run on Linux, on that specific folder.
Would be great if you could test and push the needed changes for it to work on Windows.
 
casainho said:
Can you please pull the firmware and try use the configuration tool on Windows?
It doesn't work the way it is on windows. I don't know how to set the pathes in the batch files. So I would suggest to copy the windows- batchfiles back to the main folder for the moment, to have a working solution for potential windows users.

and again, there are several error messages in the log while compiling. (with C#ROME-B)
Code:
C:\temp\BMSBattery_S_controllers_firmware-master>make -f Makefile_windows
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oStdPeriphLib/src/stm8s_itc.c StdPeriphLib/src/stm8s_itc.c
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oStdPeriphLib/src/stm8s_clk.c StdPeriphLib/src/stm8s_clk.c
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oStdPeriphLib/src/stm8s_iwdg.c StdPeriphLib/src/stm8s_iwdg.c
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oStdPeriphLib/src/stm8s_gpio.c StdPeriphLib/src/stm8s_gpio.c
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oStdPeriphLib/src/stm8s_exti.c StdPeriphLib/src/stm8s_exti.c
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oStdPeriphLib/src/stm8s_uart2.c StdPeriphLib/src/stm8s_uart2.c
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp4. Please contact sdcc authors with source code to reproduce.
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oStdPeriphLib/src/stm8s_tim1.c StdPeriphLib/src/stm8s_tim1.c
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oStdPeriphLib/src/stm8s_tim2.c StdPeriphLib/src/stm8s_tim2.c
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oStdPeriphLib/src/stm8s_adc1.c StdPeriphLib/src/stm8s_adc1.c
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp1. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp1. Please contact sdcc authors with source code to reproduce.
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oStdPeriphLib/src/stm8s_flash.c StdPeriphLib/src/stm8s_flash.c
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -owatchdog.c watchdog.c
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -ogpio.c gpio.c
In file included from gpio.h:50,
                 from gpio.c:11:
main.h:23:1: warning: "MOTOR_TYPE" redefined
In file included from main.h:12,
                 from gpio.h:50,
                 from gpio.c:11:
config.h:35:1: error: this is the location of the previous definition
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -outils.c utils.c
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -ouart.c uart.c
In file included from uart.c:15:
main.h:23:1: warning: "MOTOR_TYPE" redefined
In file included from main.h:12,
                 from uart.c:15:
config.h:35:1: error: this is the location of the previous definition
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oadc.c adc.c
In file included from gpio.h:50,
                 from adc.c:12:
main.h:23:1: warning: "MOTOR_TYPE" redefined
In file included from main.h:12,
                 from gpio.h:50,
                 from adc.c:12:
config.h:35:1: error: this is the location of the previous definition
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -obrake.c brake.c
In file included from gpio.h:50,
                 from brake.c:12:
main.h:23:1: warning: "MOTOR_TYPE" redefined
In file included from main.h:12,
                 from gpio.h:50,
                 from brake.c:12:
config.h:35:1: error: this is the location of the previous definition
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -opas.c pas.c
In file included from gpio.h:50,
                 from pas.c:12:
main.h:23:1: warning: "MOTOR_TYPE" redefined
In file included from main.h:12,
                 from gpio.h:50,
                 from pas.c:12:
config.h:35:1: error: this is the location of the previous definition
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -otimers.c timers.c
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -opwm.c pwm.c
In file included from gpio.h:50,
                 from pwm.c:12:
main.h:23:1: warning: "MOTOR_TYPE" redefined
In file included from main.h:12,
                 from gpio.h:50,
                 from pwm.c:12:
config.h:35:1: error: this is the location of the previous definition
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oeeprom.c eeprom.c
In file included from eeprom.h:12,
                 from eeprom.c:12:
main.h:23:1: warning: "MOTOR_TYPE" redefined
In file included from main.h:12,
                 from eeprom.h:12,
                 from eeprom.c:12:
config.h:35:1: error: this is the location of the previous definition
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -omotor.c motor.c
In file included from ebike_app.h:13,
                 from motor.c:17:
main.h:23:1: warning: "MOTOR_TYPE" redefined
In file included from main.h:12,
                 from ebike_app.h:13,
                 from motor.c:17:
config.h:35:1: error: this is the location of the previous definition
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp121. Please contact sdcc authors with source code to reproduce.
motor.c:1039: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
sdcc -c -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  -oebike_app.c ebike_app.c
In file included from ebike_app.h:13,
                 from ebike_app.c:9:
main.h:23:1: warning: "MOTOR_TYPE" redefined
In file included from main.h:12,
                 from ebike_app.h:13,
                 from ebike_app.c:9:
config.h:35:1: error: this is the location of the previous definition
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp9. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp9. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp9. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp9. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp4. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp4. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp4. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp4. Please contact sdcc authors with source code to reproduce.
sdcc -IStdPeriphLib/inc -I.  -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-ihx --debug  main.c StdPeriphLib/src/stm8s_itc.rel StdPeriphLib/src/stm8s_clk.rel StdPeriphLib/src/stm8s_iwdg.rel StdPeriphLib/src/stm8s_gpio.rel StdPeriphLib/src/stm8s_exti.rel StdPeriphLib/src/stm8s_uart2.rel StdPeriphLib/src/stm8s_tim1.rel StdPeriphLib/src/stm8s_tim2.rel StdPeriphLib/src/stm8s_adc1.rel StdPeriphLib/src/stm8s_flash.rel watchdog.rel gpio.rel utils.rel uart.rel adc.rel brake.rel pas.rel timers.rel pwm.rel eeprom.rel motor.rel ebike_app.rel
In file included from gpio.h:50,
                 from main.c:12:
main.h:23:1: warning: "MOTOR_TYPE" redefined
In file included from main.h:12,
                 from gpio.h:50,
                 from main.c:12:
config.h:35:1: error: this is the location of the previous definition
main.c:119: warning 126: unreachable code

?ASlink-Warning-Undefined Global '_wheel_speed_sensor_init' referenced by module 'main'
make: *** [main] Error 1

C:\temp\BMSBattery_S_controllers_firmware-master>ren main.ihx main.hex

C:\temp\BMSBattery_S_controllers_firmware-master>STVP_CmdLine -BoardName=ST-LINK -ProgMode=SWIM -Port=USB -Device=STM8S105x6 -FileProg=main.hex -verbose -no_loop

regards
stancecoke
 
For me, on master, builds as expected:

cas@cas-sp4:~/OpenSource-EBike-firmware/BMSBattery_S_controllers_firmware$ make -f Makefile_linux
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oStdPeriphLib/src/stm8s_itc.c StdPeriphLib/src/stm8s_itc.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oStdPeriphLib/src/stm8s_clk.c StdPeriphLib/src/stm8s_clk.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oStdPeriphLib/src/stm8s_iwdg.c StdPeriphLib/src/stm8s_iwdg.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oStdPeriphLib/src/stm8s_gpio.c StdPeriphLib/src/stm8s_gpio.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oStdPeriphLib/src/stm8s_exti.c StdPeriphLib/src/stm8s_exti.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oStdPeriphLib/src/stm8s_uart2.c StdPeriphLib/src/stm8s_uart2.c
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp4. Please contact sdcc authors with source code to reproduce.
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oStdPeriphLib/src/stm8s_tim1.c StdPeriphLib/src/stm8s_tim1.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oStdPeriphLib/src/stm8s_tim2.c StdPeriphLib/src/stm8s_tim2.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oStdPeriphLib/src/stm8s_adc1.c StdPeriphLib/src/stm8s_adc1.c
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp1. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp0. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp1. Please contact sdcc authors with source code to reproduce.
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oStdPeriphLib/src/stm8s_flash.c StdPeriphLib/src/stm8s_flash.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -owatchdog.c watchdog.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -ogpio.c gpio.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -outils.c utils.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -ouart.c uart.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oadc.c adc.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -obrake.c brake.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -opas.c pas.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -owheel_speed_sensor.c wheel_speed_sensor.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -otimers.c timers.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -opwm.c pwm.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oeeprom.c eeprom.c
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -omotor.c motor.c
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp121. Please contact sdcc authors with source code to reproduce.
motor.c:1003: warning 85: in function do_motor_controller_mode unreferenced local variable : 'ui8_pwm_duty_cycle_current_controller'
motor.c:1039: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
/home/cas/software/stm8-binutils/bin/sdcc -c -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug -oebike_app.c ebike_app.c
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp44. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp32. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp2. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp4. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp4. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp4. Please contact sdcc authors with source code to reproduce.
Warning: Non-connected liverange found and extended to connected component of the CFG:iTemp4. Please contact sdcc authors with source code to reproduce.
/home/cas/software/stm8-binutils/bin/sdcc -IStdPeriphLib/inc -I. -mstm8 -Ddouble=float --std-c99 --nolospre --out-fmt-elf --debug main.c StdPeriphLib/src/stm8s_itc.rel StdPeriphLib/src/stm8s_clk.rel StdPeriphLib/src/stm8s_iwdg.rel StdPeriphLib/src/stm8s_gpio.rel StdPeriphLib/src/stm8s_exti.rel StdPeriphLib/src/stm8s_uart2.rel StdPeriphLib/src/stm8s_tim1.rel StdPeriphLib/src/stm8s_tim2.rel StdPeriphLib/src/stm8s_adc1.rel StdPeriphLib/src/stm8s_flash.rel watchdog.rel gpio.rel utils.rel uart.rel adc.rel brake.rel pas.rel wheel_speed_sensor.rel timers.rel pwm.rel eeprom.rel motor.rel ebike_app.rel
main.c:119: warning 126: unreachable code
stm8-size main.elf -A
main.elf :
section size addr
DATA 98 1
INITIALIZED 321 99
SSEG 3 420
HOME 131 32768
GSINIT 30 32899
GSFINAL 3 32929
CODE 23938 32932
INITIALIZER 321 56870
.debug_line 25701 0
.debug_loc 6400 0
.debug_abbrev 2589 0
.debug_info 29370 0
.debug_pubnames 10618 0
.debug_frame 432 0
Total 99955


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
cas@cas-sp4:~/OpenSource-EBike-firmware/BMSBattery_S_controllers_firmware$
 
stancecoke said:
It doesn't work the way it is on windows. I don't know how to set the pathes in the batch files. So I would suggest to copy the windows- batchfiles back to the main folder for the moment, to have a working solution for potential windows users.
On Windows, original example:
Code:
del main.hex
make -f Makefile_windows clean

Now we are 2 folder after, so we should need "..\..":
Code:
del ..\..\main.hex

And make needs C command to say it will run 2 folders backwards:
Code:
make -C '..\..\' -f Makefile_windows clean

Linux version that works:
Code:
make -C '../../' -f Makefile_linux clean
 
I've just updated the makefile_windows, that fixed one error. Is it right, that you don't configure the motortype any longer in the tool? Then I have to delete this option from the C#ROME-B tool, to get back to a working windows-solution.
To set the pathes in the right way is not that easy, your suggestion does't work :-(

Regards
stancecoke
 
Ok then I will move all the scripts to root folder.

Yes about the motor type. In the end, motor type just changes a parameter for PID speed controller, so I think we can mantain the same value and not use motor type for now on the user configuration tool.

I will improve as needed, from users feedback.
 
casainho said:
Ok then I will move all the scripts to root folder.

I've done that already, the C#ROME-B is updated already, too. So the windows toolchain should work again now.

regards
stancecoke
 
I've figured out the right syntax in Java now. You have to change this two lines, to execute the batch files in the windows_scripts folder:

Code:
...

Process process = Runtime.getRuntime().exec("cmd /c start windows_scripts\\WriteOptionBytes");

...

Process process = Runtime.getRuntime().exec("cmd /c start windows_scripts\\Start_Compiling");

...
With this change, it should work with windows, too.

I've adjusted the batch file in the windows_scripts folder on github already.

edit: I've just seen, that you are using this syntax in the Java-sourcecode already. So it works as it is with my changes in the batchfile and the move of the make.exe and the dlls to the windows_scripts folder :D .

Regards
stancecoke
 
stancecoke said:
. So it works as it is with my changes in the batchfile and the move of the make.exe and the dlls to the windows_scripts folder :D .
That's great!! And I need to test on Linux, test building and flashing, as I didn't before.

And now even more ideas and changes!! :)

So, why not do as we did before with the documentation, put the focus in the user?
So, user download from the github and after unzip, the root folder could have the java executable + user documentation (the one that is online). Firmware sources would be on firmware folder. This would mean that the paths to build the firmware, etc would need to be changed.
What do you think?
The notes files can export as html or PDF, but I am not sure PDF is better than html.
 
Got the scripts running on Linux, and so the Java firmware configuration tool now work on Windows and Linux.
The missing thing now is help text for each option.

I also found some incorrect implementations on the firmware, they are now resolved.
 
casainho said:
the root folder could have the java executable + user documentation (the one that is online). Firmware sources would be on firmware folder.
What do you think?
Yes, this makes sense.

casainho said:
The notes files can export as html or PDF, but I am not sure PDF is better than html.
PDF would be better for printing, I guess. But I wouldn't pack the documentation to the master branch, as it will take several Megabyte of data. Even your pixelcamp presentation would better be placed on bitbucket. I always get annoyed about the slow download of almost 40MB for the Masterbranch as zip-file.

regards
stancecoke
 
Finally added the help text. I think the tool is now finished.



When clicking on the help for "Throttle control algorithm output":
 
I like a lot Podride and I wanted to offer my help, so I sent the following message to their contact channels.

Hi.

I am a developer of Flexible OpenSource firmware for EBike motor controllers and I would like to offer my help (for free) as I really believe in what Podride represents.

Our EBike motor controllers firmware is flexible and OpenSource, more than customization, any feature for some specific need can be easily implemented and for free (no need to pay any commercial license).

The firmware runs on the capable but also cheap EBike motor controllers with various sizes e powers, from 0.25kW up to 5kW.

You can reach me at: casainhoMAIL or our community at: https://opensourceebikefirmware.bitbucket.io/s

[youtube]4lKq1fGtXFM[/youtube]
 
stancecoke said:
casainho said:
the root folder could have the java executable + user documentation (the one that is online). Firmware sources would be on firmware folder.
What do you think?
Yes, this makes sense.

casainho said:
The notes files can export as html or PDF, but I am not sure PDF is better than html.
PDF would be better for printing, I guess. But I wouldn't pack the documentation to the master branch, as it will take several Megabyte of data. Even your pixelcamp presentation would better be placed on bitbucket. I always get annoyed about the slow download of almost 40MB for the Masterbranch as zip-file.
I made it. And I didn't put the documentation there, because of the space and also no need to duplicate, as the final user should have internet -- I just pointed on README.md file to http://opensourceebikefirmware.bitbucket.io/

I tested on Linux and also updated the paths for Windows but I can't test it - can you please test?

Also, you will see that I updated the tool to:
- if torque sensor is selected and human power is also selected, the PAS options are enabled because for human power the user need to setup PAS options.

 
casainho said:
I tested on Linux and also updated the paths for Windows but I can't test it - can you please test?

I've just updated the Start_Compiling.bat at github, it works now with Windows, too.
The call of the batch file from eclipse doesn't work at the moment, as it's no longer placed in the firmware folder, but I will only fix that, if someone wants to use it really.

regards
stancecoke
 
stancecoke said:
I've just updated the Start_Compiling.bat at github, it works now with Windows, too.
Good!!
And I just updated the user documentation with screenshots and info about the firmware configuration tool + windows instructions, that I did copy from your site. I also linked to your site and I want to mention it on the main page.

I think the documentation and the firmware are now finished but they have space for improvement. I hope to keep improve the documentation on next days.
 
The v. reg is too hot to touch after around 2 minutes - is that ok?

Yes, the 5v is present at all these points.

I think I may have made a stupid mistake with my st-link connector. I used a jst-sh connector (single row) to fit into the st link, completely forgetting that the pins were open to one side of the connector. These were probably touching the other row of pins putting RST-SWCLK and SWIM-SWDIO. I guess this must have been affecting programming and may have damaged the st-link.. :oops: Have now ordered another st-link just in case.

Thanks for your offer to diagnose but I won't trouble you guys with this, you've been enough help already. Like we said these things are cheap enough to not worry too much.

.....I've had a bit of a developement with my 'dead' controller. As an experiment I downloaded the latest github firmware and.....guess what.....my dead controller has sprung into life. Despite my earlier attempts seeming to load up the data ok, there was clearly some error. The hot LM317 reg. and my cable mistake were false trails and were not related to these previous issues.

I won't get to try this 'on the road' till tomorrow but I have one small issue so far - the new configurator layout can't be fully viewed on my laptop screen, which is 1280x800 resolution. The 'write configuration' button at the very bottom disappears off the lower screen and cannot be dragged or scrolled into view. I have got round this by manually changing 'config.h' and running 'start compiling.bat' but this is obviously not ideal, is it possible to fix this?

Anyway, some progress, hopefully a New Years Day pointer for the rest of my year.. :wink:
 
That is great news!! Also great that you could understand the technical side and corner the issue.

I will make the window resizeable and probably smaller... The issue is also that I have a display of 4k or something like that and the window is very small on that display... Maybe there is a way for java to scale automatically the size depending on display ppi.

I hope to have a new version tomorrow.
 
Ok, thanks.

One thing I noticed in the config.h file - I had to change the pas direction (3rd line from the end) and noticed in the default option the word 'RIGHT' was misspelt. Probably of no consequence but thought I'd mention in case it was a significant tag.
 
geofft said:
but I have one small issue so far - the new configurator layout can't be fully viewed on my laptop screen, which is 1280x800 resolution. The 'write configuration' button at the very bottom disappears off the lower screen and cannot be dragged or scrolled into view.
Can you please send a screenshot?
 
Back
Top