ElectronicCats / badge-dragonJARCon-2024

Badge Oficial DragonJAR 2024
4 stars 1 forks source link

error: implicit declaration of function 'oled_driver_set_encrypt_value' [-Werror=implicit-function-declaration] #2

Closed Alevsk closed 5 days ago

Alevsk commented 1 week ago

Hi, following the steps on https://github.com/ElectronicCats/Minino/issues/12 (using v5.3.1 version of esp-idf) allowed me to compile the MININO firmware.

Then, I follow the documentation here https://github.com/ElectronicCats/badge-dragonJARCon-2024/blob/main/firmware/README.md, set the environment variable export MININO_PATH=/Users/user/Minino/firmware, run make setup and when I run make compile commands and I'm getting a new error when trying to compile the dragonjarcon badge firmware.

es/__idf_main.dir/apps/infection/infection.c.obj -c /home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c
In file included from /home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/sbattery/sbattery.h:2,
                 from /home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/include/menus.h:21,
                 from /home/alevsk/Development/Minino/firmware/main/modules/menus_module/menus_module.h:3,
                 from /home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/engine.h:4,
                 from /home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c:2:
/home/alevsk/Development/Minino/firmware/main/general/bitmaps_general.h:132:38: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  132 | unsigned char* epd_startup_logo[] = {epd_bitmap_minino_text_logo,
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alevsk/Development/Minino/firmware/main/general/bitmaps_general.h:133:38: warning: initialization discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  133 |                                      epd_bitmap_face_logo};
      |                                      ^~~~~~~~~~~~~~~~~~~~
In file included from /home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c:5:
/home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/modules/badge_pairing/badge_pairing.h:22:1: warning: parameter names (without types) in function declaration
   22 | typedef void (*badge_pairing_event_cb_t)(badge_pairing_ctx_t);
      | ^~~~~~~
/home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c: In function 'set_encrypt_value':
/home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c:61:3: error: implicit declaration of function 'oled_driver_set_encrypt_value' [-Werror=implicit-function-declaration]
   61 |   oled_driver_set_encrypt_value(value);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c: In function 'set_typography_value':
/home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c:69:3: error: implicit declaration of function 'oled_driver_set_typography_value' [-Werror=implicit-function-declaration]
   69 |   oled_driver_set_typography_value(value);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c: In function 'send_virus_cmd':
/home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c:232:22: warning: passing argument 1 of 'badge_connect_send' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  232 |   badge_connect_send(ESPNOW_ADDR_BROADCAST, &virus_cmd, sizeof(virus_cmd_t));
      |                      ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c:4:
/home/alevsk/Development/badge-dragonJARCon-2024/firmware/components/badge_connect/include/badge_connect.h:115:34: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'const uint8_t *' {aka 'const unsigned char *'}
  115 | void badge_connect_send(uint8_t* addr, void* data, size_t data_size);
      |                         ~~~~~~~~~^~~~
/home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c: At top level:
/home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c:235:13: warning: 'send_master_cure' defined but not used [-Wunused-function]
  235 | static void send_master_cure() {}
      |             ^~~~~~~~~~~~~~~~
/home/alevsk/Development/badge-dragonJARCon-2024/firmware/main/apps/infection/infection.c:125:13: warning: 'print_vaccine' defined but not used [-Wunused-function]
  125 | static void print_vaccine(vaccine_t vaccine) {
      |             ^~~~~~~~~~~~~
/home/alevsk/Development/Minino/firmware/main/general/bitmaps_general.h:116:29: warning: 'arrows_bitmap_arr' defined but not used [-Wunused-variable]
  116 | static const unsigned char* arrows_bitmap_arr[] = {
      |                             ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the /home/alevsk/Development/badge-dragonJARCon-2024/firmware/build/log/idf_py_stderr_output_205831 and /home/alevsk/Development/badge-dragonJARCon-2024/firmware/build/log/idf_py_stdout_output_205831
make: *** [Makefile:14: compile] Error 2

From the error it seems that a couple of functions have not been declared and that's what is failing during compilation process

error: implicit declaration of function 'oled_driver_set_encrypt_value' [-Werror=implicit-function-declaration]
...
error: implicit declaration of function 'oled_driver_set_typography_value' [-Werror=implicit-function-declaration]
Elizabeth-0 commented 1 week ago

Hi Lenin,

It was a documentation issue, but it's now fixed. Please update the Minino repo before initiating the new build on the Dragon badge, follow the steps in the documentation again, and check if the issue persists.

Have a nice day!

Alevsk commented 1 week ago

Hi Lenin,

It was a documentation issue, but it's now fixed. Please update the Minino repo before initiating the new build on the Dragon badge, follow the steps in the documentation again, and check if the issue persists.

Have a nice day!

Hi, the Minino repo is working fine now. I can confirm make setup and make compile works correctly on the https://github.com/ElectronicCats/Minino/ codebase.

However the issue I'm now is in the https://github.com/ElectronicCats/badge-dragonJARCon-2024 repo. The issue seems to be the oled_driver_set_encrypt_value and oled_driver_set_typography_value functions are missing in the codebase.

Screenshot 2024-10-12 9 27 27 PM

Screenshot 2024-10-12 9 28 12 PM

JahazielLem commented 1 week ago

Hi Lenin. Because we use the Minino firmware as base of the function of the badge, so you need to fetch and pull the Minino repo to update the components, and re build the firmware in the badge. We update the Minino repo with the change to compile the Badges firmware, so with this you can build the firmware of the dragon badge.

Alevsk commented 5 days ago

Hi Lenin. Because we use the Minino firmware as base of the function of the badge, so you need to fetch and pull the Minino repo to update the components, and re build the firmware in the badge. We update the Minino repo with the change to compile the Badges firmware, so with this you can build the firmware of the dragon badge.

Thanks for your guidance, I can confirm pulling the latest changes from the minino repo allow me to compile and flash the latest firmware for the dragonJARCon badge