Author Topic: AI tools for embedded  (Read 6597 times)

0 Members and 1 Guest are viewing this topic.

Online voltsandjoltsTopic starter

  • Supporter
  • ****
  • Posts: 3873
  • Country: gb
AI tools for embedded
« on: September 25, 2025, 07:43:27 am »
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
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 23122
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: AI tools for embedded
« Reply #1 on: September 25, 2025, 08:14:54 am »
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

Key questions that need answering before using it...

  • What guarantees does the tool give, if any?
  • What are the consequences of it getting something subtly wrong? 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.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: tooki

Offline krish2487

  • Frequent Contributor
  • **
  • Posts: 800
  • Country: dk
Re: AI tools for embedded
« Reply #2 on: September 25, 2025, 08:21:42 am »
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

That 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
If god made us in his image,
and we are this stupid
then....
 

Offline woofy

  • Frequent Contributor
  • **
  • Posts: 511
  • Country: gb
    • Woofys Place
Re: AI tools for embedded
« Reply #3 on: September 25, 2025, 08:59:48 am »
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.

Offline hans

  • Super Contributor
  • ***
  • Posts: 2000
  • Country: 00
Re: AI tools for embedded
« Reply #4 on: September 25, 2025, 10:02:42 am »
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?
« Last Edit: September 25, 2025, 10:05:03 am by hans »
 

Offline iMo

  • Super Contributor
  • ***
  • Posts: 6963
  • Country: li
Re: AI tools for embedded
« Reply #5 on: September 25, 2025, 10:08:10 am »
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)..
« Last Edit: September 25, 2025, 10:09:57 am by iMo »
Readers discretion is advised..
 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 11372
  • Country: fi
Re: AI tools for embedded
« Reply #6 on: September 25, 2025, 10:08:25 am »
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).
 
The following users thanked this post: SiliconWizard

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 6102
  • Country: gb
  • Doing electronics since the 1960s...
Re: AI tools for embedded
« Reply #7 on: September 25, 2025, 10:43:49 am »
Well, this is the "AI" debate again :)

Indeed, 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 getting pointers for further investigation.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 23122
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: AI tools for embedded
« Reply #8 on: September 25, 2025, 11:06:19 am »
Well, this is the "AI" debate again :)
...
Otherwise, AI (which is not "intelligence" but just clever pattern matching across vast amounts of data) is good for getting pointers for further investigation.

Just 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.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 6102
  • Country: gb
  • Doing electronics since the 1960s...
Re: AI tools for embedded
« Reply #9 on: September 25, 2025, 11:14:00 am »
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 like

You'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 so :)

Looking 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.
« Last Edit: September 25, 2025, 11:21:35 am by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 23122
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: AI tools for embedded
« Reply #10 on: September 25, 2025, 01:04:55 pm »
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 like

You'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 so :)

Looking 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.

Yes, 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.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 6102
  • Country: gb
  • Doing electronics since the 1960s...
Re: AI tools for embedded
« Reply #11 on: September 25, 2025, 09:02:47 pm »
Everything online is getting scraped 24/7/365. One community site is getting 10-100Hz scrape frequency :) This is largely "AI" training. Cloudflare blocks some of it...

One day this "AI" bubble might burst. Sell your Nvidia shares before it does ;)

It is handy for knocking code together, overall, net, but incorporating this "guessing machine" into development tools is dumb.
« Last Edit: September 25, 2025, 09:05:42 pm by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online abeyer

  • Frequent Contributor
  • **
  • Posts: 962
  • Country: us
Re: AI tools for embedded
« Reply #12 on: September 25, 2025, 09:12:47 pm »
Quote
AI-Enabled Tool Frees Developers from MCU Vendor Lock-ins

...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.
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 23122
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: AI tools for embedded
« Reply #13 on: September 25, 2025, 10:22:33 pm »
Everything online is getting scraped 24/7/365. One community site is getting 10-100Hz scrape frequency :) This is largely "AI" training. Cloudflare blocks some of it...

Tekwiki 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%.

Quote
One day this "AI" bubble might burst. Sell your Nvidia shares before it does ;)

It is handy for knocking code together, overall, net, but incorporating this "guessing machine" into development tools is dumb.

The stock market rises on the appearance that 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.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline artag

  • Super Contributor
  • ***
  • Posts: 1559
  • Country: gb
Re: AI tools for embedded
« Reply #14 on: September 26, 2025, 01:15:41 am »
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.




 
 
The following users thanked this post: tooki

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 11372
  • Country: fi
Re: AI tools for embedded
« Reply #15 on: September 26, 2025, 06:01:43 am »
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.  ... I'm pleased they're fixing it but not impressed they took this long to realise what schoolteachers have known for decades.

Sounds 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.
 
The following users thanked this post: tooki

Offline peter-h

  • Super Contributor
  • ***
  • Posts: 6102
  • Country: gb
  • Doing electronics since the 1960s...
Re: AI tools for embedded
« Reply #16 on: September 26, 2025, 06:32:44 am »
Yes exactly. Zero understanding. It is done with clever pattern matching.

Quote
Tekwiki 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%.

The 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.
« Last Edit: September 26, 2025, 06:49:27 am by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 23122
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: AI tools for embedded
« Reply #17 on: September 26, 2025, 06:55:05 am »
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.

Yes.

Vibe coding isn't quite that bogus. It only stops when you haven'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.  >:D
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 23122
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: AI tools for embedded
« Reply #18 on: September 26, 2025, 06:57:16 am »
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.  ... I'm pleased they're fixing it but not impressed they took this long to realise what schoolteachers have known for decades.

Sounds 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.

Yes.

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.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline krish2487

  • Frequent Contributor
  • **
  • Posts: 800
  • Country: dk
Re: AI tools for embedded
« Reply #19 on: September 26, 2025, 07:40:36 am »
By design, AI/LLM duplicates the fallibility and failings of humans.

In 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..  >:D
If god made us in his image,
and we are this stupid
then....
 
The following users thanked this post: tooki

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 23122
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: AI tools for embedded
« Reply #20 on: September 26, 2025, 08:23:24 am »
By design, AI/LLM duplicates the fallibility and failings of humans.

In 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..  >:D

... and trained on AI slop. That correctly worries LLM researchers.
... and trained on vibe coding gibberish.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 
The following users thanked this post: krish2487

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 11372
  • Country: fi
Re: AI tools for embedded
« Reply #21 on: September 26, 2025, 08:40:09 am »
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, prioritization

That'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 helpful on that is a fallacy. The only problem is those inexperienced and unwilling to learn telling 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's own use cases that 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 a lot of understanding and creativity. It will be a big challenge for "an AI".
« Last Edit: September 26, 2025, 08:43:25 am by Siwastaja »
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 23122
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
Re: AI tools for embedded
« Reply #22 on: September 26, 2025, 08:46:22 am »
That's the deal. Choose to become professional in something and become good at it. Expecting AI to be helpful on that is a fallacy. The only problem is those inexperienced and unwilling to learn telling 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's own use cases that make perfect sense.

Correct.

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.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 17829
  • Country: fr
Re: AI tools for embedded
« Reply #23 on: September 26, 2025, 12:51:09 pm »
How would you guys feel about "vibe surgery"? :-+
 
The following users thanked this post: Siwastaja

Offline nfmax

  • Super Contributor
  • ***
  • Posts: 1701
  • Country: gb
Re: AI tools for embedded
« Reply #24 on: September 26, 2025, 01:00:46 pm »
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
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->