[info] How to compile the firmware

It's all about the code!
yyj876790646
Posts: 11
Joined: Tue Jan 01, 2019 1:55 am

Re: How to compile the firmware

Post 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:

User avatar
NormanAlphaspeed
Posts: 21
Joined: Fri Jan 13, 2017 7:15 am
Location: Puerto Rico
Contact:

Re: How to compile the firmware

Post 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).

960
contributor
contributor
Posts: 333
Joined: Mon Dec 10, 2018 1:22 am

Re: How to compile the firmware

Post 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.

User avatar
NormanAlphaspeed
Posts: 21
Joined: Fri Jan 13, 2017 7:15 am
Location: Puerto Rico
Contact:

Re: How to compile the firmware

Post 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?

960
contributor
contributor
Posts: 333
Joined: Mon Dec 10, 2018 1:22 am

Re: How to compile the firmware

Post 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.

960
contributor
contributor
Posts: 333
Joined: Mon Dec 10, 2018 1:22 am

Re: How to compile the firmware

Post 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.

User avatar
AndreyB
Site Admin
Posts: 10762
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: How to compile the firmware

Post 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
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
NormanAlphaspeed
Posts: 21
Joined: Fri Jan 13, 2017 7:15 am
Location: Puerto Rico
Contact:

Re: How to compile the firmware

Post 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.

User avatar
AndreyB
Site Admin
Posts: 10762
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: How to compile the firmware

Post 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?
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
NormanAlphaspeed
Posts: 21
Joined: Fri Jan 13, 2017 7:15 am
Location: Puerto Rico
Contact:

Re: How to compile the firmware

Post 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 10532 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

960
contributor
contributor
Posts: 333
Joined: Mon Dec 10, 2018 1:22 am

Re: How to compile the firmware

Post 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..

User avatar
kb1gtt
contributor
contributor
Posts: 3674
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: How to compile the firmware

Post by kb1gtt »

Try the git command(s) from C:\Users\user\Downloads\rusefi-master

Notice this is one folder above "firmware"
Welcome to the friendlier side of internet crazy :)

User avatar
AndreyB
Site Admin
Posts: 10762
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: How to compile the firmware

Post 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
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

960
contributor
contributor
Posts: 333
Joined: Mon Dec 10, 2018 1:22 am

Re: How to compile the firmware

Post 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.

User avatar
NormanAlphaspeed
Posts: 21
Joined: Fri Jan 13, 2017 7:15 am
Location: Puerto Rico
Contact:

Re: How to compile the firmware

Post by NormanAlphaspeed »

Same error
eror3.PNG
eror3.PNG (31.91 KiB) Viewed 10514 times
BTW I haven't deleted any folder or anything. :?:

960
contributor
contributor
Posts: 333
Joined: Mon Dec 10, 2018 1:22 am

Re: How to compile the firmware

Post 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?

User avatar
kb1gtt
contributor
contributor
Posts: 3674
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: How to compile the firmware

Post 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
Last edited by kb1gtt on Fri Feb 15, 2019 5:05 pm, edited 1 time in total.
Welcome to the friendlier side of internet crazy :)

User avatar
NormanAlphaspeed
Posts: 21
Joined: Fri Jan 13, 2017 7:15 am
Location: Puerto Rico
Contact:

Re: How to compile the firmware

Post by NormanAlphaspeed »

Nothing yet.
errorrusefi.PNG
errorrusefi.PNG (18.89 KiB) Viewed 10492 times
BTW, there is a . git inside the "rusefi" folder

User avatar
AndreyB
Site Admin
Posts: 10762
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: How to compile the firmware

Post 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
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
NormanAlphaspeed
Posts: 21
Joined: Fri Jan 13, 2017 7:15 am
Location: Puerto Rico
Contact:

Re: How to compile the firmware

Post 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!

User avatar
kb1gtt
contributor
contributor
Posts: 3674
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: How to compile the firmware

Post 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.
Welcome to the friendlier side of internet crazy :)

Kavabanga
Posts: 40
Joined: Sat Apr 13, 2019 9:07 pm

Re: How to compile the firmware

Post 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?
Attachments
123.png
123.png (70.12 KiB) Viewed 9663 times

User avatar
AndreyB
Site Admin
Posts: 10762
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: How to compile the firmware

Post 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?
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

User avatar
AndreyB
Site Admin
Posts: 10762
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City

Re: How to compile the firmware

Post 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.
https://rusefi.com/s/howtocontribute
very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions
my skype is arro239

Ahmad
Posts: 33
Joined: Mon Aug 12, 2019 10:44 pm
Location: Iran

Re: How to compile the firmware

Post by Ahmad »

Is it possible to use the STM32CubeIDE for compiling?

User avatar
kb1gtt
contributor
contributor
Posts: 3674
Joined: Tue Sep 10, 2013 1:42 am
Location: ME of USA

Re: How to compile the firmware

Post by kb1gtt »

Anything is possible, just depends on how much effort you want to put into it.
Welcome to the friendlier side of internet crazy :)

Ahmad
Posts: 33
Joined: Mon Aug 12, 2019 10:44 pm
Location: Iran

Re: How to compile the firmware

Post 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 8913 times

hossein
Posts: 45
Joined: Mon Apr 10, 2017 8:10 am

Re: How to compile the firmware

Post 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

petersma
Posts: 12
Joined: Wed Jun 17, 2020 12:54 pm

Re: How to compile the firmware

Post 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

puff
contributor
contributor
Posts: 2815
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: How to compile the firmware

Post 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 ;-(

Post Reply