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

sunfield
MS/Extra Newbie
Posts: 29
Joined: Mon Jun 30, 2008 11:54 am
Location: Apeldoorn, Netherlands

Re: MS2 development/coding for dummies

Post by sunfield »

sunfield wrote:
jsmcortina wrote:See the third post here: http://www.msextra.com/forums/viewtopic ... 01#p308151

James
The upload went well. The tar created the directory d:/usr/.... In the usr/bin the are a lot of variations of m68hc11-elf-....... But the file I expected m68hc11-elf-gcc has the extention .exe and there is no one named without extention. What am I doing wrong?

Verstuurd vanaf mijn Nexus 10 met Tapatalk
Who can help me without the following "fout" = error 127

Image

Verstuurd vanaf mijn Nexus 10 met Tapatalk
racingmini_mtl
Super MS/Extra'er
Posts: 9128
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada
Contact:

Re: MS2 development/coding for dummies

Post by racingmini_mtl »

I think there are issues with cygwin64. You need to use the 32-bit version. I know that's what I'm using and it works. And there are posts from last year that say the same thing.

Jean
jbperf.com Main site . . . . . . . . . . . . . . . . . . . . . . jbperf.com Forum
Image
sunfield
MS/Extra Newbie
Posts: 29
Joined: Mon Jun 30, 2008 11:54 am
Location: Apeldoorn, Netherlands

Re: MS2 development/coding for dummies

Post by sunfield »

racingmini_mtl wrote:I think there are issues with cygwin64. You need to use the 32-bit version. I know that's what I'm using and it works. And there are posts from last year that say the same thing.

Jean
@jean, 32 bit version is working without problemen. Thanks

Verstuurd vanaf mijn Nexus 10 met Tapatalk
sunfield
MS/Extra Newbie
Posts: 29
Joined: Mon Jun 30, 2008 11:54 am
Location: Apeldoorn, Netherlands

Re: MS2 development/coding for dummies

Post by sunfield »

I am using table switching Patrol and LPG. The are some tricks to connect the thermo sensor to the ground for LPG by hardware. Who can help me to do this by software. I need some support where to change and which signals

Verstuurd vanaf mijn S30 met Tapatalk
jsdevel
Experienced MS/Extra'er
Posts: 318
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Re: MS2 development/coding for dummies

Post by jsdevel »

http://www.msextra.com/tools/ is great. The version of gcc is pretty out of date. Has anyone tried using the latest version of gcc? I like to keep my system managed by dnf as much as possible which is why I ask.
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MS2 development/coding for dummies

Post by jsmcortina »

This is the latest version of gcc for s12.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
jsdevel
Experienced MS/Extra'er
Posts: 318
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Re: MS2 development/coding for dummies

Post by jsdevel »

Got it. Thanks James!
jsdevel
Experienced MS/Extra'er
Posts: 318
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Re: MS2 development/coding for dummies

Post by jsdevel »

Actually, I realized that I could probably bundle those tools up into a docker container. Then I could run a simple docker command. I'll post back once I have that working.
jsdevel
Experienced MS/Extra'er
Posts: 318
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Re: MS2 development/coding for dummies

Post by jsdevel »

I was able to create a .s19 from the ms2extra source with docker!

Here's the Dockerfile I used:
FROM fedora:26

RUN dnf install -y wget
RUN wget -q -O freescale-tools.tgz http://www.msextra.com/tools/s12buildto ... -24.tar.gz
RUN tar --strip-components=1 -zxf freescale-tools.tgz
RUN tar -zxf tools.tar.gz
RUN dnf install -y make which
ENV PATH="/usr/bin:${PATH}"
RUN dnf install -y glibc.i686
RUN dnf install -y zlib.i686
VOLUME ["/host"]
WORKDIR /host
In the directory I had my Dockerfile in I did this:
docker build -t freescale-tools .
After changing BINDIR to /usr/bin/ in the Makefile, I ran the following commands in my ms2extra directory:
docker run --privileged -v $PWD:/host freescale-tools make
docker run --privileged -v $PWD:/host freescale-tools chmod -R `id -u`:`id -u` .
And voila! megasquirt2.s19 was in my current directory!

I like this approach as I don't have to muck with / on my system.
Last edited by jsdevel on Sat Oct 21, 2017 5:47 pm, edited 2 times in total.
jsdevel
Experienced MS/Extra'er
Posts: 318
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Re: MS2 development/coding for dummies

Post by jsdevel »

I'll also add that I loaded the .s19 file to my MS2 and it worked flawlessly.

James, would it be possible to include that Dockerfile in with the sources? Or would it violate the license if I published that Dockerfile as an image on dockerhub? It would be cool if `msextra-tools` were up on the hub.
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MS2 development/coding for dummies

Post by jsmcortina »

I'm not sure I understand the purpose of this 'docker' ?

The MS2/Extra build is fairly simple driven by a Makefile. If you have a different tools path, you can edit the Makefile and set your paths in the PROGPREF line.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
jsdevel
Experienced MS/Extra'er
Posts: 318
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Re: MS2 development/coding for dummies

Post by jsdevel »

Yea, the Makefile is indeed pretty straight forward. I like using docker containers because I can avoid installing tools in global paths. Docker commands are run in a container, and containers are like light weight VMs.
jsdevel
Experienced MS/Extra'er
Posts: 318
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Re: MS2 development/coding for dummies

Post by jsdevel »

Just stumbled upon this site and thought I'd share. Lots of relevant info: http://www.seattlerobotics.org/encoder/ ... ncoder.htm
ol boy
Super MS/Extra'er
Posts: 1532
Joined: Mon Sep 10, 2007 3:06 am
Location: Tucson, Az

Re: MS2 development/coding for dummies

Post by ol boy »

When running the "make release" in cygwin does it spit out how much ram and flash the new .s19 file uses?

Sent from my SCH-I535 using Tapatalk
306 SBFord, Torquer II EFI intake, 60 lbs injectors, 8 LS2 coils, VS Racing 7668 turbo, 4R70W, MS3x fw1.4 w/built in trans controller.
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MS2 development/coding for dummies

Post by jsmcortina »

ol boy wrote:When running the "make release" in cygwin does it spit out how much ram and flash the new .s19 file uses?
Take a look in the top of the *.dmp for the flash section usage, you'll need to cross reference memory.x also. Variable allocation in RAM you can find in the *.map file, but that doesn't tell you the required stack space.

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
EnergeticMotorsports
Helpful MS/Extra'er
Posts: 110
Joined: Sun Dec 31, 2017 5:59 pm

Re: MS2 development/coding for dummies

Post by EnergeticMotorsports »

well i am keep getting an error
$ make release
-bash: make: command not found

I have windows 10 and the latest 32bit cygwin and i have thes12buildtools-win32-2012-10-24 extracted and it is in the C:/cygwin/usr/bin folder

m68hc11-elf-gcc is in the folder when i checked

I included a screen shot of the issue. lol not sure where i went wrong.

I have folder that the files to be compiled are C:/cygwin/trans

i did " cd C:/cygwin/trans " and then i typed "make release". I know im doing it wrong lol

Thanks apparently i'm challenged. lol

Nelson
Attachments
make release error.png
make release error.png (88.58 KiB) Viewed 31602 times
jsmcortina
Site Admin
Posts: 39585
Joined: Mon May 03, 2004 1:34 am
Location: Birmingham, UK
Contact:

Re: MS2 development/coding for dummies

Post by jsmcortina »

When you installed cygwin, did you select the package that includes "make" ?
I'm guessing that command would normally be in /usr/bin

James
I can repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

My Success story: http://www.msextra.com/forums/viewtopic ... 04&t=34277
MSEXTRA documentation at: http://www.msextra.com/doc/index.html
New users, please read the "Forum Help Page".
EnergeticMotorsports
Helpful MS/Extra'er
Posts: 110
Joined: Sun Dec 31, 2017 5:59 pm

Re: MS2 development/coding for dummies

Post by EnergeticMotorsports »

nope.lol that makes sense.lol :D
EnergeticMotorsports
Helpful MS/Extra'er
Posts: 110
Joined: Sun Dec 31, 2017 5:59 pm

Re: MS2 development/coding for dummies

Post by EnergeticMotorsports »

I think i found the package I believe it is just make package. ill install this one.
Attachments
make in cygwin 86 install.png
make in cygwin 86 install.png (101.4 KiB) Viewed 31572 times
EnergeticMotorsports
Helpful MS/Extra'er
Posts: 110
Joined: Sun Dec 31, 2017 5:59 pm

Re: MS2 development/coding for dummies

Post by EnergeticMotorsports »

Looks like the make command works i get a error 127 when compiling using non edited firmware. guessing i need to adjust make file. i was just testing Thanks for help!
Attachments
error 127.png
error 127.png (69.35 KiB) Viewed 31565 times
Post Reply