Having Trouble Compiling Stancecoke Firmware

sdobbie

100 W
Joined
Dec 14, 2013
Messages
137
Location
Fife Scotland
Hi, having a bit of trouble getting the firmware compiled. I managed to get the whole project loaded into eclipse but there are two problems, first, I can't see sdcc batch when I click on the run button and there are 33 errors and 8 warnings saying that type uint16_t could not be resolved, etc.

My workspace is C:\Users\s\eclipse-workspace
The project is stored in C:\BMSBattery_S_controllers_firmware-Master
 
Are you in plain eclipse or using the stm version? I think stancecoke wrote it in the ST SW4STM32 ide and that contains all the gnu and types and whatever you need. If you try in plain eclipse you're onto an uphill struggle. It's probably possible but easier if you just import the project into the new stm cube ide. I say, having had a similar problem but not with stancecoke firmware.
 
sdobbie said:
The project is stored in C:\BMSBattery_S_controllers_firmware-Master

So I'm assuming, that you want to try the Kunteng project, not the Lishui project :)
Do you want to add new features to the firmware, or why don't you use the Java GUI?!

Have you read the tutorial carefully?

regards
stancecoke
 
Thanks everyone for the replies,

I bought the 12 mosfet svp version kt controller and was wanting to get the software set up before it arrives just to understand how it all works and maybe in future I will add stuff to it. I managed to get the software more set up, all the errors are gone, I have the sdcc batch option and I just have errors like Unused declaration of function 'EXTI_PORTA_IRQHandler' left and also get this error when I select the sdcc batch

option in eclipse Variable references non-existent resource : ${workspace_loc:/BMSBattery_S_controllers_firmware/Start_Compiling.bat}

What I was wanting to do was practice on a small 6 fet controller I have which uses the STM8S903K3 and do some basic programming on it and familiarise myself with the hardware and the IDE. I am used to the arduino IDE and have done a lot of projects with it but need to move on as it doesn't really support most of these STM chips. I would start by doing a simple hello world kind of program which just flashes some lights using the mosfet h bridge and move on from there. Even though it is a square wave controller I would like to add regen to it if there is any source code out there for these more basic controllers.
 
sdobbie said:
Thanks everyone for the replies,

I bought the 12 mosfet svp version kt controller and was wanting to get the software set up before it arrives just to understand how it all works and maybe in future I will add stuff to it. I managed to get the software more set up, all the errors are gone, I have the sdcc batch option and I just have errors like Unused declaration of function 'EXTI_PORTA_IRQHandler' left and also get this error when I select the sdcc batch

option in eclipse Variable references non-existent resource : ${workspace_loc:/BMSBattery_S_controllers_firmware/Start_Compiling.bat}

What I was wanting to do was practice on a small 6 fet controller I have which uses the STM8S903K3 and do some basic programming on it and familiarise myself with the hardware and the IDE. I am used to the arduino IDE and have done a lot of projects with it but need to move on as it doesn't really support most of these STM chips. I would start by doing a simple hello world kind of program which just flashes some lights using the mosfet h bridge and move on from there. Even though it is a square wave controller I would like to add regen to it if there is any source code out there for these more basic controllers.
You can buy very cheap STM8S105 dev boards on Ebay for like 5 euros, they are great for development and maybe simulate the motor controller - I do that a lot.

Currently I moved from Eclipse to Visual Code Studio, that way I can develop for STM32, NRF52 and STM8, all of this microcontrollers for the ebike projects. I started to make Visual Code Studio working for STM8 and I had it but I deleted by mistake the project folder... - Visual Code Studio is much more easy to setup for flash and debug using the OpenOCD and GDB - I am even using it professionally for GDB remote debugging of code running on a Raspberry PI.
 
You can buy very cheap STM8S105 dev boards on Ebay for like 5 euros, they are great for development and maybe simulate the motor controller - I do that a lot.

Currently I moved from Eclipse to Visual Code Studio, that way I can develop for STM32, NRF52 and STM8, all of this microcontrollers for the ebike projects. I started to make Visual Code Studio working for STM8 and I had it but I deleted by mistake the project folder... - Visual Code Studio is much more easy to setup for flash and debug using the OpenOCD and GDB - I am even using it professionally for GDB remote debugging of code running on a Raspberry PI.

I'm a bit stuck because I can't find any tutorials for STM8S903K3 and I need to learn how to program for the microcontrollers I have available rather than programming for a dev board from ebay which uses a different chip and then having to change my code to work on the hardware I have. The main struggle I have is setting up the IDE for that specific controller I have and then knowing all the pin and port names which are normally all handled for me in Arduino.
 
sdobbie said:
The main struggle I have is setting up the IDE for that specific controller I have and then knowing all the pin and port names which are normally all handled for me in Arduino.

But there are the "Standard Peripheral Libs" that manage a lot for you...

For an easy start, you can use STM8CubeMX, this lets you configure the hardware in a graphic interface. I have not used it so far and I don't know what you get as output:
"Finally, the user launches the report generation utility."

https://www.st.com/en/development-tools/stm8cubemx.html

http://www.colecovision.eu/stm8/compilers.shtml

regards
stancecoke
 
casainho said:
I started to make Visual Code Studio working for STM8 and I had it but I deleted by mistake the project folder...

There are file recovery programs out there (some free) as long as nothing has overwritten the former file locations.
 
amberwolf said:
casainho said:
I started to make Visual Code Studio working for STM8 and I had it but I deleted by mistake the project folder...

There are file recovery programs out there (some free) as long as nothing has overwritten the former file locations.
Thanks but that was few weeks ago on my busy computer :)
 
I manage to get it to compile using the java tool and that should be fine for now. I am wondering about the regen though, do I solder a wire to pad x4 and attach a throttle to that? Also, what would happen if I accidentally twisted the power and regen throttles at the same time?
 
Back
Top