Code Monkey home page Code Monkey logo

kocherga's People

Contributors

asmfreak avatar coderkalyan avatar dj-von avatar maksimdrachov avatar pavel-kirienko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kocherga's Issues

How to embed AppInfo into ROM image

Firstly, thank you for this great library that saved me from writing tons of boilerplate code. I fairly quickly got it running on STM32F103 and can now upload ROM images via UAVCAN.

However, I'm not sure what would be the correct procedure for embedding AppInfo structure into a ROM image. I can initialise it as a global in the code, however I will not be able to calculate CRC and size variables. Is this a job for a custom build tool that would calculate these fields and modify an already built binary? Or am I missing some magic tool that does just that?

Thank you.

libcanard polling too slow

I'm not sure whether this issue belongs to this repository but at least I will share the problem I encountered.

I'm using this bootloader on a STM32F103 @ 72 MHz and the main bootloader loop is too slow to poll libcanard stm32 driver receive function hence losing packets during file transfer. The internal receive buffer is only 2 frames and it seems that it cannot keep up with 1mbps CAN bitrate. The way I solved this is by making libcanard driver interrupt driven and feeding frames to an intermediate RX queue (ChibiOS FIFO).

This is highly platform specific, but I think someone will definitely encounter this issue. I'm not sure if this should be fixed by making libcanard driver buffered or by other means.

Add FindKocherga.cmake for convenience

# Given an .elf file produced by the linker, generate an .app.bin with the correct signature
# that is accepted by the Kocherga bootloader.
# The source ELF file will be also side-patched for convenience.
function(
        generate_kocherga_image
        ARG_ELF_FILE_NAME
        ARG_OUTPUT_BASENAME
)
    set(elf ${ARG_ELF_FILE_NAME})
    set(bin ${ARG_OUTPUT_BASENAME}.bin)
    set(app ${ARG_OUTPUT_BASENAME}.app.bin)
    add_custom_target(
            ${app} ALL
            COMMAND rm -f *.bin  # Remove all previous build outputs
            COMMAND ${CMAKE_OBJCOPY} -O binary ${elf} ${bin}
            COMMAND ${KOCHERGA_IMAGE_TOOL} --lazy --verbose ${bin} --side-patch ${elf}
            COMMAND rm -f ${bin}
            DEPENDS ${elf}
            WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
            COMMENT "Generating application image compatible with the Kocherga bootloader: ${app}"
    )
endfunction()

find_program(
        KOCHERGA_IMAGE_TOOL NAMES kocherga_image kocherga_image.py
        PATHS
        ${CMAKE_CURRENT_SOURCE_DIR}
        ${CMAKE_CURRENT_SOURCE_DIR}/..
        ${CMAKE_CURRENT_SOURCE_DIR}/../..
        ${CMAKE_SOURCE_DIR}
        ${CMAKE_SOURCE_DIR}/lib
        PATH_SUFFIXES
        tools
        kocherga/tools
        REQUIRED
)
message(STATUS "Found kocherga_image tool: ${KOCHERGA_IMAGE_TOOL}")

RP2040 Implementation Using RP2040

Hi,

I was wondering if there exists any examples of using this project that would help me integrate it with an RP2040 & MCP2515 CAN Controller. I'm familiar with using libcanard and the 107 MCP2515 library to produce cyphal nodes. I've also written the code to boot a user program from flash on the RP2040 - the main issue is implementing classes such as:

class MyCANDriver final : public kocherga::can::ICANDriver

Any help would be greatly appreciated.

Retry timed out requests to support poorly characterized non-real-time networks

One is unlikely to encounter packet loss if the network is well-designed, but developers often have to deal with overloaded networks where the timing guarantees expected by Cyphal are not upheld.

Extend the FileLocationSpecifier with the number of requests made:

struct FileLocationSpecifier
{
std::uint8_t local_node_index{};
NodeID server_node_id{};
std::size_t path_length{};
std::array<std::uint8_t, dsdl::File::PathCapacity> path{};
std::optional<std::chrono::microseconds> response_deadline{};
};

Only begins update if command sent from file server

Hi,

I have a file server running with node ID 43. When kocherga is running, the update will only begin if the begin update command is sent from the same node ID as the file server. If the command is sent from any other ID, kocherga goes into AppUpdateInProgress mode with a VSSC of 1, and then enters NoAppToBoot mode. Once a program has been loaded onto the microcontroller, I am able to trigger an update successfully by sending an update command from any node ID.

Is this intended behaviour, or a bug? For my purposes, being able to trigger an initial software update from a node ID other than the file server would be very useful.

Cheers

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.