Need to read something about "cache" and how it works for the different RAM regions including EXTMEM. Do you have any suggestions where I could find something (beginners level, please . . .)
SCB_MPU_RBAR = 0x00000000 | REGION(i++); // trap NULL pointer deref
SCB_MPU_RASR = DEV_NOCACHE | NOACCESS | SIZE_32B;
SCB_MPU_RBAR = 0x00200000 | REGION(i++); // Boot ROM
SCB_MPU_RASR = MEM_CACHE_WT | READONLY | SIZE_128K;
SCB_MPU_RBAR = 0x20000000 | REGION(i++); // DTCM
SCB_MPU_RASR = MEM_NOCACHE | READWRITE | NOEXEC | SIZE_512K;
SCB_MPU_RBAR = ((uint32_t)&_ebss) | REGION(i++); // trap stack overflow
SCB_MPU_RASR = SCB_MPU_RASR_TEX(0) | NOACCESS | NOEXEC | SIZE_32B;
SCB_MPU_RBAR = 0x20200000 | REGION(i++); // RAM (AXI bus)
SCB_MPU_RASR = MEM_CACHE_WBWA | READWRITE | NOEXEC | SIZE_1M;
SCB_MPU_RBAR = 0x40000000 | REGION(i++); // Peripherals
SCB_MPU_RASR = DEV_NOCACHE | READWRITE | NOEXEC | SIZE_64M;
SCB_MPU_RBAR = 0x60000000 | REGION(i++); // QSPI Flash
SCB_MPU_RASR = MEM_CACHE_WBWA | READONLY | SIZE_16M;
SCB_MPU_RBAR = 0x70000000 | REGION(i++); // FlexSPI2
SCB_MPU_RASR = MEM_CACHE_WBWA | READONLY | NOEXEC | SIZE_256M;
SCB_MPU_RBAR = 0x70000000 | REGION(i++); // FlexSPI2
SCB_MPU_RASR = MEM_CACHE_WBWA | READWRITE | NOEXEC | SIZE_16M;
#define MEM_CACHE_WT SCB_MPU_RASR_TEX(0) | SCB_MPU_RASR_C
#define MEM_CACHE_WB SCB_MPU_RASR_TEX(0) | SCB_MPU_RASR_C | SCB_MPU_RASR_B
#define MEM_CACHE_WBWA SCB_MPU_RASR_TEX(1) | SCB_MPU_RASR_C | SCB_MPU_RASR_B
#define MEM_NOCACHE SCB_MPU_RASR_TEX(1)
Need to read something about "cache" and how it works for the different RAM regions including EXTMEM. Do you have any suggestions where I could find something (beginners level, please . . .)
/usr/local/arduino-1.8.12-teensy/hardware/teensy/avr/libraries/USBHost_t36/adk.cpp: In member function 'void ADK::sendStr(Device_t*, uint8_t, char*)':
/usr/local/arduino-1.8.12-teensy/hardware/teensy/avr/libraries/USBHost_t36/adk.cpp:229:36: warning: invalid conversion from 'uint8_t* {aka unsigned char*}' to 'char*' [-fpermissive]
strcpy(adkbuf, (unsigned char*)str);
^
In file included from /usr/local/arduino-1.8.12-teensy/hardware/tools/arm/arm-none-eabi/include/stdlib.h:11:0,
from /usr/local/arduino-1.8.12-teensy/hardware/teensy/avr/cores/teensy4/WProgram.h:34,
from /tmp/arduino_build_230358/pch/Arduino.h:6:
/usr/local/arduino-1.8.12-teensy/hardware/tools/arm/arm-none-eabi/include/string.h:34:8: note: initializing argument 1 of 'char* strcpy(char*, const char*)'
char *_EXFUN(strcpy,(char *__restrict, const char *__restrict));
^
/usr/local/arduino-1.8.12-teensy/hardware/teensy/avr/libraries/USBHost_t36/adk.cpp:229:36: warning: invalid conversion from 'unsigned char*' to 'const char*' [-fpermissive]
strcpy(adkbuf, (unsigned char*)str);
^
In file included from /usr/local/arduino-1.8.12-teensy/hardware/tools/arm/arm-none-eabi/include/stdlib.h:11:0,
from /usr/local/arduino-1.8.12-teensy/hardware/teensy/avr/cores/teensy4/WProgram.h:34,
from /tmp/arduino_build_230358/pch/Arduino.h:6:
/usr/local/arduino-1.8.12-teensy/hardware/tools/arm/arm-none-eabi/include/string.h:34:8: note: initializing argument 2 of 'char* strcpy(char*, const char*)'
char *_EXFUN(strcpy,(char *__restrict, const char *__restrict));
^
/usr/local/arduino-1.8.12-teensy/hardware/teensy/avr/libraries/USBHost_t36/adk.cpp: In member function 'void ADK::rx_data(const Transfer_t*)':
/usr/local/arduino-1.8.12-teensy/hardware/teensy/avr/libraries/USBHost_t36/adk.cpp:314:42: warning: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
uint8_t *p = (const uint8_t *)transfer->buffer;
^
(which uses USBHost_t36.h) for Teensy-4.1, I am getting the following:
/private/var/folders/tt/hmrg1j897131t24r2zh4ccg00000gn/T/AppTranslocation/CFD3AB6C-2458-499E-B3E1-2AF23C9741AA/d/T-1.52-b5-Arduino1.8.12.app/Contents/Java/hardware/teensy/avr/libraries/USBHost_t36/adk.cpp:229:36: warning: invalid conversion from 'uint8_t* {aka unsigned char*}' to 'char*' [-fpermissive]
strcpy(adkbuf, (unsigned char*)str);
/private/var/folders/tt/hmrg1j897131t24r2zh4ccg00000gn/T/AppTranslocation/CFD3AB6C-2458-499E-B3E1-2AF23C9741AA/d/T-1.52-b5-Arduino1.8.12.app/Contents/Java/hardware/tools/arm/arm-none-eabi/include/string.h:34:8: note: initializing argument 1 of 'char* strcpy(char*, const char*)'
char *_EXFUN(strcpy,(char *__restrict, const char *__restrict));
/private/var/folders/tt/hmrg1j897131t24r2zh4ccg00000gn/T/AppTranslocation/CFD3AB6C-2458-499E-B3E1-2AF23C9741AA/d/T-1.52-b5-Arduino1.8.12.app/Contents/Java/hardware/teensy/avr/libraries/USBHost_t36/adk.cpp:314:42: warning: invalid conversion from 'const uint8_t* {aka const unsigned char*}' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
uint8_t *p = (const uint8_t *)transfer->buffer;
Sketch uses 104416 bytes (9%) of program storage space. Maximum is 1048576 bytes.
Global variables use 24616 bytes (9%) of dynamic memory, leaving 237528 bytes for local variables. Maximum is 262144 bytes.