This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RL-RTX can not work with RL-FlashFs

I try to use RL-FlashFs read file from a SDcard

in a RL-rtx task.

It dosnot work.

Debug , Cannot go to main() .

RL-FlashFs Can work with RL-rtx?

Parents
  • First thanks to try to answer to my question
    To Per Westermark : I'am not sure to understand what do you really mean. That's not I never get out of the main function, it's I never go in the main function. So I never go to the rest of my program which for the moment is very "light" because I have just an init task which launch a task that switch the led of my demo board.

    __task void led (void) {
    
      LED_Init (); /* Initialize LED display module    */
      for (;;) {
        LED_Out (leds);/* Update LED Driver  */
            leds=leds<<1;
            if(leds==0x10)
                    leds=0x01;
        os_dly_wait (20);
      }
    }
    
    __task void init (void) {
    
            static FILE *f = NULL;
    
            if (finit() == 0) {
            f = fopen ("M:\\toto.txt","w");
    
            if(f!=NULL)
                    fclose(f);
            }
      /* start task led */
      t_led    = os_tsk_create (led, 1);
      os_tsk_delete_self ();
    }
    
    
    int main (void) {
    
    os_sys_init (init);
    /* Initialize RTX and start init    */
    }
    

    To John Linq :
    I have

    #ifndef OS_STKCHECK
     #define OS_STKCHECK    1
    #endif
    


    but I check I never get into

    os_stk_overflow (OS_TID task_id)
    


    So I think there is no stack overflow (and moreover it is a really small program).

    next you are right I should do

    os_sys_init (init);
    


    before doing everything else so I put the "FlashFS" call in the init task (like I post). but that don't change anything.

    When I launch the program in debug mode I found that I go to

    void _sys_exit (int return_code) {
       /* Endless loop. */
       while (1);
    }
    

    and of course I stay in it because it's a "while(1)" that why I never go to main, I go to _sys_exit before the main function is call

Reply
  • First thanks to try to answer to my question
    To Per Westermark : I'am not sure to understand what do you really mean. That's not I never get out of the main function, it's I never go in the main function. So I never go to the rest of my program which for the moment is very "light" because I have just an init task which launch a task that switch the led of my demo board.

    __task void led (void) {
    
      LED_Init (); /* Initialize LED display module    */
      for (;;) {
        LED_Out (leds);/* Update LED Driver  */
            leds=leds<<1;
            if(leds==0x10)
                    leds=0x01;
        os_dly_wait (20);
      }
    }
    
    __task void init (void) {
    
            static FILE *f = NULL;
    
            if (finit() == 0) {
            f = fopen ("M:\\toto.txt","w");
    
            if(f!=NULL)
                    fclose(f);
            }
      /* start task led */
      t_led    = os_tsk_create (led, 1);
      os_tsk_delete_self ();
    }
    
    
    int main (void) {
    
    os_sys_init (init);
    /* Initialize RTX and start init    */
    }
    

    To John Linq :
    I have

    #ifndef OS_STKCHECK
     #define OS_STKCHECK    1
    #endif
    


    but I check I never get into

    os_stk_overflow (OS_TID task_id)
    


    So I think there is no stack overflow (and moreover it is a really small program).

    next you are right I should do

    os_sys_init (init);
    


    before doing everything else so I put the "FlashFS" call in the init task (like I post). but that don't change anything.

    When I launch the program in debug mode I found that I go to

    void _sys_exit (int return_code) {
       /* Endless loop. */
       while (1);
    }
    

    and of course I stay in it because it's a "while(1)" that why I never go to main, I go to _sys_exit before the main function is call

Children