Error in basic examples spi_master/lcd

Maksim
Posts: 4
Joined: Fri Nov 01, 2024 7:57 am

Error in basic examples spi_master/lcd

Postby Maksim » Fri Nov 01, 2024 9:03 am

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.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: Error in basic examples spi_master/lcd

Postby ESP_Sprite » 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?

Maksim
Posts: 4
Joined: Fri Nov 01, 2024 7:57 am

Re: Error in basic examples spi_master/lcd

Postby Maksim » Mon Nov 04, 2024 1:14 am

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

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: Error in basic examples spi_master/lcd

Postby ESP_Sprite » Mon Nov 04, 2024 7:37 am

In that case, what specific version are you using?

Maksim
Posts: 4
Joined: Fri Nov 01, 2024 7:57 am

Re: Error in basic examples spi_master/lcd

Postby Maksim » Wed Nov 06, 2024 2:33 am

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

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: Error in basic examples spi_master/lcd

Postby ESP_Sprite » Wed Nov 06, 2024 2:39 am

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?

Who is online

Users browsing this forum: No registered users and 64 guests