Browse Source

Fix for GCC generating bad code for DMAChannel TCD access when it can't prove alignment.

teensy4-core
Tilo Nitzsche 7 years ago
parent
commit
0288b22167
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      teensy3/DMAChannel.h

+ 2
- 2
teensy3/DMAChannel.h View File

@@ -41,7 +41,7 @@ extern uint16_t dma_channel_allocated_mask;

class DMABaseClass {
public:
typedef struct __attribute__((packed)) {
typedef struct __attribute__((packed, aligned(4))) {
volatile const void * volatile SADDR;
int16_t SOFF;
union { uint16_t ATTR;
@@ -589,7 +589,7 @@ void DMAPriorityOrder(DMAChannel &ch1, DMAChannel &ch2, DMAChannel &ch3, DMAChan

class DMABaseClass {
public:
typedef struct __attribute__((packed)) {
typedef struct __attribute__((packed, aligned(4))) {
volatile const void * volatile SAR;
volatile void * volatile DAR;
volatile uint32_t DSR_BCR;

Loading…
Cancel
Save