thiswillbeyourgithub / SleepTk_pinetime_sleep_tracker

SleepTk: sleep tracker with smart alarm for the pinetime on wasp-os
GNU General Public License v3.0
57 stars 3 forks source link

Cannot find the UI #4

Closed GaryM0101 closed 2 years ago

GaryM0101 commented 2 years ago

No UI found for new build of SleepTK.py, make was successful and DFU'd the micropython.zip. I'm on the latest fork or pretty close: "v0.4-114-gaf59556"

SleepTK.py must be running because I had to take another app out of memory "main.py" because I was getting low memory messages after loading the new build.

thiswillbeyourgithub commented 2 years ago

Hi, sorry for botching the last few push of today.

Could you try with the latest SleepTk and explain in more details the issue?

GaryM0101 commented 2 years ago

I tried using your latest SleepTK but does not build for some reason it cannot find SleepTk.py .

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "../../tools/makemanifest.py", line 372, in main() File "../../tools/makemanifest.py", line 300, in main ts_infile = get_timestamp(infile) File "../../tools/makemanifest.py", line 181, in get_timestamp raise FreezeError("cannot stat {}".format(path)) main.FreezeError: cannot stat /home/pi/sleep/wasp-os/wasp/apps/SleepTk.py make[1]: [../../py/mkrules.mk:142: build-pinetime-s132/frozen_content.c] Error 1 make[1]: Leaving directory '/home/pi/sleep/wasp-os/micropython/ports/nrf' make: [Makefile:66: micropython] Error 2

The file and directory are visible. pi@raspberrypi:~/sleep/wasp-os/wasp/apps $ ls -al SleepTK.py -rw-r--r-- 1 pi pi 35446 Aug 17 10:08 SleepTK.py

thiswillbeyourgithub commented 2 years ago

It appears you spelled "TK" instead of "Tk" :)

GaryM0101 commented 2 years ago

Thanks!

GaryM0101 commented 2 years ago

Oh and sorry about the spelling. I did do a Git pull and new latest distro "v0.4-127-g752fe77" and still no UI. I was able to load it from your Git clone but the step tracker gone and I need that one more than the sleep tracker. Anyway it was worth the try though. Good luck.

$ ls -al SleepTk.py -rw-r--r-- 1 pi pi 35446 Aug 17 08:37 SleepTk.py

thiswillbeyourgithub commented 2 years ago

You should be able to have both. Can you again post your logs? That would be very helpful to me

GaryM0101 commented 2 years ago

Nothing out of the ordinary but here it is.

GaryM0101 commented 2 years ago

Can't attach files for some reason, sorry for long post.

pi@raspberrypi:~/wasp-os $ make submodules git submodule update --init (cd bootloader; git submodule update --init) (cd micropython/ports/nrf; make submodules) make[1]: Entering directory '/home/pi/wasp-os/micropython/ports/nrf' Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity. Updating submodules: lib/nrfx lib/tinyusb make[1]: Leaving directory '/home/pi/wasp-os/micropython/ports/nrf' (cd reloader; git submodule update --init) (cd wasp/modules/bma42x-upy; git submodule update --init) pi@raspberrypi:~/wasp-os $ make softdevice micropython/ports/nrf/drivers/bluetooth/download_ble_stack.sh No Bluetooth LE stack defined, downloading all.

####################################

Downloading s110_nrf51_8.0.0

####################################

--2022-08-17 12:03:45-- https://www.nordicsemi.com/api/sitecore/Products/MedialibraryZipDownload2 Resolving www.nordicsemi.com (www.nordicsemi.com)... 104.20.252.111, 104.20.251.111, 2606:4700:10::6814:fb6f, ... Connecting to www.nordicsemi.com (www.nordicsemi.com)|104.20.252.111|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 402512 (393K) [application/zip] Saving to: ‘MedialibraryZipDownload2’

MedialibraryZipDown 100%[===================>] 393.08K 441KB/s in 0.9s

2022-08-17 12:03:47 (441 KB/s) - ‘MedialibraryZipDownload2’ saved [402512/402512]

Archive: temp.zip inflating: s110nrf51800.zip
Archive: s110nrf51800.zip /home/pi/wasp-os

####################################

Downloading s132_nrf52_6.1.1

####################################

--2022-08-17 12:03:47-- https://www.nordicsemi.com/api/sitecore/Products/MedialibraryZipDownload2 Resolving www.nordicsemi.com (www.nordicsemi.com)... 104.20.251.111, 104.20.252.111, 2606:4700:10::6814:fc6f, ... Connecting to www.nordicsemi.com (www.nordicsemi.com)|104.20.251.111|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 371100 (362K) [application/zip] Saving to: ‘MedialibraryZipDownload2’

MedialibraryZipDown 100%[===================>] 362.40K 418KB/s in 0.9s

2022-08-17 12:03:49 (418 KB/s) - ‘MedialibraryZipDownload2’ saved [371100/371100]

Archive: temp.zip inflating: s132nrf52611.zip
Archive: s132nrf52611.zip /home/pi/wasp-os

####################################

Downloading s140_nrf52_6.1.1

####################################

--2022-08-17 12:03:49-- https://www.nordicsemi.com/api/sitecore/Products/MedialibraryZipDownload2 Resolving www.nordicsemi.com (www.nordicsemi.com)... 104.20.252.111, 104.20.251.111, 2606:4700:10::6814:fb6f, ... Connecting to www.nordicsemi.com (www.nordicsemi.com)|104.20.252.111|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 390137 (381K) [application/zip] Saving to: ‘MedialibraryZipDownload2’

MedialibraryZipDown 100%[===================>] 380.99K 446KB/s in 0.9s

2022-08-17 12:03:51 (446 KB/s) - ‘MedialibraryZipDownload2’ saved [390137/390137]

Archive: temp.zip inflating: s140nrf52611.zip
Archive: s140nrf52611.zip /home/pi/wasp-os pi@raspberrypi:~/wasp-os $ make BOARD=pinetime all rm -f bootloader/_build-pinetime_nrf52832//pinetime_nrf52832_bootloader-*-nosd.hex make -C bootloader/ BOARD=pinetime_nrf52832 all genhex make[1]: Entering directory '/home/pi/wasp-os/bootloader' LD pinetime_nrf52832_bootloader-0.3.0-39-g357b9a5-nosd.out

text data bss dec hex filename 22984 152 19970 43106 a862 _build-pinetime_nrf52832/pinetime_nrf52832_bootloader-0.3.0-39-g357b9a5-nosd.out

CR pinetime_nrf52832_bootloader-0.3.0-39-g357b9a5-nosd.hex make[1]: Leaving directory '/home/pi/wasp-os/bootloader' python3 tools/hexmerge.py \ bootloader/_build-pinetime_nrf52832/pinetime_nrf52832_bootloader--nosd.hex \ bootloader/lib/softdevice/s132_nrf52_6.1.1/s132_nrf52_6.1.1_softdevice.hex \ -o build-pinetime/bootloader.hex python3 tools/hex2c.py build-pinetime/bootloader.hex > \ reloader/src/boards/pinetime/bootloader.h python3 -m nordicsemi dfu genpkg \ --bootloader bootloader/_build-pinetime_nrf52832//pinetime_nrf52832_bootloader--nosd.hex \ --softdevice bootloader/lib/softdevice/s132_nrf52_6.1.1/s132_nrf52_6.1.1_softdevice.hex \ build-pinetime/bootloader-daflasher.zip Failed to import ecdsa, cannot do signing Zip created at build-pinetime/bootloader-daflasher.zip make -C reloader/ BOARD=pinetime make[1]: Entering directory '/home/pi/wasp-os/reloader' arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -c src/main.c -o build-pinetime/main.o arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -c src/blit.c -o build-pinetime/blit.o arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -c src/flash.c -o build-pinetime/flash.o arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -c src/spi.c -o build-pinetime/spi.o arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -c src/spinor.c -o build-pinetime/spinor.o arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -c src/st7789.c -o build-pinetime/st7789.o arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -c src/wdt.c -o build-pinetime/wdt.o arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -c lib/nrfx/drivers/src/nrfx_nvmc.c -o build-pinetime/nrfx_nvmc.o arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -c lib/nrfx/mdk/gcc_startup_nrf52.S -o build-pinetime/gcc_startup_nrf52.o arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -c lib/nrfx/mdk/system_nrf52.c -o build-pinetime/system_nrf52.o arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -Wl,-Map=build-pinetime/reloader.map -Lsrc -Llib/nrfx/mdk -Tnrf52832_xxaa.ld build-pinetime/main.o build-pinetime/blit.o build-pinetime/flash.o build-pinetime/spi.o build-pinetime/spinor.o build-pinetime/st7789.o build-pinetime/wdt.o build-pinetime/nrfx_nvmc.o build-pinetime/gcc_startup_nrf52.o build-pinetime/system_nrf52.o -o build-pinetime/reloader.elf arm-none-eabi-objcopy -O ihex build-pinetime/reloader.elf build-pinetime/reloader.hex python3 -m nordicsemi dfu genpkg --dev-type 0x0052 --application build-pinetime/reloader.hex build-pinetime/reloader.zip Failed to import ecdsa, cannot do signing Zip created at build-pinetime/reloader.zip arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -Wl,-Map=build-pinetime/reloader.map -Lsrc -Llib/nrfx/mdk -Tnrf52832_xxaa_mcuboot.ld build-pinetime/main.o build-pinetime/blit.o build-pinetime/flash.o build-pinetime/spi.o build-pinetime/spinor.o build-pinetime/st7789.o build-pinetime/wdt.o build-pinetime/nrfx_nvmc.o build-pinetime/gcc_startup_nrf52.o build-pinetime/system_nrf52.o -o build-pinetime/reloader-mcuboot.elf arm-none-eabi-objcopy -O binary build-pinetime/reloader-mcuboot.elf build-pinetime/reloader-mcuboot.bin.tmp lib/mcuboot/scripts/imgtool.py create \ --align 4 --version 1.0.0 \ --header-size 32 --slot-size 475136 --pad-header build-pinetime/reloader-mcuboot.bin.tmp build-pinetime/reloader-mcuboot.bin rm -f build-pinetime/reloader-mcuboot.bin.tmp python3 -m nordicsemi dfu genpkg --dev-type 0x0052 --application build-pinetime/reloader-mcuboot.bin build-pinetime/reloader-mcuboot.zip Failed to import ecdsa, cannot do signing Zip created at build-pinetime/reloader-mcuboot.zip arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -g3 -Os -ffunction-sections -fdata-sections -DNRF52832_XXAA -Ilib/CMSIS/CMSIS/Core/Include -Ilib/nrfx -Ilib/nrfx/drivers/include -Ilib/nrfx/mdk -Ilib/nrfx/hal -Isrc/boards/pinetime -Isrc -Wl,-Map=build-pinetime/reloader.map -Lsrc -Llib/nrfx/mdk -Tnrf52832_xxaa.ld build-pinetime/main.o build-pinetime/blit.o build-pinetime/factoryflash.o build-pinetime/spi.o build-pinetime/spinor.o build-pinetime/st7789.o build-pinetime/wdt.o build-pinetime/nrfx_nvmc.o build-pinetime/gcc_startup_nrf52.o build-pinetime/system_nrf52.o -o build-pinetime/reloader-factory.elf arm-none-eabi-objcopy -O ihex build-pinetime/reloader-factory.elf build-pinetime/reloader-factory.hex python3 -m nordicsemi dfu genpkg --dev-type 0x0052 --application build-pinetime/reloader-factory.hex build-pinetime/reloader-factory.zip Failed to import ecdsa, cannot do signing Zip created at build-pinetime/reloader-factory.zip make[1]: Leaving directory '/home/pi/wasp-os/reloader' cp reloader/build-pinetime/reloader*.zip build-pinetime rm -f micropython/ports/nrf/build-pinetime-s132/frozen_content.c make -C micropython/ports/nrf \ BOARD=pinetime SD=s132 \ MICROPY_VFS_LFS2=1 \ FROZEN_MANIFEST=/home/pi/wasp-os/wasp/boards/pinetime/manifest.py \ USER_C_MODULES=/home/pi/wasp-os/wasp/modules make[1]: Entering directory '/home/pi/wasp-os/micropython/ports/nrf' Use make V=1 or set BUILD_VERBOSE in your environment to increase build verbosity. Including User C Module from /home/pi/wasp-os/wasp/modules/bma42x-upy GEN build-pinetime-s132/frozen_content.c CC build-pinetime-s132/frozen_content.c LINK build-pinetime-s132/firmware.elf text data bss dec hex filename 334968 180 1840 336988 5245c build-pinetime-s132/firmware.elf arm-none-eabi-objcopy -O binary build-pinetime-s132/firmware.elf build-pinetime-s132/firmware.bin arm-none-eabi-objcopy -O ihex build-pinetime-s132/firmware.elf build-pinetime-s132/firmware.hex make[1]: Leaving directory '/home/pi/wasp-os/micropython/ports/nrf' python3 -m nordicsemi dfu genpkg \ --dev-type 0x0052 \ --application micropython/ports/nrf/build-pinetime-s132/firmware.hex \ build-pinetime/micropython.zip Failed to import ecdsa, cannot do signing Zip created at build-pinetime/micropython.zip

thiswillbeyourgithub commented 2 years ago

To me "Zip created at build-pinetime/micropython.zip" indicates that the build was successful. Are you sure there's a problem?

GaryM0101 commented 2 years ago

Hard to tell, usually if you put a file in the wasp/apps directory don't you have to list it in the mainfest? I don't know I'm fairly new to all of this. I DFU'd the file right after this built finished successfully.

So just to recap the only things I did was a Git pull to get the latest "https://github.com/daniel-thompson/wasp-os" and put the SleepTk.py in the wasp/apps directory and did the make.

thiswillbeyourgithub commented 2 years ago

Thank for the feedback. It is helping me notice blindspots in my howto :)

I edited my installation instruction, the steps should be more clear now.

thiswillbeyourgithub commented 2 years ago

I also added docs on how to add the app to your default wasp os without having to rebuild. I have not tested the lines though

GaryM0101 commented 2 years ago

You probably going to have to take the rebuild steps out and just having them upload to the external flash, I try that next. Like Morse, Level and the other apps wasp has been running out of firmware space as seen by my latest try at the build to try an include SleepTk.py.

LINK build-pinetime-s132/firmware.elf /usr/lib/gcc/arm-none-eabi/7.3.1/../../../arm-none-eabi/bin/ld: build-pinetime-s132/firmware.elf section .text' will not fit in regionFLASH_TEXT' /usr/lib/gcc/arm-none-eabi/7.3.1/../../../arm-none-eabi/bin/ld: region `FLASH_TEXT' overflowed by 11072 bytes collect2: error: ld returned 1 exit status make[1]: [Makefile:501: build-pinetime-s132/firmware.elf] Error 1 make[1]: Leaving directory '/home/pi/wasp-os/micropython/ports/nrf' make: [Makefile:66: micropython] Error 2

The changed files did get picked up if that matters any. Including User C Module from /home/pi/wasp-os/wasp/modules/bma42x-upy MPY apps/software.py MPY apps/SleepTk.py MPY wasp.py

You can probably commit this right to the wasp-os/apps along with the other apps too big for the firmware. I suspect this list will get larger and the firmware space get smaller and smaller. ;-)

thiswillbeyourgithub commented 2 years ago

Alright thanks a lot.

I don't plan on making a PR to wasp os anytime soon as I want to change some things to the code before.

Now that I think about it I might anyway 🤔 . Thanks a lot for the feedback!

GaryM0101 commented 2 years ago

You're welcome! I'm just glad we got this far and my fat fingering wasn't all for nothing. :) Cheers!