‹ BackHN Continuity

Thread

SDCC – Small Device C Compiler

137 points · 37 comments · lioeters

  1. dmitrygr · · focus · HN ↗
    SDCC has the best OSS 8051 compiler. It is buggy as hell, but it is free. Sometimes that is good enough.
    1. Jyaif · · focus · HN ↗
      What a coincidence, just yesterday I asked an LLM to generate a C compiler for the 8051 because SDCC's output was not optimized. Within an 1.5 hour it was correctly compiling my project at 60% of the size of what SDCC generates. One or 2 quota refreshes later it passed the SDCC test suite and optimized soft floats.

      <a href="https:&#x2F;&#x2F;github.com&#x2F;jyaif&#x2F;cc51" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;jyaif&#x2F;cc51

      1. oasisaimlessly · · focus · HN ↗
        I assume you&#x27;re running that test suite using a 3rd party 8051 emulator to avoid the potential for common-mode errors in both your compiler and emulator resulting in false confidence the compiler&#x27;s correctness?

        &gt; two simulators used for testing, sim51 (a plain 8051) and minitel_sim

        Narrator: No, he was not.

        1. Jyaif · · focus · HN ↗
          &quot;it runs on my device&quot; is my criteria of success here
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.