Porting firmware to GCC

General English language SECU-3 discussions here. Обсуждение общих вопросов SECU-3 на английском.

Moderator: STC

User avatar
STC
LQFP144 - On Top Of The Game
Posts: 2420
Joined: Fri Oct 22, 2010 10:47 pm
Location: Ukraine, Kiev
Contact:

Porting firmware to GCC

Post by STC »

One of users (JOleg) already started porting SECU-3 firmware to GCC (and mostly finished). He will add his results into repository soon and I will put link to it here. Depending on results of JOleg's work I will try megre his changes to main branch of firmware.

This is a link to Russian topic viewtopic.php?f=52&t=1177
Author of the SECU-3 project. SECU-3 Engine control unit / Ignition control system
SECU-3.org (Русский)
SECU-3.org (English)
SECU-3 Club ВКонтакте
SECU-3 EMS Project Facebook
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Porting firmware to GCC

Post by Fred »

Oh no! JOleg should have been committing changes as he went so that there was a clear path between old and new and so that it was easy to see what changed and why. But, there is no point in crying over spilt milk! Great to hear! :-)

Thanks for updating us silly English speakers too! :-)

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
STC
LQFP144 - On Top Of The Game
Posts: 2420
Joined: Fri Oct 22, 2010 10:47 pm
Location: Ukraine, Kiev
Contact:

Re: Porting firmware to GCC

Post by STC »

Author of the SECU-3 project. SECU-3 Engine control unit / Ignition control system
SECU-3.org (Русский)
SECU-3.org (English)
SECU-3 Club ВКонтакте
SECU-3 EMS Project Facebook
User avatar
STC
LQFP144 - On Top Of The Game
Posts: 2420
Joined: Fri Oct 22, 2010 10:47 pm
Location: Ukraine, Kiev
Contact:

Re: Porting firmware to GCC

Post by STC »

I've finished porting source code to GCC (WinAvr)!
- Code can be compiled either by GCC or IAR;
- Makefiles are used.

To build project you need to run configure.bat with two options: type of microcontroller and type of compiler. Example:
configure.bat M32 GCC
or
configure.bat M32 IAR

It will create Makefile for you and start building project. If you are going to use IAR you must set environment variable IAR_HOME, this variable is used by Makefile.
It is possible to create configure.sh for Linux

Code is not fully tested and currently I have some issue related to code build by GCC (wrong calculation of advance angle). I will let you know when I solve this issue.
Author of the SECU-3 project. SECU-3 Engine control unit / Ignition control system
SECU-3.org (Русский)
SECU-3.org (English)
SECU-3 Club ВКонтакте
SECU-3 EMS Project Facebook
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Porting firmware to GCC

Post by Fred »

STC wrote:I've finished porting source code to GCC (WinAvr)!
- Code can be compiled either by GCC or IAR;
- Makefiles are used.
Awesome work! :-)
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
STC
LQFP144 - On Top Of The Game
Posts: 2420
Joined: Fri Oct 22, 2010 10:47 pm
Location: Ukraine, Kiev
Contact:

Re: Porting firmware to GCC

Post by STC »

Also, I've already fixed issue with advance angle. Now it should work properly.
Author of the SECU-3 project. SECU-3 Engine control unit / Ignition control system
SECU-3.org (Русский)
SECU-3.org (English)
SECU-3 Club ВКонтакте
SECU-3 EMS Project Facebook
User avatar
STC
LQFP144 - On Top Of The Game
Posts: 2420
Joined: Fri Oct 22, 2010 10:47 pm
Location: Ukraine, Kiev
Contact:

Re: Porting firmware to GCC

Post by STC »

I've created configure.sh script for Linux
Author of the SECU-3 project. SECU-3 Engine control unit / Ignition control system
SECU-3.org (Русский)
SECU-3.org (English)
SECU-3 Club ВКонтакте
SECU-3 EMS Project Facebook
User avatar
STC
LQFP144 - On Top Of The Game
Posts: 2420
Joined: Fri Oct 22, 2010 10:47 pm
Location: Ukraine, Kiev
Contact:

Re: Porting firmware to GCC

Post by STC »

Today I've improved Makefiles a little bit. Automatic generation of dependencies and checking have been added.
Author of the SECU-3 project. SECU-3 Engine control unit / Ignition control system
SECU-3.org (Русский)
SECU-3.org (English)
SECU-3 Club ВКонтакте
SECU-3 EMS Project Facebook
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Porting firmware to GCC

Post by Fred »

STC wrote:Today I've improved Makefiles a little bit. Automatic generation of dependencies and checking have been added.
I'll have to have a look at how you've done that! My make file deps are manual and prone to error, not cool. I need to improve that situation. Thanks for posting about it! :-)
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: Porting firmware to GCC

Post by Fred »

A couple of comments:

If you're going to manually wrap lines, do it at 80 chars for readme type files. You seem to be doing it at 85 which makes it soooo hard to read in a std terminal. Or just don't wrap them and let the editor of the reader do it for you.

Consider switching to markdown readme format (.md) as it will display very nicely on github and is pretty easy to read in text too. See freeems-vanilla repo readme for an example.

I also added an ignore file for you. See the sticky on git usage in freeems general if you don't know how to pull it in WITHOUT using the github UI.

Fred.
DIYEFI.org - where Open Source means Open Source, and Free means Freedom
FreeEMS.org - the open source engine management system
FreeEMS dev diary and its comments thread and my turbo truck!
n00bs, do NOT PM or email tech questions! Use the forum!
The ever growing list of FreeEMS success stories!
Post Reply