You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • For some reason the following compiles fine on my local EspruinoCompiler, but fails on the online one:

    let c = E.compiledC(`
    // int boop(double)
    
    int boop(double d) {
      return float(d) * 3;
    }
    `);
    
    print('boop:', c.boop(3.5));
    

    Maybe it's a different GCC version? arm-none-eabi-gcc -v gives me:
    gcc version 10.3.1 20210824 (release) (GNU Arm Embedded Toolchain 10.3-2021.10)

    I think fixing it on the online one is just a matter of adding cflags += "-lgcc "; but I can't test that here. It doesn't increase the binary size unnecessarily and is much better than messing with inline assembly.

About

Avatar for Gordon @Gordon started