Skip to content

Issues when compiling with GCC #10

@mavaneerden

Description

@mavaneerden

Issues

The following issues lead to warnings or errors when compiling with MSP430-GCC:

  1. __dma_copy function in fram.h is never defined, and never used. __dma_word_copy is defined and used but not declared anywhere, not even as extern.
  2. GCC complains about invalid (implicit) casts when using the __dma_word_copy function.
  3. Linker errors occur because functions are defined as inline in the header files isrmanager.h and scheduler.h.
  4. In __pers_timer_init, undefined behaviour occurs because arrays are written out of bounds. The same happens in unpack_pdc_to_local
  5. The set_timer function in clk.h is unused and not declared, which leads to a warning.

Solutions

The following solutions for the issues mentioned above have been verified as working with MSP430-GCC:

  1. Change the function name in fram.h to __dma_word_copy and include fram.h in dma.c. Then also include fram.h in thread.c.
  2. Change the return type of __dma_word_copy to void *, and cast to uintptr_t instead of unsigned long.
  3. Remove the inline keywords in the header files.
  4. Split the for loop into 3 loops, one for each timer array.
  5. Replace MAX_TIMER_THREADS with MAX_PDC_THREADS.
  6. Remove the set_timer function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions