Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

It seems that we can't execute python codes in two different freerots threads!!! #76

@FFtust

Description

@FFtust

The "mp_task" parses and executes the python file " main.py",it works well.
Now I want to create a new task to execute a python file "factory.py", just like "main.py". my code like this:

    void mp_main_py_task(void *pvParameter){
         mp_stack_set_top((void*)&pvParameter);
         mp_stack_set_limit(MP_TASK_STACK_SIZE - 512);
         pyexec_file("factory.py");
         vTaskDelete( NULL );  
   }

This new task works well ,but then,when I sent some python code or just some meaningless code to the cpu by UART, it reboot soon; I found that the configuration"mp_stack_set_top((void*)&pvParameter)" influenced the python code parsing;
Now my question is:
Using two thread to parse python codes is allowed?If so ,how can I do it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions