Amanieu has quit [Ping timeout: 268 seconds]
Amanieu has joined #rust-embedded
starblue has quit [Ping timeout: 265 seconds]
starblue has joined #rust-embedded
emerent has joined #rust-embedded
PyroPeter has quit [Ping timeout: 260 seconds]
PyroPeter has joined #rust-embedded
dreamcat4 has quit [Quit: Connection closed for inactivity]
<re_irc> <> As a general question to all embedded consultants out there, does anyone have a overview of pricing models for drivers that a customer can buy? E.g. we have a driver for a radio chip that a customer wants to use instead of the manufacturer supplied one, but we have no idea on how to price it or how it's usually done in the industry. Does anyone have a hint on how this is usually done?
<re_irc> <> korken89: (a) analyze the work to be done, write a roadmap, estimate hours it'll take you, multiply by fudge factor and margin, hand out quote or (b) hand out estimate as such and ask for partial payment based on hours at go/no-go points or monthly along the way or (c) estimate the amount of code, multiply by your cost per line of code based on past projects and multiply by fudge factor and by margin
<re_irc> <> Thanks for the tip!
<re_irc> <> But yeah. It's hard and you will likely underestimate the cost. Hourly helps you with that and in turn go/no-go helps the customer manage the uncertainty.
<re_irc> <> Yeah
<re_irc> <> We more or less are thinking that the hourly rate to "rewrite" the driver for them should be >> single cost of finished driver
<re_irc> <> Or something like that
<re_irc> <> Difficult...,
<re_irc> <> Depending on customer background, writing the specification together with them may already be the hardest part. 😉
<re_irc> <> Especially since we usually don't do consultancy (we are a product company)
<re_irc> <> But only we have implemented features for the chip that a customer wants (plus that it will be compatible with our infrastructure)
<re_irc> <> So we are in the deep end of "not our normal sale" xD
<re_irc> <> But thanks for the tips! I have more insight now :)
<re_irc> <> There is Time and Materials, and there is Fixed Price. The latter must be a bigger amount than the former, as you must allow some contingency (in case you estimate too low) - but at least the customer knows what they will pay. The first option is usually cheaper, but to your customer it feels like they are writing a blank cheque. So you just have regular milestones and updates.
<re_irc> <> T&M in general where there is discovery to be made... they'll want a budget though. In the end, it is worth what the market is willing to pay. I advise asking the customer what they are willing to pay.
<re_irc> <> If there is pre-existing IP you wish to sell, then your time is already lost and all you can do is try and get as much money as you can.
<re_irc> <> Hah, yes.
<re_irc> <> This is what we have
<re_irc> <> Super, thanks!
<re_irc> <> Also, exclusive IP is worth more than non- exclusive. No one will pay full price (i.e. cost to replace) for non-exclusive if you're just going to sell it to their competitor next week.
<re_irc> <> Yeah makes sense
<re_irc> <> I appreciate the feedback! Now I have some idea on how to assist in the estimate :D
<re_irc> <> Yeah, I'm much more in the wagon of hour-based accounting. It allows you to be infinitely more flexible. Projects _never_ go according to plan and there's always things that pop up that someone wants investigation into. If you work on fixed price, you're discouraged from helping your client outside of exactly what the contract is for, which typically isn't ideal for anyone involved imo
<re_irc> <> Honestly I'd probably be more in the market of offering them the IP as part of a consulting package. You help them support and integrate it, extend features on it, etc.
<re_irc> <> I think this is what we will do, and use the IP to reduce total hours
<re_irc> <> Yeah, I've often developed internal tools for consulting firms that they in turn use for various clients, but just keep all the tooling in-house
<re_irc> <> Nice, makes sense
<re_irc> <> And that tooling then goes to the value proposition of the firm to their clients. They can now claim to have the tooling that makes them way more efficient than others, which can result in higher rates
<re_irc> <> Ah
<re_irc> <> Nice way to differentiate for them
xnor has quit [Ping timeout: 265 seconds]
xnor has joined #rust-embedded
<re_irc> <> (crossposting from )
<re_irc> <> Hi! I am trying to put a very long array to a different file to be imported. The array definition will be used for test purposes, but must be compiled and ran.
<re_irc> <> I was doing sth like this: (simplified)
<re_irc> <> ```rust
<re_irc> <> Someone kindly recommended include_str, but it seems it is in the std library.
<re_irc> <> Therefore I thought it might make sense to post it here too.
<re_irc> <> You could make a pub const in that file and import it in your main file?
<re_irc> <> If i understand the question right? :)
<re_irc> <> include_str is in core
<re_irc> <> I guess so.
<re_irc> <> but you'll have to parse the string with that...
<re_irc> <> include_bytes and transmuting to a [f32] could work
<re_irc> <> but yeah the easiest is probably a mod
<re_irc> <> Yeah, that might be the best course.
<re_irc> <> Avoided pub const I guess, but it fts here.
<re_irc> <> Since it is just to test
<re_irc> <> I realized that the function I use that for needs it to be mutable.
<re_irc> <> Can I make a mutable copy of that const, I guess.
<re_irc> <> Yep.
<re_irc> <> no, but it'll eat stack space unless you put it in a static
fabic_ has joined #rust-embedded
dreamcat4 has joined #rust-embedded
<re_irc> <> is the current last word on hw float detection?
Rahix has quit [Quit: ZNC -]
Rahix has joined #rust-embedded
emerent has quit [Ping timeout: 260 seconds]
emerent has joined #rust-embedded
<re_irc> <> hi room! meeting time again, agenda is, please add anything you'd like to talk about! we'll start in 5min
<re_irc> <> 👋
<re_irc> <> 👋
<re_irc> <> 👋
<re_irc> <> ok, let's start! couple quick announcements, first a reminder that rust 1.56 is out, including 2021 edition!
<re_irc> <> ...and including adding linker scripts via which we should look into for c-m-rt sometime 👀
<re_irc> <> and, berlin leaves daylight saving time this sunday, so our meetings will remain 8pm berlin time but this may shift for people in other countries
<re_irc> <> that's all I've got, any announcements from anyone else?
<re_irc> <> ok, if not let's move on to the embedded-hal things, first up the separate SPI buffers
<re_irc> <> I don't think there's much outstanding/new discussion after last week, just still a desire to see them implemented to check they work as well as we think they will
<cr1901> Is this worth an announcement :P?
<cr1901> i.e. I'm actually doing my job
<re_irc> <> I guess you can save the announcement for when it's done :P nice, though!
<re_irc> <> I have a quick announcement
<re_irc> <> such a pernicious bug
<re_irc> <> go for it thejpster
<re_irc> <> I was doing a bunch of Raspberry Silicon RP2040 stuff as paid work. But that has come to abrupt end because I'm leaving that job. Lots more Rust to come when I start my new job though, so hopefully only a hiatus for a couple of weeks.
<re_irc> <> 👍️ good luck with the new job!
<re_irc> <> Also, if you can ever get paid or otherwise find time to do a whole day on a project, it's way more efficient! :)
<re_irc> <> funnily enough that's what my day job thinks too :P
<re_irc> <> ok, next up on the e-h items is embedded-can which is very near the finish line now...
<re_irc> <> yeah, marked the constructors as `unsafe` again
<re_irc> <> there was some recent chat about whether its `new_unchecked` methods for IDs should be unsafe which I think is probably resolved now, though if anyone has opinions please have a quick look
<re_irc> <> good that the inconsistency was spotted
<re_irc> <> yea, definitely would have been bad to have it different for std/extended
<re_irc> <> there was the request for unit tests, they would mostly just test constants
<re_irc> <> I have not left a note yet but briefly talked with eldruin about it earlier today. This seems ready to land.
<re_irc> <> ... or very close to. Seems like eldruin had something with unittests in mind. I'll let them have the final word.
<re_irc> <> cool
<re_irc> <> I think let's move to thejpster's agenda items and revisit the i2c nack errors after if there's time, as I don't think much has changed since the discussion last week
<re_irc> <> I can add the unit tests in the next days, shouldn’t be too much effort
<re_irc> <> thejpster, want to go ahead with yours?
<re_irc> <> OK, hang on let me see what was first
<re_irc> <> Right, MSRV
<re_irc> <> All the crates in the cortex-m repo seem to set MSRV randomly
<re_irc> <> Somewhere between 1.31 and 1.38
<re_irc> <> And we want to get on Rust 2021 soonish, because of the quality of life improvements
<re_irc> <> Who would get upset it we bumped the MSRV to 1.56 in 12 weeks' time? (i.e. it would be oldoldstable at that point)
<re_irc> <> hmm
<re_irc> <> our msrv policy is we bump it whenever we need to, to no newer than oldoldstable
<re_irc> <> but is there any particular need to bump it for those crates for its own sake?
<re_irc> <> I could be quickly convinced for c-m-rt because of the linker script business
<re_irc> <> Are there any concrete QoL improvements you had in mind?
<re_irc> <> well we need to bump it to make .cargo/config.toml go away.
<re_irc> <> Or at least the obscure way we set the linker script for thumbvX
<re_irc> <> that's only for cortex-m-rt though, right?
<re_irc> <> cmrt doesn't set the linker script, just copies it to out_dir
<re_irc> <> it's the end user's crate that has the -Tlink.x
<re_irc> <> But we could fix that
<re_irc> <> Because the cmrt could set the linker script
<re_irc> <> But anyway, the point it MSRVs
<re_irc> <> This is all moot if we're stuck at 1.30-something
<re_irc> <> a crate can't set the linker script for bins from another crate
<re_irc> <> Who would get upset it we bumped the MSRV to 1.56 in 12 weeks' time? (i.e. it would be oldoldstable at that point)
<re_irc> <> The irony... .cargo/config.toml was only introduced in 1.39, before it only supported it without .toml
<re_irc> <> No objections as long as there's a crystal clear benefit.
<re_irc> <> it's not a problem to bump the msrv, but as part of a PR that does something that needs it, not just for its own sake
<re_irc> <> OK, great.
<re_irc> <> As long as someone isn't sitting on a rustc fork that's stuck in time
<re_irc> <> the user chooses whether they set the linker script with .cargo/config.toml or in their crate
<re_irc> <> Or desperately needing to build with the rustc shipped with debian or something
<re_irc> <> they can decide to stick to a new rust and use, no changes needed in cmrt
<re_irc> <> ah great, yea i hadn't thought that through dirbaio
<re_irc> <> you can already do that today, I am fwiw
<cr1901> Basically, this doesn't remove the rt dance of copying linker fragments to create a full script
<cr1901> just allows you to set the script in
<cr1901> correct?
<re_irc> <> thejpster: our standing policy is "must build on today's stable", we don't have a policy that we have to stick to an old msrv for some particular reason,
<re_irc> <> OK cool, but there's quickstart and other things to think about. Anyway, I'm fine with this.
<re_irc> <> Let's move on!
<re_irc> <> quickstart's "msrv" can be bumped, it doesn't need bumping cm or cmrt's
<re_irc> <> My second item was around software simulation of arm chips
<re_irc> <> You can emulate some Arm systems (a weird Luminary Micro Cortex-M3 that no-one uses) in QEMU, but we hear that it's a bit ... non-deterministic.
<re_irc> <> This is related to
<re_irc> <> Which was looking at doing testing on real hardware
<re_irc> <> there's a bunch of other machines available for qemu, including some stm32s and so forth
<re_irc> <> quality of simulation is definitely variable
<re_irc> <> though the luminary one ships with stock qemu which does have some appeal, I think RTIC has tests using that?
<re_irc> <> I found out that Arm have a good (and much better than qemu) but not cycle accurate, simulator called a "Fast Model"
<re_irc> <> And you can get the Fast Model for the Cortex-M55 as part of a "Fixed Virtual Platform", as a download with no licence click-through required.
<re_irc> <> Which is good, because normally a Fast Model is about $1000 a person
fabic_ has quit [Ping timeout: 260 seconds]
<re_irc> <> It has an SDL GUI, and UART support, and lots of fun things:
<re_irc> <> Plus, it would be interesting to try out Cortex-M55 support.
<re_irc> <> Will that always be free or it is temporary because the M55 is new?
<re_irc> <> My question is - is testing on a Cortex-M55 fast-model valuable? And is it a good gate for merging a PR?
<re_irc> <> newam - that is a good question, but once we have a copy, we have a copy.
<re_irc> <> Or should we not bother with Fast Models and just test on hardware (or maybe on QEMU)?
<re_irc> <> We could start with QEMU and evaluate later if we run into problems.
<re_irc> <> Zephyr RTOS ran into problems:
<re_irc> <> I expect many of those tests are things we don't do in cortex-m so might not be so bad for us
<re_irc> <> but it would be interesting to know if their tests fare any better on arm's fast model
<re_irc> <> Oh and thanks to newam for offering to host real hardware!
<re_irc> <> I like testing on real hardware. I am perhaps less warm about gating PRs on CI running on infra with no SLA.
<re_irc> <> like I said, I think RTIC are using qemu quite successfully, without the sorts of issues zephyr are seeing
<re_irc> <> so it's probably an option
<re_irc> <> one option is to not gate them but have them be advisory only, e.g. if they run and fail then something's probably wrong, if they run and pass then great, and if they fail to run because the test rig is down then the reviewer can run the same tests manually locally
<re_irc> <> but to be honest my suspicion is our pace of development is gentle enough to stand a few CI outages without major problem, so we could just gate on it
<re_irc> <> I think the real advantage would just be in having a test suite at all, and being able to run it on local hardware easily (especially e.g. those nucleo boards that lots of people have or can get)
<re_irc> <> having it then run in CI is a huge boon for contributors and makes reviewer's lives much easier too
<re_irc> <> related to HIL testing:
<re_irc> <> I've been working on this the past weeks
<re_irc> <> it's a different approach to using a selfhosted runner
<re_irc> <> it's an http API where you POST an ELF, it runs it using probe-rs and returns success/failure and the defmt/rtt logs
<re_irc> <> As a related topic should we discuss moving cortex-m-rt into the cortex-m repo? That will be required regardless of testing strategy.
<re_irc> <> dirbaio: so you'd use GHA's own CI servers to build an ELF, then have the GHA action POST it to the HIL tester?
<re_irc> <> so you can do all the building on the github-hosted runners, no remote-code-execution runner required
<re_irc> <> yep
<re_irc> <> my plan is to use it for embassy, building a farm of stm32/nrf chips. I can lend access to rust-embedded's projects if needed too
<re_irc> <> still remote code exec on the target of course but they are probably less appealing crypto miners than the CI servers :P
<re_irc> <> don't think the stm32's hardware accelerated sha would be great
<re_irc> <> unfortunately for HAL testing you need real hardware... I don't think the qemu stm32s are good enough
<re_irc> <> Yeah, too much is left unimplemented to test HALs on QEMU.
<re_irc> <> Is there a HALT_AND_CATCH_FIRE equivalent for Arm? I note the PR talks about wearing out flash deliberately.
<re_irc> <> my plan is to only run it on `trying` and `staging` branches, so it only runs after `bors r+` or `bors try`
<re_irc> <> so there's some review first
<re_irc> <> given the PR would have to be deliberately malicious and it's not clear there's any material benefit for the submitter either (unlike crypto mining on CI servers), I'm sort of hopeful there won't be abuse
<re_irc> <> there are some chips you can outright brick (nrf53's APPROTECT+ERASEPROTECT for example)
<re_irc> <> ah, yea, that would be pretty annoying
<re_irc> <> same deal on stm32
<re_irc> <> OK, but hopefully any malicious intent would be obvious from a code review
<re_irc> <> So yeah if the HIL run is gated on a `bors try` that seems OK
<re_irc> <> I run the STM32WL HIL without approval, but that's a much smaller repo in terms of contributors. I think the probability of abuse occuring is low - it is just good to keep in mind that it can occur.
<re_irc> <> And the free fast model remains an option if anyone wants to try it
<re_irc> <> yep
<re_irc> <> once we have a test suite it would hopefully be fairly quick to see if it runs on an arm fast model
<re_irc> <> if someone was interested in playing with it
<re_irc> <> first step for c-m is definitely moving c-m-rt crate into the same repo
<re_irc> <> if there are any volunteers... 👀 otherwise I'll try and start putting it together later this week
<re_irc> <> or put it on my list of things to do 'later this week' anyway
<re_irc> <> adamgreig: I will take a look at the fast model for cortex-m testing this weekend.
<re_irc> <> cool, thanks!
<re_irc> <> OK, I think that just about covers us for this week unless anyone has anything else to mention?
<re_irc> <> ok, let's call it there, then, thanks everyone!
<re_irc> <> Any news about the newsletter? 😉
<re_irc> <> the meeting's over, I don't have to answer that 😬
<re_irc> <> hmm actually #30 has already got a fair bit of content
<re_irc> <> much of it thanks to eldruin
<re_irc> <> maybe we should publish it soon, perhaps solicit any new content over the next week or two?
<re_irc> <> so yea, if anyone has anything they'd like to add... you know the drill! PR to the file ^
<cr1901> agg: Do you know whether there's a rationale for not include bin/cortex-*.a as part of rerun-if-changed?
<cr1901> I guess it doesn't change enough to warrant it?
<re_irc> <> yea, I guess that's it...
troth has quit [Ping timeout: 260 seconds]
troth has joined #rust-embedded
Amanieu has quit [Ping timeout: 260 seconds]
jackneilll has quit [Remote host closed the connection]
jackneilll has joined #rust-embedded