Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 02:45 14 Apr 2021 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : CMM2: Workflows

     Page 1 of 2    
Author Message
Nelno
Regular Member

Joined: 22/01/2021
Location: United States
Posts: 59
Posted: 02:59am 15 Feb 2021
Copy link to clipboard 
Print this post

I'm wondering what some common workflows look like for those of you programming the CMM2.

Working directly on the CMM2 has some downsides for me:

- frequent removal of the SD card to copy over images, etc.
- no source control

What do others do to mitigate these issues? I noticed most of the cmm2fun projects are in github, I'm wondering if this involves manually copying back to PC each time or if there's some other solution I'm missing.

In addition, it seems like it could be useful to have a thread discussing common ways of working with CMM2 that might not be obvious to everyone.

If there's already a thread for this that I missed in my search, let me know. Thanks.
 
mclout999
Senior Member

Joined: 05/07/2020
Location: United States
Posts: 294
Posted: 04:14am 15 Feb 2021
Copy link to clipboard 
Print this post

I think a lot of people use MMEDIT https://www.c-com.com.au/MMedit.htm  on their PC with it linked over the USB B power cable via serial console and upload and download files from there. It takes care of all of your concerns. You can edit it on MMEDIT and run the code directly from an XMODEM transfer.
Edited 2021-02-15 16:02 by mclout999
 
vegipete

Guru

Joined: 29/01/2013
Location: Canada
Posts: 721
Posted: 07:20am 15 Feb 2021
Copy link to clipboard 
Print this post

I tend use Notepad++ on the PC side, and 'AUTOSAVE "xxx.BAS"" in the CMM2 side. Quick edits on the CMM2 are fine, then 'LIST ALL' and copy the TeraTerm capture back into Notepad++. Occasionally I'll paste into TeraTerm straight into the CMM2 editor, but that is limited to single lines at a time.
 
jirsoft

Guru

Joined: 18/09/2020
Location: Czech Republic
Posts: 376
Posted: 08:31am 15 Feb 2021
Copy link to clipboard 
Print this post

I'm trying to develop most of it direct on CMM2, simply relax from other OSes... And every few hours I'm copying files with Napoleon Commander to Mac (UDP or serial) and from there to GitHub.
Just when I'm developing CSUBs, it's done directly in BBedit on Mac, compiled and result is then sent through serial to EDIT into proper place.
Have a smooth day, Jiri
Napoleon Commander and SimplEd  for CMM2 (GitHub), CMM2.fun
 
epsilon

Senior Member

Joined: 30/07/2020
Location: Belgium
Posts: 170
Posted: 08:33am 15 Feb 2021
Copy link to clipboard 
Print this post

I use XEdit on the CMM2 to edit files (It supports two buffers, split-screen, undo, etc, so even for multi-file programs it's useable). XEdit doesn't hold a candle against any editor on PC, but I really enjoy the process of writing my programs on CMM2, like it's 1989, using an editor that I wrote myself :-)

I use xmodem to transfer files over serial. I never ever remove the SD card because I don't trust my soldering enough for the SD socket to last more than two inserts/ejects.

When I need to move an entire directory between CMM2 and PC, I use the MAR archiving program (a rough approximation of tar, or zip if you will) to zip up directories into an archive file before I xmodem them.

Jiri's Napoleon Commander is also an excellent tool to ferry files between PC and CMM2.
Epsilon CMM2 projects
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 4204
Posted: 09:01am 15 Feb 2021
Copy link to clipboard 
Print this post

I do use MMEdit for coding but still have the issue of sending other files to and from the CMM2.
I use MMUploader for a lot of file transfers and for initialization files.
A quick drag and drop gets the CMM2 configured how I want it after firmware uploads or playing around.

I am in the process of completing a FTP server for the CMM2.
It works well with the ESP32 and now have to test it with the ESP8266. The first attempt with the ESP8266 had problems with file transfer to the CMM2. I have changed a few settings and I am hopeful.

I test with Windows and Linux. Sorting out the differences has been time consuming.

I also need to see how fast I can get it to run reliably.

Jim
VK7JH
MMedit   MMBasic Help
 
Schlowski
Newbie

Joined: 26/03/2014
Location: Germany
Posts: 29
Posted: 09:11am 15 Feb 2021
Copy link to clipboard 
Print this post

I develop solely on the CMM2 - that's the whole point for me, a complete and closed "retro" system to tinker with in BASIC.

Edit-Run-Get error-Edit-Run-See something wrong-... Ah the good old times :-)

One thing that makes me crazy is my habit to do a Home-Home "doubleclick" to go to the start of an indented line as usual in Visual Studio - and the editor brings me to the top of the source... Other than that I'm quite happy with the editor and do not miss VisualStudio or UltraEdit or any other PC editor.

Every now and then I take the SD-Card to my PC to make a backup.
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 1312
Posted: 10:12am 15 Feb 2021
Copy link to clipboard 
Print this post

Hi @Nelno,

I worried about finding an optimal tool-supported workflow quite a lot initially, but these days I merrily just swap the SD card between the CMM2 and either my Win10 or Pi3 box, whichever I happen to be sitting at. I might look at @TassyJim's FTP stuff when he is done, but "whatever works". I guess I might experience mechanical failure with the SD eventually, but I'll cross that bridge if/when it comes.

Generally I develop using the CMM2's EDITor via a serial connection from PuTTY (though through my recent VT100 serial experiments I think PuTTY may be a little bit buggy) or TeraTerm. My .git directories are on the SD card so once I pop it into a PC I can just use git directly from it. I also have a script on the Pi that uses rsynch to create a backup from the SD card, but don't run that as often as I probably should.

Best wishes,

Tom
CMM2 Welcome Tape, Z-MIM: Zork on the CMM2
 
Nelno
Regular Member

Joined: 22/01/2021
Location: United States
Posts: 59
Posted: 03:18am 19 Feb 2021
Copy link to clipboard 
Print this post

Thanks for the responses. I posted this just before rolling blackouts hit us here in Texas, so it took me a while to get back online.

One of the reasons I was looking to find a better workflow than swapping my SD card in and out is because I broke the micro SD card on my Retromax -- several times. Beyond the first time, where I think I just had the misfortune of an out-of-tolerance SD connector that quit working after ~3 inserts, this was mostly because when I was developing my 3D printed case I was inserting it in the case over and over to test fit and weakening the SD card connector without realizing it. In one of my attempts to re-solder a new connector, I managed to delaminate most of the pads that hold it down. Even after buying special high-temp epoxy made for repairing PCBs and using the minimum heat to melt solder I couldn't get replacement pads to stay in place. I did what any sane person would do and hot-glued it. This actually works pretty well, but I am sure that over time it will weaken. So... hoping to avoid removing the card a whole lot.

Up till now I've developed solely on the CMM2 except for making art / sound / music assets on my PC. I would kind of like to continue doing that. Part of the fun is pretending I'm still in the 1980's, after all. For this same reason I've resisted figuring out CSUBs so far, though I know I will eventually do this to satisfy my performance habit.

I've also just found myself missing source control now and then. It's not really that I'm worried about losing everything, as I make backups each time I remove the SD card, but source control is nice for undoing something when I later decide it wasn't a good idea, and it's also a convenient way to distribute anything I'm working on.

The final temptation really is the editor. It probably wouldn't double my output, but I think just a better scroll speed, search and replace, etc. would improve it some non-trivial amount.

I'll go through all of the posts and try some of this out. Thanks everyone for the comments!
 
Nelno
Regular Member

Joined: 22/01/2021
Location: United States
Posts: 59
Posted: 03:23am 19 Feb 2021
Copy link to clipboard 
Print this post

  jirsoft said  'm trying to develop most of it direct on CMM2, simply relax from other OSes... And every few hours 'm copying files with Napoleon Commander to Mac (UDP or serial) and from there to GitHub.
Just when 'm developing CSUBs, it's done directly in BBedit on Mac, compiled and result is then sent through serial to EDIT into proper place.


This was what I was hoping to do. Unfortunately I haven't been able to get NC to connect to my PC via the COM port (I've got the B connector plugged directly into my PC for power). I probably only gave this about 15 minutes of trying though. I noticed the default baud rate seemed to be something like 219200? Maybe I need to configure this in multiple places (i.e. Python server and NC?)

If I can get this working it may satisfy all of my immediate needs.
 
Nelno
Regular Member

Joined: 22/01/2021
Location: United States
Posts: 59
Posted: 03:25am 19 Feb 2021
Copy link to clipboard 
Print this post

  vegipete said  tend use Notepad++ on the PC side, and 'AUTOSAVE "xxx.BAS"" in the CMM2 side. Quick edits on the CMM2 are fine, then 'LIST ALL' and copy the TeraTerm capture back into Notepad++. Occasionally I'll paste into TeraTerm straight into the CMM2 editor, but that is limited to single lines at a time.


I tried pasting straight into TeraTerm as this seemed like one possible workflow for using a PC editor and quickly getting code over to the CMM2, but it was dropping about 1/2 of the text any time I tried. I was pasting maybe a dozen lines of code at the time. I didn't spend any time trying to figure out why that might be the case.
 
Nelno
Regular Member

Joined: 22/01/2021
Location: United States
Posts: 59
Posted: 03:29am 19 Feb 2021
Copy link to clipboard 
Print this post

  epsilon said  use XEdit on the CMM2 to edit files (It supports two buffers, split-screen, undo, etc, so even for multi-file programs it's useable). XEdit doesn't hold a candle against any editor on PC, but I really enjoy the process of writing my programs on CMM2, like it's 1989, using an editor that I wrote myself :-)

use xmodem to transfer files over serial. I never ever remove the SD card because I don't trust my soldering enough for the SD socket to last more than two inserts/ejects.

When I need to move an entire directory between CMM2 and PC, use the MAR archiving program (a rough approximation of tar, or zip if you will) to zip up directories into an archive file before I xmodem them.

Jiri's Napoleon Commander is also an excellent tool to ferry files between PC and CMM2.


I absolutely agree there's something to be said for coding on the CMM2 itself. I haven't bothered using any .inc files yet, so I haven't missed having split screen editing. Thanks for reminding me.  

That's basically same reason I don't want to use my SD card a lot :)

What are you using for xmodem? Is that Maxiterm?

I will try XEdit out. Thanks!
 
Nelno
Regular Member

Joined: 22/01/2021
Location: United States
Posts: 59
Posted: 03:35am 19 Feb 2021
Copy link to clipboard 
Print this post

  thwill said  i @Nelno,

I worried about finding an optimal tool-supported workflow quite a lot initially, but these days I merrily just swap the SD card between the CMM2 and either my Win10 or Pi3 box, whichever I happen to be sitting at. I might look at @TassyJim's FTP stuff when he is done, but "whatever works". I guess I might experience mechanical failure with the SD eventually, but I'll cross that bridge if/when it comes.

Generally I develop using the CMM2's EDITor via a serial connection from PuTTY (though through my recent VT100 serial experiments I think PuTTY may be a little bit buggy) or TeraTerm. My .git directories are on the SD card so once I pop it into a PC I can just use git directly from it. I also have a script on the Pi that uses rsynch to create a backup from the SD card, but don't run that as often as I probably should.

Best wishes,

Tom


Ah... interesting idea to just put .git on the SD card. I may do that, though I'll just end up resoldering another micro SD, I think. But I've got 4 left, so...

One thing I don't want to do is waste a bunch of time finding an "optimal flow", but it does bug me somewhat to know that I could be operating more efficiently on some levels. After all, I have a limited amount of time outside of work and everything else to play with my CMM2, so any significant, low-effort productivity gains are probably worth it.
Edited 2021-02-19 13:35 by Nelno
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 4204
Posted: 06:09am 19 Feb 2021
Copy link to clipboard 
Print this post

  Quote  I tried pasting straight into TeraTerm as this seemed like one possible workflow for using a PC editor and quickly getting code over to the CMM2, but it was dropping about 1/2 of the text any time I tried. I was pasting maybe a dozen lines of code at the time. I didn't spend any time trying to figure out why that might be the case.


In TeraTerm serial port setting, try a transmit delay of 100 msec/line.

100 is way too big a delay but that is what I use for talking to the slower micromites and am too lazy to change it.

Jim
VK7JH
MMedit   MMBasic Help
 
epsilon

Senior Member

Joined: 30/07/2020
Location: Belgium
Posts: 170
Posted: 08:46am 19 Feb 2021
Copy link to clipboard 
Print this post

  Nelno said  I absolutely agree there's something to be said for coding on the CMM2 itself. I haven't bothered using any .inc files yet, so I haven't missed having split screen editing. Thanks for reminding me.  


Vertical split, horizontal split, two views into the same buffer...
You're missing out!

  Nelno said  
What are you using for xmodem? Is that Maxiterm?


I use TeraTerm.
One annoying issue with xmodem is that it's block oriented, so it'll pad your files with zeros up to nearest block size. It's mostly harmless though, and if you mar your files before transferring, you won't have that issue.
Epsilon CMM2 projects
 
William Leue
Senior Member

Joined: 03/07/2020
Location: United States
Posts: 211
Posted: 10:55pm 21 Feb 2021
Copy link to clipboard 
Print this post

I am deliberately using a simple, primitive, and naive workflow when writing for the CMM2. This is basically a respite from a long career in software using  tons and tons of software engineering tools like git, Maven, slack, and a ton of others that make working in a team productive.

So it's a bit of a relief to code solo and with the simplest possible methods.
I code directly on the CMM2 using the built-in editor. For backup, archiving, etc.
I just take out the SD card and put it into one of my desktop computers that has an SD slot and copy the data over to the computer.
For debugging I write print statements to a "debug.txt" file and try to use my head.

Sure, I miss git and have gotten into trouble a couple of times not having it. And a really good debugger would speed up the diagnosis and fix when I have done something really stupid.

I have considered using MMEdit on the PC but haven't gotten sufficiently motivated. If there were good networked software tools on the CMM2 like FTP or putty I would use them for sure, but  I can live without them.

My main goal is to have fun!
-Bill
 
johnd
Newbie

Joined: 22/10/2020
Location: United States
Posts: 30
Posted: 09:15am 22 Feb 2021
Copy link to clipboard 
Print this post

I think support for a WIFI enabled SD card would provide for a great workflow.  Scanning the forum, it looks like the CMM2 doesn't support WIFI-SD cards, so that is a bummer.  I wonder if it because they are not being initialized correctly upon startup.  I saw a post over in a 3D printer forum that talked about the Marlin controlling software and that when compiling it, a certain line should be un-commented in order for the software to send a WIFI init signal to the SD card on power up to activate the wifi capability, if that was to be used.  I wonder if the CMM2 firmware could do the same, or if there is some other reason the wifi cards do not work.
 
bigfix
Regular Member

Joined: 20/02/2014
Location: Austria
Posts: 92
Posted: 09:45am 22 Feb 2021
Copy link to clipboard 
Print this post

In theory there is a perfect solution for this - it does not require any change on the CMM/MicroMite SW side

It intercepts the SD Interface and offers a WebDAV Service to the filesystem
As there is no lockmanager to steer lowlevel access, one must be careful doing things simultanously
This is no issue at a 3D Printer, but eventually at a CMM2


BUT - it seems to be a little buggy
FYsetec SD-WIFI

The Code is opensource, so someone with the right skills could enhance it
WEBdav Server
There is also the circuit diagram included on GitHub

Some more info on Thingiverse
Thingiverse

You can buy it here
Fysetec Website

I am busy right now with a major plumbing (real brass & copper) project - so no time on my side for this
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 4738
Posted: 09:49am 22 Feb 2021
Copy link to clipboard 
Print this post

  Quote  BUT - it seems to be a little buggy
FYsetec SD-WIFI


Tried it - doesn't work - please don't waste your money
 
bigfix
Regular Member

Joined: 20/02/2014
Location: Austria
Posts: 92
Posted: 10:03am 22 Feb 2021
Copy link to clipboard 
Print this post

  Quote  Tried it - doesn't work - please don't waste your money

Good to hear this feedback from someone I trust !

Is it completely broken, or does it at least work somewhat/sometimes ?

The concept is attractive - but likely only partially finished...
Edited 2021-02-22 20:04 by bigfix
 
     Page 1 of 2    
Print this page
© JAQ Software 2021