esl-epfl / x-heep

eXtendable Heterogeneous Energy-Efficient Platform based on RISC-V
Other
141 stars 75 forks source link

Incompatible Pointer Type Errors with GNU Compiler 14.1.0 #536

Open Ho3eintaji opened 3 months ago

Ho3eintaji commented 3 months ago

There is a bunch of casting issues in the software. When compiling with GNU 11.1.0, which is used for x-heep, it does not run into errors, but when compiling with a higher version, like GNU 14.1.0, which is used for heepatia, the applications are not compiling. Example: example_gpio_intr

JoseCalero commented 3 months ago

1) please, write better issue names as having an issue called "causing issues" is a bit ... useless 2) heepatia or any other xheep derivative is supposed to be adapting to what xheep is having and/or extending that, i.e if extending requires new versions of whatever tool we use, of course these problems are gonna rise 3) the thing you are describing is an issue in heepatia, not in here 4) give a proper reason to upgrade the gnu version

Ho3eintaji commented 3 months ago

Hey Jose,

  1. File: sw/applications/example_gpio_intr/main.c

    • Line: 141
    • Error:
      passing argument 2 of 'gpio_assign_irq_handler' from incompatible pointer type [-Wincompatible-pointer-types]
      gpio_assign_irq_handler( GPIO_INTR, &handler_1 );
                                        ^~~~~~~~~~
                                        void (*)()
    • Expected Type: void * (*)()
    • Actual Type: void (*)()
  2. File: sw/device/lib/sdk/dma/dma_sdk.c

    • Line: 70
    • Error:
      initialization of 'uint8_t *' {aka 'unsigned char *'} from incompatible pointer type 'uint32_t *' {aka 'long unsigned int *'} [-Wincompatible-pointer-types]
      .ptr = dst,
           ^~~