← Back to context

Comment by bonoboTP

1 day ago

Did you try this by giving it access to the materials? Human programmers also don't memorize all this stuff. If this is the reason for your calmness it's quite shortsighted.

There are problems when you rely too much on AI generated code, but these shallow dismissals are quite annoying.

I did, the problem is that

1. There can be massive differences between chips which sounds plausibly same and thanks to the way how LLM is working, models are mangling these variations together

2. Registers are often named in very way similar across different manufacturers so models are making up registers in MPC5555 which are coincidentally registers in Renesas processors doing same thing.

3. There are no standard in reference manuals, sometimes there are literally missing chunks of knowledge thanks to translation to English or there are pieces which you can only get from Application Notes which has code as a screenshot.

And then you will find out that all those descriptions are wrong and through trial and error you will get it working in 2 weeks time.

Bonus point: Random people having public Git repositories for obscure processors, but with bad or completely non working implementation of drivers for them. However LLM will just output variation of this garbage on you, because there are 3 public repositories on the whole internet. Sometimes I have a feeling that this must be on purpose to poison the well.

  • Ok but it takes weeks of trial and error for expert humans. If you allow the llm to run the code and see the results and do trial and error, it will also likely figure it out, no?

    • That's not how it works in embedded world. If you set your registers wrong, you can have i.e. double the clock, then your quanta on CAN is not correct (they are half) and you have double the baudrate or set point off. The thing is that LLM does not have implementation of target processor, so it can't run the code nor it has implementation of peripherals so it can't know if CAN driver is implemented correctly or incorrectly.

      1 reply →