Tell me "Read the FAQ, N00b" - Compiling MS code?
#1
Elite Member
Thread Starter
iTrader: (3)
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
Tell me "Read the FAQ, N00b" - Compiling MS code?
What do I need to do to get up and running for compiling and uploading my own (or other people's) code to the MS?
I have both Ubuntu and Vista, and a laptop with something terrible like win95 on it.
I'm not sure when I'll have to start compiling, and when I'll just be uploading code/tables other people wrote, but since I'm going to start soldering soon, I might as well spend the next day or two (putting off doing laundry by) setting up my computer so I don't have to do it later.
Thanks!
-Abe.
I have both Ubuntu and Vista, and a laptop with something terrible like win95 on it.
I'm not sure when I'll have to start compiling, and when I'll just be uploading code/tables other people wrote, but since I'm going to start soldering soon, I might as well spend the next day or two (putting off doing laundry by) setting up my computer so I don't have to do it later.
Thanks!
-Abe.
#3
No compiling. Download the 1st file for all the software necessary http://www.msextra.com/manuals/MS_Ex...nual_Index.htm. IIRC it includes easytherm, but not 100% sure on that. There are also links further down for support tuning software like Megalogviewer/vexme. Don't know about ubuntu compatibility with linux, but it does work with vista. I'm assuming that you will be running the MS extra for fuel and spark like everyone else here who runs MS-I.
As for other people's maps. Everyone's MS has an *.msq file in it that is what people share, but it is for all settings so I wouldn't just load someone else's map into your car before making sure that things like inverted spark/overboost protection/etc... are the same as yours. You can always use a program like vexme to export/import just the spark/fuel maps.
When reading the manuals, it's easy to get overwhelmed as things sound much more complex than they really are, but once you get your car running, megatune/megalogviewer/VEanalyzer make much more sense and is pretty intuitive. I remember feeling kind of over my head while reading the manual, and when using the software live, it made MUCH more sense.
As for other people's maps. Everyone's MS has an *.msq file in it that is what people share, but it is for all settings so I wouldn't just load someone else's map into your car before making sure that things like inverted spark/overboost protection/etc... are the same as yours. You can always use a program like vexme to export/import just the spark/fuel maps.
When reading the manuals, it's easy to get overwhelmed as things sound much more complex than they really are, but once you get your car running, megatune/megalogviewer/VEanalyzer make much more sense and is pretty intuitive. I remember feeling kind of over my head while reading the manual, and when using the software live, it made MUCH more sense.
#4
Elite Member
iTrader: (1)
Join Date: Jun 2006
Location: Warrington/Birmingham
Posts: 2,642
Total Cats: 42
No compiling. Download the 1st file for all the software necessary http://www.msextra.com/manuals/MS_Ex...nual_Index.htm. IIRC it includes easytherm, but not 100% sure on that. There are also links further down for support tuning software like Megalogviewer/vexme. Don't know about ubuntu compatibility with linux, but it does work with vista. I'm assuming that you will be running the MS extra for fuel and spark like everyone else here who runs MS-I.
As for other people's maps. Everyone's MS has an *.msq file in it that is what people share, but it is for all settings so I wouldn't just load someone else's map into your car before making sure that things like inverted spark/overboost protection/etc... are the same as yours. You can always use a program like vexme to export/import just the spark/fuel maps.
When reading the manuals, it's easy to get overwhelmed as things sound much more complex than they really are, but once you get your car running, megatune/megalogviewer/VEanalyzer make much more sense and is pretty intuitive. I remember feeling kind of over my head while reading the manual, and when using the software live, it made MUCH more sense.
As for other people's maps. Everyone's MS has an *.msq file in it that is what people share, but it is for all settings so I wouldn't just load someone else's map into your car before making sure that things like inverted spark/overboost protection/etc... are the same as yours. You can always use a program like vexme to export/import just the spark/fuel maps.
When reading the manuals, it's easy to get overwhelmed as things sound much more complex than they really are, but once you get your car running, megatune/megalogviewer/VEanalyzer make much more sense and is pretty intuitive. I remember feeling kind of over my head while reading the manual, and when using the software live, it made MUCH more sense.
he wants to de-compile edit and then re-compile the firmware for his MS
#8
Here's a link to the latest beta d/l.
http://www.msextra.com/ms2extra/file...ta20071122.zip
Here's a link to the thread about the latest beta:
http://www.msextra.com/viewtopic.php?t=26715
If I remember right, everything is hard pathed to C:/msii, so create the directory then expand the zip there.
Look for the file "make.bat" and run it. I'm pretty sure you also need to install Cygwin (free) but that takes a long time to d/l so try make.bat w/o first.
Once you do a build, you'll create a .s13 file (maybe .s19, god my memory sucks). Copy that file up one directory level and run the download batch file w/ MS connected to d/l. The batch files gives you step by step instructions. It's straight forward.
Be sure your coils are not connected or you will fry them. Even after you flash, the default spark setting hold the coils hot so don't connect the them until you set the ignition settings to Miata specific values. You might want to verify w/ a multimeter or o-scope to be sure.
http://www.msextra.com/ms2extra/file...ta20071122.zip
Here's a link to the thread about the latest beta:
http://www.msextra.com/viewtopic.php?t=26715
If I remember right, everything is hard pathed to C:/msii, so create the directory then expand the zip there.
Look for the file "make.bat" and run it. I'm pretty sure you also need to install Cygwin (free) but that takes a long time to d/l so try make.bat w/o first.
Once you do a build, you'll create a .s13 file (maybe .s19, god my memory sucks). Copy that file up one directory level and run the download batch file w/ MS connected to d/l. The batch files gives you step by step instructions. It's straight forward.
Be sure your coils are not connected or you will fry them. Even after you flash, the default spark setting hold the coils hot so don't connect the them until you set the ignition settings to Miata specific values. You might want to verify w/ a multimeter or o-scope to be sure.
#9
Elite Member
Thread Starter
iTrader: (3)
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
Ha, thanks for the vote of confidence, guys. I'm just not afraid, I wouldn't say I'm 'advanced'. Trying to be a little intelligent here and not reinventing any wheels, I really want to get up and running ASAP, reusing what's available in the community so I know I'm not doing anything dumb.
THEN yes, there's a lot I want to do. With/Like Arga, I want to run the OEM '99 sensors. An external box for voltage regulation seems easy enough, but I might want to write my own cruise control routine (easy enough I think if I put real cut out switches on things). I have three main goals:
1) A car with knock sensing, definable fuel & spark tables, maybe EBC. You know, an actual computer controlled turbo car that will do what I need it to stay together without running only 7 psi.
2) To help develop a 99+ "pnp" MS solution so people don't have to buy CAS sensors or give up features their car had stock just to get a real ECU in the car
3) To dink around with things like configurable water injection, wheel sensor or accelerometer based traction control, making my turn signals flash in new and exciting ways. Just anything a "computer in a car" could do, just one that has access to esoteric engine condition information.
So yeah. Pointing me to "MS101 for dummies" is excellent, I don't want to learn the hard way! But I'm also sure I'm going to look at something interesting before too long, certainly apprenticing under Arga with the starting/idling on an NB miata is something I want to do ASAP.
THEN yes, there's a lot I want to do. With/Like Arga, I want to run the OEM '99 sensors. An external box for voltage regulation seems easy enough, but I might want to write my own cruise control routine (easy enough I think if I put real cut out switches on things). I have three main goals:
1) A car with knock sensing, definable fuel & spark tables, maybe EBC. You know, an actual computer controlled turbo car that will do what I need it to stay together without running only 7 psi.
2) To help develop a 99+ "pnp" MS solution so people don't have to buy CAS sensors or give up features their car had stock just to get a real ECU in the car
3) To dink around with things like configurable water injection, wheel sensor or accelerometer based traction control, making my turn signals flash in new and exciting ways. Just anything a "computer in a car" could do, just one that has access to esoteric engine condition information.
So yeah. Pointing me to "MS101 for dummies" is excellent, I don't want to learn the hard way! But I'm also sure I'm going to look at something interesting before too long, certainly apprenticing under Arga with the starting/idling on an NB miata is something I want to do ASAP.
#10
Elite Member
Thread Starter
iTrader: (3)
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
Thanks! That's exactly what I'm looking for. I'll probably want to steal your maps, too, although yours probably don't go too far into the 100-200 kpa range. :-)
My GOD that's the first thing I want to change. What do you do, swap out a transistor or something? I see this all over the place, and it seems a warning we shouldn't need. :-( Maybe I could put a relay in to cut power till a line gets pulled low. :-P But yeah, in the meantime, unplugging is fine I'm sure.
Sounds like windows is the development environment of choice then?
Be sure your coils are not connected or you will fry them. Even after you flash, the default spark setting hold the coils hot so don't connect the them until you set the ignition settings to Miata specific values. You might want to verify w/ a multimeter or o-scope to be sure.
Sounds like windows is the development environment of choice then?
#11
Elite Member
Thread Starter
iTrader: (3)
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
This work for you?
http://www.bgsoflex.com/megasquirtembdown.html
http://www.bgsoflex.com/megasquirtembdown.html
#12
3) To dink around with things like configurable water injection, wheel sensor or accelerometer based traction control, making my turn signals flash in new and exciting ways. Just anything a "computer in a car" could do, just one that has access to esoteric engine condition information.
There was also going to be an expansion board for general purpose I/O. That might be a better solution. Not sure where that is, though.
#13
Elite Member
Thread Starter
iTrader: (3)
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
that REALLY interests me. A long time ago it sounded like it was right around the corner. I'll tell you, I see more value in that than in the sequencer board. If you give up on backwards compatibility (something I feel is a big mistake in most development projects, start fresh if there's something to be gained!!), you could use the GPIO board to take over duties the MS is now doing, and then free up those channels for running 4 dedicated fuel injector lines from the CPU. That's enough for a sequential 4 or a banked 8. It kinda isn't ideal for V-6's but I mean, give up your 3 LEDs and one spare output and bingo! You've got 4 injectors.
You know, or not. Anyway, GPIO board is what really turns me on about all this - I want more ins and outs, ideally some analog.
You know, or not. Anyway, GPIO board is what really turns me on about all this - I want more ins and outs, ideally some analog.
#14
Elite Member
Thread Starter
iTrader: (3)
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
http://www.jbperf.com/p&h_board/
heh - interesting. I gotta find out about the MS1x and the MS2x code, everything I see says the extra code is only for the MS1 but I know that's not right, maybe it's just the manuals?
Anyway, hmmm, 4 independant injector channels. It's enough to make a guy want to keep his staged injection. :-P I can't be the first person to see this, can I?
<edit>
Ok ok, I found it. Lots of MS-II stuff. Sounds like there's a lot missing, and a lot there. At least it's a bit easier to read now that there's a reason. :-)
Arga, got a link to that code again, I can't find it - the two versions of your ignition code for the OEM sensors.
heh - interesting. I gotta find out about the MS1x and the MS2x code, everything I see says the extra code is only for the MS1 but I know that's not right, maybe it's just the manuals?
Anyway, hmmm, 4 independant injector channels. It's enough to make a guy want to keep his staged injection. :-P I can't be the first person to see this, can I?
<edit>
Ok ok, I found it. Lots of MS-II stuff. Sounds like there's a lot missing, and a lot there. At least it's a bit easier to read now that there's a reason. :-)
Arga, got a link to that code again, I can't find it - the two versions of your ignition code for the OEM sensors.
Last edited by AbeFM; 12-11-2007 at 03:22 AM.
#15
Boost Pope
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,072
Total Cats: 6,625
MSII owners already have 0.001ms injector resolution and thus no need for an "HR" code variant, thus they will not lose their on-board PWM capability.
So that board is basically a standalone PWM injector driver. It takes a standard injector input and produces an output of equal duration but consisting of a brief peak period followed by a PWM current limited period. You could use it with any ECU, not just megasquirt. It's based on this IC from National: http://www.national.com/mpf/LM/LM1949.html
#16
Elite Member
Thread Starter
iTrader: (3)
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
My take was that maybe you could run 4 channels by using the two outputs per channel of the MS-II and setting them to run 4 channels seperately, letting the driver board run the show.
What has me more concerned is the lack of EGT handling by the MS2-x
What has me more concerned is the lack of EGT handling by the MS2-x
#17
The trouble with EGT is it's affected by a couple of other things like ignition timing and where you stick the probe. Using it for closed loop fuel correction's not going to be a good idea. It probably wouldn't be too hard to hack the code to log a single EGT channel, however.
#18
Elite Member
Thread Starter
iTrader: (3)
Join Date: Aug 2006
Location: San Diego, CA
Posts: 3,047
Total Cats: 12
Peak-and-hold isn't really something you should need to do in software.
The trouble with EGT is it's affected by a couple of other things like ignition timing and where you stick the probe. Using it for closed loop fuel correction's not going to be a good idea. It probably wouldn't be too hard to hack the code to log a single EGT channel, however.
#19
It is quite useful for that. However, you'd run out of processor inputs with the current hardware, so you'd be better off using an external device (maybe an Innovate TC-4) to measure your exhaust temperatures. If you're reprogramming a Megasquirt, I wonder if you could write a routine for interfacing with Innovate's serial protocol?
#20
Boost Pope
iTrader: (8)
Join Date: Sep 2005
Location: Chicago. (The less-murder part.)
Posts: 33,072
Total Cats: 6,625
It's four completely separate driver channels. Output INJ1 is driven by U1, which is triggered by input 1. Output INJ2 is driven by U2, triggered by input 2, and etc... There is no switching logic at all, this board is just a simple input follower.
A thought however- I don't know what the cam sensor on an NB outputs. If you guys get one pulse per cam revolution (indicating #1 TDC only) instead of two pulses per cam revolution like us NA'ers, then it would be trivial to build a circuit to steer the pulses from the MS to the correct pair of injector drivers, based on the CAS indication.
BTW- what EGT sensor are you guys using? Mine is slower than hell, no possible way it could be used for fuel tuning- if I floor it on the highway, it takes a couple of seconds to see the change in EGT.