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 sunfield » Fri Aug 11, 2017 11:13 pm

sunfield wrote:
jsmcortina wrote:See the third post here: http://www.msextra.com/forums/viewtopic.php?f=91&t=43601#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
sunfield
MS/Extra Newbie
 
Posts: 29
Joined: Mon Jun 30, 2008 11:54 am
Location: Apeldoorn, Netherlands

Re: MS2 development/coding for dummies

Postby racingmini_mtl » Fri Aug 11, 2017 11:43 pm

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
racingmini_mtl
Super MS/Extra'er
 
Posts: 8013
Joined: Sun May 02, 2004 6:51 am
Location: Quebec, Canada

Re: MS2 development/coding for dummies

Postby sunfield » Sat Aug 12, 2017 1:18 pm

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

Postby sunfield » Sat Sep 09, 2017 6:44 am

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
sunfield
MS/Extra Newbie
 
Posts: 29
Joined: Mon Jun 30, 2008 11:54 am
Location: Apeldoorn, Netherlands

Re: MS2 development/coding for dummies

Postby jsdevel » Fri Sep 15, 2017 9:49 pm

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.
jsdevel
Experienced MS/Extra'er
 
Posts: 294
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Re: MS2 development/coding for dummies

Postby jsmcortina » Sun Sep 17, 2017 2:16 am

This is the latest version of gcc for s12.

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

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

Re: MS2 development/coding for dummies

Postby jsdevel » Tue Sep 19, 2017 12:09 am

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

Re: MS2 development/coding for dummies

Postby jsdevel » Sat Oct 21, 2017 3:34 pm

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: 294
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Re: MS2 development/coding for dummies

Postby jsdevel » Sat Oct 21, 2017 5:44 pm

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: 294
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Re: MS2 development/coding for dummies

Postby jsdevel » Sat Oct 21, 2017 5:45 pm

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.
jsdevel
Experienced MS/Extra'er
 
Posts: 294
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Re: MS2 development/coding for dummies

Postby jsmcortina » Sun Oct 29, 2017 3:41 am

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 supply, repair or upgrade Megasquirts in UK. http://www.jamesmurrayengineering.co.uk

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

Re: MS2 development/coding for dummies

Postby jsdevel » Sun Oct 29, 2017 8:30 pm

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: 294
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Re: MS2 development/coding for dummies

Postby jsdevel » Sat Nov 04, 2017 4:48 am

Just stumbled upon this site and thought I'd share. Lots of relevant info: http://www.seattlerobotics.org/encoder/200109/encoder.htm
jsdevel
Experienced MS/Extra'er
 
Posts: 294
Joined: Mon May 23, 2016 3:41 pm
Location: Phoenix, AZ

Previous

Return to MS2/Extra Development

Who is online

Users browsing this forum: No registered users and 2 guests