GithubHelp home page GithubHelp logo

Comments (12)

vbelloir avatar vbelloir commented on June 15, 2024 2

That's ok, I found how to do that:
So, in my mynewt project.yml file, I changed:

repository.mcuboot:
    type: github
    vers: 0-dev
    user: JuulLabs-OSS
    repo: mcuboot
With
repository.mcuboot:
    type: github
    vers: 0-dev
    user: mcu-tools
    repo: mcuboot

And perform a newt upgrade

$ newt upgrade
WARNING: Repo's "origin" remote points to unexpected URL: https://github.com/mcu-tools/mcuboot.git; correcting it to https://github.com/nrfconnect/sdk-mcuboot.git.  Repo contents may be incorrect.
Skipping "apache-mynewt-core": already upgraded (0.0.1)
Skipping "apache-mynewt-mcumgr": already upgraded (0.0.0)
Skipping "apache-mynewt-nimble": already upgraded (0.0.0)
Making the following changes to the project:
    upgrade mcuboot (579b30c29999860f9f7d843a25ff5453b6542cce --> 0.0.0)
mcuboot successfully upgraded to version 0.0.0

Now, I good error during compilation.

Compiling repos/mcuboot/boot/bootutil/src/tlv.c
Error: repos/mcuboot/boot/bootutil/src/loader.c: In function 'boot_validated_swap_type':
repos/mcuboot/boot/bootutil/src/loader.c:731:10: error: variable 'upgrade_valid' set but not used [-Werror=unused-but-set-variable]
  731 |     bool upgrade_valid = false;
      |          ^~~~~~~~~~~~~
cc1: all warnings being treated as errors

EDIT : manage to build project, deleting this variable. Quite ugly, but it works.

from pinetime-rust-mynewt.

lupyuen avatar lupyuen commented on June 15, 2024

Is it possible that the SPI Flash is consuming the extra power?

Remember that MCUBoot starts the SPI Flash Driver to render the boot logo to the display.

Might be good to power off SPI Flash after rendering the boot logo.

from pinetime-rust-mynewt.

vbelloir avatar vbelloir commented on June 15, 2024

I don't really. I can make a try.

I was also asking myself if semihosting in mynewt, or serial log in mcuboot were or not activated.

I will see if I managed to deinit SPI flash, and keep you in touch.

from pinetime-rust-mynewt.

lupyuen avatar lupyuen commented on June 15, 2024

Yep thanks ๐Ÿ™‚

from pinetime-rust-mynewt.

vbelloir avatar vbelloir commented on June 15, 2024

Hi @lupyuen,
I didn't try yet to deinit SPI Flash (and DMA!) before boot.

I opened same issue in mcuboot repo :
mcu-tools/mcuboot#958

But I don't really know how to implement answers I was given.
(And last few weeks, I had some difficulties to get time for that)

from pinetime-rust-mynewt.

vbelloir avatar vbelloir commented on June 15, 2024

DO you know how I can change mcuboot to point on nrfconnect fork?

from pinetime-rust-mynewt.

lupyuen avatar lupyuen commented on June 15, 2024

Sorry not sure about that. Could you post the question to the Mynewt or MCUBoot community on Slack?

https://mynewt.apache.org/community/

from pinetime-rust-mynewt.

vbelloir avatar vbelloir commented on June 15, 2024

I tried to to back port this commit : nrfconnect/sdk-mcuboot@18a0a8a

And especially the function nrf_cleanup_peripheral.

I put this back port at startup of Infinitime , in main function.

You can find my work in this commit : vbelloir/InfiniTime@f486e4f

Do you think that I should do this in bootloader instead?
I try to deactivate spi with nrf_drv_spi_uninit but compilation failes.
Can you help?

Thanks.

from pinetime-rust-mynewt.

lupyuen avatar lupyuen commented on June 15, 2024

Sorry I'm tied up with LoRa on BL602, I won't be able to help right now.

I hope you're updating the new repo for PineTime Bootloader?

https://github.com/JF002/pinetime-mcuboot-bootloader

from pinetime-rust-mynewt.

nanch avatar nanch commented on June 15, 2024

A savings of 500ยตA for managing the SPI flash sounds like a great win!

@vbelloir How are you measuring the current draw? I'd like to investigate this further.

Also, what's the compile error you're getting when you deactivate spi with nrf_drv_spi_uninit?

from pinetime-rust-mynewt.

vbelloir avatar vbelloir commented on June 15, 2024

Hi @nanch ,
right now, I only measure current draw with a 6.5digit multimeter Agilent 2000.
Letter, if possible, I can measure it with a Power Analyser Keysight N6705B, but it is not needed right now.

I don't really remember the compile error I had.
As you can see in my previous message, I don't modify bootloader (@lupyuen yes, I'm using JF002 fork of bootloader ๐Ÿ‘ ), but I try to modify Infinitime startup, to get same consumption as when it is standalone.

from pinetime-rust-mynewt.

vbelloir avatar vbelloir commented on June 15, 2024

hi @nanch,
if you think you can help, it would be great. I got few time, and not very skilled in firmware.
I'm an hardware guy.

from pinetime-rust-mynewt.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.