Page 1 of 2

How to compile source code for FreeEMS

Posted: Fri Aug 08, 2014 9:17 am
by whizzo944
Hello All,
Please can anyone give me a quick crash (sorry) course in how to compile the source code, either under Windows or some
flavour of Linux.

TIA,

Dave.

Re: How to compile source code for FreeEMS

Posted: Fri Aug 08, 2014 9:19 am
by whizzo944
Sorry,
Didn't look first, looks like there is already a thread covering this.

Dave.

Re: How to compile source code for FreeEMS

Posted: Fri Aug 08, 2014 11:43 am
by Fred
On 32 bit windows, install git, install the tools, open git bash, cd somewhere convenient, clone the source, make BENCHTEST, done. make with no args lists the options. cd src/main and then make for a bigger rundown. etc.

On 32 bit deb/ubuntu, same process exactly.

Building in windows CMD/DOS is not supported.

Fred.

Re: How to compile source code for FreeEMS

Posted: Mon Aug 18, 2014 4:22 pm
by whizzo944
Hello All,
When I try to compile, if I use a name after Make, I get a "path not found" error.
If I type Make all, it compiles and produces a load of .s19 files in the firmware subdirectory,
but when I look, there are 2 .s19 files of each type, but 1 of them has a .gc.s19 extension and the other just has a .s19 extension. But the 2 files are different sizes. All of this is done in Windows 7
BTW.


TIA,

Dave.

Re: How to compile source code for FreeEMS

Posted: Mon Aug 18, 2014 9:35 pm
by Fred
In future you should paste the command and the output from it, to save time.

Was this in the src/main level or in the top level?

There are two make files. Top level one is for configured user builds (what you need), lower is for general builds and is what is called into by the top level one.

So in src/main you can still do what you want, but it's more complicated. In the top level you should do make WHIZZO944 and if it fails, it's because you didn't setup that alias in the top level file. So perhaps read/edit it first.

Fred.

Re: How to compile source code for FreeEMS

Posted: Sun Aug 24, 2014 11:26 am
by whizzo944
Hello All,
I've moved to Linux for compiling the firmware, it seems to be better somehow :-)

Can anyone please explain this bit of the FixedConfig1 file ?

#elif CONFIG == WHIZZO944_ID // Whizzo944's Honda VFR400R NC30 bike
anglesOfTDC: {ANGLE(0), ANGLE(90), ANGLE(360), ANGLE(450), ANGLE(0), ANGLE(90), ANGLE(360), ANGLE(450)},
outputEventPinNumbers: {0,1,2,3,4,5,4,5}, // Wasted Spark and semi-sequential
schedulingConfigurationBits: {0,0,0,0,1,1,1,1}, // First four ignition, last four fuel
decoderEngineOffset: ANGLE(70.00), //
numberOfConfiguredOutputEvents: 8, // Migrated to new way
numberOfInjectionsPerEngineCycle: 2 // Used to be batch, dead time being wrong could have affected AFRs

TIA,

Dave.

Re: How to compile source code for FreeEMS

Posted: Mon Aug 25, 2014 6:45 am
by Fred
The above, as it states in the file is the schedulingSettings. IE, when to turn on timed outputs, and how long to keep them on. A source of pulsewidth and timing is needed for each, and a base angle within your decoder total angle. The above implies you have a 720 decoder angle, which is untrue if you're using missing tooth on the crank. Additionally decoderEngineOffset should be zero until you measure it empirically on the car/engine.

Re: How to compile source code for FreeEMS

Posted: Mon Aug 25, 2014 11:36 am
by whizzo944
Hello,
Is this better ?

#elif CONFIG == WHIZZO944_ID // Whizzo944's Honda VFR400R NC30 bike
anglesOfTDC: {ANGLE(0), ANGLE(90), ANGLE(0), ANGLE(90)},
outputEventPinNumbers: {0,1,2,3,4,5,4,5}, // Wasted Spark and semi-sequential
schedulingConfigurationBits: {0,0,1,1}, // First two ignition, last two fuel
decoderEngineOffset: ANGLE(70.00), //
numberOfConfiguredOutputEvents: 4, // Migrated to new way
numberOfInjectionsPerEngineCycle: 2 // Used to be batch, dead time being wrong could have affected AFRs

Please can you explain outputEventPinNumbers ?

Is the decoderEngineOffset related to the angle of the missing tooth relative to TDC ?
If this is the case, my missing tooth is at 70deg BTDC.

TIA,

Dave.

Re: How to compile source code for FreeEMS

Posted: Thu Aug 28, 2014 11:03 pm
by Fred
whizzo944 wrote: Is this better ?
Yes, however:

1) the arrays should be equal length
2) you might want to wire up four injector outputs for future software updates (6 entries)
Please can you explain outputEventPinNumbers ?
Which hardware pin each entry is output on.
Is the decoderEngineOffset related to the angle of the missing tooth relative to TDC ?
If this is the case, my missing tooth is at 70deg BTDC.
Yes but I never calculate it as you MUST check it with a timing light anyway. So I just set it up cranking.

Re: How to compile source code for FreeEMS

Posted: Sun Aug 31, 2014 10:54 am
by whizzo944
For some of us mere mortals, C is just the third letter in the alphabet ;-)