Tool chain

Post Reply
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Tool chain

Post by EV_Builder »

I was wondering which toolchain is needed to compile the code for the inverter?

Perhaps elaborate on it and make this a sticky.

Then we are a small step closer to participating :)
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Tool chain

Post by johu »

It is in the readme and I think thats where it belongs: https://github.com/jsphuebner/stm32-sine (scroll to bottom)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Tool chain

Post by EV_Builder »

Yeah, i found it but to me it doesn't make sense. But i deff can code, so perhaps there is way to lower the bar. When i got my environment setup i will post it here. If i succeed that is...
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Tool chain

Post by EV_Builder »

Until now:
missingHperhaps..JPG
I know the libs are on github so will pull them but i dont know where the my is.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Tool chain

Post by johu »

I don't know which build system you're trying to use there.
I suggest to roll with Linux but apparently Windows works too. In Debian based ones you just do

Code: Select all

apt install gcc-arm-none-eabi build-essentials
Thats a useful line I could add to the readme.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
dima
Posts: 157
Joined: Sun Dec 09, 2018 9:35 pm
Location: Canada

Re: Tool chain

Post by dima »

With Windows, you will need to install "Python" to build "libopencm3" + GCC + arm-none-eabi to build actual firmware.

It is not easy in Windows, I use a script to build.
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Tool chain

Post by EV_Builder »

Eeekss..... i hoped on a arduino style toolchain. Can't imagine that isn't available for a STM32 MCU...

Nobody went the Visual Code and arm-none-eabi way of doing things then....

Think i will crank up a VM then :)
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Tool chain

Post by johu »

Haha, Arduino didn't really exist when I started this code :) This is much better though, all self-contained bare metal stuff.

You can also try https://gitpod.io/#https://github.com/< ... stm32-sine

Just fork the project to your own git account then you can develop online if you want
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Tool chain

Post by EV_Builder »

Well it's just that i'm not that fit in toolchain setups and operating systems etc.

Yeah, i already downloaded everything. Now i need a toolchain.
And not only the compiler. Which IDE do you use?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Tool chain

Post by EV_Builder »

- First thing i wanted to build is auto-tune :)
- More CANBUS less WiFi
- C# GUI??

If i get the toolchain running i will start converting my inverter :)
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Tool chain

Post by johu »

Sounds good. I use Code::Blocks as IDE. The cbp file is the project file.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Tool chain

Post by EV_Builder »

OK I got code block setup but you have projects inside projects so i miss a bunch of dependencies.

Isn't there a project snapshot incl. all dependencies?
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Tool chain

Post by johu »

Executed "make get-deps" ?
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Tool chain

Post by EV_Builder »

That fails saying first no git (ok i know wy you leave that out, but i started vanilla) then it says its not within a GIT directory...

I compiled the "libopencm3" but then i get a big bunch of cpu folders/ wich part needs to be copied to the project?
(i assume this since make errors out with a reference to stm32/usart.h but in the stm32 folder in the library there are sub folders...)

For the rest almost there then :)
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Tool chain

Post by johu »

No other steps, make get-deps thats it. Yes some tools must be missing, it's so obvious to me that I can't explain it ;)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Tool chain

Post by EV_Builder »

ok i figured out i should use GIT... this works way easier. So i was too old school there :).

Now your commands work (obviously).

For Linux:
  • create a VM with Ubuntu (for example)
  • sudo apt-get install (ide of choice, git, gcc-arm-none-eabi)
  • create a directory for GIT clone (mkdir .....)
(omit the version tag if you want master/develop)
  • make get-deps
  • make
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
johu
Site Admin
Posts: 5791
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 157 times
Been thanked: 1025 times
Contact:

Re: Tool chain

Post by johu »

Great :) I added the apt line to readme. Just wondering, why did you pick the "-source" package instead of just gcc-arm-none-eabi?

Also cloning the 4.94.R branch won't get the newest sources, I suggest you omit that.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Tool chain

Post by EV_Builder »

oww some typo's i corrected the post.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
User avatar
EV_Builder
Posts: 1199
Joined: Tue Apr 28, 2020 3:50 pm
Location: The Netherlands
Has thanked: 16 times
Been thanked: 33 times
Contact:

Re: Tool chain

Post by EV_Builder »

It would be useful if you check in a new folder the commands. Build the bin and compare it. Tobe sure that references etc. and everything results in the same binary.

At Least its how we at work check the toolchain. Build something (old version/release) and compare the bin file.
We don't accept new binaries if the input was the same.
Converting an Porsche Panamera
see http://www.wdrautomatisering.nl for bespoke BMS modules.
Post Reply