I need someone to explain this to me.

Text editor running on your ARM project

bare-metal-elua-text-editor

Tired of flashing your embedded project over and over just to tweak a few values? So was [Karl], so he wrote a text editor that runs on his ARM dev board.

Having trouble wrapping your mind around the need for this kind of thing? He’s actually playing around with eLua, the embedded version of the Lua programming language. In this case the program files are┬ábeing stored on an SD card. But still, moving that back and forth between computer and embedded project gets old quickly. So he invested the time to write a rudimentary text editor that he interfaces through this terminal window. Above you can see the help screen which lays out all of the applications features. Right now it sounds like the only gotcha for this is the amount of RAM it needs to run. As it stands, the editor will now work an┬ámbed board, but it works just fine on an STM Discovery.

Comments

  1. Ren says:

    Nice, Vi and Ed commands!

  2. ejonesss says:

    so in theory since the Arduino uses arm then you should be able to run a text editor on a Arduino

    • kommune78 says:

      I thought it uses AVR?

    • six677 says:

      There are only 2 official arduino boards with ARM on board, and both could be considered specialist. The due and the yun (or whatever its called). The entire rest of the lineup uses AtMega AVR microcontrollers, AtTiny’s have been supported by 3rd parties as have a few other ARM boards but most arduinos are not ARM.

      • six677 says:

        Actually, come to think of it. The YUN isnt ARM either. Its a normal AVR based arduino with a MIPS processor on board running linux, what the hell its for I dont know, but like I said, it can be considered specialist.

  3. Blueskiesokie says:

    “As is stands, the editor will now…” shouldn’t “now” be “not” ?
    :-) great article btw.

  4. Darron says:

    While this is interesting… the most common thing to do here would be to make a serial protocol for file transfer and other things. Then, you could edit the files in a much nicer environment. You wouldn’t be limited to just transferring files… I’ve had full debug control (breakpoints, variable inspection and editing, etc) over serial/Ethernet to embedded scripting systems a few times.

    One of the most worthwhile things you can spend time on are tools to give you visibility into what’s going on with your project. Debugging aids are near the top of the list.

    • jbsnyder says:

      eLua actually does support this a couple of different ways, though not yet with breakpoints, etc.. though it’s something we’ve wanted to have for a bit. That doesn’t negate the convenience of being able to have a self contained development environment on the device that just needs a terminal emulator.

      We have a remote filesystem: http://www.eluaproject.net/doc/master/en_arch_rfs.html

      An RPC module that allows code to be compiled on the host and sent over a serial link and called as if they were functions local to a Lua instance on the host: http://www.eluaproject.net/doc/master/en_refman_gen_rpc.html

      And, we also support using xmodem to just copy/run files: http://www.eluaproject.net/doc/master/en_using.html (see recv command)

      Also, at least on mbed we can also access the flash that gets presented as mass storage when it’s connected to a host over USB so you can use that for passing scripts back and forth although only either the MCU or the host machine can access it at a given point in time so you have to switch it back and forth.

      • somun says:

        Thanks for the write-up and references.

        Within this context, the project here tends to go the ‘just because I can’ category. We should have a new site about those ;p

  5. Grant says:

    Awesome project, but please let hyperterminal die. ;_;

  6. popeiler says:

    Dude, awesome project. I can’t tell you how handy it is having a text editor on target.

    One minor thing though- Please let hyperterminal die ;_;. It’s the IE6 of terminal emulators.

  7. AMS says:

    I’ve usually just thrown a little FORTH interpeter on the other end of my serial lines, but now that ARM chips have gotten a bit more beefy I wonder if it would be possible to toss something like the vi from busybox on there.

  8. F says:

    no surprise really, emcraft has linux running on STM32F2 and STM32F4

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s