How to compile source code for FreeEMS

Official FreeEMS vanilla firmware development, the heart and soul of the system!
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: How to compile source code for FreeEMS

Post by 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!
whizzo944
QFP80 - Contributor
Posts: 53
Joined: Sun Mar 27, 2011 9:35 am
Location: Durham, U.K.

Re: How to compile source code for FreeEMS

Post by whizzo944 »

I was rather hoping for a longer reply than a smiley. Like a better explanation of Output Events, OutputEventPinNumbers, Arrays .

Please ?
whizzo944
QFP80 - Contributor
Posts: 53
Joined: Sun Mar 27, 2011 9:35 am
Location: Durham, U.K.

Re: How to compile source code for FreeEMS

Post by whizzo944 »

Pretty Please ? :-)
User avatar
DeuceEFI
LQFP144 - On Top Of The Game
Posts: 578
Joined: Thu Feb 25, 2010 3:57 am
Location: Gosport, IN USA
Contact:

Re: How to compile source code for FreeEMS

Post by DeuceEFI »

Things to keep in mind:
The 6 timer outputs which can be used for ignition or injection are on Port T2-T7:
Port T2 = outputEventPinNumbers #0
Port T3 = outputEventPinNumbers #1
Port T4 = outputEventPinNumbers #2
Port T5 = outputEventPinNumbers #3
Port T6 = outputEventPinNumbers #4
Port T7 = outputEventPinNumbers #5

Also note this is the first n-1 crank wheel configuration that I have attempted to configure in the firmware, so there may be errors in my logic.
whizzo944 wrote:anglesOfTDC: {ANGLE(0), ANGLE(90), ANGLE(0), ANGLE(90)},
This means that two cylinders are at TDC at 0 degrees and then the other two are at TDC at 90 degrees of the crank. If this isn't correct then the angles need to be changed.
whizzo944 wrote:outputEventPinNumbers: {0,1,2,3,4,5,4,5}, // Wasted Spark and semi-sequential
the number of elements in this array should be equal to the number of anglesOfTDC, so there should be 4 elements, ie:

Code: Select all

outputEventPinNumbers:       {0,1,2,3}, // Wasted Spark and semi-sequential injection
This is true if you are using one of my Jaguar 0.7-alpha PCBs since:
the first two ignitor outputs are on the first two timer outputs (T2 =0 and T3 = 1)
the first two injection outputs that you can use are T4 = 2 and T5 = 3 and these would need to be jumpered from the Port T4-7 pads (the square pad is Port T4) to the appropriate "Injectors-IN" pads in the "Injector Drivers" section.
whizzo944 wrote:schedulingConfigurationBits: {0,0,1,1}, // First two ignition, last two fuel
this is correct based on the previous array configurations above.
whizzo944 wrote:decoderEngineOffset: ANGLE(70.00), //
This should be 0.00 until you measure the actual angle using a timing light while cranking without the injectors connected. You don't want the engine to try to run until you are sure about this value.
whizzo944 wrote:numberOfConfiguredOutputEvents: 4, // Migrated to new way
numberOfInjectionsPerEngineCycle: 2 // Used to be batch, dead time being wrong could have affected AFRs
These look correct based on the above settings.
whizzo944
QFP80 - Contributor
Posts: 53
Joined: Sun Mar 27, 2011 9:35 am
Location: Durham, U.K.

Re: How to compile source code for FreeEMS

Post by whizzo944 »

Hello Andy,
THANK-YOU !!!! That was the missing pieces of the puzzle. Now that I understand what the event numbers refer to,
I can compile a firmware with a degree of confidence in what I'm trying to do. The question that now remains is "Will the decoder
handle my engine speed ? " I have a test rig which I can use to find this out now.

Thanks AGAIN,

Dave.
User avatar
Fred
Moderator
Posts: 15431
Joined: Tue Jan 15, 2008 2:31 pm
Location: Home sweet home!
Contact:

Re: How to compile source code for FreeEMS

Post by Fred »

Not if I don't release the required changes, it won't, no. Also, some of the above is plain wrong. Short on time, though. Will answer another day.
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