View unanswered posts | View active topics It is currently Mon Jun 18, 2018 4:51 am

Reply to topic  [ 2 posts ] 
FreeEMS port on different CPU-AVR,ARM? 
Author Message
TO220 - Visibile

Joined: Mon Nov 21, 2011 11:20 am
Posts: 6
Hi all.
This is my first post, I'm sorry if I wrote in the wrong section.

I'm trying to build an electronic injection to my one cylinder motorcycle. FreeEMS I really liked because of the nice, well-documented code. I appreciate also that for this project is already no small community. Unfortunately, I have absolutely no experience with Freescale processors.
However, for the time being does not use XGATE, so the code should allow the move to other platform. I thought to myself, to try to carry out the code on the AVR or ARM, and build their own hardware layer.
I'm afraid, however, that it might be too difficult a task. I would like to start from as little-developed program (possibly from a very early version of FreeEMS). I would be grateful for your help in indicating to me the way how to go about it. I also want to ask where I could ask on the forum on the problems that I will be encountering.

I need only one or two (for two intake ports) injectors and spark one channel and use cheaper narrowband probe (PID mode). I wish that my project was the cheapest, at least at the beginning.
I have experience in programming AVR, low in the ARM. I wrote to the author FreeECU-I think that can help me. I think, to probe deeper into the code SECU-3 - timing procedures may be good enough to simply use it to add injection.

I think that such a project could be useful for many people.
And what you think about that?

Tue Nov 22, 2011 12:44 pm
User avatar

Joined: Tue Jan 15, 2008 2:31 pm
Posts: 15141
Location: Home sweet home!
Hello and welcome! :-)

You're welcome to port the code to a different platform, but I don't have time to support that effort (not even a little bit), and it would likely diverge very quickly without your full time work on that fork and thus be a solo effort, or at least, not one that can leverage our work here.

I work on the code and the community 24/7 and thus progress is pretty fast. If you're going to attempt a port, definitely start with the latest code, as it's maturing rapidly. I'd also prefer that you didn't use the FreeEMS name and came up with something of your own, but give clear credit to those of us here who have put literally years of our lives into FreeEMS.

You'll find a lot of issues trying to use budget processors like the AVRs. They're very light on resources, and it will hurt you. Specifically doing 16 bit and 32 bit math on an 8 bit core will suck. Also, the lack of timers will suck, but if it's only for a single cylinder or two then you'll be OK there. Expect to rewrite that code from scratch, though. Another thing you'll have trouble with is memory and management of it. The S12 memory management is not portable to other archs afaik, so that would be from scratch too.

If you're planning to cut it down and make it single purpose, sure, it could be done, but when an S12X cpu costs 15usd, why would you bother? The rest of the ecu typically costs 10 - 20 times that much irrespective of the CPU cost. I have never seen the benefit in any of the other architectures people want to use. Most either add complexity, or add cost, or reduce reliability, or reduce power/features, and none add any significant features.

XGATE is used, just not for much, right now, but that will change early next year with some luck and good process.

I never understand when people say "I have experience with XYZ arch" because it's all C and the archs are all very similar. If you're a good dev, you're a good dev, or you're not :-)

One thing that you can count on is a lot of help from other people. EVERYONE, and their dogs, love AVR despite its weaknesses.

In all honesty, you're probably better off taking advantage of the SECU-3 code base and its fuel injection branch (yes, such a thing exists) if you want a low end processor solution. That code has been hand crafted to perform on the AVR and should work admirably within its constraints.

I hope that helps! Best of luck!


_________________ - where Open Source means Open Source, and Free means Freedom - 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!

Tue Nov 22, 2011 3:46 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software for PTF. ColorizeIt.