Page 1 of 1

How to setup a PC to edit and compile a bin that can be uploaded to the VCU or Mini board

Posted: Wed Apr 17, 2024 11:14 pm
by ted.walsh
Allright, I've hacked around with various code formats over the years, BASIC, DOS, BATCH, VB et al, I can probably hold my own at a Noobs convention and hack my way across the open plains of coding but FFS what development environment, what programme do i need to install on my PC to hack about with the source off Damiens GIT, compile it and then upload it to the VCU etc?. Can anyone just give me PDF on how to endanger myself so I can get on with it? please...

Re: How to setup a PC to edit and compile a bin that can be uploaded to the VCU or Mini board

Posted: Thu Apr 18, 2024 6:26 am
by Jacobsmess
I'm no coder, and someone will be along shortly to correct me but I believe it's all c/c++. Arduino IDE or similar should be all you need to look at the binaries (I think). Otherwise, the code is completely uploaded by the web interface, no other software required.
Also, please do not endanger yourself or anyone else (pot calling the kettle black here perhaps!)

Re: How to setup a PC to edit and compile a bin that can be uploaded to the VCU or Mini board

Posted: Thu Apr 18, 2024 6:41 am
by Bigpie
https://github.com/crasbe/ZombieBuild will help with the VCU firmware building and also OI. Be aware and changes you make could result in unexpected behaviour, obviously.

Re: How to setup a PC to edit and compile a bin that can be uploaded to the VCU or Mini board

Posted: Mon Apr 29, 2024 10:59 pm
by ted.walsh
Bigpie wrote: Thu Apr 18, 2024 6:41 am https://github.com/crasbe/ZombieBuild will help with the VCU firmware building and also OI. Be aware and changes you make could result in unexpected behaviour, obviously.
Thanks for your help on this BP,
can you tell me where I might find a source of stdint.h and its associated mates? there appear to be pointers in the STM32 making ref and throwing errors?

Re: How to setup a PC to edit and compile a bin that can be uploaded to the VCU or Mini board

Posted: Tue May 21, 2024 7:15 pm
by peterdiffey
Hi Ted,

I just did my first Openinverter compile this very afternoon. From knowing nothing to firmware loaded took less that 1 hour.
I am assuming the VCU has a web interface, that allows you to upload the new firmware.

If you have a Raspberry Pi, it's a doddle

A very quick howto - assuming you have a raspberry pi with Raspian installed. and are doing an OpenInverter build

All done from the command line

sudo apt-get install git
mkdir zombbieverter
cd zombbieverter/
git clone https://github.com/damienmaguire/Stm32-vcu
cd Stm32-vcu/
sudo apt-get install *arm-none*
make get-deps

## Do all yer dodgy hacks and then

make

ls -al stm32_vcu.bin ## check for a sensible date on the new file ie a few secs ago

The first compile took about 2 minutes on a RPI 5, subsequent small code changes took about 3 secs.

getting it to the VCU board can be abit of a faff, I use a USB stick, plug it in to the RPi

sudo mkdir /z
dmesg | grep sd ## and note the last device - probably sda
sudo mount /dev/sda1 /z

cp stm32_vcu.bin /z

ls /z ## check it is really there

sudo umount /z ## to avoid possibly trashing the USB stick when you unplug it

Now you can plug in the USB stick to your laptop and upload the file to your VCU.

I was very surprised how easy it was, I can now get HV battery voltage out of the VCU via Canbus

Pete

Re: How to setup a PC to edit and compile a bin that can be uploaded to the VCU or Mini board

Posted: Wed Nov 06, 2024 10:17 pm
by ted.walsh
Bigpie wrote: Thu Apr 18, 2024 6:41 am https://github.com/crasbe/ZombieBuild will help with the VCU firmware building and also OI. Be aware and changes you make could result in unexpected behaviour, obviously.

I just went through this again on a new laptop and found a couple of things that would make it easier for future installs & big thanks for setting up the Git and links as they are very helpful.

Can I suggest the following.
your link to the windows docker installer doesn't have a windows intel version listed (yeah yeah yeah) however it can be found here https://docs.docker.com/desktop/install ... s-install/

add the instruction to "download ZIP" from the Git 'Code', unzip the contents into what will become the projects base folder and then run the SetupContainer.bat

thanks again.
TED

Re: How to setup a PC to edit and compile a bin that can be uploaded to the VCU or Mini board

Posted: Thu Nov 07, 2024 2:50 pm
by crasbe
"AMD64" is the version for all x86_64 processors (including Intel), so the link to the Getting Started page is correct:
Bild_2024-11-07_150630768.png
I could add the instructions how to download the zip archive, however I did not anticipate that that would be an issue.
The README is already updated.