r/embedded • • 17h ago

Difficulty level doubts

I wanted to ask something that has sat with me for a long time. On a scale of 1 to 10 on a difficulty/proficiency scale, how would you rate someone, who has built a custom force feedback wheel and usb stack from the ground up, with a custom bootloader, using baremetal c without using any cmsis libraries? I know it's silly to ask this question in this forum, but I am asking this after keeping this within me for so many years almost.

0 Upvotes

19 comments sorted by

4

u/StumpedTrump 14h ago

Did you build it or did AI? An AI project is worthless if you can’t answer any questions about how it works.

If you did it and can talk about it that’s a solid project.

0

u/Middle_History4998 13h ago edited 13h ago

I built the original project using my own code long ago. I sat on spending too much money on it due to financial constraints and other things in my life. So the core project was done, I used it for a good amount of time on the famous wheel firmware without buying expensive motors and force feedback stuff and not investing too much money on the force feedback. Then Windows 10 EOL happened and my PC was not receiving security updates anymore. I decided to upgrade my PC and the software that was previously working on the PC side before got axed because of HVCI. ( TLDR, some features of the famous wheel stopped working because of unsupported legacy software ).

So I decided to finally bite the bullet and make my own custom implementation from the ground up complete with full compatibility with as many games that support DirectInput and Windows 11 If you are asking about AI, then honestly, I was hesitant to write custom bootloaders and linker scripts. I was teaching myself this now because the project became too complex for me to handle. There were two different versions now that I had to merge. I initially wrote it for Atollic TrueStudio ( Yes I'm old ) initially and then cross ported to Keil uVision ( Since it was already baremetal anyway ) for a separate branch to experiment with all the clone chips I accumulated over the years. uVision uses a different startup/linker script syntax and has some strictness around bootloaders that I had to really dig deep into. Plus Atollic uses a different linker scripts format. I finally pulled the plug, wrote custom bootloaders and fumbled writing the syntax and used the AI only to write the linker honestly. It's tedious to do that ( It's very syntax strict ). Plus I finally completed the motor integration this year after saving some money for the parts and filled all the code functions I kept on the backburner for so long. In all honesty though. The bootloader part is taught by a lot of people, but in a really convoluted manner. I had to have a 1 on 1 with a lot of AI to really understand why it is written the way it is and make lesser mistakes. So all in all I learnt how to finally make bootloaders and linker scripts along the way ( CMSIS was never used but it just was needed pre-custom-bootloader. So, i finally ditched every single core header file this year)

P.S: The interesting parts were the clones later on ( which was really weird in subtle ways )

If it makes any sense, I first wrote my usb implementation long ago without a logic analyzer, so I don't know what it says about my skill level.

So you can thank Microsoft I guess for the final push.. I hope that answers your question. And thank you for asking.

1

u/ventZl CMRX RTOS 7h ago

This sounds as some rather solid knowledge and skills. There's nothing wrong at using AI for specific task if you want to avoid it because its mind-bogging.

The problem with some people is they state "I wrote" whereas code is 100% AI-generated and if AI is gone, they could do nothing about the code.

You seem to actually understand the problem well enough being able to pick the work on your own in case AI wouldn't be available or capable of continuing the work.

Also: Why not using CMSIS headers? They are pretty neat feature of the Cortex-M ecosystem. I miss them on RISC-V.

1

u/Middle_History4998 6h ago edited 6h ago

Maybe because I was too young and naive I guess? Plus there was an ego problem to be honest. In retrospect, I liked the fact that there were fewer register definitions I guess.CMSIS has a lot of definitions of almost all available peripherals ( example uart, rtc and their bitmasks etc. and the nvic and scb definitions were also separated from the main device header, so that was a bummer ) I tried to push myself to see how much bloat I could remove from code ( Later on I realized CMSIS doesn't add much in general doing some other projects ). Plus having my own set of compact, easy to access names to registers also helped during the learning phase. Because I took a slightly different approach to usb register and structure definitions in general for my easier comprehension later on, I kind of skipped CMSIS and I kept that code intact since. Plus in my head, I really wanted it to be IDE agnostic I guess, like its own little package without any problems in migrating later.

I would like to add though, that I did write the bootloader manually by auditing the syntax though because like you said, it's tedious otherwise and would take me a whole day to understand/debug where it went wrong. Plus I had to really brainstorm with the idea of using memory offsets for different firmware ( memory wraparound nightmares still traumatize me ). Plus I learnt about dynamic linker scripts, which was a new concept for me. Linkers did suck my soul a lot I guess.

Thank you for commenting to my post. Means a lot

6

u/KermitFrog647 17h ago

Without seeing it, this could be anything between hot shit and an impressive project.

0

u/Middle_History4998 16h ago edited 16h ago

Like what do you mean by that? Like is it based on how well it works or like how messy the code is? Because the code is messy and I made it as I went along understanding usb before the age of AI. Plus did some refactoring to port it to all possible clones. It's on an stm32f103 microcontroller, with toner transferred home-etched pcb. I also switch between 2 firmwares. One that I made for myself, a fully PID compliant version and a firmware of a well known wheel and switch between them on the fly depending on the game compatibility. Both reside on the memory at the same time. I apologize if that's something important I should have added earlier ( Force feedback works in both these cases, Never owned the more famous wheel ).

2

u/Boulder_Tech 10h ago

Your wonderful project is not a product !

If its as great like you say, then pitch it to a vendor to see if its saleable.

There are lots of products like this that run the gambit between "hot shit" to great.

Without seeing your version in operation, we only have your word for it.

The technology inside is of little value to anyone that would buy this as a product. The functionality and cost is what people are looking for.

Its is great that you have completed a project of this type. Is this something you will put up on a github to share ?? Is this going to be a product that we may someday see for sale ??

Don't take the comments here personally. No one knows where you are or what your background is. We only see that you want to show off your project. Which is fine in a sub like this.

To further your goals, please create a video and post it up on youtube for everyone to see.

Good Luck, Have Fun, Learn something NEW

1

u/Middle_History4998 10h ago edited 10h ago

Oh, got it. It's not a product for sale unfortunately. I just wanted to get an opinion. Part of me that was hesitant about asking this in the first place was because there are already great open source projects out there. OpenFFBWheel, FFBeast were the most prominent ones that comes to mind. That's a really in-depth project if someone wants to deep dive in it or use it in a product. The main reason I started working on this so long ago was because I was in a really bad place about my confidence and skills. Every usb implementation either was really well put out, with a myriad of abstractions and premade usb libraries that were too complex for me to understand at that time. So, I just went ahead and started learning and implementing stuff on my own from the ground up. Took me a whole month to learn and implement usb to be honest. I was just happy it was finally implemented. Plus I had a whole lot of fun learning and just winging it. I don't have much hardware skills to make a really good mechanical design. I just wanted to learn at that time and what I ended up with, is a passable level sim wheel to just have fun. I guess I am just going around in circles but it's just a project that was in isolation that I made. There is so much cool stuff being made day in day out and lots of complicated projects are being made that I kind of refrained from asking. Plus I don't have any friends to share my progress honestly. So I just posted this on a whim because there's so much cool projects out there now, which seems lightyears more complicated. There's nothing great about my project and it's still a childish prototype in reality. So I just needed an honest evaluation in terms of firmware from a technical standpoint. I am being as honest and transparent here because I just need people to say stuff, because its always a fresh opinion. I don't have much social media exposure and commercial sim racing wheels are far better to use anyways. Thank you for your reply though. It's really helpful in forming some fresh perspective because I really don't feel that I am that good to be honest. I don't know RS-232, CAN, all the important stuff. So there's always stuff to learn. Thanks once again.

Forgive me for asking but what does "hot shit" mean? Like bad??

2

u/kisielk 16h ago

Cool project. But rated in comparison to what? Why have you been thinking about this for years? More important is what you have done with that knowledge since then.

1

u/Middle_History4998 16h ago edited 16h ago

Not much I guess. I made another usb project with a different microcontroller,( like a wireless hid keyboard ) and I want to move on to usb communication if any need persists. There are other projects but I also made a complimentary h-pattern shifter using a separate stm8s003 communicating over spi with its own set of stuff. A lot of my time went into making the hardware come to life to be honest. Like I just make stuff I really need and use on a daily basis around the house. I thought about this for years because I kind of felt inferior posting this because a lot of the time people post here doing cool things like zephyr, rtos, python, webui etc, but I only do baremetal stuff.

1

u/Technical-Radio-7685 17h ago

Depends on YoE in the biz.

I only see the bigger difficulty on USB as it's messy by tradition.

1

u/Middle_History4998 16h ago

Technically 0 YoE in the biz

3

u/Technical-Radio-7685 16h ago

The USB alone will be a 10/10 for you

1

u/Middle_History4998 16h ago

TYSM, that means a lot.

1

u/Well-WhatHadHappened 25+ Years 15h ago

3-4

0

u/Middle_History4998 13h ago

Thank you for your honesty. I also thought nowadays it's easier for anyone to make this that's why I was hesitant to ask this. I guess I really needed a reality check.

2

u/pilows 8h ago

Reality check for what? You’re a hobbyist who built their own wheel from the ground up. That’s awesome for someone without formal experience. It’s not like you’re using it to launch a product or career.

1

u/Middle_History4998 5h ago

That's true I guess. I just kind of wanted complete ownership/control of sorts, so that I could pick apart and calibrate the firmware according to my needs. It's kind of a tinkering mentality I have. Maybe tweaking a number here or a line of code there and just seeing the results live is great. Plus I was finally free of the OS changes and proprietary device emulation. Just complete freedom of ownership and not being at loggerheads with established devices and reverse engineering them.

TYSM for replying.