Hello All,
I have been trying to compile a tensorflow lite for microcontroller example in the Arduino Web Editor, but I got the following compilation issue:
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp: In member function 'int OV767X::begin(int, int, int, int)':
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:18:43: error: 'NRF_P0' was not declared in this scope
#define portInputRegister(P) ((P == 0) ? &NRF_P0->IN : &NRF_P1->IN)
^
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:138:16: note: in expansion of macro 'portInputRegister'
_vsyncPort = portInputRegister(digitalPinToPort(_vsyncPin));
^~~~~~~~~~~~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:18:57: error: 'NRF_P1' was not declared in this scope
#define portInputRegister(P) ((P == 0) ? &NRF_P0->IN : &NRF_P1->IN)
^
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:138:16: note: in expansion of macro 'portInputRegister'
_vsyncPort = portInputRegister(digitalPinToPort(_vsyncPin));
^~~~~~~~~~~~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp: In member function 'void OV767X::readFrame(void*)':
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:244:1: error: 'NRF_GPIO_Type' was not declared in this scope
NRF_GPIO_Type * port;
^~~~~~~~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:244:1: note: suggested alternative: 'NVIC_Type'
NRF_GPIO_Type * port;
^~~~~~~~~~~~~
NVIC_Type
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:244:17: error: 'port' was not declared in this scope
NRF_GPIO_Type * port;
^~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:244:17: note: suggested alternative: 'port_s'
NRF_GPIO_Type * port;
^~~~
port_s
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:246:10: error: 'nrf_gpio_pin_port_decode' was not declared in this scope
port = nrf_gpio_pin_port_decode(&ulPin);
^~~~~~~~~~~~~~~~~~~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp: In member function 'void OV767X::beginXClk()':
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:369:3: error: 'NRF_I2S' was not declared in this scope
NRF_I2S->CONFIG.MCKEN = (I2S_CONFIG_MCKEN_MCKEN_ENABLE << I2S_CONFIG_MCKEN_MCKEN_Pos);
^~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:369:3: note: suggested alternative: 'NUM_I2CS'
NRF_I2S->CONFIG.MCKEN = (I2S_CONFIG_MCKEN_MCKEN_ENABLE << I2S_CONFIG_MCKEN_MCKEN_Pos);
^~~~~~~
NUM_I2CS
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:369:28: error: 'I2S_CONFIG_MCKEN_MCKEN_ENABLE' was not declared in this scope
NRF_I2S->CONFIG.MCKEN = (I2S_CONFIG_MCKEN_MCKEN_ENABLE << I2S_CONFIG_MCKEN_MCKEN_Pos);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:369:61: error: 'I2S_CONFIG_MCKEN_MCKEN_Pos' was not declared in this scope
NRF_I2S->CONFIG.MCKEN = (I2S_CONFIG_MCKEN_MCKEN_ENABLE << I2S_CONFIG_MCKEN_MCKEN_Pos);
^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:370:29: error: 'I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV2' was not declared in this scope
NRF_I2S->CONFIG.MCKFREQ = I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV2 << I2S_CONFIG_MCKFREQ_MCKFREQ_Pos;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:370:68: error: 'I2S_CONFIG_MCKFREQ_MCKFREQ_Pos' was not declared in this scope
NRF_I2S->CONFIG.MCKFREQ = I2S_CONFIG_MCKFREQ_MCKFREQ_32MDIV2 << I2S_CONFIG_MCKFREQ_MCKFREQ_Pos;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:371:26: error: 'I2S_CONFIG_MODE_MODE_MASTER' was not declared in this scope
NRF_I2S->CONFIG.MODE = I2S_CONFIG_MODE_MODE_MASTER << I2S_CONFIG_MODE_MODE_Pos;
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:371:57: error: 'I2S_CONFIG_MODE_MODE_Pos' was not declared in this scope
NRF_I2S->CONFIG.MODE = I2S_CONFIG_MODE_MODE_MASTER << I2S_CONFIG_MODE_MODE_Pos;
^~~~~~~~~~~~~~~~~~~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:373:57: error: 'I2S_PSEL_MCK_PIN_Pos' was not declared in this scope
NRF_I2S->PSEL.MCK = (digitalPinToPinName(_xclkPin) << I2S_PSEL_MCK_PIN_Pos);
^~~~~~~~~~~~~~~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp: In member function 'void OV767X::endXClk()':
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:381:3: error: 'NRF_I2S' was not declared in this scope
NRF_I2S->TASKS_STOP = 1;
^~~~~~~
/home/builder/opt/libraries/latest/harvard_tinymlx_1_2_3_alpha/src/OV767X_TinyMLx.cpp:381:3: note: suggested alternative: 'NUM_I2CS'
NRF_I2S->TASKS_STOP = 1;
^~~~~~~
NUM_I2CS
Error during build: exit status 1
The strange thing is that I have not used that file in my project, and my project was correctly compiled before. Here is the link to the source code: TinyML-Cookbook/09_classification.ino at main · PacktPublishing/TinyML-Cookbook · GitHub
Have you experimented with a similar issue before?
Many thanks for your help.
Gian Marco