GP2040-CE icon indicating copy to clipboard operation
GP2040-CE copied to clipboard

mbedtls build error

Open Poldraunic opened this issue 4 months ago • 4 comments

I get a bunch of errors building latest master.

In file included from /home/joe/programming/GP2040-CE/build/_deps/pico_sdk-src/lib/mbedtls/include/mbedtls/build_info.h:192,
                 from /home/joe/programming/GP2040-CE/build/_deps/pico_sdk-src/lib/mbedtls/include/mbedtls/rsa.h:20,
                 from /home/joe/programming/GP2040-CE/headers/drivers/ps4/PS4Auth.h:5,
                 from /home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp:4:
/home/joe/programming/GP2040-CE/build/_deps/pico_sdk-src/lib/mbedtls/include/mbedtls/check_config.h:748:2: error: #error "MBEDTLS_RSA_C defined, but not all prerequisites"
  748 | #error "MBEDTLS_RSA_C defined, but not all prerequisites"
      |  ^~~~~
/home/joe/programming/GP2040-CE/build/_deps/pico_sdk-src/lib/mbedtls/include/mbedtls/check_config.h:876:2: error: #error "MBEDTLS_SSL_ASYNC_PRIVATE defined, but not all prerequisites"
  876 | #error "MBEDTLS_SSL_ASYNC_PRIVATE defined, but not all prerequisites"
      |  ^~~~~
/home/joe/programming/GP2040-CE/build/_deps/pico_sdk-src/lib/mbedtls/include/mbedtls/check_config.h:1065:2: error: #error "MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH defined, but not all prerequisites"
 1065 | #error "MBEDTLS_SSL_VARIABLE_BUFFER_LENGTH defined, but not all prerequisites"
      |  ^~~~~
/home/joe/programming/GP2040-CE/build/_deps/pico_sdk-src/lib/mbedtls/include/mbedtls/check_config.h:1110:2: error: #error "MBEDTLS_CHECK_PARAMS was removed in Mbed TLS 3.0. See https://github.com/Mbed-TLS/mbedtls/issues/4313"
 1110 | #error "MBEDTLS_CHECK_PARAMS was removed in Mbed TLS 3.0. See https://github.com/Mbed-TLS/mbedtls/issues/4313"
      |  ^~~~~
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp: In member function 'void PS4Auth::keyModeInitialize()':
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp:19:85: error: 'mbedtls_mpi' has no non-static data member named 's'
   19 |     mbedtls_mpi name = { .s=1, .n=size / sizeof(mbedtls_mpi_uint), .p=bytes ## name }; \
      |                                                                                     ^
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp:77:5: note: in expansion of macro 'NEW_CONFIG_MPI'
   77 |     NEW_CONFIG_MPI(N, options.rsaN.bytes, options.rsaN.size)
      |     ^~~~~~~~~~~~~~
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp:19:85: error: 'mbedtls_mpi' has no non-static data member named 's'
   19 |     mbedtls_mpi name = { .s=1, .n=size / sizeof(mbedtls_mpi_uint), .p=bytes ## name }; \
      |                                                                                     ^
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp:78:5: note: in expansion of macro 'NEW_CONFIG_MPI'
   78 |     NEW_CONFIG_MPI(E, options.rsaE.bytes, options.rsaE.size)
      |     ^~~~~~~~~~~~~~
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp:19:85: error: 'mbedtls_mpi' has no non-static data member named 's'
   19 |     mbedtls_mpi name = { .s=1, .n=size / sizeof(mbedtls_mpi_uint), .p=bytes ## name }; \
      |                                                                                     ^
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp:79:5: note: in expansion of macro 'NEW_CONFIG_MPI'
   79 |     NEW_CONFIG_MPI(P, options.rsaP.bytes, options.rsaP.size)
      |     ^~~~~~~~~~~~~~
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp:19:85: error: 'mbedtls_mpi' has no non-static data member named 's'
   19 |     mbedtls_mpi name = { .s=1, .n=size / sizeof(mbedtls_mpi_uint), .p=bytes ## name }; \
      |                                                                                     ^
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp:80:5: note: in expansion of macro 'NEW_CONFIG_MPI'
   80 |     NEW_CONFIG_MPI(Q, options.rsaQ.bytes, options.rsaQ.size)
      |     ^~~~~~~~~~~~~~
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp:81:21: error: too many arguments to function 'void mbedtls_rsa_init(mbedtls_rsa_context*)'
   81 |     mbedtls_rsa_init(&ps4AuthData.rsa_context, MBEDTLS_RSA_PKCS_V21, MBEDTLS_MD_SHA256);
      |     ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/joe/programming/GP2040-CE/build/_deps/pico_sdk-src/lib/mbedtls/include/mbedtls/rsa.h:139:6: note: declared here
  139 | void mbedtls_rsa_init(mbedtls_rsa_context *ctx);
      |      ^~~~~~~~~~~~~~~~
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp: In member function 'void PS4Auth::keyModeProcess()':
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp:108:14: error: 'mbedtls_sha256_ret' was not declared in this scope; did you mean 'mbedtls_sha256_free'?
  108 |         if ( mbedtls_sha256_ret(ps4AuthData.ps4_auth_buffer, 256, hashed_nonce, 0) < 0 ) {
      |              ^~~~~~~~~~~~~~~~~~
      |              mbedtls_sha256_free
/home/joe/programming/GP2040-CE/src/drivers/ps4/PS4Auth.cpp:112:17: error: 'MBEDTLS_RSA_PRIVATE' was not declared in this scope; did you mean 'MBEDTLS_PRIVATE'?
  112 |                 MBEDTLS_RSA_PRIVATE, MBEDTLS_MD_SHA256,
      |                 ^~~~~~~~~~~~~~~~~~~
      |                 MBEDTLS_PRIVATE
[1060/1410] Building CXX object CMakeFiles/GP2040-CE.dir/src/interfaces/i2c/ssd1306/obd_ssd1306.cpp.o
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX.h:7,
                 from /home/joe/programming/GP2040-CE/headers/interfaces/i2c/ssd1306/obd_ssd1306.h:4,
                 from /home/joe/programming/GP2040-CE/src/interfaces/i2c/ssd1306/obd_ssd1306.cpp:1:
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h: In member function 'virtual uint32_t GPGFX_DisplayBase::getPixel(uint8_t, uint8_t)':
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h:21:58: warning: no return statement in function returning non-void [-Wreturn-type]
   21 |         virtual uint32_t getPixel(uint8_t x, uint8_t y) {}
      |                                                          ^
[1063/1410] Building CXX object CMakeFiles/GP2040-CE.dir/src/gp2040aux.cpp.o
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX.h:7,
                 from /home/joe/programming/GP2040-CE/headers/addons/display.h:13,
                 from /home/joe/programming/GP2040-CE/src/gp2040aux.cpp:11:
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h: In member function 'virtual uint32_t GPGFX_DisplayBase::getPixel(uint8_t, uint8_t)':
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h:21:58: warning: no return statement in function returning non-void [-Wreturn-type]
   21 |         virtual uint32_t getPixel(uint8_t x, uint8_t y) {}
      |                                                          ^
In file included from /home/joe/programming/GP2040-CE/src/gp2040aux.cpp:2:
/home/joe/programming/GP2040-CE/headers/gp2040aux.h: In constructor 'GP2040Aux::GP2040Aux()':
/home/joe/programming/GP2040-CE/headers/gp2040aux.h:22:10: warning: 'GP2040Aux::isReady' will be initialized after [-Wreorder]
   22 |     bool isReady;
      |          ^~~~~~~
/home/joe/programming/GP2040-CE/headers/gp2040aux.h:20:16: warning:   'GPDriver* GP2040Aux::inputDriver' [-Wreorder]
   20 |     GPDriver * inputDriver;
      |                ^~~~~~~~~~~
/home/joe/programming/GP2040-CE/src/gp2040aux.cpp:19:1: warning:   when initialized here [-Wreorder]
   19 | GP2040Aux::GP2040Aux() : isReady(false), inputDriver(nullptr) {
      | ^~~~~~~~~
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_UI_screens.h:15,
                 from /home/joe/programming/GP2040-CE/headers/addons/display.h:16:
/home/joe/programming/GP2040-CE/headers/display/ui/screens/ButtonLayoutScreen.h: At global scope:
/home/joe/programming/GP2040-CE/headers/display/ui/screens/ButtonLayoutScreen.h:21:21: warning: 'displayNames' defined but not used [-Wunused-variable]
   21 | static const char * displayNames[INPUT_HISTORY_MAX_MODES][INPUT_HISTORY_MAX_INPUTS] = {
      |                     ^~~~~~~~~~~~
[1066/1410] Building CXX object CMakeFiles/GP2040-CE.dir/src/display/ui/elements/GPWidget.cpp.o
In file included from /home/joe/programming/GP2040-CE/headers/helper.h:7,
                 from /home/joe/programming/GP2040-CE/headers/storagemanager.h:14,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX_UI.h:12,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPWidget.h:5,
                 from /home/joe/programming/GP2040-CE/src/display/ui/elements/GPWidget.cpp:1:
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:103: warning: "I2C0_ENABLED" redefined
  103 |  #define I2C0_ENABLED 1
      | 
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_types.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:4,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX.h:7,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPWidget.h:4:
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:12: note: this is the location of the previous definition
   12 | #define I2C0_ENABLED 0
      | 
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:104: warning: "I2C0_PIN_SDA" redefined
  104 |  #define I2C0_PIN_SDA 0
      | 
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:16: note: this is the location of the previous definition
   16 | #define I2C0_PIN_SDA -1
      | 
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:105: warning: "I2C0_PIN_SCL" redefined
  105 |  #define I2C0_PIN_SCL 1
      | 
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:20: note: this is the location of the previous definition
   20 | #define I2C0_PIN_SCL -1
      | 
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:5:
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h: In member function 'virtual uint32_t GPGFX_DisplayBase::getPixel(uint8_t, uint8_t)':
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h:21:58: warning: no return statement in function returning non-void [-Wreturn-type]
   21 |         virtual uint32_t getPixel(uint8_t x, uint8_t y) {}
      |                                                          ^
[1067/1410] Building CXX object CMakeFiles/GP2040-CE.dir/src/interfaces/i2c/ssd1306/tiny_ssd1306.cpp.o
In file included from /home/joe/programming/GP2040-CE/headers/interfaces/i2c/ssd1306/tiny_ssd1306.h:5,
                 from /home/joe/programming/GP2040-CE/src/interfaces/i2c/ssd1306/tiny_ssd1306.cpp:1:
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h: In member function 'virtual uint32_t GPGFX_DisplayBase::getPixel(uint8_t, uint8_t)':
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h:21:58: warning: no return statement in function returning non-void [-Wreturn-type]
   21 |         virtual uint32_t getPixel(uint8_t x, uint8_t y) {}
      |                                                          ^
/home/joe/programming/GP2040-CE/src/interfaces/i2c/ssd1306/tiny_ssd1306.cpp: In member function 'virtual void GPGFX_TinySSD1306::drawEllipse(uint16_t, uint16_t, uint32_t, uint32_t, uint32_t, uint8_t)':
/home/joe/programming/GP2040-CE/src/interfaces/i2c/ssd1306/tiny_ssd1306.cpp:292:21: warning: comparison of integer expressions of different signedness: 'long int' and 'uint32_t' {aka 'long unsigned int'} [-Wsign-compare]
  292 |         while (y1++ < radiusY) {
      |                ~~~~~^~~~~~~~~
/home/joe/programming/GP2040-CE/src/interfaces/i2c/ssd1306/tiny_ssd1306.cpp:261:14: warning: unused variable 'diff' [-Wunused-variable]
  261 |         long diff = 0;
      |              ^~~~
/home/joe/programming/GP2040-CE/src/interfaces/i2c/ssd1306/tiny_ssd1306.cpp: In member function 'virtual void GPGFX_TinySSD1306::drawBuffer(uint8_t*)':
/home/joe/programming/GP2040-CE/src/interfaces/i2c/ssd1306/tiny_ssd1306.cpp:441:13: warning: variable 'result' set but not used [-Wunused-but-set-variable]
  441 |         int result = -1;
      |             ^~~~~~
/home/joe/programming/GP2040-CE/src/interfaces/i2c/ssd1306/tiny_ssd1306.cpp: In member function 'void GPGFX_TinySSD1306::sendCommands(uint8_t*, uint16_t)':
/home/joe/programming/GP2040-CE/src/interfaces/i2c/ssd1306/tiny_ssd1306.cpp:488:13: warning: unused variable 'result' [-Wunused-variable]
  488 |         int result = _options.i2c->write(_options.address, commands, length, false);
      |             ^~~~~~
[1068/1410] Building CXX object CMakeFiles/GP2040-CE.dir/src/display/ui/elements/GPButton.cpp.o
In file included from /home/joe/programming/GP2040-CE/headers/helper.h:7,
                 from /home/joe/programming/GP2040-CE/headers/storagemanager.h:14,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX_UI.h:12,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPWidget.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPButton.h:4,
                 from /home/joe/programming/GP2040-CE/src/display/ui/elements/GPButton.cpp:1:
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:103: warning: "I2C0_ENABLED" redefined
  103 |  #define I2C0_ENABLED 1
      | 
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_types.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:4,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX.h:7,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPWidget.h:4:
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:12: note: this is the location of the previous definition
   12 | #define I2C0_ENABLED 0
      | 
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:104: warning: "I2C0_PIN_SDA" redefined
  104 |  #define I2C0_PIN_SDA 0
      | 
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:16: note: this is the location of the previous definition
   16 | #define I2C0_PIN_SDA -1
      | 
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:105: warning: "I2C0_PIN_SCL" redefined
  105 |  #define I2C0_PIN_SCL 1
      | 
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:20: note: this is the location of the previous definition
   20 | #define I2C0_PIN_SCL -1
      | 
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:5:
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h: In member function 'virtual uint32_t GPGFX_DisplayBase::getPixel(uint8_t, uint8_t)':
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h:21:58: warning: no return statement in function returning non-void [-Wreturn-type]
   21 |         virtual uint32_t getPixel(uint8_t x, uint8_t y) {}
      |                                                          ^
/home/joe/programming/GP2040-CE/src/display/ui/elements/GPButton.cpp: In member function 'virtual void GPButton::draw()':
/home/joe/programming/GP2040-CE/src/display/ui/elements/GPButton.cpp:22:14: warning: unused variable 'offsetY' [-Wunused-variable]
   22 |     uint16_t offsetY = ((getRenderer()->getDriver()->getMetrics()->height - (uint16_t)((double)(this->getViewport().bottom - this->getViewport().top) * scaleY)) / 2);
      |              ^~~~~~~
[1069/1410] Building CXX object CMakeFiles/GP2040-CE.dir/src/display/ui/elements/GPLever.cpp.o
In file included from /home/joe/programming/GP2040-CE/headers/helper.h:7,
                 from /home/joe/programming/GP2040-CE/headers/storagemanager.h:14,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX_UI.h:12,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPWidget.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPLever.h:4,
                 from /home/joe/programming/GP2040-CE/src/display/ui/elements/GPLever.cpp:1:
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:103: warning: "I2C0_ENABLED" redefined
  103 |  #define I2C0_ENABLED 1
      | 
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_types.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:4,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX.h:7,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPWidget.h:4:
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:12: note: this is the location of the previous definition
   12 | #define I2C0_ENABLED 0
      | 
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:104: warning: "I2C0_PIN_SDA" redefined
  104 |  #define I2C0_PIN_SDA 0
      | 
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:16: note: this is the location of the previous definition
   16 | #define I2C0_PIN_SDA -1
      | 
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:105: warning: "I2C0_PIN_SCL" redefined
  105 |  #define I2C0_PIN_SCL 1
      | 
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:20: note: this is the location of the previous definition
   20 | #define I2C0_PIN_SCL -1
      | 
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:5:
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h: In member function 'virtual uint32_t GPGFX_DisplayBase::getPixel(uint8_t, uint8_t)':
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h:21:58: warning: no return statement in function returning non-void [-Wreturn-type]
   21 |         virtual uint32_t getPixel(uint8_t x, uint8_t y) {}
      |                                                          ^
[1070/1410] Building CXX object CMakeFiles/GP2040-CE.dir/src/display/ui/elements/GPLabel.cpp.o
In file included from /home/joe/programming/GP2040-CE/headers/helper.h:7,
                 from /home/joe/programming/GP2040-CE/headers/storagemanager.h:14,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX_UI.h:12,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPWidget.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPLabel.h:4,
                 from /home/joe/programming/GP2040-CE/src/display/ui/elements/GPLabel.cpp:1:
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:103: warning: "I2C0_ENABLED" redefined
  103 |  #define I2C0_ENABLED 1
      | 
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_types.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:4,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX.h:7,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPWidget.h:4:
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:12: note: this is the location of the previous definition
   12 | #define I2C0_ENABLED 0
      | 
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:104: warning: "I2C0_PIN_SDA" redefined
  104 |  #define I2C0_PIN_SDA 0
      | 
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:16: note: this is the location of the previous definition
   16 | #define I2C0_PIN_SDA -1
      | 
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:105: warning: "I2C0_PIN_SCL" redefined
  105 |  #define I2C0_PIN_SCL 1
      | 
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:20: note: this is the location of the previous definition
   20 | #define I2C0_PIN_SCL -1
      | 
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:5:
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h: In member function 'virtual uint32_t GPGFX_DisplayBase::getPixel(uint8_t, uint8_t)':
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h:21:58: warning: no return statement in function returning non-void [-Wreturn-type]
   21 |         virtual uint32_t getPixel(uint8_t x, uint8_t y) {}
      |                                                          ^
[1071/1410] Building CXX object CMakeFiles/GP2040-CE.dir/src/display/ui/elements/GPScreen.cpp.o
In file included from /home/joe/programming/GP2040-CE/headers/helper.h:7,
                 from /home/joe/programming/GP2040-CE/headers/storagemanager.h:14,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX_UI.h:12,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPWidget.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPScreen.h:6,
                 from /home/joe/programming/GP2040-CE/src/display/ui/elements/GPScreen.cpp:1:
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:103: warning: "I2C0_ENABLED" redefined
  103 |  #define I2C0_ENABLED 1
      | 
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_types.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:4,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX.h:7,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPWidget.h:4:
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:12: note: this is the location of the previous definition
   12 | #define I2C0_ENABLED 0
      | 
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:104: warning: "I2C0_PIN_SDA" redefined
  104 |  #define I2C0_PIN_SDA 0
      | 
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:16: note: this is the location of the previous definition
   16 | #define I2C0_PIN_SDA -1
      | 
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:105: warning: "I2C0_PIN_SCL" redefined
  105 |  #define I2C0_PIN_SCL 1
      | 
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:20: note: this is the location of the previous definition
   20 | #define I2C0_PIN_SCL -1
      | 
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:5:
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h: In member function 'virtual uint32_t GPGFX_DisplayBase::getPixel(uint8_t, uint8_t)':
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h:21:58: warning: no return statement in function returning non-void [-Wreturn-type]
   21 |         virtual uint32_t getPixel(uint8_t x, uint8_t y) {}
      |                                                          ^
[1072/1410] Building CXX object CMakeFiles/GP2040-CE.dir/src/display/ui/elements/GPMenu.cpp.o
In file included from /home/joe/programming/GP2040-CE/headers/helper.h:7,
                 from /home/joe/programming/GP2040-CE/headers/storagemanager.h:14,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX_UI.h:12,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPWidget.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPMenu.h:4,
                 from /home/joe/programming/GP2040-CE/src/display/ui/elements/GPMenu.cpp:1:
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:103: warning: "I2C0_ENABLED" redefined
  103 |  #define I2C0_ENABLED 1
      | 
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_types.h:5,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:4,
                 from /home/joe/programming/GP2040-CE/headers/display/GPGFX.h:7,
                 from /home/joe/programming/GP2040-CE/headers/display/ui/elements/GPWidget.h:4:
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:12: note: this is the location of the previous definition
   12 | #define I2C0_ENABLED 0
      | 
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:104: warning: "I2C0_PIN_SDA" redefined
  104 |  #define I2C0_PIN_SDA 0
      | 
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:16: note: this is the location of the previous definition
   16 | #define I2C0_PIN_SDA -1
      | 
/home/joe/programming/GP2040-CE/configs/Haute42COSMOX/BoardConfig.h:105: warning: "I2C0_PIN_SCL" redefined
  105 |  #define I2C0_PIN_SCL 1
      | 
/home/joe/programming/GP2040-CE/lib/PicoPeripherals/./peripheral_i2c.h:20: note: this is the location of the previous definition
   20 | #define I2C0_PIN_SCL -1
      | 
In file included from /home/joe/programming/GP2040-CE/headers/display/GPGFX_core.h:5:
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h: In member function 'virtual uint32_t GPGFX_DisplayBase::getPixel(uint8_t, uint8_t)':
/home/joe/programming/GP2040-CE/headers/interfaces/i2c/displaybase.h:21:58: warning: no return statement in function returning non-void [-Wreturn-type]
   21 |         virtual uint32_t getPixel(uint8_t x, uint8_t y) {}
      |                                                          ^
/home/joe/programming/GP2040-CE/src/display/ui/elements/GPMenu.cpp: In member function 'virtual void GPMenu::draw()':
/home/joe/programming/GP2040-CE/src/display/ui/elements/GPMenu.cpp:7:18: warning: unused variable 'baseX' [-Wunused-variable]
    7 |         uint16_t baseX = this->x;
      |                  ^~~~~
/home/joe/programming/GP2040-CE/src/display/ui/elements/GPMenu.cpp:8:18: warning: unused variable 'baseY' [-Wunused-variable]
    8 |         uint16_t baseY = this->y;
      |                  ^~~~~
/home/joe/programming/GP2040-CE/src/display/ui/elements/GPMenu.cpp:10:18: warning: unused variable 'menuWidth' [-Wunused-variable]
   10 |         uint16_t menuWidth = this->menuSizeX * 6;
      |                  ^~~~~~~~~
/home/joe/programming/GP2040-CE/src/display/ui/elements/GPMenu.cpp:11:18: warning: unused variable 'menuHeight' [-Wunused-variable]
   11 |         uint16_t menuHeight = this->menuSizeY * 8;
      |                  ^~~~~~~~~~
[1073/1410] Building CXX object CMakeFiles/GP2040-CE.dir/src/gp2040.cpp.o

Any tips?

Poldraunic avatar Aug 14 '25 15:08 Poldraunic

Which version of the Pico SDK?

mikepparks avatar Aug 16 '25 22:08 mikepparks

@mikepparks, not sure. I "used" whatever was downloaded during CMake run.

Poldraunic avatar Aug 17 '25 12:08 Poldraunic

@mikepparks I'm having the same problem, so I can give you the info:

  • GP2040 v0.7.12-Beta2
  • pico-sdk 2.2.0

On the other hand, using GP2040 v0.7.12-Beta2 or GP2040 v0.7.11 with pico-sdk 2.1.1 or 2.1.1-correct-picotool

Details
En el fichero incluido desde /home/daniel/Documentos/pico-sdk/tools/pioasm/gen/parser.hpp:52,
                 desde /home/daniel/Documentos/pico-sdk/tools/pioasm/pio_assembler.h:11,
                 desde /home/daniel/Documentos/pico-sdk/tools/pioasm/main.cpp:8:
/home/daniel/Documentos/pico-sdk/tools/pioasm/pio_types.h:290:5: error: ‘uint8_t’ no nombra a un tipo
  290 |     uint8_t used_gpio_ranges = 0;
      |     ^~~~~~~
/home/daniel/Documentos/pico-sdk/tools/pioasm/pio_types.h:19:1: nota: ‘uint8_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
   18 | #include "pio_enums.h"
  +++ |+#include <cstdint>
   19 | 
En el fichero incluido desde /home/daniel/Documentos/pico-sdk/tools/pioasm/pio_assembler.h:12:
/home/daniel/Documentos/pico-sdk/tools/pioasm/output_format.h:83:9: error: ‘uint8_t’ no nombra a un tipo
   83 |         uint8_t used_gpio_ranges;
      |         ^~~~~~~
/home/daniel/Documentos/pico-sdk/tools/pioasm/output_format.h:1:1: nota: ‘uint8_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
  +++ |+#include <cstdint>
    1 | /*
[  2%] Building C object lib/SNESpad/CMakeFiles/SNESpad.dir/home/daniel/Documentos/pico-sdk/src/common/pico_sync/lock_core.c.o
[  2%] Building C object lib/SNESpad/CMakeFiles/SNESpad.dir/home/daniel/Documentos/pico-sdk/src/common/pico_sync/mutex.c.o
[  2%] Building C object lib/SNESpad/CMakeFiles/SNESpad.dir/home/daniel/Documentos/pico-sdk/src/common/pico_sync/critical_section.c.o
make[5]: *** [CMakeFiles/pioasm.dir/build.make:75: CMakeFiles/pioasm.dir/main.cpp.o] Error 1
make[4]: *** [CMakeFiles/Makefile2:87: CMakeFiles/pioasm.dir/all] Error 2
make[3]: *** [Makefile:136: all] Error 2
make[2]: *** [pico-sdk/src/rp2_common/tinyusb/CMakeFiles/pioasmBuild.dir/build.make:95: pico-sdk/src/rp2_common/tinyusb/pioasm/src/pioasmBuild-stamp/pioasmBuild-build] Error 2
make[1]: *** [CMakeFiles/Makefile2:2762: pico-sdk/src/rp2_common/tinyusb/CMakeFiles/pioasmBuild.dir/all] Error 2
make[1]: *** Se espera a que terminen otras tareas....

In all the cases I didn't have any difference from compiling picotool along GP2040, or having it already installed (2.2.0).

I'm compiling in Manjaro, but afaik I have all the dependencies installed and compiling pico-sdk independently does not returns any error

EDIT

My CMake output is

[daniel@pines GP2040-CE]$ cd build && PICO_SDK_PATH=/home/daniel/Documentos/pico-sdk cmake ..
Using PICO_SDK_PATH from environment ('/home/daniel/Documentos/pico-sdk')
PICO_SDK_PATH is /home/daniel/Documentos/pico-sdk
Target board (PICO_BOARD) is 'pico'.
Using board configuration from /home/daniel/Documentos/pico-sdk/src/boards/include/boards/pico.h
Defaulting platform (PICO_PLATFORM) to 'rp2040' based on PICO_BOARD setting.
-- Defaulting build type to 'Release' since not specified.
Defaulting compiler (PICO_COMPILER) to 'pico_arm_cortex_m0plus_gcc' since not specified.
Configuring toolchain based on PICO_COMPILER 'pico_arm_cortex_m0plus_gcc'
-- Found Git: /usr/bin/git (found version "2.51.0")
GIT_REPO_VERSION is v0.7.12-Beta2
CMAKE_GIT_REPO_VERSION is 0.7.12
GIT_REPO_BUILD_ID is b5eae93
Defaulting PICO_GCC_TRIPLE to 'arm-none-eabi'
-- The C compiler identification is GNU 14.2.0
-- The CXX compiler identification is GNU 14.2.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/arm-none-eabi-gcc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/arm-none-eabi-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/arm-none-eabi-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Submodules updated
-- Not Skipping WebBuild
-- Found Node.js version 22.19.0: /home/daniel/.config/nvm/versions/node/v22.19.0/bin/node
-- Found npm version 10.9.3: /home/daniel/.config/nvm/versions/node/v22.19.0/bin/npm
npm warn deprecated [email protected]: Glob versions prior to v9 are no longer supported

added 535 packages, and audited 536 packages in 11s

112 packages are looking for funding
  run `npm fund` for details

22 vulnerabilities (5 low, 6 moderate, 10 high, 1 critical)

To address issues that do not require attention, run:
  npm audit fix

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.

> [email protected] build
> npm run build-proto && vite build && npm run makefsdata


> [email protected] build-proto
> npx pbjs --no-create --no-encode --no-decode --no-convert --no-verify --no-delimited --sparse -t static-module -w commonjs --path ../lib/nanopb/generator/proto/ ../proto/enums.proto | npx pbts --no-comments -m -o ./src_gen/enums.ts -

vite v4.3.9 building for production...
transforming...
✓ 925 modules transformed.
rendering chunks...
computing gzip size...
build/index.html                     0.94 kB │ gzip:   0.54 kB
build/assets/index-0352c873.css    249.23 kB │ gzip:  34.21 kB
build/assets/index-8f90c7e2.js   1,287.38 kB │ gzip: 392.34 kB

(!) Some chunks are larger than 500 kBs after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 6.64s

> [email protected] makefsdata
> node makefsdata.js

Compressed /assets/index-0352c873.css from 249229 to 34160 bytes (14%)
Compressed /assets/index-8f90c7e2.js from 1326586 to 389900 bytes (29%)
Compressed /favicon.ico from 15406 to 1698 bytes (11%)
Skipping compression of /images/logo.png by file extension
Compressed /index.html from 944 to 528 bytes (56%)
Skipping compression of /manifest.json by file extension
Clonando en 'arduinojson-src'...
HEAD está ahora en 420221f0 Set version to 6.21.2
-- Using default Pico-PIO-USB.
-- Found Python3: /usr/bin/python3.13 (found version "3.13.7") found components: Interpreter
Build type is Release
TinyUSB available at /home/daniel/Documentos/GP2040-CE/lib/tinyusb/hw/bsp/rp2040; enabling build support for USB.
BTstack available at /home/daniel/Documentos/pico-sdk/lib/btstack
cyw43-driver available at /home/daniel/Documentos/pico-sdk/lib/cyw43-driver
mbedtls available at /home/daniel/Documentos/pico-sdk/lib/mbedtls
lwIP available at /home/daniel/Documentos/pico-sdk/lib/lwip
Using picotool from /usr/bin/picotool
-- Configuring done (24.0s)
-- Generating done (0.7s)
-- Build files have been written to: /home/daniel/Documentos/GP2040-CE/build

Patataman avatar Sep 15 '25 19:09 Patataman

I managed to compile it (idk if it works correctly) The main problems seems to be that pico-sdk uses the latest version of mbedTLS which is the 3.x and GP2040 is still using the functions and headers in 2.x

I manually went to the pico-sdk folder and did a checkout to mbedtls-2.28.10 in the mbedtls submodule and the compilation worked

Patataman avatar Sep 18 '25 13:09 Patataman

Does this project reference that dependency version anywhere?

P.S.: Do not forget to run cmake again, for it to detect the new version of mbedTLS submodule you manually checked out.

Plaque-fcc avatar Dec 12 '25 00:12 Plaque-fcc

Well, it might be already fixed with the new release. Apparently this was a problem of having the wrong version with the pico-sdk.

Right now I'm not doing anything related to this, but I if it is not fixed, downloading from scratch and using the correct pico version before anything should fix it

Patataman avatar Dec 14 '25 18:12 Patataman