Tesla charger STM32 firmware now open source
- johu
- Site Admin
- Posts: 6709
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 368 times
- Been thanked: 1536 times
- Contact:
Tesla charger STM32 firmware now open source
I finally got around to publishing the charger firmware.
Janosch has added unit tests to it for that finishing touch, thanks very much!
https://github.com/jsphuebner/stm32-teslacharger
Please understand that with this step I completely withdraw from development and support of this firmware and would be happy to find a new maintainer.
Janosch has added unit tests to it for that finishing touch, thanks very much!
https://github.com/jsphuebner/stm32-teslacharger
Please understand that with this step I completely withdraw from development and support of this firmware and would be happy to find a new maintainer.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 6
- Joined: Mon Dec 05, 2022 5:36 am
- Has thanked: 5 times
- Been thanked: 6 times
Re: Tesla charger STM32 firmware now open source
Thank you for everything that you've done, Johannes. It's such a terrific effort.
Re: Tesla charger STM32 firmware now open source
hi, can someone build the .bin and .hex for me, i'm messing around with the terminal and cubeIDE but i keep getting the same error messages. I would like to try this version but I just can't get it to build.
thx
thx
-
- Posts: 261
- Joined: Sun Feb 20, 2022 4:23 am
- Location: N. Wiltshire. UK
- Has thanked: 22 times
- Been thanked: 130 times
Re: Tesla charger STM32 firmware now open source
Files below, but it's version 1.17.R which I think you are already using.
- Attachments
-
- stm32_charger.hex
- (65.97 KiB) Downloaded 192 times
-
- stm32_charger.bin
- (23.44 KiB) Downloaded 194 times
Re: Tesla charger STM32 firmware now open source
Thx men!
I'm the meantime I got the building also working! But when I make some changes in the chargercan file and build it and then upload the changes are not working. I changed the DC set current to ac set current but when I flash the new bin file the DC current is still changing via the can messages and not the AC current.
I think the flashing via the web interface is not working. I got the upload complete message followed bij 0% until 100% so normal that would be ok. But maybe got a old bootloader and the flashing via web is not working. Try tomorrow via stlink.
I'm the meantime I got the building also working! But when I make some changes in the chargercan file and build it and then upload the changes are not working. I changed the DC set current to ac set current but when I flash the new bin file the DC current is still changing via the can messages and not the AC current.
I think the flashing via the web interface is not working. I got the upload complete message followed bij 0% until 100% so normal that would be ok. But maybe got a old bootloader and the flashing via web is not working. Try tomorrow via stlink.
- johu
- Site Admin
- Posts: 6709
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 368 times
- Been thanked: 1536 times
- Contact:
Re: Tesla charger STM32 firmware now open source
Ah, what it does is checking whether the canmap loaded successfully from flash. Only if it didn't it will execute the code in chargercan. That change was necessary to allow user mappings again. You'd need to erase the second-to-last flash page for it to be reinitialized.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 80
- Joined: Sun Oct 30, 2022 2:21 am
- Has thanked: 4 times
- Been thanked: 9 times
Re: Tesla charger STM32 firmware now open source
Hi guys. I was wondering if 1.17R is still the most current version of the firmware (which I am running). If not, is it possible to post a download for the latest version in .bin and .hex? Thanks!
Re: Tesla charger STM32 firmware now open source
I'm not certain, but looking through the source code I think there is a newer version than 1.17R. One of the files seems to reference 1.6 if I am reading it right.
I'm trying to compile the code but hit a roadblock. After getting Ubuntu running on my laptop (something I wanted to do anyway) and getting my SSH key attached to my github account, I managed to clone the repository and get-deps, but when running the make command I seem to be missing my_fp.c and my_fp.o? Obviously, this stuff is clearly beyond me. I do have my_fp.h. And, the .bin and .hex files do actually appear after running the command. It looks like the error is coming up in the 'test' phase but not sure if that is a problem or not.
If I can sort it out I may post the bin after uploading it to my board to verify the version.. though I'm not sure anyone would want to trust it in case I still managed to compile it wrong etc.
I'm trying to compile the code but hit a roadblock. After getting Ubuntu running on my laptop (something I wanted to do anyway) and getting my SSH key attached to my github account, I managed to clone the repository and get-deps, but when running the make command I seem to be missing my_fp.c and my_fp.o? Obviously, this stuff is clearly beyond me. I do have my_fp.h. And, the .bin and .hex files do actually appear after running the command. It looks like the error is coming up in the 'test' phase but not sure if that is a problem or not.
If I can sort it out I may post the bin after uploading it to my board to verify the version.. though I'm not sure anyone would want to trust it in case I still managed to compile it wrong etc.
-
- Posts: 261
- Joined: Sun Feb 20, 2022 4:23 am
- Location: N. Wiltshire. UK
- Has thanked: 22 times
- Been thanked: 130 times
Re: Tesla charger STM32 firmware now open source
That has compiled the file. OBJCOPY stm32_charger.bin creates the bin file which will be in the project folder.
There is something wrong in the makefile that is causing the error, but it can be ignored.
I posted bin file here yesterday. viewtopic.php?p=73725#p73725
There is something wrong in the makefile that is causing the error, but it can be ignored.
I posted bin file here yesterday. viewtopic.php?p=73725#p73725
Re: Tesla charger STM32 firmware now open source
Ah, okay, thanks. I knew the bin was made but couldn't tell if it was complete or not. Hate to ignore an error when I don't understand what it is, haha.
EDIT: Discovered the problem was I didn't have g++ installed. Discovered this by trying to repeat the command right before the error, and it said g++ was not installed. Once installed I ran the compile again and this time it gave me some debugging info and said all the tests passed. Uploaded to the board (which is still on the bench, charger is in the mail) and it comes back as 1.19.R just like yours.
EDIT: Discovered the problem was I didn't have g++ installed. Discovered this by trying to repeat the command right before the error, and it said g++ was not installed. Once installed I ran the compile again and this time it gave me some debugging info and said all the tests passed. Uploaded to the board (which is still on the bench, charger is in the mail) and it comes back as 1.19.R just like yours.