Multiple applications running simultaneously?

This is quite a complex question, as it’s in some ways based on assumptions I’ve been forced to make because I can’t find any answers. Please feel free to correct me if any of those assumptions are incorrect.

(basics: the application is run on a connectcore9c with an arm9 using netos6.3)

Main question:

  • When our embedded applicaion is released and the machines are out in the field, how do we update the application? While constructing the application we’ve used the hardware debugger (majic) to download the new application to the machine. When the machine hits the field this is no longer an option, so we’ve included an ftp server in our application. The problem is that we can’t manage to get the ftp server to accept a request to overwrite itself…

We now get two side questions:

  • Is it possible to run two applications simultaneously on the machine, i.e. is it possible to have the main application running and at the same time have an ftp server (running from ram?) up with the sole purpose of allowing us to update the main application?
  • We believe that it’s possible to update the application using some kind of serial connection - but where should that serial connection be connected? Is it the same connection as the majic normally uses?

I’m still quite new at this (and my predessessor left his work without any hints at what he had changed and why he had changed it), so there could very well be a simple solution to the problem. If there is, I would be very happy to know what I need to do and where I need to change…
I hope that there is a very simple way of downloading the new application to the machine, as we’re running out of time (and never thought that this might be a problem). The most important part of it is that we must be able to update the application without a debugger (and without netos), so we hope that there is a way of simply dumping the image.bin onto the board…


  1. The custom Digi you receive are loaded with the “naftp” FTP server application, so it is simple to load your application.
  2. Your custom application should have a FTP server. There should be no proble to overwrite it because it is running in RAM, and the new programm will be stored in Flash. In my application, I activate the FTP server through the WEB page, I stop every other threads (otherwise it doesn’t work, I don’t know why), I send the new firmware, and the DIGI restart when it’s finished. Take the NAftp as example to do this.


Ahh… Now I think I see the reason why it works for you and not for me. All my threads are still running when I try to update via ftp. I wonder if there is a way I could change that… I think there could be. If I start the ftp-server instead of the normal application when restarting the machine no other threads should be running, and hence I should be able to update the system. It’s definitely worth a try!

It is pretty easy to add a function to your application that will retrieve the file from TFTP similar to the bootstrap. Just remember that you need to manually pack the structures.

This also has the advantage that you don’t have to play with the threads. The disadvantage is that you need a TFTP server running somewhere.


Net+OS is a multi-threaded OS, so it is designed to have multiple threads running at the same time.
I do not see any problem at all running a FTP server and something else.
I actually had an application running:
FTP server
HTTP server
TCP server
UDP keepalive
Serial Port Command line
Telnet server
Total of about 16 threads!
All this is running in a ConnectME (55MHz).


I also use multi-threading a lot. My primary app has:
Utility/Serial Port (main) thread
TFTP client thread
SSH server thread
15 telnet client threads
1 alarm client thread
1 shell client thread
1 telnet server thread
1 nist client thread
1 watchdog thread
Plus several more that I don’t remember what they do at the moment.

Multi-threading seems to work. :slight_smile: