wasp-os: MicroPython for PineTime!
#41
(06-06-2020, 01:15 PM)VMMainFrame Wrote: I have opened issue 31 on the wasp-os github page. 

https://github.com/daniel-thompson/wasp-os/issues/31

Thanks Hugh!

Looks like the conversation on that ticket has already revealed what the issue was and its all my fault  Blush . Anyhow based on that the workaround you already will be durable so there's no need for you to go chasing updates. Naturally I'll regenerate the 0.2 binaries this evening to avoid problems for others... and I will do it correctly this time Angry .
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
#42
Firstly congratulations and thank you for wasp-os.  I have really enjoyed reading through all the resources I have found and it has inspired me to order a PineTime as wasp-os provides me with a platform I feel confident I can use to tinker away with.

Whilst I await delivery I am trying to get myself set up and build the firmware but I have run in to a problem.  I know I am being a complete numpty (and you will probably think I should cancel my order if I can't get this right!) but when I run 

Code:
make -j `nproc` BOARD=pinetime all

it can't find the arm-none-eabi-gcc 

Code:
/bin/sh: 1: arm-none-eabi-gcc: not found

I have download the toolchain for the Arm Cortex-M4 but wherever I have tried placing it in the file system it still can't be found.  Please, what am I doing wrong?
#43
(06-10-2020, 12:47 PM)graynada Wrote: I have download the toolchain for the Arm Cortex-M4 but wherever I have tried placing it in the file system it still can't be found.  Please, what am I doing wrong?

I suspect you haven't added the toolset to the PATH, the list of directories to search for executable files.

Try something like (swapping /home/drt/Apps/ for wherever you have boot the toolchain on your machine... and where stingray$ is the prompt on my machine, I like short prompts):

Code:
stingray$ export PATH=$PATH:/home/drt/Apps/gcc-arm-none-eabi-9-2019-q4-major
stingray$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

stingray$ make -j`nproc` BOARD=pinetime all


If you don't want to run that export command everytime you open a new terminal window then you can add that line to your .bashrc file.

PS If you watch hasn't arrived yet you'll probably also want to try make sim . That will launch the simulator which permits basic app development without a real device, It's not an exact simulation (there is 100,000 times more RAM for example  Big Grin ) but it's still good for checking your Python code is right. If you get it running then the display is for single press only. The arrow keys are used to emulate swipe gestures and Tab emulates the physical button.
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
#44
Quote:I suspect you haven't added the toolset to the PATH, the list of directories to search for executable files.


Thank you, all working now.


Quote:PS If you watch hasn't arrived yet you'll probably also want to try make sim .


And thank you, I've had that up and running and I am planning to make that my weekend playground.

Thanks for your help.
#45
It's been longer than it should have (because these features landed in the git repos several weeks ago) but I have just uploaded a new wasp-os video. The major features are step counting and heart rate monitoring, both of which are implemented using free software/open source drivers (although wasp-os as a whole is still using the proprietary SoftDevice bluetooth stack). There's also a couple smaller things, such as the slider widget, and perhaps a small glimpse of the future.

[Image: 0.jpg]
wasp-os: Open source heart rate monitoring for Pine64 PineTime
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
#46
(06-03-2020, 09:45 AM)danielt Wrote:
(06-01-2020, 06:53 PM)lupyuen Wrote: Hi @danielt: I'm almost done documenting my wasp-os experiment on Mynewt, please have a look...

https://lupyuen.github.io/pinetime-rust-...icropython

I'm stuck with a multitasking conflict between wasp-os and Mynewt... wasp-os runs the REPL loop forever, scheduling its own tasks. But Mynewt needs to run the Event Loop to handle NimBLE Bluetooth packets.

Any idea which part of wasp-os I should modify to feed the Mynewt Event Loop?

Alternatively I could start another Mynewt task to run wasp-os, but that would consume extra memory (for the stack). Plus extra overheads for task switching. Thank you so much :-)

Sorry for the delay. I'm afraid missed this when I looked at the forum yesterday.

To keep things robust you probably need to deeply integrate this into Micropython rather then the wasp-os code.

I'd consider adding an implementation of MICROPY_VM_HOOK_LOOP to the MyNewt port that handles pending MyNewt events. This allows will dispatch the events from the main VM execution loop and will share the processor regardless of what Python code we are running. Note that this code is a really, really hot path so needs to be written for maximum performance. That usually means a divisor so the hook does not for every virtual opcode, take a loop at ports/esp8266/mpconfigport.h for an example.

After that you'd probably also need to call the MyNewt event loop from mp_hal_stdin_rx_chr() as well since most implementation of micropython just stop dead in that function when they are seeking user input! This code is less performance critical because is mostly runs a human speed however for simplicity I think it would be OK to call MICROPY_VM_HOOK_LOOP here as well.

A simpler alternative that would probably also work is to dispatch MyNewt events from mp_hal_stdin_rx_char(), machine_deepsleep and machine_lightsleep. That would rely on the system calling one of the sleep functions when it want to save power (which wasp-os does).
[color= var(--text-muted)][color= var(--header-primary)]Lupyuen said to me that unless the developers of mcuboot are able to get your help that Wasp OS wont be able to run on the Mcuboot bootloader that will soon be shipping early edition pinetimes. It would be a severe loss if we lost WaspOS with this release, so i personally hope you would be able to help get it working on there[/color][/color]

[color= var(--text-muted)][color= var(--header-primary)]<3 WaspOS[/color][/color]
#47
"Developers of MCUBoot" refers to me of course :-)

Hi Daniel: Since we are about to preload MCUBoot + FreeRTOS (by JF) on PineTime, would you like to tweak wasp-os to work with MCUBoot?

We will be using the nRF Connect app for firmware updates. The FreeRTOS firmware supports the SoftDevice firmware update protocol (even though it uses NimBLE instead of SoftDevice)

Sent from my Pixel 4 XL using Tapatalk
#48
(07-15-2020, 07:01 PM)Aberts10 Wrote: Lupyuen said to me that unless the developers of mcuboot are able to get your help that Wasp OS wont be able to run on the Mcuboot bootloader that will soon be shipping early edition pinetimes. It would be a severe loss if we lost WaspOS with this release, so i personally hope you would be able to help get it working on there

Thanks and don't worry, you will be able to run wasp-os on the early adopter PineTimes!


(07-15-2020, 07:08 PM)lupyuen Wrote: Since we are about to preload MCUBoot + FreeRTOS (by JF) on PineTime, would you like to tweak wasp-os to work with MCUBoot?

mcuboot has adopted a flash layout that is not compatible with the Softdevice (as discussed here) so it won't be possible to modify wasp-os to work with MCUBoot until the nrf Micropython port gets support for a different Bluetooth stack.

Right now I would rather prioritize making wasp-os a great tool for application developers over porting Micropython to NimBLE (and maybe someone else will beat me to it anyway). However whilst it would take a long time to port wasp-os to mcuboot it should be quick and easy to port the wasp-reloader to mcuboot so this is how I can support the early adopter units: I will provide a modified version of the wasp-reloader that can replace mcuboot with the wasp-bootloader instead.
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye
#49
Sure thanks will watch for your updates :-)

You can find JF and me in the PineTime Chatroom if you need anything. We are practically online 24 by 7 :-)

Here are the firmware files that we shall be loading...

https://gist.github.com/lupyuen/fb4cc04f...c371f8c644
#50
(07-16-2020, 02:43 AM)lupyuen Wrote: Sure thanks will watch for your updates :-)

You can find JF and me in the PineTime Chatroom if you need anything. We are practically online 24 by 7 :-)

Here are the firmware files that we shall be loading...

https://gist.github.com/lupyuen/fb4cc04f...c371f8c644

I'll take a look when my spare PineTime is delivered (it's in the post right now). I haven't used SWD on my daily driver watch for three months or more (wasp-os has been developed almost entirely using OTA updates only). I don't plan to prise the back off any time soon!

I'm afraid I only really hang out on the forum though. I found chatrooms a bit too distracting for me to get my day job done...
PineTime: wasp-os and MicroPython, Pinebook Pro:  Debian Bullseye


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pinetime - Kids with special needs hidara 0 554 06-11-2024, 10:42 PM
Last Post: hidara
  Develop a new firmware for PineTime belushi 2 1,993 09-25-2023, 12:32 PM
Last Post: ccchan234
  Bluetooth BLE-MIDI-controller app for PineTime / InfiniTime Luno 0 887 08-20-2023, 05:17 AM
Last Post: Luno
  Zephyr Backlight Examples for PineTime lcj 0 1,067 05-06-2023, 02:54 PM
Last Post: lcj
  Zephyr is ready for pinetime jandy 1 2,690 05-06-2023, 02:15 PM
Last Post: lcj
  Send a message from Android to pinetime via BLE razrosman 0 1,263 11-05-2022, 08:24 AM
Last Post: razrosman
  PineTime Stuck in DFU Mode Eesha Barua 1 2,637 07-25-2022, 09:17 PM
Last Post: heyhewmike
  Idle tracking with PineTime: how versatile it is? schaman 1 2,143 07-13-2022, 12:50 AM
Last Post: wibble
  PineTime implemented with partial of pebble API jandy 0 1,880 03-20-2022, 08:58 PM
Last Post: jandy
  "Pine64 USB JTAG Adapter + OpenOCD + PineTime" should it work? ITCactus 4 4,918 03-02-2022, 05:58 AM
Last Post: wibble

Forum Jump:


Users browsing this thread: 4 Guest(s)