• Pi Pico and Zephyr RTOS

    From mm0fmf@none@invalid.com to comp.sys.raspberry-pi on Tue Dec 24 20:47:48 2024
    From Newsgroup: comp.sys.raspberry-pi

    Has anyone used the Zephyr RTOS on a Pi Pico or any other smallish system?

    I'm writing something relatively simple for a Pico in C using the SDK.
    It doesn't need an RTOS, the old classic cyclic executive paradigm will
    work fine.
    At one time I'd have used an 8bit CPU but why faff about when you can
    get something like a Pico for hardly any cost even if 2x Cortex M0+
    seems overkill.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From wmartin@wwm@wwmartin.net to comp.sys.raspberry-pi on Tue Dec 24 16:30:09 2024
    From Newsgroup: comp.sys.raspberry-pi

    On 12/24/24 12:47, mm0fmf wrote:
    Has anyone used the Zephyr RTOS on a Pi Pico or any other smallish system?

    I'm writing something relatively simple for a Pico in C using the SDK.
    It doesn't need an RTOS, the old classic cyclic executive paradigm will
    work fine.
    At one time I'd have used an 8bit CPU but why faff about when you can
    get something like a Pico for hardly any cost even if 2x Cortex M0+
    seems overkill.
    Well, you can have two threads, kinda, with the Pico without an
    RTOS...just split your work between the two cores. I just did a simple
    project using one core to do a com link to a pc for command/response,
    and the other core to do a real-time hardware controller chore. Made it painless...
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From mm0fmf@none@invalid.com to comp.sys.raspberry-pi on Wed Dec 25 10:02:21 2024
    From Newsgroup: comp.sys.raspberry-pi

    On 25/12/2024 00:30, wmartin wrote:
    On 12/24/24 12:47, mm0fmf wrote:
    Has anyone used the Zephyr RTOS on a Pi Pico or any other smallish
    system?

    I'm writing something relatively simple for a Pico in C using the SDK.
    It doesn't need an RTOS, the old classic cyclic executive paradigm
    will work fine.
    At one time I'd have used an 8bit CPU but why faff about when you can
    get something like a Pico for hardly any cost even if 2x Cortex M0+
    seems overkill.
    Well, you can have two threads, kinda, with the Pico without an
    RTOS...just split your work between the two cores. I just did a simple project using one core to do a com link to a pc for command/response,
    and the other core to do a real-time hardware controller chore. Made it painless...

    That was my plan. The project has to do simple things like scan a 4x4 keyboard, light assorted LEDs and send strings over the UART at 38k4 to control something. I'd already decided that I would run all the UART send/receive on one core and run the control on the other core. That way
    the control core remains non-blocking and the UART core can block if needed.

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Brian Gregory@void-invalid-dead-dontuse@email.invalid to comp.sys.raspberry-pi on Sun Jan 12 18:45:17 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 25/12/2024 10:02, mm0fmf wrote:
    On 25/12/2024 00:30, wmartin wrote:
    On 12/24/24 12:47, mm0fmf wrote:
    Has anyone used the Zephyr RTOS on a Pi Pico or any other smallish
    system?

    I'm writing something relatively simple for a Pico in C using the
    SDK. It doesn't need an RTOS, the old classic cyclic executive
    paradigm will work fine.
    At one time I'd have used an 8bit CPU but why faff about when you can
    get something like a Pico for hardly any cost even if 2x Cortex M0+
    seems overkill.
    Well, you can have two threads, kinda, with the Pico without an
    RTOS...just split your work between the two cores. I just did a simple
    project using one core to do a com link to a pc for command/response,
    and the other core to do a real-time hardware controller chore. Made
    it painless...

    That was my plan. The project has to do simple things like scan a 4x4 keyboard, light assorted LEDs and send strings over the UART at 38k4 to control something. I'd already decided that I would run all the UART send/receive on one core and run the control on the other core. That way
    the control core remains non-blocking and the UART core can block if
    needed.

    Doesn't the PICO SDK include some FreeRTOS examples?

    Do you really need Zephr RTOS rather than FreeRTOS?

    Note though, that I'm not sure if the examples have the ability to use
    both cores yet, I remember that initially they just allowed
    multi-threading using a single core on the PICO.

    If it was me I think I might just write my own RTOS that worked the same
    way I was originally taught to do multi-threading (using Dykstra's
    semaphores and not much else) rather than having to learn and understand
    how somebody else thought it should be done.
    --
    Brian Gregory (in England).
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From The Natural Philosopher@tnp@invalid.invalid to comp.sys.raspberry-pi on Sun Jan 12 20:33:03 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 12/01/2025 18:45, Brian Gregory wrote:
    On 25/12/2024 10:02, mm0fmf wrote:
    On 25/12/2024 00:30, wmartin wrote:
    On 12/24/24 12:47, mm0fmf wrote:
    Has anyone used the Zephyr RTOS on a Pi Pico or any other smallish
    system?

    I'm writing something relatively simple for a Pico in C using the
    SDK. It doesn't need an RTOS, the old classic cyclic executive
    paradigm will work fine.
    At one time I'd have used an 8bit CPU but why faff about when you
    can get something like a Pico for hardly any cost even if 2x Cortex
    M0+ seems overkill.
    Well, you can have two threads, kinda, with the Pico without an
    RTOS...just split your work between the two cores. I just did a
    simple project using one core to do a com link to a pc for
    command/response, and the other core to do a real-time hardware
    controller chore. Made it painless...

    That was my plan. The project has to do simple things like scan a 4x4
    keyboard, light assorted LEDs and send strings over the UART at 38k4
    to control something. I'd already decided that I would run all the
    UART send/receive on one core and run the control on the other core.
    That way the control core remains non-blocking and the UART core can
    block if needed.

    Doesn't the PICO SDK include some FreeRTOS examples?

    It does. If You cant live without a pre-emptive multtaskking solution


    Do you really need Zephr RTOS rather than FreeRTOS?

    Note though, that I'm not sure if the examples have the ability to use
    both cores yet, I remember that initially they just allowed
    multi-threading using a single core on the PICO.

    If it was me I think I might just write my own RTOS that worked the same
    way I was originally taught to do multi-threading (using Dykstra's semaphores and not much else) rather than having to learn and understand
    how somebody else thought it should be done.

    +1 for that.
    --
    I would rather have questions that cannot be answered...
    ...than to have answers that cannot be questioned

    Richard Feynman



    --- Synchronet 3.20a-Linux NewsLink 1.114