Page 1 of 2
Good work flow methods
Posted: Mon Sep 22, 2014 6:19 pm
by TheRegnirps
I'm looking for input on an "optimal" work flow for development with Debian or Mac host. IDE's? Easiest way to edit and test code?
My first attempts involved moving SD cards back and forth and some testing from command line. This is rather slow and awkward. I use the pyboard and ST Discovery boards plus some with Stellaris launchpads.
Re: Good work flow methods
Posted: Mon Sep 22, 2014 6:44 pm
by dhylands
For stuff which doesn't need specific features of the pyboard, I tend to test out things using the unix build of micropython.
For things which need the pyboard, then I usually do something along the following:
- edit file on my local computer
- copy file to the pyboard via USB Storage
- in the pyboard REPL, Press Control-D
- import my test script which may then use the other scripts
when things don't work, then I'll usually explore with the REPL to figure out what I did wrong, and then repeat the whole process
I'm currently running ubuntu 14.04 or Linux Mint 13 depending on which computer I'm using.
Re: Good work flow methods
Posted: Tue Sep 23, 2014 7:33 am
by nekomatic
Do you mean you've got Micropython up and running on the Stellaris? Any hints and tips if so, please?
Re: Good work flow methods
Posted: Fri Sep 26, 2014 12:05 am
by TheRegnirps
No, I intended to see what can be done with several Stellaris Launchpad kits I have. So, I have not looked yet to see if anyone has done it.
Re: Good work flow methods
Posted: Fri Sep 26, 2014 8:05 am
by pythoncoder
dhylands wrote:
...
[*]copy file to the pyboard via USB Storage
...
I do the same as you but I've found it necessary to issue
sync under Linux after performing this step otherwise on occasion the file on the target doesn't get updated.
Regards, Pete
Re: Good work flow methods
Posted: Fri Sep 26, 2014 8:14 am
by fma
I think it is possible to force the 'sync' option when mounting usb storage devices...
Re: Good work flow methods
Posted: Fri Sep 26, 2014 3:24 pm
by dhylands
For me, this seems to be have been done by the OS:
Code: Select all
/dev/sdc1 on /media/dhylands/4421-0023 type vfat (rw,nosuid,nodev,uid=35029,gid=1001,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
I think that the "flush" option is the one you want. From:
http://linux.die.net/man/8/mount
Code: Select all
flush
If set, the filesystem will try to flush to disk more early than normal. Not set by default.
Two of my machines use ubuntu 14.04 and this one uses Linux Mint 13, and they all seem to set flush on flash drives.
Re: Good work flow methods
Posted: Mon Sep 29, 2014 8:50 am
by pythoncoder
Thanks for that. Now fixed (Debian, in fstab).
Regards, Pete
Re: Good work flow methods
Posted: Thu Oct 09, 2014 7:07 pm
by mosi
My pyboard v3 with current code causes the following:
REPL "freezes" when in minicom serial terminal on mac and becomes unresponsive.
It happens randomly, from 1 minute to 3 hours range.
It happens in all serial console tools.
The only solution is to close the serial port and re-open, sometimes hard reset is needed.
I tested two boards to exclude hardware problems, both behave the same.
How can I best debug in the C code of repl?
I can solder, use the SWD or JLINK with STlink v2, however I only did it on Keil so far, which works seamlessly.
I have a working openOCD setup as well on Mac.
How do you debug? Where can I turn on/off debugging REPL output?
All ideas are welcome.
Re: Good work flow methods
Posted: Thu Oct 09, 2014 7:17 pm
by blmorris
@mosi - you may want to try 'screen' instead of minicom on the mac; I started out using minicom but found that screen is just generally easier to use, and probably more stable as well.
Are you really using v3 (the early kickstarter reward version)? You may want to check that you are using the right firmware image for your board. (You did mention that your firmware is current.)
Using screen doesn't require sudo on my machine, simply enter 'screen /dev/tty.usbmodem<your device #>' and the REPL will come up.
To exit type Control-A then k, and hit y to confirm you want to exit.
-Bryan