I am working on a new micropython pico project and ran into an "issue" when using both cores. One core reads serial commands over the USB using sys.stdio and queues them. The other core pulls the commands from the queue to process them. Everything runs fine and does what it should...Here is the issue:
if I have the command reader on core 1 and the command processor on core 0 then I can no longer reprogram the device using the raspberry pi plugin for VS Code or Thonny without first nuking the flash and starting from scratch. If I reverse the cores (i.e. command reader on core 0 and command processor on core 1) I can reprogram it just fine.
I am guessing that VS Code and Thonny know how to stop Core 0 and take over the USB for the REPL but can't or don't stop core 1. So, if you are using the USB on Core 1, your use can interfere with the REPL and the editor's ability to interact with the pico.
I don't know if I am missing something or not but thought I would share what I am seeing and see what others thought.
if I have the command reader on core 1 and the command processor on core 0 then I can no longer reprogram the device using the raspberry pi plugin for VS Code or Thonny without first nuking the flash and starting from scratch. If I reverse the cores (i.e. command reader on core 0 and command processor on core 1) I can reprogram it just fine.
I am guessing that VS Code and Thonny know how to stop Core 0 and take over the USB for the REPL but can't or don't stop core 1. So, if you are using the USB on Core 1, your use can interfere with the REPL and the editor's ability to interact with the pico.
I don't know if I am missing something or not but thought I would share what I am seeing and see what others thought.
Statistics: Posted by madoneca — Wed Dec 04, 2024 4:25 pm