Menu

Shell project screenshots

Help
2010-10-13
2012-12-09
  • Dragan Grujičić

    Hello Ruud,

    Would it be possible to have some quality screenshots of shell project, specially LIST function output. I am half way on coding shell inside MCU and have problems with formatting and output so this would be helpful. Please send latest version. Also some more explanation on presented data would be great (more than in Youtube clip).

    Best regards

     
  • De Vlaam

    De Vlaam - 2010-10-13

    Tomorrow i will look if i still have a chip programmed with the shell lying around. If so, i will make some screen shots and explain what can be seen there. At the moment i am porting the code to xmega and it is not working right now. Of course, best would be if you have a tiny861, flash the shell and connect it to the parallel port of some old pc. It is really not a lot of work, and you can play with the shell yourself. The shell demonstrates preemptive and cooperative tasks running simultaneously, as well as the file system, a os load monitor and much more.

    Your other post also gave me something to think about, I will react later.

     
  • Dragan Grujičić

    Thank you,

    Almost all is clear about the Shell project, but I need a good explanation on LIST command, fields that are on the screen etc

    Also I will have some more questions along the way.

    I do not have MCU required, and believe me it is difficult to get some here. So your help would be of great value, as always.

    Best regards

     
  • De Vlaam

    De Vlaam - 2010-10-14

    Below please find a copy from the input/output of the shell program. It says id is 0.91, but i am pretty sure it is a near 0.92 version. Below that there is an explanation of the fields. Hopefully this provides some information. Text behind the '>' is type by me, and the response is from the chip, exept for '>help', this is generated by the terminal program. Please note that the terminal program does not send full commands, but short versions of them. The tiny861 is simply not large enough to do text processing.

    Bus started
    >help
    FemtoOS Shell by R. Vlaming
    
    general commands:
     help               : generate this text
     id                 : report the FemtoOS system ID
     ticks              : report the system tickcounter in ticks
     uptime             : report the time past since the last reboot
     reboot             : reboot (not reset!) the system
     list               : show OS and task process variables
     suspend (nr)       : stops the given task (nr) from being run
     resume (nr)        : task (nr) is rescheduled for execution again
     kill (nr)          : terminate task (nr)
     recreate (nr)      : complete recreation of task (nr)
     priority (nr) (pr) : give task (nr) new priority (pr) (0..7)
     dump (t) (s) (l)   : dump (l) bytes of the (t) ram/flash/eeprom, starting at (s); s,l: hex/dec
     store (nr) (cont)  : store ascii content (cont) under filenumber (nr)
     recall (nr)        : recall the content of filenumber (nr)
     test               : may have any effect, including a full crash
    
    democommands:
     ledstate {(led)|all} {off|on|flash|freeze|follow} : led new state
     ledcycle {(led)|all} (ontime) (offtime)           : dutycycle, blocks of 32ms.
     ledsave  (nr)      : save the current ledstate and cycles in file (nr) (0..3)
     ledload  (nr)      : load the current ledstate and cycles from file (nr) (0..3)
    
    examples: 
     kill 0             : immideately terminates task 0.
     priority 4 2       : sets the priority of task 4 to level 2. 
     dump ram 0x200 100 : dump 100 bytes starting from address 0x200.
     ledstate 2 flash   : make ledtask 2 (third led) flash  
     ledstate 3 follow  : make ledtask 3 follow the interrupts on pin PB6  
     ledcycle 2 1 10    : make ledtask 2 cycle 32 ms on and 320 ms off. 
     ledstate all off   : switch all leds off.
    
    >list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
      far    1      -  free     0   8809 56285    43   25     0
    identifier--  status-----------------------------  admin------------------  watermarks----
    -nr ----name  state -lock sched dress -wdog -file  prio -time -nest -slots  stack register
      0 T4 Bus       go  free delay ready sleep     -     3   123 0 0 0 -----0     24 xxxx____
      1 Shell        go  free   run  done  dead     -     3     0 0 0 0 -----1     38 xxxxxxxx
      2 LED 0        go  free delay ready  dead     -     4    48 0 0 0 ------     21 xxxx____
      3 LED 1        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
      4 LED 2        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
      5 LED 3        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
      6 LED 4        go share delay  done  dead     -     2    34 0 0 0 ------     21 xxxx____
      7 LED 5        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
      8 LED 6        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
      9 LED 7        go share delay  done  dead     -     2    35 0 0 0 ------     21 xxxx____
    >id
    id: FemtoOS 0.91
    >suspend 2
    sys: ok
    >kill 6
    sys: ok
    >list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1      -  free     0   8767 56317    38   25     0
    identifier--  status-----------------------------  admin------------------  watermarks----
    -nr ----name  state -lock sched dress -wdog -file  prio -time -nest -slots  stack register
      0 T4 Bus       go  free delay ready sleep     -     3   183 0 0 0 -----0     24 xxxx____
      1 Shell        go  free   run  done  dead     -     3    36 0 0 0 -----1     57 xxxxxxxx
      2 LED 0      susp   ---   run   ---  dead     -     4     0 0 0 0 ------     21 xxxx____
      3 LED 1        go share delay  done  dead     -     2    26 0 0 0 ------     21 xxxx____
      4 LED 2        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
      5 LED 3        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
      6 LED 4      term   ---   ---   ---  dead     -     0    10 0 0 0 ------     21 xxxx____
      7 LED 5        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
      8 LED 6        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
      9 LED 7        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
    >resume 2
    sys: ok
    >list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1      -  free     0   8749 56331    40   25     0
    identifier--  status-----------------------------  admin------------------  watermarks----
    -nr ----name  state -lock sched dress -wdog -file  prio -time -nest -slots  stack register
      0 T4 Bus       go  free delay ready sleep     -     3   173 0 0 0 -----0     24 xxxx____
      1 Shell        go  free   run  done  dead     -     3    32 0 0 0 -----1     57 xxxxxxxx
      2 LED 0        go  free delay ready  dead     -     4    25 0 0 0 ------     21 xxxx____
      3 LED 1        go share delay  done  dead     -     2    28 0 0 0 ------     21 xxxx____
      4 LED 2        go share delay  done  dead     -     2    30 0 0 0 ------     21 xxxx____
      5 LED 3        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
      6 LED 4      term   ---   ---   ---  dead     -     0     0 0 0 0 ------     21 xxxx____
      7 LED 5        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
      8 LED 6        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
      9 LED 7        go share delay  done  dead     -     2    32 0 0 0 ------     21 xxxx____
    

    First group of three lines are about the OS itself, second group of lines about the tasks that are running. If a field has "--" it means that particular field is not appropriate to the task.

    task:
      first: (near|far)
              near: indicates that a task is scheduled within 256 ticks
              far: there are no tasks in the comming 256 ticks
      curr:  number of the task currently running
    file system:
     mode: (read|write|pend)
            read: eeprom is in reading mode
            write: eeprom is in writing
            pend:  currently reading, waiting for write state, no new reads allowed
     burn: (block|free)
            block: eeprom writing is still in progress
            free eeprom may be read or written
     tsk/#: which task is writing or the number of tasks simulteanously reading
    time:
     os:   the number of subticks spend in the os
     idle: the number of subticks spend in the idle mode
     isr:  the number of subticks spend in an isr (must cooperate)
    stack:
     os:   the number of bytes of the os stack in use
     isr:  the number of bytes of the isr stack in use
    identifier:
     nr:   number of the task (always starts with 0)
     name: dynamic task name (not static one) if present
    status:
     state: (term|susp|sleep|go)
             term: task is terminated, context is deleted
             susp: task is suspended, task will no be scheduled for execution
             sleep: task is sleeping, if all tasks are sleeping chip goes power down until interrupt
             go: task will be scheduled for execution
     lock:  (sync|free|file|share)
             sync: task is blocking on synchronizer,
             file: task is blocking on filesystem,
             share: cooperative task in shared mode, waiting for its turn
             free: task is able to run
     sched:  (delay|run)
             delay: task is delayed or if blocked waiting for timeout
             run: task is running
     dress:  (ready|done|read|write)
             ready: task is waiting to be scheduled in the round robbin
             done: task was already scheduled in this round robbin
             read: task is waiting for a read from eeprom
             write: task is waiting for a writing to eeprom
     wdog:  (dead|sleep|wake|bark)
            dead: the watchdog is not being used
            sleep: the watchdog is put to sleep, task seems running fine
            wake: the watchdog is monitoring this task, it may crash
            bark: the watch caugth a crashed task
     file:  (read|write|ERROR)
            read: task is currently reading from eeprom
            write: task is currently writing to eeprom
            ERROR: internal state of file system, should not occur
    admin:
     prio: the priority of the task 0..7, 
     time: number of subticks the task has spend
     nest: levels of nesting per critical section (global interrupts , tick interrupts, context switches)
     slots: numbers of slots that are in use
    watermarks:
     stack:    maximal number of bytes used from the stack
     register: registergroups used by the stack
    
     
  • De Vlaam

    De Vlaam - 2010-10-14

    Just one more remark, all values given under 'time' can be added to get the total (does not have to be 65536, but is usually close), and it is guaranteed that the measurements are done in the same time frame, so they are comparable. In this case:

    os:      8749  13.35% 
    idle:   56331  85.95%
    isr:       40   0.06%
    T4 Bus:   173   0.26%
    Shell:     32   0.05%
    LED 0:     25   0.04%
    LED 1:     28   0.04%
    LED 2:     30   0.05%
    LED 3:     32   0.05%
    LED 4:      0   0.00%
    LED 5:     32   0.05%
    LED 6:     32   0.05%
    LED 7:     32   0.05%
    =============  ======
    Total:  65536    100%
    

    I have put the load percentages by hand. Please note that mere doing such statistics also takes cycles in OS space. Of course these are always snapshots of some time ago.

     
  • Dragan Grujičić

    Thank you for your response. major source of confusion for me was API documentation from your site (and comments from femtoos_core.h) whish is not the same as in femtoos_core.c.

    Character count for genLogOS and genLogTask are not correct in API. Correct values are form femtoos_core.c.

    Tomorrow I will have some screenshots of mine to show off. I hope.

    Best regards

     
  • De Vlaam

    De Vlaam - 2010-10-14

    Character count for genLogOS and genLogTask are not correct in API. Correct values are form femtoos_core.c.

    That may be possible, i will have a look into that. This is probably because this function changes whenever there is a change in the OS. Thanks for the hint.

    Tomorrow I will have some screenshots of mine to show off.

    :-) I am very curious.

     
  • Dragan Grujičić

    Hello Ruud,

    Thanks for your help, but I need some more.

    As promised on Balansero blog you can find first screenshot of shell running on ATmega328p, communicating to PC over UART. Output of few list functions is shown and I need some help.

    On Sourceforge there is a complete project if you have some time to check it.

    Here is what I need:

    1. shell file is shell/shell.c. If you could check functions printLogOs and printLogTask and see if I got it all right. Basically this is rewrite of functions in shell trace code you provided. I believe it is full of bugs. I got all the output: for some I know it is OK for some not.

    2. Most suspicious to me are nest and slots columns.

    3. Registers: I have UART task defined as follows:

    #if (preTaskDefined(UART))
    void appLoop_UART(void)
    {
        while (true)
        {
            //UART_putc(UART_getc());
            taskDelayFromNow(5000);
        }
    }
    #endif
    

    but shell reports all registers are in use. I am using Eclipse and avr-gcc under Windows and I can not find file/output that is produced during compilation with use of registers, stack… Help? May be this is correct register count? Or something to do with OS configuration?

    3. From time to time I get unusually big load of Shell task (as you can see on screenshot, last output) that do not add up to 65536 and I do not know if this is OS or just my printfu function

    Any suggestions would be helpful, configuration option…

    At this point this is not something to brag about. At this moment this is how to say "proof of concept" and hopefully will grow. Here is what I plan:

    1. Realise all functions, except maybe blink examples.
    2. Make new command parser.
    3. Make print functions hardware independent so one can use UART, telnet…
    4 …

    It takes one by one painful step forward.

    So any help will be appreciated. And of course if anyone who knows to program in C, unlike me, would takeover, step in or whatever…

    Thanks

     
  • De Vlaam

    De Vlaam - 2010-10-15

    Just a quick first reaction: SO VERY COOL!

    It is just special to see others use my work and go beyond that. You have actually made the shell work over the standard UART. Of course i will have a look into you code. But i must be realistic too. I want to get the port to xmega done some day, and my spare time is very limited. You know, work, kids, house etc, so it will probably only be a quick look.

     
  • Dragan Grujičić

    … so it will probably only be a quick look.

    And that is fine with me just check those two functions for obvious mistakes and registers. Just a good look.

    And of course if anyone who knows to program in C, unlike me, would takeover, step in or whatever...
    

    This was for anybody other out there

     
  • De Vlaam

    De Vlaam - 2010-10-23

    One first thing. I see in the screenshots on task 3 (Shell) is running but the OS is in the 'far' state. I don't think this is possible, since the task is actually running. However, the code that sorts this out, and prints the state seems valid:

        /* Determine nearwake state*/
        if ((queuRead & defNearWakeStateGetMask) == defNearWakeStatePresent)
            rprintfProgStrM(" near");
        else
            rprintfProgStrM("  far");
    

    thus, maybe the queuRead is not the correct byte. But the code that prepares the queue seems valid too (with removed comments):

    static void    WriteQueuPipe(Tchar c) { genQueuWriteOnName(ShellQueu,c); }
    .....
    taskQueuWriteRequestOnName(ShellQueu,12);
    genQueuClearOnName(ShellQueu);
    genLogOs(WriteQueuPipe);
    taskQueuReleaseOnName(ShellQueu);
    .....
    taskQueuReadRequestOnName(ShellQueu,12);
    if ( genQueuReadOnName(ShellQueu) != defResponseLogOs ) return; /* read byte: 1*/
    queuRead = genQueuReadOnName(ShellQueu); /* read byte: 2*/
    

    now, since rprintfProgStrM are macro's it would be better to use compound statements { }, since you never know if these expand to two statements:

    if ((queuRead & defNearWakeStateGetMask) == defNearWakeStatePresent)
        { rprintfProgStrM(" near"); }
    else
        { rprintfProgStrM("  far"); }
    

    but in this situation this is not the case. So something seems wrong, but i don't know what yet. Maybe some other task is reading the queue?

     
  • Dragan Grujičić

    Hello

    /* [StatusOs(1)]
          * Definitions for the uiOsStatus byte. The whole state of the Femto OS is kept in one byte.
          * 8 bit structure: ccnstttt
          * cc:   context state of the OS: This indicates in which state the OS is at the moment.
          * n:    presence of a near wake: one or more tasks have to waked with 256 ticks.
          * s:    share bit. If set we have shared task running.
          * tttt: number of the current task: Number of the task that is currently running.
          */
    

    So for

    n:    presence of a near wake: one or more tasks have to waked with 256 ticks
    

    I tried following: changed taskDelayFromNow(5000); in Debug task to taskDelayFromNow(50); and I get OS to be in near state. This is in accordance with your explanation. But if you say there is something wrong…

    Thanks for the tip on expanding macros.

    Progress so far:

    - Implemented new command parser
    - implemented all functions except blinking leds
    - added possibility to assign value to 10 variables from command line. This could be useful for controlling robot, for example. Also it prints out value for this variable.
    - shell will be easily expandable

    All functions work as expected, except suspend. I can not suspend my tasks for some reason.

    On registers: I checked your code and it seems that shell only prints out registers configuration from config_application.h. The same is for me. My expectation was that OS could follow and give "realtime" usage of registers, like it gives for stack, and that this information could be used for minimizing register usage for tasks. Could you explain this?

    In next few days I will prepare screen-cast of shell performing and will put online updated code.

    Best regards

     
  • De Vlaam

    De Vlaam - 2010-10-26

    But if you say there is something wrong…

    Well I'm only human … What you have tried seems good. Is the shell without any delays? Of with very long delays only? In that case it could be correct after all. I run my shell with a shore delay, so the state is always near. I assumed you did something alike, but of course never assume anything … ;-)

    All functions work as expected, except suspend. I cannot suspend my tasks for some reason.

    Suspending a task can be a dangerous action in a embedded system. On older versions of my OS it was possible to suspend a task, "just like that". However, since you do not know when the suspend hits the task, it may well hold system resources when the suspend comes, thereby blocking the whole system. Thus, i changed the design somewhat. In its present form a genSuspend() call must be paired with a taskSuspend(defSuspendCheck) call in the task to be suspended. Now, at least you know where the suspend will take place. Without that no suspend takes place. Shared tasks should be suspended in their shared state. Of course a task can immediately suspend itself with taskSuspend(defSuspendNow). For more info see:
      http://www.femtoos.org/code_api.html#0113
      http://www.femtoos.org/code_api.html#0120
    If you where already fully known with this setup, please post what is going on. The feature is relatively new, maybe there is a design flaw.

    On registers: I checked your code and it seems that shell only prints out registers configuration from config_application.h. The same is for me. My expectation was that OS could follow and give "realtime" usage of registers, like it gives for stack, and that this information could be used for minimizing register usage for tasks. Could you explain this?

    Well that should not be the case. It should print out the live use of registers, at least that is what my shell does. In the config you must specify which registers are to be checked. At the moment, i cannot verify this. Btw, "you checked my code", fine of course, but can you pinpoint on which line you came to this conclusion? The code handling this is rather complex, since assembly is involved too. But maybe you are correct.

     
  • Dragan Grujičić

    if (preTaskDefined(Shell))

    void appLoop_Shell(void)
    {
        initShell();
        while (true)
        {
            cmdlineInputFunc(UART_getc());
        }
    }
    #endif
    

    As you can see shell task has no delays, but is blocked on UART input buffer, waiting for next character. As delays from keyboard are significant it is always more then 256 ticks (I think :-) ) so I get far all the time.

    Point taken on suspending tasks. I will try the setup. Of course, if nothing else helps, read the manual.

    Btw, "you checked my code"

    Of course I could not find this in your code. What I wanted to say is I checked config file of your example to find out how to configure my project and I could not figure out what I do wrong except this:

    #define  RegisterUse_LEDtask0                    r16_upto_r31
    #define  RegisterUse_LEDtask1                    r16_upto_r31
    #define  RegisterUse_LEDtask2                    r16_upto_r31
    #define  RegisterUse_LEDtask3                    r16_upto_r31
    #define  RegisterUse_LEDtask4                    r16_upto_r31
    #define  RegisterUse_LEDtask5                    r16_upto_r31
    #define  RegisterUse_LEDtask6                    r16_upto_r31
    #define  RegisterUse_LEDtask7                    r16_upto_r31
    #define  RegisterUse_T4Bus                       r16_upto_r31
    #define  RegisterUse_Shell                       registersAll
    

    So I assumed this is the problem: you already optimized register use, and now you are just printing this. Please do not assume I can, at this point, find any bugs just by reading your code. This is out of my abilities.

    As reporting register use is one functionality I want to have correctly, I ask you to check my config file to see if there is something obvious wrong there.

    Just to point out another problem: Screen shot shows that Debug task is using all registers and this can not be true since:

    #if (preTaskDefined(Debug))
    void appLoop_Debug(void)
    {
      while (true)
      {
            taskDelayFromNow(5000);
      }
    }
    #endif
    

    If I compile project without Shell task I get following main.defs file with used registers properly listed.
    If I compile with Shell task I get main.defs without register use. I saw that there could be issues with jump names but I do not understand a thing.

    So bottom line: could you help me resolve this issue with registers, or point out in a good direction.

    Best regards

     
  • De Vlaam

    De Vlaam - 2010-10-26

    so I get far all the time

    Indeed, i check the code Saturday on my mobile phone, so i missed this. The near state just indicates that a delayed task is to be released within 255 ticks or less. Non delayed tasks are not involved, blocks are not involved either, unless you use the timeout feature.

    Of course I could not find this in your code … Please do not assume I can, at this point, find any bugs just by reading your code.

    Ah, ok. But from what you make i see you are a quick learner. So that day will not be far. Now, lets hope that by that time there are none to be discovered … :-)

    Now about the register optimization. This is 'advanced stuff'. First, make sure you store and check all registers on the context:

    #define RegisterUseOverride      registersAll
    #define RegisterCheckOverride    registersAll
    

    If correct, you now should see which registers are being used by the tasks. Let the application run sufficient time. If you see for example that a particular task is not using the registers r0-r15, you can eliminate them from the configuration, and reduce the stack size by 15 bytes.

    #define RegisterUse_yourtask   r16_upto_r31 
    ...//specify all other tasks as well.
    

    If you only(!) change that, a recompilation should not change any code or register use. If you started adding more code, or just change a minor thing about your code, the optimization must be done from the start. This is really dangerous, since registers being use but not saved on the context may lead to very strange behavior. So, if you have the ram to spare, do not do register optimization, just save the every register on the context.

    If I compile project without Shell task I get following main.defs file with used registers properly listed. If I compile with Shell task I get main.defs without register use. I saw that there could be issues with jump names but I do not understand a thing.

    My compile script also tries to analyze the assemble and displays which registers are used. It is not 100% foolproof however, so introspection of the code may still be needed. The problem lies in the disassemble of the code (produced by the compiler) Sometimes, jumps are not given the correct name, but some address, which is not related to the call. I don't know why this is the case. But for me it is not possible any more to analyze the jump structure. If you post the .lss files for both cases i can show you where the problem lies.

    As reporting register use is one functionality I want to have correctly, I ask you to check my config file to see if there is something obvious wrong there.

    This seems ok to me.

    Just to point out another problem: Screen shot shows that Debug task is using all registers and this can not be true since:

    Indeed, i agree. I remember there was a time i was playing around with this part of the code. Maybe there is a bug. Such a bug is not so easily spotted. Please give me some time to sort this out.

     
  • Dragan Grujičić

    Ok. There will be few posts on latest development on Shell over UART:

    Registers:

    With following Config I get this output:

    Config1

    /* ========================================================================= */
    /* REGISTER USE ============================================================ */
    /* ========================================================================= */
    #define  RegisterUse_UART                        registersAll
    #define  RegisterUse_Debug                       registersAll
    #define  RegisterUse_Shell                          registersAll
    #define  RegisterUse_UART_RxTask         registersAll
    /* ========================================================================= */
    /* REGISTER CHECK ========================================================== */
    /* ========================================================================= */
    #define  RegisterCheckOverride                   registersAll
    

    Output11

    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1    ---  free     0   4084 60609     1   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2    15 0 0 0  -----0     35 xxxxxxxx
      1 Shell       go  free   run  done  dead   ---     1    80 0 0 0  -----3     66 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3   132 0 0 0  -----0     41 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     1   615 0 0 0  -----0     37 xxxxxxxx
    

    Config2

    /* ========================================================================= */
    /* REGISTER USE ============================================================ */
    /* ========================================================================= */
    #define  RegisterUse_UART                        r16_upto_r31
    #define  RegisterUse_Debug                       r16_upto_r31
    #define  RegisterUse_Shell                          registersAll
    #define  RegisterUse_UART_RxTask         registersAll
    /* ========================================================================= */
    /* REGISTER CHECK ========================================================== */
    /* ========================================================================= */
    #define  RegisterCheckOverride                   registersAll
    

    Output2

    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1    ---  free     0   4057 60823     0   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2    16 0 0 0  -----0     19 xxxx----
      1 Shell       go  free   run  done  dead   ---     1  9990 0 0 0  -----3     56 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3   173 0 0 0  -----0     35 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     2   656 0 0 0  -----0     19 xxxx----
    

    Config3

    /* ========================================================================= */
    /* REGISTER USE ============================================================ */
    /* ========================================================================= */
    #define  RegisterUse_UART                        r24r25r26r27
    #define  RegisterUse_Debug                       r24r25r26r27
    #define  RegisterUse_Shell                       registersAll
    #define  RegisterUse_UART_RxTask                 registersAll
    /* ========================================================================= */
    /* REGISTER CHECK ========================================================== */
    /* ========================================================================= */
    #define  RegisterCheckOverride                   registersAll
    

    Output3

    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1    ---  free     0   3977 60821     0   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2     0 0 0 0  -----0      7 -x------
      1 Shell       go  free   run  done  dead   ---     1     0 0 0 0  -----3     56 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3   184 0 0 0  -----0     35 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     2   730 0 0 0  -----0      7 -x------
    
     
  • Dragan Grujičić

    As promised I have been busy:

    Application works as expected:

    - new command parser is based on Ragel state machine compiler. Works as expected, will skip all spaces, tabs, parses commands and all arguments correctly. Any wrong command will be skipped silently

    -All commands are implemented

    -there are variables from v0 to v9 (16bit) that can be assigned value and checked for current value

    -shell occupies some 15k of flash but can be scaled down by using only just a subset of commands needed.

    Things to be done:

    - optimize code to use less flash and ram. This can be done in few ways: using different compile switch for Ragel (-T1 instead of -G1, that is used  now). This requires some manual tweaking  of generated code. Can save some 1.5 kbyte. Also there are 1.8 kbyte strings in flash that could be moved to eeprom ( it is unused in my application, so why not using it?) This has to be checked (I need to be sure of file system use in OS.) Try to use less RAM: at this point compiling reports 1173 byte bss, but after reducing stack from 200 to needed size I can save 650 byte. Not bad having shell running ??

    -change characters are feed  in and out of shell. This can save time and space

    - implement telnet communication to shell

    - implement some more file system commands

    Known bugs and differences from original shell:

    - register reporting is not correct (or it is?)
    -uptime counter is 32 bit long not 40
    - reboot is not working for me (may be because I use Arduino with bootloader? Do not know, but it sends my MCU to  endless reboot loop)
    -list command: time reporting for Shell task is not always correct. I do not know why.
    - dump command made just one stupid listing for all time used. You can see it in listing I will provide.
    -storing in same file multiple times in the raw is causing me problems. I have to learn file system interface.

    This is it.

    I prepared Flash screen cast but Youtube will not take it. I have to find another way. Instead I will give screenshot and terminal output listing of all commands used.

     
  • Dragan Grujičić

    Terminal Log of FemtoOS shell commands:

    help
    FemtoOS Shell by R. Vlaming
    general commands:
      help               : generate this text
      id                 : report the FemtoOS system ID
      ticks              : report the system tickcounter in ticks
      uptime             : report the time past since the last reboot
      reboot             : reboot (not reset!) the system
      list               : show OS and task process variables
      suspend [nr]       : stops the given task [nr] from being run
      resume [nr]        : task [nr] is rescheduled for execution again
      kill [nr]          : terminate task [nr]
      recreate [nr]      : complete recreation of task [nr]
      priority [nr] [pr] : give task [nr] new priority [pr] (0..7)
      dump [t] [s] [l]   : dump [l] bytes of the [t] ram/flash/eeprom, starting at [s]; s,l: hex/dec
      store [nr] [cont]  : store ascii content [cont] under filenumber [nr]
      recall [nr]        : recall the content of filenumber [nr]
      test               : may have any effect, including a full crash
    examples:
      kill 0             : immideately terminates task 0
      priority 4 2       : sets the priority of task 4 to level 2
      dump ram 0x200 100 : dump 100 bytes starting from address 0x200
    cmd> id
    FemtoOS 0.91
    cmd> 
    cmd> 
    cmd> ticks
     29960
    cmd> uptime
    Uptime:     0 days 00:08:41 hours
    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1    ---  free     0   4095 60671     0   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2     0 0 0 0  -----0     35 xxxxxxxx
      1 Shell       go  free   run  done  dead   ---     1    48 0 0 0  -----3     66 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3   107 0 0 0  -----0     43 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     2   615 0 0 0  -----0     35 xxxxxxxx
    cmd> suspend 0
    sys: OK
    cmd> kill 3
    sys: OK
    cmd> ki
    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
      far    1    ---  free     0   2066 63362     0   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART      susp   ---   run   ---  dead   ---     2     0 0 0 0  -----0     35 xxxxxxxx
      1 Shell       go  free   run  done  dead   ---     1    41 0 0 0  -----3     66 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3    67 0 0 0  -----0     43 xxxxxxxx
      3 Debug     term   ---   ---   ---  dead   ---     0     0 0 0 0  -----0     35 xxxxxxxx
    cmd> resume 0
    sys: OK
    cmd> recreate 3
    sys: OK
    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1    ---  free     0   4086 60677     1   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2     0 0 0 0  -----0     35 xxxxxxxx
      1 Shell       go  free   run  done  dead   ---     1    58 0 0 0  -----3     66 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3    99 0 0 0  -----0     43 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     2   615 0 0 0  -----0     35 xxxxxxxx
    cmd> help
    FemtoOS Shell by R. Vlaming
    general commands:
      help               : generate this text
      id                 : report the FemtoOS system ID
      ticks              : report the system tickcounter in ticks
      uptime             : report the time past since the last reboot
      reboot             : reboot (not reset!) the system
      list               : show OS and task process variables
      suspend [nr]       : stops the given task [nr] from being run
      resume [nr]        : task [nr] is rescheduled for execution again
      kill [nr]          : terminate task [nr]
      recreate [nr]      : complete recreation of task [nr]
      priority [nr] [pr] : give task [nr] new priority [pr] (0..7)
      dump [t] [s] [l]   : dump [l] bytes of the [t] ram/flash/eeprom, starting at [s]; s,l: hex/dec
      store [nr] [cont]  : store ascii content [cont] under filenumber [nr]
      recall [nr]        : recall the content of filenumber [nr]
      test               : may have any effect, including a full crash
    examples:
      kill 0             : immideately terminates task 0
      priority 4 2       : sets the priority of task 4 to level 2
      dump ram 0x200 100 : dump 100 bytes starting from address 0x200
    cmd> priority 3 4
    sys: OK
    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1    ---  free     0   4061 60845     0   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2    15 0 0 0  -----0     35 xxxxxxxx
      1 Shell       go  free   run  done  dead   ---     1     0 0 0 0  -----3     66 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3     0 0 0 0  -----0     43 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     4   615 0 0 0  -----0     35 xxxxxxxx
    cmd> priority 3 1
    sys: OK
    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
      far    1    ---  free     0   4095 60290     0   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2    15 0 0 0  -----0     35 xxxxxxxx
      1 Shell       go  free   run  done  dead   ---     1  8410 0 0 0  -----3     66 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3   180 0 0 0  -----0     43 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     1   605 0 0 0  -----0     35 xxxxxxxx
    cmd> help
    FemtoOS Shell by R. Vlaming
    general commands:
      help               : generate this text
      id                 : report the FemtoOS system ID
      ticks              : report the system tickcounter in ticks
      uptime             : report the time past since the last reboot
      reboot             : reboot (not reset!) the system
      list               : show OS and task process variables
      suspend [nr]       : stops the given task [nr] from being run
      resume [nr]        : task [nr] is rescheduled for execution again
      kill [nr]          : terminate task [nr]
      recreate [nr]      : complete recreation of task [nr]
      priority [nr] [pr] : give task [nr] new priority [pr] (0..7)
      dump [t] [s] [l]   : dump [l] bytes of the [t] ram/flash/eeprom, starting at [s]; s,l: hex/dec
      store [nr] [cont]  : store ascii content [cont] under filenumber [nr]
      recall [nr]        : recall the content of filenumber [nr]
      test               : may have any effect, including a full crash
    examples:
      kill 0             : immideately terminates task 0
      priority 4 2       : sets the priority of task 4 to level 2
      dump ram 0x200 100 : dump 100 bytes starting from address 0x200
    cmd> dump 0x200 100
    cmd> dump ram 0x200 100
    00200: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00210: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00220: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00230: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00240: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00250: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00260: 00 00 00 00 00 00 00 00 00 00 00 21 00 00 00 00
    cmd> dump 0x200 200
    cmd> dump flash 0x200 200
    00200: 65 20 6e 75 6d 62 65 72 00 43 6f 6d 6d 61 6e 64
    00210: 20 73 79 6e 74 61 78 20 65 72 72 6f 72 3a 20 74
    00220: 72 79 20 68 65 6c 70 00 46 65 6d 74 6f 4f 53 20
    00230: 53 68 65 6c 6c 20 62 79 20 52 2e 20 56 6c 61 6d
    00240: 69 6e 67 0a 00 67 65 6e 65 72 61 6c 20 63 6f 6d
    00250: 6d 61 6e 64 73 3a 0a 00 20 20 68 65 6c 70 20 20
    00260: 20 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 67
    00270: 65 6e 65 72 61 74 65 20 74 68 69 73 20 74 65 78
    00280: 74 0a 00 20 20 69 64 20 20 20 20 20 20 20 20 20
    00290: 20 20 20 20 20 20 20 20 3a 20 72 65 70 6f 72 74
    002a0: 20 74 68 65 20 46 65 6d 74 6f 4f 53 20 73 79 73
    002b0: 74 65 6d 20 49 44 0a 00 20 20 74 69 63 6b 73 20
    002c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 3a 20 72
    cmd> dump eeprom 0 100
    00000: 00 12 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00030: 00 00 00 00 46 65 6d 74 6f 4f 53 20 53 68 65 6c
    00040: 6c 20 74 65 73 74 00 00 00 00 00 00 00 00 00 00
    00050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    cmd> help
    FemtoOS Shell by R. Vlaming
    general commands:
      help               : generate this text
      id                 : report the FemtoOS system ID
      ticks              : report the system tickcounter in ticks
      uptime             : report the time past since the last reboot
      reboot             : reboot (not reset!) the system
      list               : show OS and task process variables
      suspend [nr]       : stops the given task [nr] from being run
      resume [nr]        : task [nr] is rescheduled for execution again
      kill [nr]          : terminate task [nr]
      recreate [nr]      : complete recreation of task [nr]
      priority [nr] [pr] : give task [nr] new priority [pr] (0..7)
      dump [t] [s] [l]   : dump [l] bytes of the [t] ram/flash/eeprom, starting at [s]; s,l: hex/dec
      store [nr] [cont]  : store ascii content [cont] under filenumber [nr]
      recall [nr]        : recall the content of filenumber [nr]
      test               : may have any effect, including a full crash
    examples:
      kill 0             : immideately terminates task 0
      priority 4 2       : sets the priority of task 4 to level 2
      dump ram 0x200 100 : dump 100 bytes starting from address 0x200
    cmd> recall 1
    18:FemtoOS Shell test
    cmd> store 1 Dragan Gruiciclist
    cmd> recall 1
    18:FemtoOS Shell test
    cmd> store 1 dragan grujicic
    sys: OK
    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1    ---  free     0   4071 60835     0   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2     0 0 0 0  -----0     35 xxxxxxxx
      1 Shell       go  free   run  done  dead   ---     1  5851 0 0 0  -----3     56 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3   177 0 0 0  -----0     35 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     2   615 0 0 0  -----0     35 xxxxxxxx
    cmd> recall 1
    15:dragan grujicic
    cmd> store 1 FemtoOS Shell Teast
    cmd> store 2 FemtoOS hello world
    sys: OK
    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1    ---  free     0   4091 60653     0   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2    15 0 0 0  -----0     35 xxxxxxxx
      1 Shell       go  free   run  done  dead   ---     1    63 0 0 0  -----3     56 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3    99 0 0 0  -----0     40 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     2   615 0 0 0  -----0     35 xxxxxxxx
    cmd> recall 2
    19:FemtoOS hello world
    cmd> recall 1
    16:FemtoOS Shell Te
    cmd> store 1 dragan grujicic incorporaded
    cmd> recall 1
    16:dragan grujicic 
    cmd> free 
    cmd> store 1 world wind OK
    sys: OK
    cmd> recall 1
    13:world wind OK
    cmd> store 1 OK
    cmd> rew
    cmd> recall 1
    13:world wind OK
    cmd> store 1 dsafoidfjjdijf jdifoisdfidfj
    cmd> recall 1
    13:world wind OK
    cmd> store 2 fghdndh bvnmfjfh vjfn
    sys: OK
    cmd> recall 2
    21:fghdndh bvnmfjfh vjfn
    cmd> store 2 djnchdzrhncjddm fjmcnfjdskdmcn jdmncjfkdmdjc
    cmd> store 1 vhfnfkjdud nmfhfkdndk cndfmdjh 
    cmd> 
    cmd> 
    cmd> recall 1
    13:world wind OK
    cmd> sr
    cmd> store 1 dfdgdnj fgfjfnvkm
    sys: OK
    cmd> store 1 hfjfunvmfri
    cmd> store 2 frghthr
    sys: OK
    cmd> recall 2
    7:frghthr
    cmd> store 2 drtzbrt
    cmd> dump eeprom 0 300
    00000: 00 11 07 00 00 00 00 00 00 00 00 00 00 00 00 00
    00010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    cmd> dump eeprom 0 600
    00000: 00 11 07 00 00 00 00 00 00 00 00 00 00 00 00 00
    00010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00030: 00 00 00 00 64 66 64 67 64 6e 6a 20 66 67 66 6a
    00040: 66 6e 76 6b 6d 74 00 00 00 00 00 00 66 72 67 68
    00050: 74 68 72 72 68 6e 63 6a 64 64 6d 20 20 76 6a 66
    cmd> dump eeprom 0 2000
    00000: 00 11 07 00 00 00 00 00 00 00 00 00 00 00 00 00
    00010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00030: 00 00 00 00 64 66 64 67 64 6e 6a 20 66 67 66 6a
    00040: 66 6e 76 6b 6d 74 00 00 00 00 00 00 66 72 67 68
    00050: 74 68 72 72 68 6e 63 6a 64 64 6d 20 20 76 6a 66
    00060: 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    cmd> dump eeprom 0 5000
    00000: 00 11 07 00 00 00 00 00 00 00 00 00 00 00 00 00
    00010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00030: 00 00 00 00 64 66 64 67 64 6e 6a 20 66 67 66 6a
    00040: 66 6e 76 6b 6d 74 00 00 00 00 00 00 66 72 67 68
    00050: 74 68 72 72 68 6e 63 6a 64 64 6d 20 20 76 6a 66
    00060: 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    cmd> dump eeprom 2024
    cmd> dump eeprom 0 2024
    00000: 00 11 07 00 00 00 00 00 00 00 00 00 00 00 00 00
    00010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00030: 00 00 00 00 64 66 64 67 64 6e 6a 20 66 67 66 6a
    00040: 66 6e 76 6b 6d 74 00 00 00 00 00 00 66 72 67 68
    00050: 74 68 72 72 68 6e 63 6a 64 64 6d 20 20 76 6a 66
    00060: 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    cmd> dump ram 0 100
    00000: c0 00 7b 7c e8 04 7f 81 51 69 6a 70 06 01 0e 00
    00010: 00 00 30 00 02 00 00 00 60 30 12 01 10 00 1e 00
    00020: 60 c0 c0 1f 20 00 00 00 00 fd 00 01 c0 c0 c0 c0
    00030: 60 c0 c0 c0 c0 04 00 00 c0 c0 c0 00 00 00 00 00
    00040: ff ef 00 00 02 04 0a 20 00 c0 00 00 00 00 00 c0
    00050: 10 ff c0 01 00 00 c0 00 c0 c0 c0 00 c0 4b 03 c2
    00060: 00 00 c0 c0 00 c0 94 c0 00 00 c0 00 00 00 02 00
    cmd> dump ram 0 200
    00000: c0 00 7b 7c e8 04 7f 81 51 69 6a 70 0c 01 0e 00
    00010: 00 00 30 00 02 00 00 00 60 30 12 01 10 00 1e 00
    00020: 60 c0 c0 1f 20 00 00 00 00 fd 00 01 c0 c0 c0 c0
    00030: 60 c0 c0 c0 c0 04 00 00 c0 c0 c0 00 00 00 00 00
    00040: ff ef 00 00 02 04 13 20 00 c0 00 00 00 00 00 c0
    00050: 10 ff c0 01 00 00 c0 00 c0 c0 c0 00 c0 4b 03 c2
    00060: 00 00 c0 c0 00 c0 94 c0 00 00 c0 00 00 00 02 00
    00070: 00 c0 c0 c0 c0 c0 c0 c0 00 00 00 00 00 c0 00 00
    00080: 00 00 00 c0 00 00 00 00 00 00 00 00 c0 c0 c0 c0
    00090: 60 c0 c0 c0 c0 c0 c0 c0 c0 c0 c0 c0 c0 c0 c0 c0
    000a0: 60 c0 c0 c0 c0 c0 c0 c0 c0 c0 c0 c0 c0 c0 c0 c0
    000b0: 00 00 00 00 00 c0 00 c0 00 f8 fe ff 00 00 c0 c0
    000c0: 40 98 06 c0 33 00 30 c0 c0 c0 c0 c0 c0 c0 c0 c0
    cmd> dump flash 0 300
    00000: 67 c4 00 00 82 c4 00 00 80 c4 00 00 7e c4 00 00
    00010: 7c c4 00 00 7a c4 00 00 78 c4 00 00 76 c4 00 00
    00020: 74 c4 00 00 72 c4 00 00 70 c4 00 00 6e c4 00 00
    cmd> dump flash 0 10
    00000: 67 c4 00 00 82 c4 00 00 80 c4 00 00 7e c4 00 00
    cmd> dump flash 0 100
    00000: 67 c4 00 00 82 c4 00 00 80 c4 00 00 7e c4 00 00
    00010: 7c c4 00 00 7a c4 00 00 78 c4 00 00 76 c4 00 00
    00020: 74 c4 00 00 72 c4 00 00 70 c4 00 00 6e c4 00 00
    00030: 6c c4 00 00 6a c4 00 00 0c 94 3a 0d 66 c4 00 00
    00040: 64 c4 00 00 62 c4 00 00 f2 c4 00 00 5e c4 00 00
    00050: 5c c4 00 00 5a c4 00 00 58 c4 00 00 56 c4 00 00
    00060: 54 c4 00 00 52 c4 00 00 6b 0f b5 0f e5 0f ea 0f
    cmd> dump flash 0 200
    00000: 67 c4 00 00 82 c4 00 00 80 c4 00 00 7e c4 00 00
    00010: 7c c4 00 00 7a c4 00 00 78 c4 00 00 76 c4 00 00
    00020: 74 c4 00 00 72 c4 00 00 70 c4 00 00 6e c4 00 00
    00030: 6c c4 00 00 6a c4 00 00 0c 94 3a 0d 66 c4 00 00
    00040: 64 c4 00 00 62 c4 00 00 f2 c4 00 00 5e c4 00 00
    00050: 5c c4 00 00 5a c4 00 00 58 c4 00 00 56 c4 00 00
    00060: 54 c4 00 00 52 c4 00 00 6b 0f b5 0f e5 0f ea 0f
    00070: ef 0f f4 0f f8 0f 0c 10 11 10 16 10 1b 10 20 10
    00080: 25 10 2e 10 40 10 48 10 76 10 9b 10 aa 10 b6 10
    00090: cf 10 d4 10 d9 10 de 10 e3 10 ec 10 f1 10 f6 10
    000a0: ff 10 04 11 09 11 17 11 25 11 2a 11 2f 11 34 11
    000b0: 3d 11 69 11 8e 11 93 11 98 11 a6 11 ab 11 b0 11
    000c0: b5 11 ba 11 bf 11 c4 11 c9 11 d2 11 e4 11 ec 11
    cmd> dump flash 0 300
    00000: 67 c4 00 00 82 c4 00 00 80 c4 00 00 7e c4 00 00
    00010: 7c c4 00 00 7a c4 00 00 78 c4 00 00 76 c4 00 00
    00020: 74 c4 00 00 72 c4 00 00 70 c4 00 00 6e c4 00 00
    cmd> dump eeprom 0 200
    00000: 00 11 07 00 00 00 00 00 00 00 00 00 00 00 00 00
    00010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00030: 00 00 00 00 64 66 64 67 64 6e 6a 20 66 67 66 6a
    00040: 66 6e 76 6b 6d 74 00 00 00 00 00 00 66 72 67 68
    00050: 74 68 72 72 68 6e 63 6a 64 64 6d 20 20 76 6a 66
    00060: 6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    000c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1    ---  free     0   4084 60609     1   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2    15 0 0 0  -----0     35 xxxxxxxx
      1 Shell       go  free   run  done  dead   ---     1    80 0 0 0  -----3     66 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3   132 0 0 0  -----0     41 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     1   615 0 0 0  -----0     37 xxxxxxxx
    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1    ---  free     0   4057 60823     0   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2    16 0 0 0  -----0     19 xxxx----
      1 Shell       go  free   run  done  dead   ---     1  9990 0 0 0  -----3     56 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3   173 0 0 0  -----0     35 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     2   656 0 0 0  -----0     19 xxxx----
    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
     near    1    ---  free     0   3977 60821     0   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2     0 0 0 0  -----0      7 -x------
      1 Shell       go  free   run  done  dead   ---     1     0 0 0 0  -----3     56 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3   184 0 0 0  -----0     35 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     2   730 0 0 0  -----0      7 -x------
    cmd> list
    task------  file system------  time-------------  stack----
    first curr  -mode -burn tsk/#  ---os -idle --isr  -os --isr
      far    1    ---  free     0   3995 60691     0   18     0
    identifier-- status-----------------------------  admin-------------------  watermarks----
    -nr ----name state -lock sched dress -wdog -file  prio -time -nest  -slots  stack register
      0 UART        go  free delay ready  dead   ---     2     0 0 0 0  -----0      7 -x------
      1 Shell       go  free   run  done  dead   ---     1    49 0 0 0  -----3     56 xxxxxxxx
      2 RxTask      go  sync   run event  dead   ---     3    67 0 0 0  -----0     35 xxxxxxxx
      3 Debug       go  free delay ready  dead   ---     2   734 0 0 0  -----0      7 -x------
    cmd>
    
     
  • Dragan Grujičić

    This forum platform is $%/&(/(")(/=)(=(Q/(/#Q

     
  • Dragan Grujičić

    I needed shell to understand what is system load in ticks, flash, ram. It was fun coding it and I will continue until I am satisfied. If anyone has something to add or take please do.

    For me it already payed off.
    Again I am surprised what this OS can do for me. Excellent job Ruud.

    I am one step closer from coding communication to coding robot automation.

    Consider this application pre alpha. I will post it today on Sourceforge.

     
  • De Vlaam

    De Vlaam - 2010-11-16

    This forum platform is $%/&(/(")(/=)(=(Q/(/#Q

    Indeed.

    Again I am surprised what this OS can do for me. Excellent job Ruud.

    Thanks for the compliments. You did a pretty good job yourself. I know there are more people out there working with my OS, but most do not post their work on the net. It is good you did.

     

Log in to post a comment.