Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

Arduino ssd1306

Hello,

I added the library to my mos.yml file

libs:
 - origin: https://github.com/mongoose-os-libs/arduino-adafruit-ssd1306
...
build_vars:
...
  MGOS_ENABLE_ARDUINO_API: 1

I compile with: mos build --arch esp32

What do I wrong ?

Regards
Holger

I receive plenty of errors:

CC src/crypto/crypto_internal-rsa.o
CC mgos_arduino_spi_c.o
CC core/timers.o
CC src/crypto/des-internal.o
AR libsoc.a
CXX mgos_arduino_spi.o
In file included from /tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-compat/src/WString.h:30:0,
                 from /tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-compat/src/Print.h:27,
                 from /tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.h:6,
                 from /tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.cpp:34:
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.cpp: In member function 'void Adafruit_GFX::drawChar(int16_t, int16_t, unsigned char, uint16_t, uint16_t, uint8_t)':
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-compat/src/pgmspace.h:46:61: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
 #define pgm_read_dword(addr)  (*(const unsigned long *)(addr))
                                                             ^
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.cpp:60:42: note: in expansion of macro 'pgm_read_dword'
  #define pgm_read_pointer(addr) ((void *)pgm_read_dword(addr))
                                          ^
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.cpp:753:43: note: in expansion of macro 'pgm_read_pointer'
         GFXglyph *glyph  = &(((GFXglyph *)pgm_read_pointer(&gfxFont->glyph))[c]);
                                           ^
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-compat/src/pgmspace.h:46:61: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
 #define pgm_read_dword(addr)  (*(const unsigned long *)(addr))
                                                             ^
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.cpp:60:42: note: in expansion of macro 'pgm_read_dword'
  #define pgm_read_pointer(addr) ((void *)pgm_read_dword(addr))
                                          ^
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.cpp:754:39: note: in expansion of macro 'pgm_read_pointer'
         uint8_t  *bitmap = (uint8_t *)pgm_read_pointer(&gfxFont->bitmap);
                                       ^
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.cpp: In member function 'virtual size_t Adafruit_GFX::write(uint8_t)':
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-compat/src/pgmspace.h:46:61: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
 #define pgm_read_dword(addr)  (*(const unsigned long *)(addr))
                                                             ^
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.cpp:60:42: note: in expansion of macro 'pgm_read_dword'
  #define pgm_read_pointer(addr) ((void *)pgm_read_dword(addr))
                                          ^
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.cpp:837:50: note: in expansion of macro 'pgm_read_pointer'
                 GFXglyph *glyph = &(((GFXglyph *)pgm_read_pointer(
                                                  ^
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.cpp: In member function 'void Adafruit_GFX::charBounds(char, int16_t*, int16_t*, int16_t*, int16_t*, int16_t*, int16_t*)':
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-compat/src/pgmspace.h:46:61: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
 #define pgm_read_dword(addr)  (*(const unsigned long *)(addr))
                                                             ^
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.cpp:60:42: note: in expansion of macro 'pgm_read_dword'
  #define pgm_read_pointer(addr) ((void *)pgm_read_dword(addr))
                                          ^
/tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_995674133/libs/arduino-adafruit-gfx/src/Adafruit_GFX.cpp:952:50: note: in expansion of macro 'pgm_read_pointer'
                 GFXglyph *glyph = &(((GFXglyph *)pgm_read_pointer

Comments

  • rojerrojer Dublin, Ireland

    these are warnings, not errors. firmware should still build.

  • The firmware was not build.

    This Error comes later:

    CC bluedroid/btc/profile/std/a2dp/btc_media_task.o
    CC mgos_arduino_adafruit_ssd1306_c.o
    CXX mgos_arduino_ssd1306.o
    CXX Adafruit_SSD1306.o
    /tmp/fwbuild-volumes/users/test/mjs_hello/build_requests/build_req_541605089/libs/arduino-adafruit-ssd1306/src/Adafruit_SSD1306.cpp:28:25: fatal error: util/delay.h: No such file or directory
    compilation terminated.
    make[1]: *** [Adafruit_SSD1306.o] Error 1
    /mongoose-os/fw/platforms/esp32/src/component.mk:157: recipe for target 'Adafruit_SSD1306.o' failed
    make[1]: *** Waiting for unfinished jobs....
    CC bluedroid/btc/profile/std/a2dp/btc_avk.o
    CC mgos_rpc_channel_uart.o
    CC bluedroid/btc/profile/std/avrc/btc_avrc.o
    CC bluedroid/stack/btm/btm_ble_batchscan.o
    CC bluedroid/stack/btm/btm_ble_cont_energy.o
  • ruru
    edited June 2017

    @Capsicum, please don't use 'MGOS_ENABLE_ARDUINO_API: 1' (removed).

    https://github.com/mongoose-os-apps/c-arduino-adafruit-ssd1306/blob/master/mos.yml

  • Hello,

    I cloned the github example from obove.
    I did:
    mos build --arch esp32

    I receive still the following error:

    CXX Adafruit_SSD1306.o
    CC core/ipv4/ip4.o
    CC mgos_rpc_channel_uart.o
    CC bluedroid/bta/sdp/bta_sdp_api.o
    CC bluedroid/bta/av/bta_av_api.o
    /tmp/fwbuild-volumes/users/test/c-arduino-adafruit-ssd1306/build_requests/build_req_716845329/libs/arduino-adafruit-ssd1306/src/Adafruit_SSD1306.cpp:28:25: fatal error: util/delay.h: No such file or directory
    compilation terminated.
    /mongoose-os/fw/platforms/esp32/src/component.mk:157: recipe for target 'Adafruit_SSD1306.o' failed
    make[1]: *** [Adafruit_SSD1306.o] Error 1
    make[1]: *** Waiting for unfinished jobs....
    CC spi_slave.o
    CC i2s.o
    CC bluedroid/bta/av/bta_av_ssm.o
    CC bluedroid/bta/av/bta_av_cfg.o
    CC core/ipv4/autoip.o
    CC bluedroid/bta/av/bta_av_ci.o
  • edited June 2017

    @Capsicum , yes there was a subtle bug in mos tool which caused this problem during remote build. Please try again, now it should work.
    Thanks for reporting!

  • It works now.

    Thanks to all for the support.

Sign In or Register to comment.