MS2 development/coding for dummies

This is a forum for discussing the development and testing of alpha MS2/Extra code. Documentation
(Runs on MS2 and Microsquirt)

Moderators: jsmcortina, muythaibxr

Re: MS2 development/coding for dummies

Postby Jobro » Mon Jan 30, 2012 3:04 am

Note the error trying to compile MS2e2.1.0E

make[1]: c:/usr/bin/m6811-elf-gcc: Command not found

No problem compiling MS2e3.xxx
No problem compiling ms3

inspect ms2e311 makefile.ms2

Code: Select all
#PROGPREF=$(BINDIR)/m6811-elf-
PROGPREF=$(BINDIR)/m9s12x-elf-


inspect ms2e210 makefile.ms2

Code: Select all
PROGPREF=$(BINDIR)/m6811-elf-



Where do I get m6811-elf tools or whatever they are?
1982 RX-7 12A, MSII V3.0, running ms2extra 2.1.0E

Series 5 RX-7 throttle bodies, 2xID725, 2x1600
Complete fuel,ignition, and electric fan control. 11.828@124.30mph
Jobro
Helpful MS/Extra'er
 
Posts: 139
Joined: Wed Aug 16, 2006 12:24 am
Location: Brisbane, Australia

Re: MS2 development/coding for dummies

Postby jsmcortina » Mon Jan 30, 2012 5:02 am

Recently we've named the build tools with the m9s12x- prefix instead of m6811- So you'll need to edit that one line in the Makefile to match the filenames of the build tools you have installed.
Why would you want to build 2.1.0 though? It is obsolete.

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 27921
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: MS2 development/coding for dummies

Postby Jobro » Mon Jan 30, 2012 3:36 pm

jsmcortina wrote:Recently we've named the build tools with the m9s12x- prefix instead of m6811- So you'll need to edit that one line in the Makefile to match the filenames of the build tools you have installed.
Why would you want to build 2.1.0 though? It is obsolete.

James


I tried editing the line in the makefile.ms2. I get a different error if I do that. I will post a screen dump of the error after work.

I want to have a look at 2.1.0E because it is what I use. I am totally familiar with the operation of megatune, what all the settings do, where everything is etc. The setup as is is rock solid. I can run 121mph down the quarter mile all night long. I have extensively tested this firmware. No exaggeration when I say 40 1/4 mile passes, mostly in the 12 second band.

Tuning is not a small task when we are talking about a Wankel rotary 9.4:1 compression motor using 20psi boost. Lets not foget 12A rotor housings got scarce in 2006 and this engine is one of the last properly rebuilt ones. Value to me = priceless.
1982 RX-7 12A, MSII V3.0, running ms2extra 2.1.0E

Series 5 RX-7 throttle bodies, 2xID725, 2x1600
Complete fuel,ignition, and electric fan control. 11.828@124.30mph
Jobro
Helpful MS/Extra'er
 
Posts: 139
Joined: Wed Aug 16, 2006 12:24 am
Location: Brisbane, Australia

Re: MS2 development/coding for dummies

Postby Jobro » Tue Jan 31, 2012 2:14 am

The attached png screen dump shows what error I get if I comment out the line referring to m6811-elf and include the line referring to m9s12x-elf

Code: Select all
#PROGPREF=$(BINDIR)/m6811-elf-
PROGPREF=$(BINDIR)/m9s12x-elf-


I would really like to get this compiling if you guys can help. Next week I should have some time to flash the recompiled default source into my car. Then I can start looking at how things are done. Obviously there is no point me doing this if I can't build the .s19.
1982 RX-7 12A, MSII V3.0, running ms2extra 2.1.0E

Series 5 RX-7 throttle bodies, 2xID725, 2x1600
Complete fuel,ignition, and electric fan control. 11.828@124.30mph
Jobro
Helpful MS/Extra'er
 
Posts: 139
Joined: Wed Aug 16, 2006 12:24 am
Location: Brisbane, Australia

Re: MS2 development/coding for dummies

Postby Jobro » Thu Feb 02, 2012 7:55 am

OK well I worked out the problem trying to compile ms2e2xx code using the current release build tools.

I can compile any of the current firmwares now .s19s for ms2e2xx ms2e3xx and ms3.

Are these meaningless warnings or something significant? I'm quite interested in putting this firmware into my car.

Code: Select all
ms2_extra_main.o(.rodata+0x5414): reference to a banked address [3c:a400] in the normal address space at 5414
ms2_extra_main.o(.rodata+0x5416): reference to a banked address [3c:a400] in the normal address space at 5416
ms2_extra_main.o(.rodata+0x541a): reference to a banked address [3c:ac00] in the normal address space at 541a
ms2_extra_main.o(.rodata+0x541c): reference to a banked address [3c:ac00] in the normal address space at 541c
ms2_extra_main.o(.rodata+0x5420): reference to a banked address [3c:b400] in the normal address space at 5420
ms2_extra_main.o(.rodata+0x5422): reference to a banked address [3c:b400] in the normal address space at 5422
ms2_extra_main.o(.rodata+0x5426): reference to a banked address [3c:b800] in the normal address space at 5426
ms2_extra_main.o(.rodata+0x5428): reference to a banked address [3c:b800] in the normal address space at 5428
1982 RX-7 12A, MSII V3.0, running ms2extra 2.1.0E

Series 5 RX-7 throttle bodies, 2xID725, 2x1600
Complete fuel,ignition, and electric fan control. 11.828@124.30mph
Jobro
Helpful MS/Extra'er
 
Posts: 139
Joined: Wed Aug 16, 2006 12:24 am
Location: Brisbane, Australia

Re: MS2 development/coding for dummies

Postby racingmini_mtl » Thu Feb 02, 2012 8:30 am

You can ignore those warnings.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
racingmini_mtl
Super MS/Extra'er
 
Posts: 6465
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada

Re: MS2 development/coding for dummies

Postby Jobro » Thu Feb 02, 2012 2:25 pm

racingmini_mtl wrote:You can ignore those warnings.

Jean


Thanks!
1982 RX-7 12A, MSII V3.0, running ms2extra 2.1.0E

Series 5 RX-7 throttle bodies, 2xID725, 2x1600
Complete fuel,ignition, and electric fan control. 11.828@124.30mph
Jobro
Helpful MS/Extra'er
 
Posts: 139
Joined: Wed Aug 16, 2006 12:24 am
Location: Brisbane, Australia

Re: MS2 development/coding for dummies

Postby jsmcortina » Thu Feb 02, 2012 4:47 pm

Jobro wrote:OK well I worked out the problem trying to compile ms2e2xx code using the current release build tools.

What did you do?

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 27921
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: MS2 development/coding for dummies

Postby Jobro » Fri Feb 03, 2012 5:21 am

jsmcortina wrote:
Jobro wrote:OK well I worked out the problem trying to compile ms2e2xx code using the current release build tools.

What did you do?

James


A shitload of googlefu which found a whole heap of dead links. Eventually I learned that what was doing was looking for a gcc aged around 3.xx version, precompiled to an exe installer package designed specifically to be used with cygwin. No way on this earth would I be able to compile the src myself.

Anyway the package that works is called

The GNU Development Toolchain for 68HC11/HC12. It was an exe file. I moved my megasquirt build tools c:\usr to c:\usr_back, and then installed that and it worked straight away.
1982 RX-7 12A, MSII V3.0, running ms2extra 2.1.0E

Series 5 RX-7 throttle bodies, 2xID725, 2x1600
Complete fuel,ignition, and electric fan control. 11.828@124.30mph
Jobro
Helpful MS/Extra'er
 
Posts: 139
Joined: Wed Aug 16, 2006 12:24 am
Location: Brisbane, Australia

Re: MS2 development/coding for dummies

Postby jsmcortina » Fri Feb 03, 2012 5:47 am

You are using the old compiler then. The version on the MSEXTRA site has a significantly faster 32bit divide.

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 27921
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: MS2 development/coding for dummies

Postby Jobro » Fri Feb 03, 2012 2:26 pm

The screen dump 6 posts up shows what happens when I try to use the newer tools with ms2e2.1.0E code. There is an error in line 448 of ign_isr.s "addressing mode not implemented yet".

You're welcome to tell me how to fix that :lol:
1982 RX-7 12A, MSII V3.0, running ms2extra 2.1.0E

Series 5 RX-7 throttle bodies, 2xID725, 2x1600
Complete fuel,ignition, and electric fan control. 11.828@124.30mph
Jobro
Helpful MS/Extra'er
 
Posts: 139
Joined: Wed Aug 16, 2006 12:24 am
Location: Brisbane, Australia

Re: MS2 development/coding for dummies

Postby jsmcortina » Sun Feb 05, 2012 8:33 am

Jobro wrote:The screen dump 6 posts up shows what happens when I try to use the newer tools with ms2e2.1.0E code. There is an error in line 448 of ign_isr.s "addressing mode not implemented yet".

You're welcome to tell me how to fix that :lol:

That's a bug in that old MS2/Extra code.
Code: Select all
   bset    #TFLG_ign, TIE;    // set TIE

Arguments are reversed, should be:
Code: Select all
   bset    TIE, #TFLG_ign;    // set TIE

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 27921
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: MS2 development/coding for dummies

Postby Jobro » Mon Feb 06, 2012 5:52 am

jsmcortina wrote:
Jobro wrote:The screen dump 6 posts up shows what happens when I try to use the newer tools with ms2e2.1.0E code. There is an error in line 448 of ign_isr.s "addressing mode not implemented yet".

You're welcome to tell me how to fix that :lol:

That's a bug in that old MS2/Extra code.
Code: Select all
   bset    #TFLG_ign, TIE;    // set TIE

Arguments are reversed, should be:
Code: Select all
   bset    TIE, #TFLG_ign;    // set TIE

James


Hey so why does it compile with no errors the older tools then?
1982 RX-7 12A, MSII V3.0, running ms2extra 2.1.0E

Series 5 RX-7 throttle bodies, 2xID725, 2x1600
Complete fuel,ignition, and electric fan control. 11.828@124.30mph
Jobro
Helpful MS/Extra'er
 
Posts: 139
Joined: Wed Aug 16, 2006 12:24 am
Location: Brisbane, Australia

Re: MS2 development/coding for dummies

Postby Jobro » Mon Feb 06, 2012 5:57 am

OK I reverted to the new code tools, edited the makefile.ms to point to the new tools and flipped that line in the ign ISR and yes it does also compile that way.

Will both the s19 files work?

What would happen if I loaded the .s19 file built from the older m6811 tools with that bug in the source code
1982 RX-7 12A, MSII V3.0, running ms2extra 2.1.0E

Series 5 RX-7 throttle bodies, 2xID725, 2x1600
Complete fuel,ignition, and electric fan control. 11.828@124.30mph
Jobro
Helpful MS/Extra'er
 
Posts: 139
Joined: Wed Aug 16, 2006 12:24 am
Location: Brisbane, Australia

Re: MS2 development/coding for dummies

Postby racingmini_mtl » Mon Feb 06, 2012 8:24 am

Jobro wrote:What would happen if I loaded the .s19 file built from the older m6811 tools with that bug in the source code

You'd have a larger, slower code with a bug.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
racingmini_mtl
Super MS/Extra'er
 
Posts: 6465
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada

Re: MS2 development/coding for dummies

Postby jsmcortina » Mon Feb 06, 2012 12:58 pm

Jobro wrote:Hey so why does it compile with no errors the older tools then?

Because there's a bug in the older tools.

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 27921
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: MS2 development/coding for dummies

Postby Jobro » Wed Feb 08, 2012 2:28 am

jsmcortina wrote:
Jobro wrote:Hey so why does it compile with no errors the older tools then?

Because there's a bug in the older tools.

James


Is the line intentionally written with the wrong order because the old tools had a bug?
What exactly happens haha?
Would the code I have in my car have that bug?
I'm going to post up concise dumps hoping one of you guys can confirm I'm not having any bad messages.
1982 RX-7 12A, MSII V3.0, running ms2extra 2.1.0E

Series 5 RX-7 throttle bodies, 2xID725, 2x1600
Complete fuel,ignition, and electric fan control. 11.828@124.30mph
Jobro
Helpful MS/Extra'er
 
Posts: 139
Joined: Wed Aug 16, 2006 12:24 am
Location: Brisbane, Australia

Re: MS2 development/coding for dummies

Postby jsmcortina » Wed Feb 08, 2012 4:03 am

No, it was just a bug in the code that the old build tools didn't highlight. Two wrong don't make a right.

Check the .dmp output to see what it actually disassembles back to. My guess is that it will end up setting the wrong bits in the wrong byte. The timer could behave unexpectedly as a result.

James
I can supply, repair or upgrade Megasquirts in UK.

My Success story: viewtopic.php?f=104&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
jsmcortina
Site Admin
 
Posts: 27921
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK

Re: MS2 development/coding for dummies

Postby gslender » Tue Apr 17, 2012 7:50 pm

James/Ken - can you sticky this so that new users who come into the development forum can easily find it... this is a good primer for getting started !

G
Mazda MX5 + MS3 Pro
User avatar
gslender
Super MS/Extra'er
 
Posts: 1072
Joined: Fri Sep 16, 2011 5:29 am
Location: Brisbane, Australia

Re: MS2 development/coding for dummies

Postby Jobro » Sun May 13, 2012 2:57 am

Its been 3 months and I still haven't loaded the successfully compiled s19!

I really should go try now :P
1982 RX-7 12A, MSII V3.0, running ms2extra 2.1.0E

Series 5 RX-7 throttle bodies, 2xID725, 2x1600
Complete fuel,ignition, and electric fan control. 11.828@124.30mph
Jobro
Helpful MS/Extra'er
 
Posts: 139
Joined: Wed Aug 16, 2006 12:24 am
Location: Brisbane, Australia

PreviousNext

Return to MS2/Extra Development

Who is online

Users browsing this forum: No registered users and 1 guest