Code Monkey home page Code Monkey logo

embassy-rp-skeleton's Introduction

SupImDos

๐Ÿ Python developer from ๐Ÿ“ Perth, WA

@dataclass
class SupImDos:
    name: str = "Hayden Richards"
    username: str = "SupImDos"
    age: int = 25
    location: str = "Perth, WA"

if __name__ == "__main__":
    me = SupImDos()

๐Ÿ”ญ Languages

  • Python

๐ŸŒฑ Learning

  • Rust
  • HTML / CSS / JavaScript / TypeScript

embassy-rp-skeleton's People

Contributors

supimdos 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

Watchers

 avatar

embassy-rp-skeleton's Issues

Investigate `DapperMime` alternative `rust-dap`

Currently, the project skeleton recommends the usage of DapperMime to transform a Raspberry Pi Pico into a CMSIS-DAP debug probe.

According to a comment thread in the embassy chat, a faster alternative rust-dap exists:

9names
dapper-mime works, but rust-dap is faster as it supports cmsis-dap v2 and uses the rp2040 PIO to drive SWD. here's a build of that to test on, if you're interested
https://raw.githubusercontent.com/9names/binary-bits/main/rust-dap-pico-ramexec-setclock.uf2

Peter Hansen
Always happy to upgrade things! :-) And that's awesome that someone put PIO to use for this.
Is that build based on https://github.com/ciniml/rust-dap ? (Just checking, 'cause that one says it's no faster than other probe implementations, and doesn't mention v2 at least on the readme.)

9names
it is a build of that, yes the readme is out of date
i did some performance profiling earlier this year. cmsis-dap v1 firmwares cap out at around 22KB/sec, cmsis-dap v2 + bit-banging at around 54KB/sec, and cmsis-dap v2 + PIO at about 116KB/sec - we're getting capped by USB FS throughput at that speed unfortunately.
if we had USB HS on rp2040 I assume we would be getting 3-4 times that, which would put us at HS-probe levels of performance

The rust-dap firmware should be investigated, and if it proves to be better than DapperMime then it should replace it in this repository.

Investigate effects of `link-rp.x` on `memory.x`

The embassy rp example provides a memory.x file. However, this project does not compile without the additional bootloader section in memory.x

https://github.com/embassy-rs/embassy/blob/master/examples/rp/memory.x

MEMORY {
    BOOT2 : ORIGIN = 0x10000000, LENGTH = 0x100
    FLASH : ORIGIN = 0x10000100, LENGTH = 2048K - 0x100
    RAM   : ORIGIN = 0x20000000, LENGTH = 256K
}

https://github.com/SupImDos/embassy-rp-skeleton/blob/main/memory.x

MEMORY {
    BOOT2 : ORIGIN = 0x10000000, LENGTH = 0x100
    FLASH : ORIGIN = 0x10000100, LENGTH = 2048K - 0x100
    RAM   : ORIGIN = 0x20000000, LENGTH = 256K
}

EXTERN(BOOT2_FIRMWARE)

SECTIONS {
    /* ### Boot loader */
    .boot2 ORIGIN(BOOT2) :
    {
        KEEP(*(.boot2));
    } > BOOT2
} INSERT BEFORE .text;

The embassy rp example also provides a build.rs that includes the following line, which is missing in our equivalent .cargo/config.toml

https://github.com/embassy-rs/embassy/blob/master/examples/rp/build.rs#L34

cargo:rustc-link-arg-bins=-Tlink-rp.x

This line points us towards the link-rp.x.in file in embassy-rp, which actually includes the bootloader section of our memory.x file.

https://github.com/embassy-rs/embassy/blob/master/embassy-rp/link-rp.x.in


SECTIONS {
    /* ### Boot loader */
    .boot2 ORIGIN(BOOT2) :
    {
        KEEP(*(.boot2));
    } > BOOT2
}

It appears likely then, if we add the following line to the rustflags of our .cargo/config.toml then we can update our memory.x to the more terse version

"-C", "link-arg=-Tlink-rp.x",

What is the license for this skeleton?

Thank you for creating such a great skeleton!

I would like to use this skeleton for my project, but I could not find a license for this skeleton, so I cannot use it.

So, could you please add the license file?

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.