Good work flow methods
-
- Posts: 8
- Joined: Thu Feb 13, 2014 6:20 am
Good work flow methods
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.
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
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:
I'm currently running ubuntu 14.04 or Linux Mint 13 depending on which computer I'm using.
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
I'm currently running ubuntu 14.04 or Linux Mint 13 depending on which computer I'm using.
Re: Good work flow methods
Do you mean you've got Micropython up and running on the Stellaris? Any hints and tips if so, please?
-
- Posts: 8
- Joined: Thu Feb 13, 2014 6:20 am
Re: Good work flow methods
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.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Good work flow methods
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.dhylands wrote: ...
[*]copy file to the pyboard via USB Storage
...
Regards, Pete
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Good work flow methods
I think it is possible to force the 'sync' option when mounting usb storage devices...
Frédéric
Re: Good work flow methods
For me, this seems to be have been done by the OS:
I think that the "flush" option is the one you want. From: http://linux.die.net/man/8/mount
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.
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)
Code: Select all
flush
If set, the filesystem will try to flush to disk more early than normal. Not set by default.
- pythoncoder
- Posts: 5956
- Joined: Fri Jul 18, 2014 8:01 am
- Location: UK
- Contact:
Re: Good work flow methods
Thanks for that. Now fixed (Debian, in fstab).
Regards, Pete
Regards, Pete
Peter Hinch
Index to my micropython libraries.
Index to my micropython libraries.
Re: Good work flow methods
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.
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
@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
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