Problems with compiling

Topics concerning the Toyota and Lexus inverter drop in boards
Post Reply
Dennad
Posts: 19
Joined: Thu Oct 27, 2022 9:55 am
Has thanked: 4 times
Been thanked: 1 time

Problems with compiling

Post by Dennad »

I am trying to compile the firmware and get an error message
image.png
"fatal: git repository not found (or one of the parent directories)"
How to fix it?
Can anyone compile the 4.97-FOC firmware with the PB12 Pull down pin (PWM INHIBIT pin) or provide a working link to the opencm3 and openinv libraries for this firmware version. I tried to take these libraries from another firmware version and from github, but I got error messages. I need a manual mod to set it up. Attempts to configure on version 5.25 R did not bring success (I have libraries only for this firmware version, and on my STM32 PB12 is faulty and works correctly only with PD, and the FLT pin setting is set by default) I would be very grateful for help.
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: Problems with compiling

Post by johu »

You need to "git clone" the repo, download zip doesn't work (now that I think about it)
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Dennad
Posts: 19
Joined: Thu Oct 27, 2022 9:55 am
Has thanked: 4 times
Been thanked: 1 time

Re: Problems with compiling

Post by Dennad »

Excuse me, how do I do it right? I tried typing "make git clone -deps" and another combinations with "git clone". Did "git clone" libopencm3 and libopeninv from github, but received compilation error messages "no such file directory" and another errors and warnings individual files and lines of code.
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Problems with compiling

Post by Pete9008 »

Try

Code: Select all

git clone --recurse-submodules https://github.com/jsphuebner/stm32-sine
git checkout tags/v4.97.R
make get-deps
CONTROL=FOC make
The above will build the FOC variant, for sin replace the last line with just "make"
Dennad
Posts: 19
Joined: Thu Oct 27, 2022 9:55 am
Has thanked: 4 times
Been thanked: 1 time

Re: Problems with compiling

Post by Dennad »

It didn't work out. The nvic.h file is missing again.

Code: Select all

den@den-TM1703:~/stm32-sine-4.97.R/stm32-sine $ git tag validation/v4.97.R
M libopencm3
M libopeninv
Note: Switch to "tags/v4.97.R".

You are now in the "disconnected pointer HEAD" state. You can look around,
make experimental changes and commit them, and you can also
undo any commits created in this state without affecting other
branches by switching back to any branch.

If you want to create a new branch to save the created commits, you can
do it (now or later) using the switch command with the -c parameter.
For example:

git switch -c <new-branch>

Or cancel this operation with:

git switch -

Disable this tip by setting
the tip configuration variable.disconnected head to false value

The HEADER is now on 1aa6b4e, Prius MG1 detection has been removed, it was unreliable, CAN < 1 scaling support has been added. But now you can't scale more than 32! FOC: continuous offset calibration during downtime Custom PWM charge processing for Prius hardware Fixed a bug in the temp calc module when the lower limit of the table is reached
search den@den-TM1703:~/stm32-sine-4.97.R/stm32-sine $ make get-deps
GIT SUBMODULE
Path to the 'libopencm3' submodule: checked 'b70da8dfc0635192753c9929d715ee6f57f23772'
Path to the 'libopeninv' submodule: checked 'c2e165d7d5bf89e81aec174db470c5fb672f8d33'
MAKE libopencm3
make[1]: entering the directory "/home/den/stm32-sine"4.97.R/stm32-sine/libopencm3"
GENHDR includes/libopencm3/stm32/f0/irq.json
/usr/bin/env: "python": There is no such file or directory
make[1]: *** [Makefile:59: include/libopencm3/stm32/f0/irq.json.genhdr] Error 127
make[1]: exit from the directory "/home/den/stm32-sine-4.97.R/stm32-sine/libopencm3"
make: *** [Makefile:132: get-deps] Error 2
den@den-TM1703:~/stm32-sine-4.97.R/stm32-sine $ CONTROL=FOC make
CPP obj/stm32_sine.o
In the file included from libopencm3/include/libopencm3/cm3/nvic.h:147,
from libopeninv/include/stm32scheduler.h:23,
from src/stm32_sine.cpp:44:
libopencm3/include/libopencm3/dispatch/nvic.h:8:11: fatal error: libopencm3/stm32/f1/nvic.h: There is no such file or directory
8 | # enable <libopencm3/stm32/f1/nvic.h>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation is complete.
create: *** [Makefile:99: obj/stm32_sine.o] Error 1
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: Problems with compiling

Post by johu »

Code: Select all

/usr/bin/env: "python": There is no such file or directory
Python isn't installed or not in path
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Pete9008
Posts: 1801
Joined: Sun Apr 03, 2022 1:57 pm
Has thanked: 102 times
Been thanked: 347 times

Re: Problems with compiling

Post by Pete9008 »

Worth checking this too.
viewtopic.php?p=44819#p44819
Dennad
Posts: 19
Joined: Thu Oct 27, 2022 9:55 am
Has thanked: 4 times
Been thanked: 1 time

Re: Problems with compiling

Post by Dennad »

It worked! Thank you so much for your help.
Dennad
Posts: 19
Joined: Thu Oct 27, 2022 9:55 am
Has thanked: 4 times
Been thanked: 1 time

Re: Problems with compiling

Post by Dennad »

Updated python to version 3.11.2, but it didn't help. Then I typed "sudo apt install python-is-python3" and everything worked.
Post Reply