Ver código fonte

Add FLASHMEM, for assigning functions (not variables) to flash

main
PaulStoffregen 5 anos atrás
pai
commit
5aeeb9ad58
3 arquivos alterados com 3 adições e 0 exclusões
  1. +1
    -0
      keywords.txt
  2. +1
    -0
      teensy4/avr/pgmspace.h
  3. +1
    -0
      teensy4/imxrt1062.ld

+ 1
- 0
keywords.txt Ver arquivo

@@ -30,6 +30,7 @@ transmitterEnable KEYWORD2
attachRts KEYWORD2
attachCts KEYWORD2
PROGMEM LITERAL1
FLASHMEM LITERAL1
DMAMEM LITERAL1
FASTRUN LITERAL1
Serial4 KEYWORD1

+ 1
- 0
teensy4/avr/pgmspace.h Ver arquivo

@@ -28,6 +28,7 @@
#define DMAMEM __attribute__ ((section(".dmabuffers"), used))
#define FASTRUN __attribute__ ((section(".fastrun") ))
#define PROGMEM __attribute__((section(".progmem")))
#define FLASHMEM __attribute__((section(".flashmem")))

#define PGM_P const char *
#define PSTR(str) ({static const char data[] PROGMEM = (str); &data[0];})

+ 1
- 0
teensy4/imxrt1062.ld Ver arquivo

@@ -18,6 +18,7 @@ SECTIONS
KEEP(*(.bootdata))
KEEP(*(.vectors))
KEEP(*(.startup))
*(.flashmem*)
*(.progmem*)
. = ALIGN(4);
KEEP(*(.init))

Carregando…
Cancelar
Salvar