!WqsLCItsZbJGhRjnxP:matrix.org

stm32-rs

55 Members
Discussion and support for stm32-rs projects. History is publicly viewable. Bridged to ##stm32-rs on Freenode IRC. Code of conduct: https://www.rust-lang.org/conduct.html5 Servers

Load older messages


SenderMessageTime
10 Aug 2020
@eldmgr:matrix.orgMattias GrönlundI have not seen the other ones, so I guess it is a new greenfield approach...19:57:06
@eldmgr:matrix.orgMattias Grönlund therealprof: Do you have any link to other approaches? 19:58:36
@therealprof:matrix.orgtherealprofLooking...19:58:53
@therealprof:matrix.orgtherealprofhttps://github.com/HarkonenBade/cube-parse19:58:56
@eldmgr:matrix.orgMattias GrönlundHmm, that one seems to try to provide some higher level interface, I have just tried to transform each available element/attribute to rust structs. Currently covering Mcu and IP documents, I am not sure if the other documents are of much interest. It seems like they mostly defines cubeMX API functions.20:02:25
@ra_kete:chat.berline.rsra_keteThere is also currently a PR open for the stm32f3xx-hal that parses the CubeMX DB: https://github.com/stm32-rs/stm32f3xx-hal/pull/12920:03:16
@ra_kete:chat.berline.rsra_keteWould be cool if that could use some other crate for the parsing instead of implementing that again20:03:42
@ra_kete:chat.berline.rsra_keteEspecially for sharing between HALs20:03:54
@therealprof:matrix.orgtherealprofThanks, https://github.com/dbrgn/cube-parse was what I was looking for.20:04:43
@therealprof:matrix.orgtherealprofI thought there was at least another one...20:04:57
@ra_kete:chat.berline.rsra_keteI think the F0 HAL also has one of these PRs open for a while20:05:32
@therealprof:matrix.orgtherealprofOh...20:06:14
@therealprof:matrix.orgtherealprofBased on the same.20:07:18
@ra_kete:chat.berline.rsra_ketehttps://github.com/stm32-rs/stm32f0xx-hal/pull/29 But I was wrong, there is only relevant discussion there, no actual CubeMX parsing. And yes, that's also about cube-parse20:10:08
@ra_kete:chat.berline.rsra_ketecube-parse is pretty limited in what it does, it generates very specific GPIO mappings. I found it easier to write the parsing logic again than to fork it. But I have been thinking about librarifying the parsing, it just didn't fit into the experiment20:12:48
@eldmgr:matrix.orgMattias GrönlundPartly what I was after was to get the model/schema for the cubemx-db, to better understand what to expect to gain from it.20:14:42
@ra_kete:chat.berline.rsra_keteMaybe I'll have time to have a look at your crate and give some feedback this weekend. Sounds interesting :)20:15:54
@eldmgr:matrix.orgMattias GrönlundI had a quick look at pull/29 and realize that it generates code with the current macros. I have more and more started to believe that it would be better to generate code without any macros as that code is easier for the end user to work with...20:17:55
@eldmgr:matrix.orgMattias GrönlundFeedback is always welcome, I am just learning rust so I expect that things should be in some other way :-).20:19:10
@ra_kete:chat.berline.rsra_keteWe definitely want to get away from the macros. But I wanted to introduce the GPIO features independently from a full-blown GPIO refactor, to keep the scope manageable. Once the GPIO gets refactored the codegen will change with it, but I'd like to ensure beforehand that the general idea actually works20:20:19
@eldmgr:matrix.orgMattias GrönlundI also think we should create some kind of stm32-hal which the different family-hal implementations could implement. Making it easier to share low level peripherals. 20:20:57
@eldmgr:matrix.orgMattias GrönlundYes, I got that feeling, and it is probably the right thing to do :-).20:21:38
@therealprof:matrix.orgtherealprof
In reply to @eldmgr:matrix.org
I also think we should create some kind of stm32-hal which the different family-hal implementations could implement. Making it easier to share low level peripherals.
That's super-gnarly to do. But at least more and more projects are moving support for specific peripherals out of the hal impls with only a thin layer remaining.
20:23:50
@eldmgr:matrix.orgMattias GrönlundI have tested to go quite a bit further with gpio on the macro path to have it work without any unsafe code, but my feeling is that it would be easier to do with code-generation from cubemx-db directly.20:27:42
@eldmgr:matrix.orgMattias GrönlundYes it might be gnarly, but my hope was to find enough information in cubemx-db for it to work... So, I thought I should start and decode the cubemx-db to see what would be possible...20:30:40
@eldmgr:matrix.orgMattias GrönlundSo, my next test will be to see if I can do some sort of code generation, as I said I am just starting to learn Rust.20:32:30
@therealprof:matrix.orgtherealprofEvery little bit helps!20:39:15
11 Aug 2020
@benmkw:matrix.orgbenmkwh743v with probe-rs master and cargo embed works with rtt fwiw :) 11:14:47
@freenode_chinry:matrix.orgchinry left the room.12:00:07
@freenode_chinry:matrix.orgchinry joined the room.12:02:20

There are no newer messages yet.


Back to Room List