On Thu, 2006-10-19 at 21:35 +0300, Sergei Gavrikov wrote: > Dear eCos/RedBoot Experts, > > I have a question. Is it possible to organize a work with RedBoot like > with sub-shell system? Well, may be it's a stupid idea. Does exist a > way to return from a loaded application back in RedBoot? I brief looked > at `do_go' command of RedBoot. I noticed a thing called a trampoline. > It looks like what those `trampoline' and `return_to_redboot' functions > were designed to service a comeback to RedBoot. Is that right? But I see > never this RedBoot message on my ARM target: > > "Program completed with status 0" > > Should I have a _special_ way to terminate a running eCos application? I
Try using CYGACC_CALL_IF_MONITOR_RETURN(0); The argument is the returned exit status. This has limited use though. It only really works if the application returning to RedBoot has not modified/reprogrammed resources being used by RedBoot. Things like reprogramming the timer used by RedBoot would cause problems... --Mark > thought what I just have to call return(0) from main. Please, comment a > bit more about right way to terminate an eCos threat-ed application. And > may be this `return_to_redboot' behavior must be more configure with an > ecos config system? Did I miss something? And may be I just have some > wrongs in my HAL? > > I had an idea to run some user friendly TUI in curses with RedBoot `go' > command. A user would do something with that TUI (like `menuconfig' or > `minicom' ;) and when all will be done, user would return a control back > to RedBoot to use a RedBoot's power again, i.e., to download new data > from tftp server, to manage FIS, etc. Well, I cannot hold a whole httpd > in RAM to interact with user. I have a small memory footprint system. I > thought about CLI in TCL and TUI in curses, but I didn't desire to > duplicate the RedBoot robust behaviors in UI. Such an idea was... > > Thanks in advance for any helpful tips or comments. > > Sergei > > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
