zubax / kocherga Goto Github PK
View Code? Open in Web Editor NEWRobust platform-agnostic Cyphal/DroneCAN bootloader for deeply embedded systems
Home Page: https://zubax.com
License: MIT License
Robust platform-agnostic Cyphal/DroneCAN bootloader for deeply embedded systems
Home Page: https://zubax.com
License: MIT License
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:
kocherga/kocherga/kocherga.hpp
Lines 885 to 892 in 85f24d4
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.
# 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}")
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.
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
Use the CYPHAL_PATH
environment variable instead. yakut compile
will be removed soon.
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.
@coderkalyan maybe you could look into migrating the uavcan-v1
branch to GitHub Actions while you're at it? I sort of picked up the development recently.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.