paoloboatto
Well-known member
I'm using the Snooze library and until now I had only to correct the hal.c file introducing the FLASHMEM instruction and it works fine. Recently it doesn't compile any longer. Here follows part (other parts are similar regarding other GPIO) of the messages from the compiler:
In file included from C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/core_pins.h:32,
from C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/wiring.h:39,
from C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/WProgram.h:46,
from C:\Users\paolo\AppData\Local\arduino\sketches\EE65331FC56A03AF5F9145BC1CBF7652/pch/Arduino.h:6,
from C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Snooze\src\hal\TEENSY_40\SnoozeDigital.h:34,
from C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Snooze\src\hal\TEENSY_40\SnoozeDigital.cpp:10:
C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Snooze\src\hal\TEENSY_40\SnoozeDigital.cpp: In member function 'virtual void SnoozeDigital::enableDriver(uint8_t)':
C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/imxrt.h:5782:35: error: 'reinterpret_cast<IMXRT_GPIO_t*>(1107296256)' is not a constant expression
5782 | #define IMXRT_GPIO6 (*(IMXRT_GPIO_t *)IMXRT_GPIO6_ADDRESS)
| ^
C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/imxrt.h:5783:42: note: in expansion of macro 'IMXRT_GPIO6'
5783 | #define GPIO6_DR (IMXRT_GPIO6.DR)
| ^~~~~~~~~~~
C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Snooze\src\hal\TEENSY_40\SnoozeDigital.cpp:99:35: note: in expansion of macro 'GPIO6_DR'
99 | case ( uint32_t )&GPIO6_DR: {
How can I fix the problem?
Paolo
In file included from C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/core_pins.h:32,
from C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/wiring.h:39,
from C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/WProgram.h:46,
from C:\Users\paolo\AppData\Local\arduino\sketches\EE65331FC56A03AF5F9145BC1CBF7652/pch/Arduino.h:6,
from C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Snooze\src\hal\TEENSY_40\SnoozeDigital.h:34,
from C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Snooze\src\hal\TEENSY_40\SnoozeDigital.cpp:10:
C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Snooze\src\hal\TEENSY_40\SnoozeDigital.cpp: In member function 'virtual void SnoozeDigital::enableDriver(uint8_t)':
C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/imxrt.h:5782:35: error: 'reinterpret_cast<IMXRT_GPIO_t*>(1107296256)' is not a constant expression
5782 | #define IMXRT_GPIO6 (*(IMXRT_GPIO_t *)IMXRT_GPIO6_ADDRESS)
| ^
C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\cores\teensy4/imxrt.h:5783:42: note: in expansion of macro 'IMXRT_GPIO6'
5783 | #define GPIO6_DR (IMXRT_GPIO6.DR)
| ^~~~~~~~~~~
C:\Users\paolo\AppData\Local\Arduino15\packages\teensy\hardware\avr\1.59.0\libraries\Snooze\src\hal\TEENSY_40\SnoozeDigital.cpp:99:35: note: in expansion of macro 'GPIO6_DR'
99 | case ( uint32_t )&GPIO6_DR: {
How can I fix the problem?
Paolo