Code Monkey home page Code Monkey logo

Comments (8)

Arksine avatar Arksine commented on August 28, 2024 1

FWIW, I have an implementation of this that I intend to push soon. As requested, it uses git describe and falls back on a .version file in the katapult folder if its not a git repo.

There are several approaches that can be taken to accomplish this, I used Kconfig. By doing so the version is defined in autoconf.h, making the change minimal. This means that its a good idea to clean before building a new version, since we need to make sure that autoconf.h is regenerated before the build. Failing to do so could result in a build containing stale version info.

from katapult.

gpread avatar gpread commented on August 28, 2024

The ability to receive Katapult version info as well as UUID in a query response would be very helpful. With multiple versions and since AFAIK there is currently no easy automatic Katapult version updater (and perhaps people would not be easily convinced to use one for updates anyway) it is valuable to know definitively if you need to update and how many revisions you may be skipping when deploying the most current one and/or which version you would be wanting to revert to if you found an incompatibility/problem with newer one.

from katapult.

krautech avatar krautech commented on August 28, 2024

This functionality would also be greatly appreciate for everything already mentioned. I'll look into this myself but no guarantees. @Arksine anywhere I should be looking in specific to pulling the current Katapult version on the device?

from katapult.

kdomanski avatar kdomanski commented on August 28, 2024

Hey, I've been looking into this a while ago and the update to the thread reminded me to write down the takeaways.

The only workable solution IMO seems to be passing data to the Klipper payload similar to how bootloaders pass parameters (so-called "atags") to the Linux kernel. It seems to work by reserving a small piece of memory above the stack and passing its address through a register before jumping to the kernel. The address contains a list of structs. Then Klipper would have to pick up the address, validate the data and read it.

See:


EDIT: Nevermind. I just realized this issue is about getting the Katapult version from Katapult, not from Klipper.

from katapult.

krautech avatar krautech commented on August 28, 2024

Excellent news!

That's roughly what I came up with temporarily but my version involved using json and having version information hosted somewhere (git etc)

Yours is much more elegant 👍🏻

from katapult.

Arksine avatar Arksine commented on August 28, 2024

I have added this commit to PR #126. If some of you want to test it before I merge feel free to do so.

The flashtool script should still work for devices flashed with previous versions of Katapult, the software version should return as "?". I have done some initial testing, but would still like to test all of the interfaces before I merge.

The output should look like the following:

Flashing Serial Device /dev/ttyACM0, baud 250000
Attempting to connect to bootloader
Katapult Connected
Software Version: v0.0.1-68-gb768c12
Protocol Version: 1.1.0
Block Size: 64 bytes
Application Start: 0x8002000
MCU type: stm32f103xe
Flashing '/home/eric/klipper/out/klipper.bin'...

from katapult.

krautech avatar krautech commented on August 28, 2024

Ill run through this a bunch today and tomorrow and provide feedback 👍🏻

from katapult.

krautech avatar krautech commented on August 28, 2024

I have added this commit to PR #126. If some of you want to test it before I merge feel free to do so.

The flashtool script should still work for devices flashed with previous versions of Katapult, the software version should return as "?". I have done some initial testing, but would still like to test all of the interfaces before I merge.

The output should look like the following:

Flashing Serial Device /dev/ttyACM0, baud 250000
Attempting to connect to bootloader
Katapult Connected
Software Version: v0.0.1-68-gb768c12
Protocol Version: 1.1.0
Block Size: 64 bytes
Application Start: 0x8002000
MCU type: stm32f103xe
Flashing '/home/eric/klipper/out/klipper.bin'...

Is working for me so far :D
Flashed via USB using flashtool works as described.

from katapult.

Related Issues (20)

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.