ChanServ changed the topic of #rust-embedded to: Welcome to the Rust Embedded IRC channel! Bridged to #rust-embedded:matrix.org and logged at https://libera.irclog.whitequark.org/rust-embedded, code of conduct at https://www.rust-lang.org/conduct.html
starblue has quit [Ping timeout: 240 seconds]
starblue has joined #rust-embedded
lehmrob has joined #rust-embedded
lehmrob has quit [Ping timeout: 265 seconds]
crabbedhaloablut has quit [Ping timeout: 256 seconds]
crabbedhaloablut has joined #rust-embedded
lehmrob has joined #rust-embedded
m5zs7k has quit [Ping timeout: 240 seconds]
m5zs7k has joined #rust-embedded
starblue has quit [Ping timeout: 265 seconds]
starblue has joined #rust-embedded
IlPalazzo-ojiisa has joined #rust-embedded
lehmrob has quit [Ping timeout: 265 seconds]
<re_irc> <@korken89:matrix.org> vulfe: Embassy's HAL works great in RTIC v2, here is how to use it: https://github.com/korken89/rusty-tracker/blob/modem-abstraction/firmware/src/bin/app.rs#L18
<re_irc> <@vulfe:matrix.org> : I appreciate it! This will almost certainly be useful to me; right now I'm using the HAL through the BSP, which (somewhat frustratingly) doesn't actually expose the NVMC for some reason
emerent has quit [Ping timeout: 240 seconds]
emerent has joined #rust-embedded
<re_irc> <@ixlun:matrix.org> Hi all. Does anyone know where I can find a PAC for the LPC-1768 chip?
<re_irc> <@ixlun:matrix.org> I've already tried https://crates.io/crates/lpc176x-5x but it doesn't work with a modern version of Rust.
<re_irc> <@bugadani:matrix.org> hi, you might want to generate your own using svd2rust if the IC is less popular
<re_irc> <@judge:chat.wlandt.de> The repo contains the svd, so you could clone the repository … regenerate using the newest version of svd2rust + maybe send a PR 😉
<re_irc> <@ixlun:matrix.org> Good idea. I’ll give that a go. It looks as though some manual changes are required due to name clashes but I should be able to fix that up
<re_irc> <@bugadani:matrix.org> it's also possible that there is a newer svd you can use and that svd2rust got slightly more sophisticated and maybe you don't run into those issues
<re_irc> <@ixlun:matrix.org> Hmm, I’ll look on the NXP website for a newer SVD.
<re_irc> <@walstib-alex:matrix.org> Have a look at their resources. I recently set up PAC for the (I think) parallell m4 lpc43xx series and had to tweak some duplicate config register name, but apart from that it's working fine.
<re_irc> <@walstib-alex:matrix.org> Also, if the 17xx also have separate coprocessors you may need to add dummy secrtons for the shared nvic lines for them to be available in `Interrupt`. I did that several years ago so it may be different now.
<re_irc> <@ixlun:matrix.org> Hm, yes.. I've just tried generating the code form the svd.. "could not compile "lpc17xx" (lib) due to 17035 previous errors" 😬
<re_irc> <@walstib-alex:matrix.org> :D
<re_irc> <@ixlun:matrix.org> * lpc17xx
<re_irc> <@walstib-alex:matrix.org> Some assembly required
<re_irc> <@walstib-alex:matrix.org> Check that listed dependendencies on the docs.rs page are in and that you're using the latest `edition`
<re_irc> <@ixlun:matrix.org> I think that all looks good. It's mostly errors such as:
<re_irc> error[E0592]: duplicate definitions with name `disable`
<re_irc> --> /home/matthew/Development/r1768/lpc17xx/src/adc/inten.rs:378:5
<re_irc> |
<re_irc> 378 | pub fn disable(self) -> &'a mut W {
<re_irc> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ duplicate definitions for `disable`
<re_irc> ...
<re_irc> 428 | pub fn disable(self) -> &'a mut W {
<re_irc> | --------------------------------- other definition for `disable`
<re_irc> <@walstib-alex:matrix.org> I can try lifting it over to my pac crate, got a link for the svd?
<re_irc> <@walstib-alex:matrix.org> Oh right
<re_irc> <@walstib-alex:matrix.org> There was another tweak, double checking it now but the 43xx svd had the same issue with ENUM_A, but it was an issue of the field-name tag appearing twice
<re_irc> <@walstib-alex:matrix.org> There are also truncated enum names, but they should be the same as listed in the associated UM and may be recovered
<re_irc> <@walstib-alex:matrix.org> The GPDMA dim seems to be messed up as well, expect everything with channels to require tweaking
<re_irc> <@walstib-alex:matrix.org> +channel config
<re_irc> <@walstib-alex:matrix.org> +Edit: It was just the gpdma channel config, after fixing that and some truncated enum variants it compiles fine.
<re_irc> <@ixlun:matrix.org> Oh wow! Any chance you could share the tweaked SVD file?
<re_irc> <@walstib-alex:matrix.org> Yeah, I'm figuring out where to upload it, one sec
<re_irc> <@ixlun:matrix.org> github gist?
<re_irc> <@walstib-alex:matrix.org> Matthew Leach: I put it here for now since I want it stored online anyway. Might look at the fancy buildscripts they've built for other board support repos while I'm at it https://bitbucket.org/walstib/lpc4317
<re_irc> <@ixlun:matrix.org> Perfect, that worked great. Thanks!
<re_irc> <@ixlun:matrix.org> I'll raise a PR against the repo that's already published in cargo. Or maybe I should add it to https://github.com/lpc-rs/lpc-pac
<re_irc> <@walstib-alex:matrix.org> I don't intend to maintain anything, but feel free to use material from that repo if it helps the effort :)
<re_irc> <@walstib-alex:matrix.org> Quick note: only the duplicated by trunc variants were fixed, there are likely a million others.
IlPalazzo-ojiisa has quit [Quit: Leaving.]
<re_irc> <@ixlun:matrix.org> Thanks for the heads up, I'll do some sanity checking first
<re_irc> <@ixlun:matrix.org> Hm, odd. I've just compiled the "hello" example from the embedded rust template, and when I'm flashing it to my board I'm seeing:
<re_irc> Start address 0x00000000, load size 0
<re_irc> Transfer rate: 0 bits in <1 sec.
<re_irc> When I do an objdump of the binary, there is no ".text" section or anything
<re_irc> <@walstib-alex:matrix.org> Oh yeah, you need to setup memory.x probably
<re_irc> <@ixlun:matrix.org> Ah wayt, I figured out the problem
<re_irc> <@walstib-alex:matrix.org> I'll add the one we used for the 43xx to the repo
<re_irc> <@ixlun:matrix.org> * wait,
<re_irc> <@ixlun:matrix.org> I ran svd2rust within the template and that overwrote the template's "build.rs"
crabbedhaloablut has quit [Read error: Connection reset by peer]
crabbedhaloablut has joined #rust-embedded
loki_val has joined #rust-embedded
crabbedhaloablut has quit [Ping timeout: 264 seconds]
<re_irc> <@walstib-alex:matrix.org> I'm not well informed about the uses of lpc17xx but I'm trying to understand, what exactly is a device like lpc1751 really needed for?
<re_irc> Bespoke stepper motor controller with CAN for automotive?
<re_irc> <@walstib-alex:matrix.org> +(a single peripheral, forget gatewaying)