Page 3 of 4

Re: How to compile the firmware

Posted: Sun Feb 10, 2019 5:20 am
by yyj876790646
russian wrote:
Sun Feb 10, 2019 4:08 am
yyj876790646 wrote:
Sun Feb 10, 2019 2:59 am
My gcc version is cc version 4.7.3 20130312 (release) [ARM/embedded-4_7-branch revision 196615] (GNU Tools for ARM Embedded Processors)
the part about 2013 looks to be the problem. Please use current gnu arm 8 or recent gnu arm 7.3

At the moment I am using 7.3.1 20180622
Thanks,I thought you are still using gcc 4.7 :lol: :lol:

Re: How to compile the firmware

Posted: Tue Feb 12, 2019 10:00 am
by NormanAlphaspeed
the git submodule update --init does nothing for me, I only get
C:\Users\User\Downloads\rusefi-master\firmware>make
Invoking "git submodule update --init"
Invoked "git submodule update --init"
rusefi.mk:7: *** Please run 'make' again. Stop.
Over and over. I tried running the command manually and it just exits and does pretty much nothing.

I disabled the first 8 lines of the rusefi.mk and obviously, got the same error as the people that were not running git submodule update --init

BTW, before that I got:
C:\Users\User\Downloads\oldrusefi\efi\firmware>git submodule update --init
fatal: not a git repository (or any parent up to mount point /cygdrive)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Re: How to compile the firmware

Posted: Tue Feb 12, 2019 1:50 pm
by 960
NormanAlphaspeed wrote:
Tue Feb 12, 2019 10:00 am
the git submodule update --init does nothing for me, I only get
C:\Users\User\Downloads\rusefi-master\firmware>make
Invoking "git submodule update --init"
Invoked "git submodule update --init"
rusefi.mk:7: *** Please run 'make' again. Stop.
Over and over. I tried running the command manually and it just exits and does pretty much nothing.

I disabled the first 8 lines of the rusefi.mk and obviously, got the same error as the people that were not running git submodule update --init

BTW, before that I got:
C:\Users\User\Downloads\oldrusefi\efi\firmware>git submodule update --init
fatal: not a git repository (or any parent up to mount point /cygdrive)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
If you want to compile without having a git folder, you have to manually download the chibios and chibios contrib and put in the folders.

Have been fighting the firmware myself for a while.

Re: How to compile the firmware

Posted: Tue Feb 12, 2019 3:45 pm
by NormanAlphaspeed
960 wrote:
Tue Feb 12, 2019 1:50 pm
NormanAlphaspeed wrote:
Tue Feb 12, 2019 10:00 am
the git submodule update --init does nothing for me, I only get
C:\Users\User\Downloads\rusefi-master\firmware>make
Invoking "git submodule update --init"
Invoked "git submodule update --init"
rusefi.mk:7: *** Please run 'make' again. Stop.
Over and over. I tried running the command manually and it just exits and does pretty much nothing.

I disabled the first 8 lines of the rusefi.mk and obviously, got the same error as the people that were not running git submodule update --init

BTW, before that I got:
C:\Users\User\Downloads\oldrusefi\efi\firmware>git submodule update --init
fatal: not a git repository (or any parent up to mount point /cygdrive)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
If you want to compile without having a git folder, you have to manually download the chibios and chibios contrib and put in the folders.

Have been fighting the firmware myself for a while.
I mean I'd compile it with a git folder... but how do I create it?
I'll give what you said a shot, thanks!

**EDIT** IT WORKED! THANK YOU!

**EDIT 2 **
The fix allowed me to start compiling, but I keep failing to compile since I apparently don't have "stm32_gpio.h", which is supposed to be included in the GCC toolchain I think?

Re: How to compile the firmware

Posted: Tue Feb 12, 2019 8:38 pm
by 960
NormanAlphaspeed wrote:
Tue Feb 12, 2019 3:45 pm
960 wrote:
Tue Feb 12, 2019 1:50 pm
NormanAlphaspeed wrote:
Tue Feb 12, 2019 10:00 am
the git submodule update --init does nothing for me, I only get
C:\Users\User\Downloads\rusefi-master\firmware>make
Invoking "git submodule update --init"
Invoked "git submodule update --init"
rusefi.mk:7: *** Please run 'make' again. Stop.
Over and over. I tried running the command manually and it just exits and does pretty much nothing.

I disabled the first 8 lines of the rusefi.mk and obviously, got the same error as the people that were not running git submodule update --init

BTW, before that I got:
C:\Users\User\Downloads\oldrusefi\efi\firmware>git submodule update --init
fatal: not a git repository (or any parent up to mount point /cygdrive)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
If you want to compile without having a git folder, you have to manually download the chibios and chibios contrib and put in the folders.

Have been fighting the firmware myself for a while.
I mean I'd compile it with a git folder... but how do I create it?
I'll give what you said a shot, thanks!

**EDIT** IT WORKED! THANK YOU!

**EDIT 2 **
The fix allowed me to start compiling, but I keep failing to compile since I apparently don't have "stm32_gpio.h", which is supposed to be included in the GCC toolchain I think?
Download Git for Windows.

Re: How to compile the firmware

Posted: Tue Feb 12, 2019 8:41 pm
by 960
960 wrote:
Tue Feb 12, 2019 8:38 pm
NormanAlphaspeed wrote:
Tue Feb 12, 2019 3:45 pm
960 wrote:
Tue Feb 12, 2019 1:50 pm
NormanAlphaspeed wrote:
Tue Feb 12, 2019 10:00 am
the git submodule update --init does nothing for me, I only get
C:\Users\User\Downloads\rusefi-master\firmware>make
Invoking "git submodule update --init"
Invoked "git submodule update --init"
rusefi.mk:7: *** Please run 'make' again. Stop.
Over and over. I tried running the command manually and it just exits and does pretty much nothing.

I disabled the first 8 lines of the rusefi.mk and obviously, got the same error as the people that were not running git submodule update --init

BTW, before that I got:
C:\Users\User\Downloads\oldrusefi\efi\firmware>git submodule update --init
fatal: not a git repository (or any parent up to mount point /cygdrive)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
If you want to compile without having a git folder, you have to manually download the chibios and chibios contrib and put in the folders.

Have been fighting the firmware myself for a while.
I mean I'd compile it with a git folder... but how do I create it?
I'll give what you said a shot, thanks!

**EDIT** IT WORKED! THANK YOU!

**EDIT 2 **
The fix allowed me to start compiling, but I keep failing to compile since I apparently don't have "stm32_gpio.h", which is supposed to be included in the GCC toolchain I think?
Download Git for Windows.
I have still never gotten it to compile with command line. It always end in some error.

But ChibiStudio works for me.

Re: How to compile the firmware

Posted: Tue Feb 12, 2019 11:25 pm
by AndreyB
NormanAlphaspeed wrote:
Tue Feb 12, 2019 3:45 pm
**EDIT 2 **
The fix allowed me to start compiling, but I keep failing to compile since I apparently don't have "stm32_gpio.h", which is supposed to be included in the GCC toolchain I think?
No, stm32_gpio.h is not part of compiler - I suspect your older? updated? folder has mismatched version of ChibiOS maybe?
git submodule update --recursive --remote
could be helpful to update submodule since there was ChibiOS migration recently

Re: How to compile the firmware

Posted: Thu Feb 14, 2019 5:49 am
by NormanAlphaspeed
russian wrote:
Tue Feb 12, 2019 11:25 pm
NormanAlphaspeed wrote:
Tue Feb 12, 2019 3:45 pm
**EDIT 2 **
The fix allowed me to start compiling, but I keep failing to compile since I apparently don't have "stm32_gpio.h", which is supposed to be included in the GCC toolchain I think?
No, stm32_gpio.h is not part of compiler - I suspect your older? updated? folder has mismatched version of ChibiOS maybe?
git submodule update --recursive --remote
could be helpful to update submodule since there was ChibiOS migration recently
The link to ChibiOS on your Github takes me to the ChibiOS fork... on your Github, I downloaded that and put it in ChibiOS (and downloaded Contrib and put it there too) and apaprently I'm missing stm32_gpio.

Re: How to compile the firmware

Posted: Thu Feb 14, 2019 6:13 am
by AndreyB
NormanAlphaspeed wrote:
Thu Feb 14, 2019 5:49 am
The link to ChibiOS on your Github takes me to the ChibiOS fork... on your Github, I downloaded that and put it in ChibiOS (and downloaded Contrib and put it there too) and apaprently I'm missing stm32_gpio.
This does not sound like the way you are supposed to be using github. I would recommend against manually resolving submodules put get
git submodule update --init
or maybe
git submodule update --recursive --remote


Also, why do you need to compile - why would pre-compiled binaries not work for you?

Re: How to compile the firmware

Posted: Thu Feb 14, 2019 7:26 am
by NormanAlphaspeed
russian wrote:
Thu Feb 14, 2019 6:13 am
NormanAlphaspeed wrote:
Thu Feb 14, 2019 5:49 am
The link to ChibiOS on your Github takes me to the ChibiOS fork... on your Github, I downloaded that and put it in ChibiOS (and downloaded Contrib and put it there too) and apaprently I'm missing stm32_gpio.
This does not sound like the way you are supposed to be using github. I would recommend against manually resolving submodules put get
git submodule update --init
or maybe
git submodule update --recursive --remote


Also, why do you need to compile - why would pre-compiled binaries not work for you?
As I posted before, git submodule update --init just does evidently nothing and returns to cmd without apparently doing anything
the other command hasn't been mentioned and I'll try it out now:
errorrusefi.PNG
errorrusefi.PNG (12 KiB) Viewed 9680 times
I want to compile so I can start fiddling around with it. I have a Github repo of my own ( https://github.com/ElDominio ) and I like to learn about this, and seeing as rusEFI uses an OS I'd like to learn about how they work, especially in an ECU

Re: How to compile the firmware

Posted: Thu Feb 14, 2019 9:07 am
by 960
NormanAlphaspeed wrote:
Thu Feb 14, 2019 7:26 am
russian wrote:
Thu Feb 14, 2019 6:13 am
NormanAlphaspeed wrote:
Thu Feb 14, 2019 5:49 am
The link to ChibiOS on your Github takes me to the ChibiOS fork... on your Github, I downloaded that and put it in ChibiOS (and downloaded Contrib and put it there too) and apaprently I'm missing stm32_gpio.
This does not sound like the way you are supposed to be using github. I would recommend against manually resolving submodules put get
git submodule update --init
or maybe
git submodule update --recursive --remote


Also, why do you need to compile - why would pre-compiled binaries not work for you?
As I posted before, git submodule update --init just does evidently nothing and returns to cmd without apparently doing anything
the other command hasn't been mentioned and I'll try it out now:
errorrusefi.PNG

I want to compile so I can start fiddling around with it. I have a Github repo of my own ( https://github.com/ElDominio ) and I like to learn about this, and seeing as rusEFI uses an OS I'd like to learn about how they work, especially in an ECU
You dont have a git folder in firmware? Try CD..

Re: How to compile the firmware

Posted: Thu Feb 14, 2019 10:41 am
by kb1gtt
Try the git command(s) from C:\Users\user\Downloads\rusefi-master

Notice this is one folder above "firmware"

Re: How to compile the firmware

Posted: Thu Feb 14, 2019 11:00 am
by AndreyB
kb1gtt wrote:
Thu Feb 14, 2019 10:41 am
Try the git command(s) from C:\Users\user\Downloads\rusefi-master

Notice this is one folder above "firmware"
I believe git command should not care

Re: How to compile the firmware

Posted: Thu Feb 14, 2019 3:18 pm
by 960
russian wrote:
Thu Feb 14, 2019 11:00 am
kb1gtt wrote:
Thu Feb 14, 2019 10:41 am
Try the git command(s) from C:\Users\user\Downloads\rusefi-master

Notice this is one folder above "firmware"
I believe git command should not care
Yes it does. It does not work in firmware folder.

You have to be in the git folder. If you show hidden files, you see the git folder in the folder.

so type cd.. one time first and it should work fine.

Re: How to compile the firmware

Posted: Thu Feb 14, 2019 3:23 pm
by NormanAlphaspeed
Same error
eror3.PNG
eror3.PNG (31.91 KiB) Viewed 9662 times
BTW I haven't deleted any folder or anything. :?:

Re: How to compile the firmware

Posted: Thu Feb 14, 2019 11:40 pm
by 960
NormanAlphaspeed wrote:
Thu Feb 14, 2019 3:23 pm
Same error
eror3.PNG

BTW I haven't deleted any folder or anything. :?:
You cloned into that directory? not copied?

Re: How to compile the firmware

Posted: Fri Feb 15, 2019 12:23 am
by kb1gtt
I do not see the ".git" folder. I suspect you did not clone, but instead downloaded from the web page. Try obtaining the folder with git instead of the web page download.

I believe the commands will be something like this.

cd C:\Users\user\Downloads
git clone https://github.com/rusefi/rusefi.git
cd rusefi
git submodule update --init

Re: How to compile the firmware

Posted: Fri Feb 15, 2019 1:53 am
by NormanAlphaspeed
Nothing yet.
errorrusefi.PNG
errorrusefi.PNG (18.89 KiB) Viewed 9640 times
BTW, there is a . git inside the "rusefi" folder

Re: How to compile the firmware

Posted: Fri Feb 15, 2019 1:57 am
by AndreyB
git clone has created a new 'rusefi' folder. You should be somewhere inside the folder to invoke orher git command including git aubmodjlez

cd rusefi

Re: How to compile the firmware

Posted: Fri Feb 15, 2019 2:50 am
by NormanAlphaspeed
russian wrote:
Fri Feb 15, 2019 1:57 am
git clone has created a new 'rusefi' folder. You should be somewhere inside the folder to invoke orher git command including git aubmodjlez

cd rusefi
Well that was quite stupid of me lol
Color me burned out.
It is finally working, thanks everyone.

Compiled fine, finally. Thanks everyone!

Re: How to compile the firmware

Posted: Fri Feb 15, 2019 5:07 pm
by kb1gtt
I just edited my prior post which included the commands you followed. Not this thread makes out to look bad :D

At least now if someone find it, they'll have the proper commands to try.

Re: How to compile the firmware

Posted: Sun Jul 07, 2019 10:47 pm
by Kavabanga
Hi everybody!
I used manual for compile the firmware and come to this stage....
Where i made something wrong?
Who meeted with this problem also?

Re: How to compile the firmware

Posted: Sun Jul 07, 2019 10:52 pm
by AndreyB
Where did you get these source codes how exactly? How did you get chibios submodule exactly?

I see chibios/os/ports on your screenshot. I do not see "ports" folder at https://github.com/rusefi/ChibiOS/tree/4012d627c92b0e60bdbfdfca4af823852c341e18/os

this makes me think your chibios is wrong. since chibios is supposed to be downloaded automatically I wonder what else is wrong. So, Where did you get these source codes how exactly? How did you get chibios submodule exactly?

Re: How to compile the firmware

Posted: Sun Jul 07, 2019 11:26 pm
by AndreyB
Kavabanga wrote:
Sun Jul 07, 2019 11:10 pm
I took it here

https://rusefi.com/forum/viewtopic.php?f=9&t=253
I've just edited the first post in that 2013 topic. There were updates in the comments but first post was very very outdated.

We are chatting now, let's use https://rusefi.com/forum/viewtopic.php?f=13&t=1198 or Skype for chatting.

Re: How to compile the firmware

Posted: Fri Nov 01, 2019 4:43 pm
by Ahmad
Is it possible to use the STM32CubeIDE for compiling?

Re: How to compile the firmware

Posted: Fri Nov 01, 2019 4:45 pm
by kb1gtt
Anything is possible, just depends on how much effort you want to put into it.

Re: How to compile the firmware

Posted: Fri Nov 01, 2019 4:52 pm
by Ahmad
I'm familiar with IAR and STM32CubeIDE, not gnu toolchain.
Now I want to modify some GPIO and Timer setting of your firmware and compile it.
Below is the first headache of make:
first error.png
first error.png (17.49 KiB) Viewed 8061 times

Re: How to compile the firmware

Posted: Mon Dec 23, 2019 9:59 pm
by hossein
I think the best compiler tool is available in linux, Just install a linux on a virtual machine like virtualbox and compile it.
As i had experience, The cygwin sometimes goes unstable especially with lib(s).
https://www.youtube.com/watch?v=H3ZQDkpKwQo

Re: How to compile the firmware

Posted: Fri Jun 26, 2020 1:40 am
by petersma
The Linux way!

You must have installed gcc-arm-none-eabi(v9) in path and maybe some other utility packets(git, make etc)
In Terminal:
$ mkdir retest
$ cd retest
$ git clone https://github.com/rusefi/rusefi.git
$ cd rusefi/
$ git submodule update --init
$ cd firmware/
$ git log --oneline | head
$ make
Then you have "rusefi.bin" in "Build" directory

Re: How to compile the firmware

Posted: Fri Jun 26, 2020 8:41 am
by puff
as far as I remember, git clone takes up too much space and network traffic, downloading unnecessary hardware-related files, datasheets, etc. I don't remember if I managed to find a solution to download it partially ;-(