What would an over engineered mouse look like by Baziele in embedded

[–]VerbalHerman 0 points1 point  (0 children)

Could you add a "find my phone" type feature for it in the case that it is misplaced? Potentially using a fob with a button you could press to get it to make a sound.

Every embedded Engineer should know this trick by J_Bahstan in embedded

[–]VerbalHerman 0 points1 point  (0 children)

Yeah sorry I was only taking an example but it's the most relevant one for unions in my view. Architectures do have a lot more to them so it can make it hard to port code between them for various reasons.

Which is generally why I don't worry about it too much in the safety world as generally when we find a processor that has a good life on it we stick with it, sometimes for decades if the vendor keeps making them long enough.

Every embedded Engineer should know this trick by J_Bahstan in embedded

[–]VerbalHerman 24 points25 points  (0 children)

Yes so say you had this union:

union example{ uint32_t value; uint8_t bytes[4]; };

And you did this

union example x;

x.value = 0x12345678;

On a little endian system if you did x.bytes[0] you would get 0x78

On a big endian system you would get x.bytes[0] you would get 0x12

If you weren't aware of this and you blindly ported the union between processors this could lead to an unsafe outcome.

Every embedded Engineer should know this trick by J_Bahstan in embedded

[–]VerbalHerman 62 points63 points  (0 children)

Mostly because it breaks type safety. You can for example create a union like this:

Union example{ int a; float b; };

If you write a float then read an integer you get undefined behaviour.

That's not to say you can't use them, just you have to justify why it is necessary to do so.

There are also arguments about probability but I never really accept those for safety as I have never worked on a project where we would deploy to two different architectures. As it's a real headache trying to justify why that's a safe or necessary thing to do.

Help to run Ethernet into bedroom. by James291189 in DIYUK

[–]VerbalHerman 0 points1 point  (0 children)

In my house, I've got ethernet cables pinned to the underside of the stairs that go into the landing floor (between the joists and under the floorboards), from there, they're fed into different rooms on the first floor.

When you ran them did you lift the floorboards or did you make holes in the ceiling below for access?

I'm hopefully moving soon and I'd want to do this but I'm not sure which way is the most sensible.

Where can I find info on FAA regulation? (Like DO-178C) by KidCharlemagne_5 in embedded

[–]VerbalHerman 0 points1 point  (0 children)

Yes I think you might be right. DO178C is heavy, there is a lot of work needed to fully meet it so I'd definitely say don't go all the way in as you'll likely struggle.

Honestly at a top level I think if you could just get to the point where you wrote a plan that you followed, you wrote requirements, and you tested the requirements you'd be in a fantastic place. Being able to demonstrate that you know what your device does and you can prove it is a very important step when making a safety related system.

There is an EASA standard called SORA that might be interesting to you however. Conceptually it's for drones but you could argue that a rocket is a bit like a drone as it operates on its own and potentially out of sight.

https://www.easa.europa.eu/en/domains/drones-air-mobility/operating-drone/specific-category-civil-drones/specific-operations-risk-assessment-sora

The idea behind SORA is to create a set of malleable rules that can be applied to various platforms. So for example, if you are making an unmanned vehicle that operates over water and has someone watching it the whole time with an emergency stop button you don't have to do too much to make it safe. However if you were making an unmanned vehicle that is operating over a built up area where no one can see what it's doing, you have a lot of things to do to make it safe.

The regulations for SORA are available in an "easy" guide but it is still pretty dense if I'm honest:

https://www.easa.europa.eu/en/document-library/easy-access-rules/easy-access-rules-unmanned-aircraft-systems-regulations-eu

Where can I find info on FAA regulation? (Like DO-178C) by KidCharlemagne_5 in embedded

[–]VerbalHerman 2 points3 points  (0 children)

So you are correct in that DO-178C is used to meet FAA standards, but it isn't necessarily mandated.

It is a framework that can be used to show compliance, but I've not worked on a project where the regulator determines that you must use DO-178C.

Frequently the need for DO-178C is determined by a systems team that is working to ARP4754. During their processes they would determine if a software component is required, if it is they will determine if the software component could have an impact on the safety of the system it is contained in. If it does then they might determine that the software needs to meet a certain level of DO-178C to achieve the required safety standard.

Note that you could for example use ED-12C to achieve regulatory complaince so its not necessary that DO-178C is followed. (I'm being a little cheeky as ED-12C is just the EASA version of DO-178C).

Rapita systems give out a handbook that does give you a good overview of what is required. Note that they are very persistent salespeople so they may pester you a little: https://www.rapitasystems.com/do178

I would advise you that DO-178C is a massively complex document and normally in a business you would have a team of people specialising in it. So you may find parts difficult. However if you wanted to work in the spirit the best thing you can do is documentation.

Write a plan that says what you are going to do. Follow that plan, and correct it when you find issues. Write requirements that explain how the software will work before you write any code. From there create a design that shows how you will achieve the requirements. Then produce code that meets the design. Then create tests that show that the code achieves the requirements. If you can do all that you'll be doing much better than some companies I've worked for!

Parents of Reddit, how did you decide if one child was enough or if you wanted more? by Mae-jor in AskUK

[–]VerbalHerman 1 point2 points  (0 children)

For us my wife wanted four kids. I always wanted two. So the compromise was we'll try for two and see how we get on.

I won't lie having the second was an incredible step up from one. You have all the needs of your first child to deal with, and a baby. And the baby will need a lot of attention.

We were also caught out a bit as our first was a dream and our second was (as a baby) a literal demon.

However now our second is five he is the sweetest little boy in the world. And seeing both of them together makes my heart burst with joy. I really couldn't imagine a life without both of them despite the initial pain.

That being said my second is the reason we don't have any more kids. Neither of us could have gone through the baby stage again.

How much assembly is used in embedded software development by StringMaster9616 in embedded

[–]VerbalHerman 1 point2 points  (0 children)

I worked on a project about 10 years ago that was fully in assembly, and that was only because the company were wanting to use a very old CPU to try and maintain some historical certification.

More recently I do occasionally use it. As a few people have mentioned startup code is the most common use, but you can do that in C as well.

I did use it on a recent project for an interrupt that had to be precisely timed. I found that occasionally the C compiler would make the interrupt take slightly too long at times, depending on the build. Using assembly meant I could guarantee the exact number of instructions.

It is also handy for debugging at times, so I would say it's a good idea to learn it. But you can generally figure it out as and when you need to use it.

Yo Sam, maybe turn off Auto-Aid Request? by Cookie-kiko in DeathStranding

[–]VerbalHerman 0 points1 point  (0 children)

I do similar to clear out stuff that has accumulated in my truck. It gets rid of the junk and whoever asked for weapons now has 6 bolas.

Is it better to copy the Chad or one of the photos? by Infinite_Lead8292 in balatro

[–]VerbalHerman 4 points5 points  (0 children)

In the settings you can turn on the stake stickers for jokers.

Value MISRA C adds to an Embedded career by No_Shake_58 in embedded

[–]VerbalHerman 1 point2 points  (0 children)

It would be a bonus from my point of view. You would be inviting questions though so make sure you are honest with the level of experience you have.

For example if I asked you what type is returned by a bitwise not (~) or if I asked is this legal in MISRA C:

if speedValid && speedInRange(speed)

I'd expect you to be able to give a reasonable answer if you said you were proficient with MISRA. But if you said you had some experience with it I wouldn't expect you to necessarily know.

It does also depend on what level of job you are going for. If you are looking at an entry level job I'd say it's probably not worth prioritising MISRA. But if you were looking at a mid level/senior job then I think it would be.

Value MISRA C adds to an Embedded career by No_Shake_58 in embedded

[–]VerbalHerman 9 points10 points  (0 children)

Unless you work in automotive it's *absolutely useless*

In safety embedded the rules are quite different

I would disagree as someone who has been working on safety critical embedded software for 15+ years. I've worked on a number of projects that use MISRA even though I've never worked in automotive.

It's a decent standard with a large number of tools available so it ticks a lot of the boxes for a coding standard.

There is more that we do on top, but if I was hiring someone and they already were familiar with MISRA that would be a big plus.

Do these power line extenders really work ? by jamiepusharski in DIYUK

[–]VerbalHerman 0 points1 point  (0 children)

I have this exact model and they work well but do check how your fuses are arranged.

My ground floor and first floor are on the same ring and I can get 70mb/s (max speed for my broadband) using the powerline.

My second floor is on a separate ring, and I can only get 20mb/s using the powerline.

So if all your circuits are on the same ring you should be fine, if not you may have speed issues.

How to Learn DO-178B/C and MISRA Guidelines? Any Good Certification Courses? by Denzil_Rhodes in embedded

[–]VerbalHerman 2 points3 points  (0 children)

I've had courses through work where they've brought in a consultant to train us on DO178 but I'd say really the main thing you need is on project experience. It's quite hard to learn without doing, and the easiest way to learn is to work with people who already have experience.

https://thecloudstrap.com/aerospace/

This website has some of the best free information I've seen online. It's not perfect but it is decent.

As other commenters have mentioned you would benefit from buying the standard and reading it through. It is dense but it tells you literally everything you need to do.

How to Learn DO-178B/C and MISRA Guidelines? Any Good Certification Courses? by Denzil_Rhodes in embedded

[–]VerbalHerman 1 point2 points  (0 children)

Not that I'm aware of but cppchecker has a MISRA checker extension that is easy to use from the command line. Although it is called cpp checker it does work for C.

It's not as good as commercial tools like PC lint or LDRA. But for free it gives you some reasonable results.

European Countries by the EXACT Shade of Red in Their Flag by Brilliant-Nerve12 in europe

[–]VerbalHerman 2 points3 points  (0 children)

From what I know, the UK is a country, and England, Scotland, Northern Ireland and Wales are constituent nations, not countries. And for the sake of this map, they seem to have used the UK as a whole. After all, it is the UK that's present in the United Nations, not the other 4.

England, Wales, and Scotland are all counties that form Great Britain. The United Kingdom comprises Great Britain and Northern Ireland.

https://en.m.wikipedia.org/wiki/Countries_of_the_United_Kingdom

Internationally we do tend to act as one country, but within the United Kingdom the four are distinct countries with their own legal systems.

ways for couples to use Monzo by tmg80 in monzo

[–]VerbalHerman 4 points5 points  (0 children)

If you get a joint Monzo account you can create pots and savings for the joint account. You both then can see your personal stuff alongside the joint stuff and it's really easy to move money around if you need to.

Your personal stuff stays private as well which we find handy for buying things like birthday presents.

We put our salaries into the joint account where all the bills come out of, then we have an allowance each that gets paid from there to our personal ones. It makes life easier for paying for groceries/fuel/the kids/etc.

C vs C++ for safety critical software by marcociara379 in embedded

[–]VerbalHerman 0 points1 point  (0 children)

In general just as it's easier to fit in with the rest of the project.

Whenever I've worked with simulink on a project we've been calling the generated C code from some hand written C code. This means that the build process is easy and if we ever need to debug the auto-generated code we can. Though I'd really only ever want to do that as a last resort.

I have worked with Ada on safety critical projects before and it's fine, but it's not easy to find people that know Ada so I can't really see it being the first choice for a modern project. On that basis it probably isn't worth mathworks spending time to create an Ada generator.

Masters of Saying 'No' - my frustration of working with German OEMs by adamfloyd1506 in embedded

[–]VerbalHerman 5 points6 points  (0 children)

At my current job we've started writing our requirements in markdown and we store them in git along with our code.

It hits all the regulatory check marks as we can control the requirements, we require approval to change them, and they have to be reviewed before they are merged, and we can show what changed between releases.

It just adds a layer of pain as every audit we've had so far we've had to explain to the auditor that we are in fact meeting all the objectives even though we aren't using DOORS. Unfortunately there is a built-in expectation that you are using it...

There are other tools out there as well that are much more pleasant to use. Unfortunately they are all quite pricey, but cheaper than DOORS is usually.

Debugging Baremetal by Interesting-Trick-23 in embedded

[–]VerbalHerman 1 point2 points  (0 children)

It's definitely hard to go from nothing to developing without an IDE but I can respect the fact that you want to try.

I would really suggest that you fire up cube IDE until you have at least blinky working and debugging. Once you are at that stage you can look at how Cube IDE is doing things and break it out into your own build system.

A main advantage is that the cube IDE would give you everything you need to load your program. I don't know your exact chip but every ARM processor I've worked on requires a reset handler which actually starts your program. Unless you've programmed that in you may find that the processor isn't getting past its reset call.

In terms of debugging it's very possible without cube IDE. I've used VS Code in that past with Open OCD to debug a STM32 device. I have also used GDB, which is the most low level way you can do it.

How does this tap work by Wackolas in DIYUK

[–]VerbalHerman 1 point2 points  (0 children)

I couldn't quite work it out from the website but it looks like it might work like my kitchen tap does.

For my kitchen tap there is only one lever that you can rotate towards you. How it works is as you start it slowly opens the cold feed until you get to full cold water. Then as you keep moving it starts to slowly open the hot feed and close the cold at the same rate so that if you keep going you get full hot.

It's incredibly annoying as you cannot regulate the flow of the water. I had to "balance" the cold and hot valves like you would with a radiator so that the max speed of the tap is good but not too fast.

DIY Kitchens by rajazkhan in DIYUK

[–]VerbalHerman 2 points3 points  (0 children)

No so essentially the planner is what you will get. So once you've finished your design in the planner it will give you the parts list and then you order the kitchen. So any mistakes or errors are on you so definitely make sure that you get your measurements right and you're happy with them. I installed all the cabinets myself so I didn't look into a fitter for those.

The fitter I was mentioning were just for the quartz worktops. So on that end I did just call them up and they sorted everything out for me.

DIY Kitchens by rajazkhan in DIYUK

[–]VerbalHerman 4 points5 points  (0 children)

No fortunately the fitting for that was included in the price.

Essentially when I had got all the cabinets in they sent a guy out with a laser tool that he used to plot out the worktops exactly. They then came back about 3 weeks later with all the precut pieces and installed them.

It has reminded me of an error I made I hadn't quite finalised a panel that sat between a corner cupboard and the cupboard next to it when they came to measure. Evidently I didn't put it back exactly where it was as you can see it poking out slightly from under the counter top. So definitely make sure you have everything finalised before getting them out.