GitJer / Some-Sipeed-MAIX-GO-k210-stuff

45 stars 14 forks source link

Error compiling all the demos using LCD #4

Closed buitre-buitaker closed 3 years ago

buitre-buitaker commented 4 years ago

Hi!

I am getting this list of errors compiling LCD demo in windows, using:

Below is the error log, any advice please?

C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp: In member function 'void my_ST7789::init()': C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:73:41: error: invalid conversion from 'int' to 'fpioa_function_t' {aka '_fpioa_function'} [-fpermissive] fpioa_set_function(37, FUNC_GPIOHS0 + RST_GPIONUM); In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:5: C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/fpioa.h:912:53: note: initializing argument 2 of 'int fpioa_set_function(int, fpioa_function_t)' int fpioa_set_function(int number, fpioa_function_t function);


C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:74:41: error: invalid conversion from 'int' to 'fpioa_function_t' {aka '_fpioa_function'} [-fpermissive]
     fpioa_set_function(38, FUNC_GPIOHS0 + DCX_GPIONUM);
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:5:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/fpioa.h:912:53: note:   initializing argument 2 of 'int fpioa_set_function(int, fpioa_function_t)'
 int fpioa_set_function(int number, fpioa_function_t function);
                                    ~~~~~~~~~~~~~~~~~^~~~~~~~
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp: At global scope:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:118:37: error: cannot declare member function 'static void my_ST7789::init_rst()' to have static linkage [-fpermissive]
 static void my_ST7789::init_rst(void)
                                     ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:126:38: error: cannot declare member function 'static void my_ST7789::init_dcx()' to have static linkage [-fpermissive]
 static void  my_ST7789::init_dcx(void)
                                      ^
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp: In member function 'void my_ST7789::tft_hard_init()':
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:135:14: note: in expansion of macro 'SPI_CHANNEL'
     spi_init(SPI_CHANNEL, SPI_WORK_MODE_0, SPI_FF_OCTAL, 8, 0);
              ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:230:32: note:   initializing argument 1 of 'void spi_init(spi_device_num_t, spi_work_mode_t, spi_frame_format_t, size_t, uint32_t)'
 void spi_init(spi_device_num_t spi_num, spi_work_mode_t work_mode, spi_frame_format_t frame_format,
               ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:137:37: note: in expansion of macro 'SPI_CHANNEL'
     uint32_t clk = spi_set_clk_rate(SPI_CHANNEL, 20000000);
                                     ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:436:44: note:   initializing argument 1 of 'uint32_t spi_set_clk_rate(spi_device_num_t, uint32_t)'
 uint32_t spi_set_clk_rate(spi_device_num_t spi_num, uint32_t spi_clk);
                           ~~~~~~~~~~~~~~~~~^~~~~~~
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:137:14: warning: unused variable 'clk' [-Wunused-variable]
     uint32_t clk = spi_set_clk_rate(SPI_CHANNEL, 20000000);
              ^~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp: In member function 'void my_ST7789::tft_write_command(uint8_t)':
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:143:14: note: in expansion of macro 'SPI_CHANNEL'
     spi_init(SPI_CHANNEL, SPI_WORK_MODE_0, SPI_FF_OCTAL, 8, 0);
              ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:230:32: note:   initializing argument 1 of 'void spi_init(spi_device_num_t, spi_work_mode_t, spi_frame_format_t, size_t, uint32_t)'
 void spi_init(spi_device_num_t spi_num, spi_work_mode_t work_mode, spi_frame_format_t frame_format,
               ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:145:27: note: in expansion of macro 'SPI_CHANNEL'
     spi_init_non_standard(SPI_CHANNEL, 8, 0, 0, SPI_AITM_AS_FRAME_FORMAT);
                           ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:243:45: note:   initializing argument 1 of 'void spi_init_non_standard(spi_device_num_t, uint32_t, uint32_t, uint32_t, spi_instruction_address_trans_mode_t)'
 void spi_init_non_standard(spi_device_num_t spi_num, uint32_t instruction_length, uint32_t address_length,
                            ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:146:45: note: in expansion of macro 'SPI_CHANNEL'
     spi_send_data_normal_dma(DMAC_CHANNEL0, SPI_CHANNEL, SPI_SLAVE_SELECT, (uint8_t *)(&cmd), 1,SPI_TRANS_CHAR);
                                             ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:424:83: note:   initializing argument 2 of 'void spi_send_data_normal_dma(dmac_channel_number_t, spi_device_num_t, spi_chip_select_t, const void*, size_t, spi_transfer_width_t)'
 void spi_send_data_normal_dma(dmac_channel_number_t channel_num, spi_device_num_t spi_num,
                                                                  ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:112:33: error: invalid conversion from 'int' to 'spi_chip_select_t' {aka '_spi_chip_select'} [-fpermissive]
 #define SPI_SLAVE_SELECT        3
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:146:58: note: in expansion of macro 'SPI_SLAVE_SELECT'
     spi_send_data_normal_dma(DMAC_CHANNEL0, SPI_CHANNEL, SPI_SLAVE_SELECT, (uint8_t *)(&cmd), 1,SPI_TRANS_CHAR);
                                                          ^~~~~~~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:425:49: note:   initializing argument 3 of 'void spi_send_data_normal_dma(dmac_channel_number_t, spi_device_num_t, spi_chip_select_t, const void*, size_t, spi_transfer_width_t)'
                               spi_chip_select_t chip_select,
                               ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp: In member function 'void my_ST7789::tft_write_byte(uint8_t*, uint32_t)':
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:152:14: note: in expansion of macro 'SPI_CHANNEL'
     spi_init(SPI_CHANNEL, SPI_WORK_MODE_0, SPI_FF_OCTAL, 8, 0);
              ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:230:32: note:   initializing argument 1 of 'void spi_init(spi_device_num_t, spi_work_mode_t, spi_frame_format_t, size_t, uint32_t)'
 void spi_init(spi_device_num_t spi_num, spi_work_mode_t work_mode, spi_frame_format_t frame_format,
               ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:154:27: note: in expansion of macro 'SPI_CHANNEL'
     spi_init_non_standard(SPI_CHANNEL, 8, 0, 0, SPI_AITM_AS_FRAME_FORMAT);
                           ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:243:45: note:   initializing argument 1 of 'void spi_init_non_standard(spi_device_num_t, uint32_t, uint32_t, uint32_t, spi_instruction_address_trans_mode_t)'
 void spi_init_non_standard(spi_device_num_t spi_num, uint32_t instruction_length, uint32_t address_length,
                            ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:155:45: note: in expansion of macro 'SPI_CHANNEL'
     spi_send_data_normal_dma(DMAC_CHANNEL0, SPI_CHANNEL, SPI_SLAVE_SELECT, data_buf, length, SPI_TRANS_CHAR);
                                             ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:424:83: note:   initializing argument 2 of 'void spi_send_data_normal_dma(dmac_channel_number_t, spi_device_num_t, spi_chip_select_t, const void*, size_t, spi_transfer_width_t)'
 void spi_send_data_normal_dma(dmac_channel_number_t channel_num, spi_device_num_t spi_num,
                                                                  ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:112:33: error: invalid conversion from 'int' to 'spi_chip_select_t' {aka '_spi_chip_select'} [-fpermissive]
 #define SPI_SLAVE_SELECT        3
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:155:58: note: in expansion of macro 'SPI_SLAVE_SELECT'
     spi_send_data_normal_dma(DMAC_CHANNEL0, SPI_CHANNEL, SPI_SLAVE_SELECT, data_buf, length, SPI_TRANS_CHAR);
                                                          ^~~~~~~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:425:49: note:   initializing argument 3 of 'void spi_send_data_normal_dma(dmac_channel_number_t, spi_device_num_t, spi_chip_select_t, const void*, size_t, spi_transfer_width_t)'
                               spi_chip_select_t chip_select,
                               ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp: In member function 'void my_ST7789::tft_write_half(uint16_t*, uint32_t)':
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:161:14: note: in expansion of macro 'SPI_CHANNEL'
     spi_init(SPI_CHANNEL, SPI_WORK_MODE_0, SPI_FF_OCTAL, 16, 0);
              ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:230:32: note:   initializing argument 1 of 'void spi_init(spi_device_num_t, spi_work_mode_t, spi_frame_format_t, size_t, uint32_t)'
 void spi_init(spi_device_num_t spi_num, spi_work_mode_t work_mode, spi_frame_format_t frame_format,
               ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:163:27: note: in expansion of macro 'SPI_CHANNEL'
     spi_init_non_standard(SPI_CHANNEL, 16, 0, 0, SPI_AITM_AS_FRAME_FORMAT);
                           ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:243:45: note:   initializing argument 1 of 'void spi_init_non_standard(spi_device_num_t, uint32_t, uint32_t, uint32_t, spi_instruction_address_trans_mode_t)'
 void spi_init_non_standard(spi_device_num_t spi_num, uint32_t instruction_length, uint32_t address_length,
                            ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:164:45: note: in expansion of macro 'SPI_CHANNEL'
     spi_send_data_normal_dma(DMAC_CHANNEL0, SPI_CHANNEL, SPI_SLAVE_SELECT,data_buf, length, SPI_TRANS_SHORT);
                                             ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:424:83: note:   initializing argument 2 of 'void spi_send_data_normal_dma(dmac_channel_number_t, spi_device_num_t, spi_chip_select_t, const void*, size_t, spi_transfer_width_t)'
 void spi_send_data_normal_dma(dmac_channel_number_t channel_num, spi_device_num_t spi_num,
                                                                  ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:112:33: error: invalid conversion from 'int' to 'spi_chip_select_t' {aka '_spi_chip_select'} [-fpermissive]
 #define SPI_SLAVE_SELECT        3
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:164:58: note: in expansion of macro 'SPI_SLAVE_SELECT'
     spi_send_data_normal_dma(DMAC_CHANNEL0, SPI_CHANNEL, SPI_SLAVE_SELECT,data_buf, length, SPI_TRANS_SHORT);
                                                          ^~~~~~~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:425:49: note:   initializing argument 3 of 'void spi_send_data_normal_dma(dmac_channel_number_t, spi_device_num_t, spi_chip_select_t, const void*, size_t, spi_transfer_width_t)'
                               spi_chip_select_t chip_select,
                               ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp: In member function 'void my_ST7789::tft_write_word(uint32_t*, uint32_t, uint32_t)':
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:170:14: note: in expansion of macro 'SPI_CHANNEL'
     spi_init(SPI_CHANNEL, SPI_WORK_MODE_0, SPI_FF_OCTAL, 32, 0);
              ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:230:32: note:   initializing argument 1 of 'void spi_init(spi_device_num_t, spi_work_mode_t, spi_frame_format_t, size_t, uint32_t)'
 void spi_init(spi_device_num_t spi_num, spi_work_mode_t work_mode, spi_frame_format_t frame_format,
               ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:172:27: note: in expansion of macro 'SPI_CHANNEL'
     spi_init_non_standard(SPI_CHANNEL, 0, 32, 0, SPI_AITM_AS_FRAME_FORMAT);
                           ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:243:45: note:   initializing argument 1 of 'void spi_init_non_standard(spi_device_num_t, uint32_t, uint32_t, uint32_t, spi_instruction_address_trans_mode_t)'
 void spi_init_non_standard(spi_device_num_t spi_num, uint32_t instruction_length, uint32_t address_length,
                            ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:173:45: note: in expansion of macro 'SPI_CHANNEL'
     spi_send_data_normal_dma(DMAC_CHANNEL0, SPI_CHANNEL, SPI_SLAVE_SELECT,data_buf, length, SPI_TRANS_INT);
                                             ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:424:83: note:   initializing argument 2 of 'void spi_send_data_normal_dma(dmac_channel_number_t, spi_device_num_t, spi_chip_select_t, const void*, size_t, spi_transfer_width_t)'
 void spi_send_data_normal_dma(dmac_channel_number_t channel_num, spi_device_num_t spi_num,
                                                                  ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:112:33: error: invalid conversion from 'int' to 'spi_chip_select_t' {aka '_spi_chip_select'} [-fpermissive]
 #define SPI_SLAVE_SELECT        3
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:173:58: note: in expansion of macro 'SPI_SLAVE_SELECT'
     spi_send_data_normal_dma(DMAC_CHANNEL0, SPI_CHANNEL, SPI_SLAVE_SELECT,data_buf, length, SPI_TRANS_INT);
                                                          ^~~~~~~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:425:49: note:   initializing argument 3 of 'void spi_send_data_normal_dma(dmac_channel_number_t, spi_device_num_t, spi_chip_select_t, const void*, size_t, spi_transfer_width_t)'
                               spi_chip_select_t chip_select,
                               ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp: In member function 'void my_ST7789::tft_fill_data(uint32_t*, uint32_t)':
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:179:14: note: in expansion of macro 'SPI_CHANNEL'
     spi_init(SPI_CHANNEL, SPI_WORK_MODE_0, SPI_FF_OCTAL, 32, 0);
              ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:230:32: note:   initializing argument 1 of 'void spi_init(spi_device_num_t, spi_work_mode_t, spi_frame_format_t, size_t, uint32_t)'
 void spi_init(spi_device_num_t spi_num, spi_work_mode_t work_mode, spi_frame_format_t frame_format,
               ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:181:27: note: in expansion of macro 'SPI_CHANNEL'
     spi_init_non_standard(SPI_CHANNEL, 0, 32, 0, SPI_AITM_AS_FRAME_FORMAT);
                           ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:243:45: note:   initializing argument 1 of 'void spi_init_non_standard(spi_device_num_t, uint32_t, uint32_t, uint32_t, spi_instruction_address_trans_mode_t)'
 void spi_init_non_standard(spi_device_num_t spi_num, uint32_t instruction_length, uint32_t address_length,
                            ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:111:33: error: invalid conversion from 'int' to 'spi_device_num_t' {aka '_spi_device_num'}
-fpermissive]
 #define SPI_CHANNEL             0
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:182:38: note: in expansion of macro 'SPI_CHANNEL'
     spi_fill_data_dma(DMAC_CHANNEL0, SPI_CHANNEL, SPI_SLAVE_SELECT,data_buf, length);
                                      ^~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:407:76: note:   initializing argument 2 of 'void spi_fill_data_dma(dmac_channel_number_t, spi_device_num_t, spi_chip_select_t, const uint32_t*, size_t)'
 void spi_fill_data_dma(dmac_channel_number_t channel_num, spi_device_num_t spi_num, spi_chip_select_t chip_select,
                                                           ~~~~~~~~~~~~~~~~~^~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:8:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.h:112:33: error: invalid conversion from 'int' to 'spi_chip_select_t' {aka '_spi_chip_select'} [-fpermissive]
 #define SPI_SLAVE_SELECT        3
                                 ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:182:51: note: in expansion of macro 'SPI_SLAVE_SELECT'
     spi_fill_data_dma(DMAC_CHANNEL0, SPI_CHANNEL, SPI_SLAVE_SELECT,data_buf, length);
                                                   ^~~~~~~~~~~~~~~~
In file included from C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:3:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\lib\drivers\include/spi.h:407:103: note:   initializing argument 3 of 'void spi_fill_data_dma(dmac_channel_number_t, spi_device_num_t, spi_chip_select_t, const uint32_t*, size_t)'
 void spi_fill_data_dma(dmac_channel_number_t channel_num, spi_device_num_t spi_num, spi_chip_select_t chip_select,
                                                                                     ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp: At global scope:
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:210:44: error: cannot declare member function 'static void my_ST7789::set_dcx_control()' to have static linkage [-fpermissive]
 static void my_ST7789::set_dcx_control(void)
                                            ^
C:\Users\Antonio\Desktop\MAIX_GO\kendryte-standalone-sdk-develop\kendryte-standalone-sdk-develop\src\LCD\my_st7789.cpp:215:41: error: cannot declare member function 'static void my_ST7789::set_dcx_data()' to have static linkage [-fpermissive]
 static void my_ST7789::set_dcx_data(void)
                                         ^
make[2]: *** [CMakeFiles\LCD.dir\build.make:140: CMakeFiles/LCD.dir/src/LCD/my_st7789.cpp.obj] Error 1
make[1]: *** [CMakeFiles\Makefile2:73: CMakeFiles/LCD.dir/all] Error 2
make: *** [Makefile:83: all] Error 2
GitJer commented 3 years ago

Sorry for this very, very late answer. It seems that you have to set the -fpermissive compiler flag somewhere. Also see the home page of this repository under "Compiling". Hope this helps