Page 1 of 1
Problems with compiling
Posted: Sat Mar 11, 2023 4:45 pm
by Dennad
I am trying to compile the firmware and get an error message
"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.
Re: Problems with compiling
Posted: Sat Mar 11, 2023 5:09 pm
by johu
You need to "git clone" the repo, download zip doesn't work (now that I think about it)
Re: Problems with compiling
Posted: Sun Mar 12, 2023 12:42 pm
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.
Re: Problems with compiling
Posted: Sun Mar 12, 2023 1:19 pm
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"
Re: Problems with compiling
Posted: Sun Mar 12, 2023 3:41 pm
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
Re: Problems with compiling
Posted: Sun Mar 12, 2023 3:46 pm
by johu
Code: Select all
/usr/bin/env: "python": There is no such file or directory
Python isn't installed or not in path
Re: Problems with compiling
Posted: Sun Mar 12, 2023 3:47 pm
by Pete9008
Re: Problems with compiling
Posted: Sun Mar 12, 2023 7:09 pm
by Dennad
It worked! Thank you so much for your help.
Re: Problems with compiling
Posted: Sun Mar 12, 2023 7:15 pm
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.