AI tools for embedded - Page 1
Forum section: electronics / general

author: voltsandjolts
author_rank: Unknown
timestamp: September 25, 2025, 07:43:27 am
content: I know, I know, more AI BS...but I've sometimes found it useful.Here is a possibly interesting tool to help with porting between MCU vendors.I haven't tried it yet. YMMV.https://www.embedded.com/ai-enabled-tool-frees-developers-from-mcu-vendor-lock-ins

author: tggzzz
author_rank: Super Contributor
timestamp: September 25, 2025, 08:14:54 am
content: Quote from: voltsandjolts on September 25, 2025, 07:43:27 amKey questions that need answering before using it...What guarantees does the tool give, if any?What are the consequences of it getting somethingsubtlywrong? Customer dissatisfaction, recalls etc.Could you detect and/or determine that it had made a "mistake"?Is making that determination quicker/slower more/less reliable than doing it by hand?The first and second are standard legal/business qualification issues.The third and fourth are being found to be a problem with AI tools.

author: krish2487
author_rank: Frequent Contributor
timestamp: September 25, 2025, 08:21:42 am
content: Quote from: voltsandjolts on September 25, 2025, 07:43:27 amThat is what CMSIS is supposed to be for isnt it..Granted, the implementation is not the greatest.. but I m not seeing a more thorough use case for it..This smells like a bastard child of arduino and CMSIS tbh...and an obligatory reference to this xkcd

author: woofy
author_rank: Frequent Contributor
timestamp: September 25, 2025, 08:59:48 am
content: It feels like this is trying to solve a problem that doesn't exist.In all my career I've only ever changed processor vendor on a product a couple of times, and that was at major specification uplifts that required the firmware to be overhauled anyway.

author: hans
author_rank: Super Contributor
timestamp: September 25, 2025, 10:02:42 am
content: I'm not sure if I would trust an AI tool to understand all the peripheral constraints and pin planning for me, when in my experience it can't properly read tables and figures yet from datasheets. Software configuration errors are a cheap fix, but its less fun when the pinout is suboptimal.E.g. on most (now older) STM32, it could make a major difference if you used SPI1 or SPI2 when some other DMA stream collides (e.g. ADC, timer). That in turn has consequences for pinout, which may want you to change the colliding peripheral or SPI..And what if I want my ADC to trigger on some hardware event? These are hard things to capture ambiguously too.Firmware design starts here, and I make sure to write down plenty of constraints on the schematic that makes these limitations visible. Does this tool have the knowledge and insight to make these trade-offs automatically?

author: iMo
author_rank: Super Contributor
timestamp: September 25, 2025, 10:08:10 am
content: Frankly, it seems to me the people who are quite critical to the AI tools - especially in programming, embedded inclusive - have never made any programming..AI can easily provide you with 60-80% of the C code straight.In my last experience with C code for stm32 (several thousands lines) I got perhaps 90% of fully functional code which worked ok, no editing needed (year 2025).With python perhaps 95% of all my requests have been 100% functional code (year 2025)..

author: Siwastaja
author_rank: Super Contributor
timestamp: September 25, 2025, 10:08:25 am
content: No way this could ever work. Porting application logic is solved already: just write in portable language e.g. C.Peripherals are the big question. And those require very heavy understanding of the actual application, and serious creativity how to do that with the peripherals available on the destination MCU - if possible at all.Maybe AI could be usable as some sort of first step to find out about possible MCUs with suitable set of peripherals, but actually doing the work I don't believe in, except in trivial cases (which would be trivial anyway).

author: peter-h
author_rank: Super Contributor
timestamp: September 25, 2025, 10:43:49 am
content: Well, this is the "AI" debate againIndeed, one rarely changes the CPU vendor. That chip cost is rarely decisive. Unlike most, I think lessons should be learnt from the covid "screw everybody" days, and that may point you towards a CPU choice which has semi plausible 2nd sources (e.g. STM 32F407 has chinese semi-copies; search for Gigadevice 407 etc). But one would not change for other reasons if one has a working project.I use Claude to find algorithms. For that is works well - obviously because most of them already exist and it can easily dig out one for e.g. drawing a filled rotated rectangle. And these work out of the box, IME.Otherwise, AI (which is not "intelligence" but just clever pattern matching across vast amounts of data) is good for gettingpointersfor further investigation.

author: tggzzz
author_rank: Super Contributor
timestamp: September 25, 2025, 11:06:19 am
content: Quote from: peter-h on September 25, 2025, 10:43:49 amJust so.The problem is that frequently the people who (think they can) benefit from using AI/LLMs are those that cannot assess the validity of the output - even if they think they can. For those that really can, does it the assessment take longer than "just doing it"?There are cases where that can be satisfied, e.g. screening large numbers of proteins for useful effects, with rigorous testing of the remaining possibilities.

author: peter-h
author_rank: Super Contributor
timestamp: September 25, 2025, 11:14:00 am
content: IME, all coders, and most I have worked with were way more clever than me, have spent a great amount of time on google, digging up stuff, mostly from github, and much of that is dud code which somebody got half working and then posted up there. Claude reportedly gets a lot from github...Claude comes up with hilarious comments likeYou're absolutely right! I made an error in the ISR. I was checking and clearing EXTI_PR_PR12 when it should be EXTI_PR_PR12. Let me correct that:Thank you for catching that! The correct way to check and clear the EXTI12 pending bit is:That's when it gave you totally BS code but you bothered to play with it and told it soLooking at the hype around "AI" I reckon most people have totally no clue about how to do research.Hilariously, if you give an EEVBLOG URL to Claude, it reports and it is blocked from fetching it. Lots of websites are now blocking "AI training" access. I've implemented that across a few of mine, to reduce the spurious traffic a bit.

author: tggzzz
author_rank: Super Contributor
timestamp: September 25, 2025, 01:04:55 pm
content: Quote from: peter-h on September 25, 2025, 11:14:00 amYes, LLMs do "think" that apologising profusely is acceptable. Most people regard correctness is important, with stating "I don't know" being much better than emitting random bullshit.Two other forums I know of have reported being hit by botnet crawlers.

author: peter-h
author_rank: Super Contributor
timestamp: September 25, 2025, 09:02:47 pm
content: Everything online is getting scraped 24/7/365. One community site is getting 10-100Hz scrape frequencyThis is largely "AI" training. Cloudflare blocks some of it...One day this "AI" bubble might burst. Sell your Nvidia shares before it doesIt is handy for knocking code together, overall, net, but incorporating this "guessing machine" into development tools is dumb.

author: abeyer
author_rank: Frequent Contributor
timestamp: September 25, 2025, 09:12:47 pm
content: Quote...at the expense of taking an AI tool vendor lock-in. I have some suspicions about which vendors are likely to be more stable and long-lived.

author: tggzzz
author_rank: Super Contributor
timestamp: September 25, 2025, 10:22:33 pm
content: Quote from: peter-h on September 25, 2025, 09:02:47 pmTekwiki was getting hit by 2TB/month and 30000 simultaneous users.TEAnonymous' database was at 150% utilisation from TenCent and Amazon servers. Blocking them reduced the database load to 5%.QuoteThe stock market rises on theappearancethat they are on to future gamechangers. That's reflected in the old stock market proverb "buy on rumour, sell on news".CEOs' bonuses are dependent on stock market valuations. Guess how they will behave.

author: artag
author_rank: Super Contributor
timestamp: September 26, 2025, 01:15:41 am
content: A recent report from one of the AI gurus explained that the hallucinations were because they had designed evaluation tests that marked wrong and unanswered at the same level. Consequently there was no disadvantage to guessing with a slight possibility of getting a lucky correct answer.Taking advantage of this was explained to me at the age of 15 when taking multiple choice tests. I'm pleased they're fixing it but not impressed they took this long to realise what schoolteachers have known for decades. Add to that the confident answers that are there for marketing reasons, and it's easy to see why the recent studies have rated it so poorly.Then there's vibe coding, which appears to have a lot in common with bogosort. Randomly rewrite until the compiler stops complaining, then ship it.

author: Siwastaja
author_rank: Super Contributor
timestamp: September 26, 2025, 06:01:43 am
content: Quote from: artag on September 26, 2025, 01:15:41 amSounds like a made-up, simple explanation for a complex problem. Most of the advance has been exactly in training, so the explanation they all missed something so fundamental and important does not seem plausible. It may be a small contributing factor, but the root cause for hallucination is not in the training - it's that LLMs really "do not understand". They produce statistical output user expects to see.

author: peter-h
author_rank: Super Contributor
timestamp: September 26, 2025, 06:32:44 am
content: Yes exactly. Zero understanding. It is done with clever pattern matching.QuoteThe community site I mentioned, which I run, is certainly in the TB/month area due to malicious traffic alone, although not anywhere near 30k concurrent users.Tencent is blocked entirely in the firewall now, along with Hetzner and some others. AWS is a problem; it is huge! Hundreds of IP ranges, and probably a lot of people browsing via VPNs terminating on AWS.

author: tggzzz
author_rank: Super Contributor
timestamp: September 26, 2025, 06:55:05 am
content: Quote from: artag on September 26, 2025, 01:15:41 amYes.Vibe coding isn't quitethatbogus. It only stops whenyouhaven't spotted it not working. Therefore if you have really good unit tests, vibe coding could be used as part of TDD.Sotto voce: creating really good unit tests is, of course, harder than writing the code in the first place.

author: tggzzz
author_rank: Super Contributor
timestamp: September 26, 2025, 06:57:16 am
content: Quote from: Siwastaja on September 26, 2025, 06:01:43 amYes.We used to think that the advantage of computers over humans was that they followed the instructions exactly.By design, AI/LLM duplicates the fallibility and failings of humans.

author: krish2487
author_rank: Frequent Contributor
timestamp: September 26, 2025, 07:40:36 am
content: Quote from: tggzzz on September 26, 2025, 06:57:16 amIn other words, if you dont trust code that another human being wrote, how do you trust code that an "AI" has generated? Especially an "AI" that has been trained on code written by hundreds of thousands (if not millions) of human coders..

author: tggzzz
author_rank: Super Contributor
timestamp: September 26, 2025, 08:23:24 am
content: Quote from: krish2487 on September 26, 2025, 07:40:36 am... and trained on AI slop. That correctly worries LLM researchers.... and trained on vibe coding gibberish.

author: Siwastaja
author_rank: Super Contributor
timestamp: September 26, 2025, 08:40:09 am
content: As explained numerous times before, "vibe coding" works when* the project is close enough to a "typical example" that appeared many times in training material; not necessarily as a whole, but something which can be combined from a few "usual pieces"* developer is unable to program (at all, or in that specific language for example)* developer is unwilling to learn to do that - e.g. time constraints, prioritizationThat's all OK and I could consider using this paradigm if I have to use an unfamiliar language (to me), with tight schedule, when I see I'm never going to develop using that language in the future anyway (so no need to learn it). Then it's a massive time-saver, possibly orders of magnitude.Last time I asked AI to make me a small awk script to do some CSV data processing. 100% correct answer without needing tweaks. And much more verifiable and trustable than giving the CSV data itself to AI. A minute and running. But if I was more experienced in awk, I would have written it in the same - or even less time. And if I did repeat this same thing without AI maybe 5-10 times myself, spending collectively 10-50 hours with it, then I would be experienced in awk.That's the deal. Choose to become professional in something and become good at it. Expecting AI to be helpfulon thatis a fallacy. The only problem is those inexperienced and unwilling to learntelling others what they should do. Not a new phenomenon - maybe in 2010 we had to listen to bullcrap like "Arduino is how professional electronic product design is done nowadays" and if you disagreed you were a stupid old greybeard. Now everyone see how ridiculous the suggestion was, but that Arduino still has it'sown use casesthat make perfect sense.The problem here is that porting between different microcontrollers is either trivial (when the codebase is written correctly), or very demanding and in peculiar ways, requiring alotof understanding and creativity. It will be a big challenge for "an AI".

author: tggzzz
author_rank: Super Contributor
timestamp: September 26, 2025, 08:46:22 am
content: Quote from: Siwastaja on September 26, 2025, 08:40:09 amCorrect.The problems are finding suitable use cases and defending against zealots pushing technology as a solution to a problem.There are some use cases for LLMs, with caveats. For multiple reasons, too many zealots choose to ignore the caveats.

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 26, 2025, 12:51:09 pm
content: How would you guys feel about "vibe surgery"?

author: nfmax
author_rank: Super Contributor
timestamp: September 26, 2025, 01:00:46 pm
content: Disclosure: I have never used or even looked at LLM AI systems for anything. However, I have found and corrected a ‘bug/corner case’ in code a colleague used AI to generate, about 2 1/2 years ago.Suppose I wrote a comprehensive suite of unit tests. Could one of these systems be asked to write code that passes the tests, with any expectation of success?That might be a better human/machine split

author: tggzzz
author_rank: Super Contributor
timestamp: September 26, 2025, 03:43:09 pm
content: Quote from: nfmax on September 26, 2025, 01:00:46 pmThe resulting code would pass those tests, but... Permute the tests even slightly and nobody can predict whether or not the same input would produce the same output.LLMs ingest stuff, munge it to produce many many weights (a.k.a. frig factors) and connections, and call that the training set. They then munge input using those frig factors and connections, and emit some output. That leads to a fundamental problem with LLMs is that nobody knowswhynorhowthey produce a specific output.The same is true for human brains; the best you can see is the general active areas shown by fMRI scans. Even if you could see an individual neuron firing, it would be impossible to predict the consequences of it firing or not firing.Corollary: nobody can determine the boundary conditions for a decision, e.g.predictwhat inputs will and won't change the output. The best that can be achieved is to suck it and see what happens. In turn that means it is impossible to know thecoverageof the unit tests, nor how close to aboundarya unit test is. Ditto whether adding one more input to the training set will change the output.The TL;DR is that LLMs are fundamentally brittle.Fastening stickers on a stop sign can make an AI misread it.https://arxiv.org/abs/1707.08945Changing a single pixel on an image can make an AI think a horse is a frog.https://arxiv.org/abs/1710.08864Neural networks can be 99.99 percent confident that multicolor static is a picture of a lion.https://arxiv.org/abs/1412.1897Medical images can get modified in a way imperceptible to the human eye so medical scans misdiagnose cancer 100 percent of the time.https://spectrum.ieee.org/the-human-os/biomedical/imaging/medical-imaging-ai-software-vulnerable-to-covert-attacksUseful article with links to decent examples:https://spectrum.ieee.org/ai-failuresTaking all those factors into account, do you think unit tests couldeverbe sufficient? (But thenwewere always taught that you can't test quality into a product). That was discovered 40 years ago with Igor Aleksander's WISARD; youngsters are triumphantly rediscovering the phenomenon.

author: Siwastaja
author_rank: Super Contributor
timestamp: September 26, 2025, 07:02:52 pm
content: Quote from: nfmax on September 26, 2025, 01:00:46 pmPossibly, but that's mostly an academic coffee room discussion. Realistically full test coverage (not only unit tests, but how units integrate to each other and behave as a whole, i.e. integration tests, and that's the difficult part) is impossible for any project of non-trivial complexity... by orders of magnitude. Then add timing quirks, often relevant with microcontroller projects.Writing those tests to perfectly test thedesired outcome- and with full coverage -isthe design work. Itisthe programming. That's exactly the most demanding part. And for such (unrealistically) extreme case of TDD, >95% of work is in the tests. Which means by Amdahl's law the potential time saving by using LLMs for the implementation is <5%. But it really is not since it still requires some guidance.But I'm not a huge believer in TDD. It's nice in theory, doesn't happen much in reality because unfortunately requirements are fluffy and complicated and changing all the time. So now instead of modifying implementation code ad-hoc, you are modifying The Specification and The Tests ad-hoc, and rewriting the implementation all the time. Maybe that could be automated by AI, like unnecessary work usually is.It seems projects where this nastiness is accepted as a sad fact of life, and programmers allowed to use their own common sense, and capable, creative, motivated programmers write the code, end up being most useful. And these programmers cannot be replaced by AI. But AI could very well read their code and comment on it, or they can use AIs to explore some ideas. That is much more fruitful than "vibe coding".

author: voltsandjolts
author_rank: Unknown
timestamp: September 27, 2025, 02:35:29 pm
content: Quote from: tggzzz on September 26, 2025, 03:43:09 pmHah, not much hope for interpreting UK road signs then...

author: SiliconWizard
author_rank: Super Contributor
timestamp: September 27, 2025, 03:06:36 pm
content: Looks like deep learning is not so deep.

author: tggzzz
author_rank: Super Contributor
timestamp: September 27, 2025, 03:27:44 pm
content: I have occasionally found it useful tovisuallysignal that behind a functional GUI is a barely functional application. That allows to work out whether the client wishes to change their mind before too much work is done.The visual clue is that it looks like something sketched on a napkin.Here's an example...That's a skinned fully functional IDESomething similar is needed to indicate the limitations of a vibe coded app.

author: eTobey
author_rank: Super Contributor
timestamp: «Reply #30 on:Todayat 09:40:32 am »
content: Quote from: hans on September 25, 2025, 10:02:42 amIts worse than that:https://www.eevblog.com/forum/chat/ai-intelligence/msg6073235/