Page 1 of 1

Error in basic examples spi_master/lcd

Posted: Fri Nov 01, 2024 9:03 am
by Maksim
Good afternoon, experts. I have such a problem: I started studying SPI with the basic example proposed in the documentation https://github.com/espre ... aster/lcd . When compiling, such an error comes out, I understand that he swears that the function 'spi_bus_dma_memory_alloc' is not declared, but can I take it? Tell me please.
C:/Users/user/Desktop/lcd/main/spi_master_example_main.c: In function 'display_pretty_colors':
C:/Users/user/Desktop/lcd/main/spi_master_example_main.c:380:20: error: implicit declaration of function 'spi_bus_dma_memory_alloc' [-Werror=implicit-function-declaration]
380 | lines = spi_bus_dma_memory_alloc(LCD_HOST, 320 * PARALLEL_LINES * sizeof(uint16_t), 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~
C:/Users/user/Desktop/lcd/main/spi_master_example_main.c:380:18: warning: assignment to 'uint16_t *' {aka 'short unsigned int *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
380 | lines = spi_bus_dma_memory_alloc(LCD_HOST, 320 * PARALLEL_LINES * sizeof(uint16_t), 0);
| ^
cc1.exe: some warnings being treated as errors
ninja: build stopped: subcommand failed.

* The terminal process "c:\Espressif\tools\idf-python\tools\ninja\1.11.1\ninja.exe" terminated with exit code: 1.

Re: Error in basic examples spi_master/lcd

Posted: Sat Nov 02, 2024 6:15 am
by ESP_Sprite
Is the example from the same version of ESP-IDF as the one you are compiling it with?

Re: Error in basic examples spi_master/lcd

Posted: Mon Nov 04, 2024 1:14 am
by Maksim
ESP_Sprite wrote:
Sat Nov 02, 2024 6:15 am
Is the example from the same version of ESP-IDF as the one you are compiling it with?
yes, the versions are the same

Re: Error in basic examples spi_master/lcd

Posted: Mon Nov 04, 2024 7:37 am
by ESP_Sprite
In that case, what specific version are you using?

Re: Error in basic examples spi_master/lcd

Posted: Wed Nov 06, 2024 2:33 am
by Maksim
ESP_Sprite wrote:
Mon Nov 04, 2024 7:37 am
In that case, what specific version are you using?
v5.3.1 git - https://github.com/espressif/esp-idf/tr ... master/lcd

Re: Error in basic examples spi_master/lcd

Posted: Wed Nov 06, 2024 2:39 am
by ESP_Sprite
That example in that version builds cleanly for me. For what chip are you compiling and do you have any specific changes in the sdkconfig?