Skip to content

compile and upload the program #21

Description

@Verni82

Hello, I've tried a lot of ways and unfortunately haven't managed to compile the software and flash it onto the chip. I hope someone can help me.

  1. try: quick way
    I flash the ESP32 with the help of the Arduino(1.8.13) IDE example: OTA Web update in order to use the existing Firmware file. When loading the file, the error message: Wrong Magic Byte appears.

  2. try long way
    I installed Ubuntu on a VM and followed the steps according to the instructions. (I installed Ubuntu on a VM and followed the steps according to the instructions.) After the successful test with the Hello World example, I wanted to create and upload the firmware. I continued with the instructions from the Programmer.md file. I loaded the existing SKConfig and started make flash.
    Ich denke hier gibt es ein Paar probleme mit den Bibliotheken.
    `XX build/main/main.o
    In file included from /home/alex/esp/Firmware/main/main.cpp:33:
    /home/alex/esp/esp-idf/components/esp_event/include/esp_event_loop.h:2:2: warning: #warning "esp_event_loop.h is deprecated, please include esp_event.h instead" [-Wcpp]
    #warning "esp_event_loop.h is deprecated, please include esp_event.h instead"
    ^~~~~~~
    In file included from /home/alex/esp/Firmware/main/main.cpp:41:
    /home/alex/esp/esp-idf/components/esp32/include/rom/rtc.h:1:2: warning: #warning rom/rtc.h is deprecated, please use esp32/rom/rtc.h instead [-Wcpp]
    #warning rom/rtc.h is deprecated, please use esp32/rom/rtc.h instead
    ^~~~~~~
    In file included from /home/alex/esp/Firmware/main/main.cpp:42:
    /home/alex/esp/esp-idf/components/esp32/include/rom/cache.h:1:2: warning: #warning rom/cache.h is deprecated, please use esp32/rom/cache.h instead [-Wcpp]
    #warning rom/cache.h is deprecated, please use esp32/rom/cache.h instead
    ^~~~~~~
    /home/alex/esp/Firmware/main/main.cpp: In function 'void WiimoteTask(void*)':
    /home/alex/esp/Firmware/main/main.cpp:699:8: error: 'UART1' was not declared in this scope
    if (UART1.status.txfifo_cnt == 0 && UART2.status.txfifo_cnt == 0)
    ^~~~~
    /home/alex/esp/Firmware/main/main.cpp:699:40: error: 'UART2' was not declared in this scope
    if (UART1.status.txfifo_cnt == 0 && UART2.status.txfifo_cnt == 0)
    ^~~~~
    /home/alex/esp/Firmware/main/main.cpp:736:8: error: 'UART1' was not declared in this scope
    if (UART1.status.txfifo_cnt == 0) // UART FIFO is zero
    ^~~~~
    /home/alex/esp/Firmware/main/main.cpp: In function 'void WifiInitAccessPoint()':
    /home/alex/esp/Firmware/main/main.cpp:1684:21: warning: 'void tcpip_adapter_init()' is deprecated [-Wdeprecated-declarations]
    tcpip_adapter_init();
    ^
    In file included from /home/alex/esp/esp-idf/components/esp_netif/include/esp_netif.h:35,
    from /home/alex/esp/esp-idf/components/esp_event/include/esp_event_legacy.h:22,
    from /home/alex/esp/esp-idf/components/esp_event/include/esp_event.h:26,
    from /home/alex/esp/esp-idf/components/esp_wifi/include/esp_wifi.h:64,
    from /home/alex/esp/Firmware/main/main.cpp:32:
    /home/alex/esp/esp-idf/components/tcpip_adapter/include/tcpip_adapter.h:34:6: note: declared here
    void tcpip_adapter_init(void) attribute ((deprecated));
    ^~~~~~~~~~~~~~~~~~
    /home/alex/esp/Firmware/main/main.cpp:1684:21: warning: 'void tcpip_adapter_init()' is deprecated [-Wdeprecated-declarations]
    tcpip_adapter_init();
    ^
    In file included from /home/alex/esp/esp-idf/components/esp_netif/include/esp_netif.h:35,
    from /home/alex/esp/esp-idf/components/esp_event/include/esp_event_legacy.h:22,
    from /home/alex/esp/esp-idf/components/esp_event/include/esp_event.h:26,
    from /home/alex/esp/esp-idf/components/esp_wifi/include/esp_wifi.h:64,
    from /home/alex/esp/Firmware/main/main.cpp:32:
    /home/alex/esp/esp-idf/components/tcpip_adapter/include/tcpip_adapter.h:34:6: note: declared here
    void tcpip_adapter_init(void) attribute ((deprecated));
    ^~~~~~~~~~~~~~~~~~
    In file included from /home/alex/esp/esp-idf/components/esp_timer/include/esp_timer.h:45,
    from /home/alex/esp/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:46,
    from /home/alex/esp/esp-idf/components/freertos/include/freertos/portable.h:52,
    from /home/alex/esp/esp-idf/components/freertos/include/freertos/FreeRTOS.h:64,
    from /home/alex/esp/Firmware/main/main.cpp:23:
    /home/alex/esp/Firmware/main/main.cpp:1685:57: warning: 'esp_err_t esp_event_loop_init(system_event_cb_t, void*)' is deprecated [-Wdeprecated-declarations]
    ESP_ERROR_CHECK(esp_event_loop_init(event_handler, NULL));
    ^
    /home/alex/esp/esp-idf/components/esp_common/include/esp_err.h:119:31: note: in definition of macro 'ESP_ERROR_CHECK'
    esp_err_t __err_rc = (x);
    ^
    In file included from /home/alex/esp/esp-idf/components/esp_event/include/esp_event.h:26,
    from /home/alex/esp/esp-idf/components/esp_wifi/include/esp_wifi.h:64,
    from /home/alex/esp/Firmware/main/main.cpp:32:
    /home/alex/esp/esp-idf/components/esp_event/include/esp_event_legacy.h:239:11: note: declared here
    esp_err_t esp_event_loop_init(system_event_cb_t cb, void ctx) attribute ((deprecated));
    ^~~~~~~~~~~~~~~~~~~
    In file included from /home/alex/esp/esp-idf/components/esp_timer/include/esp_timer.h:45,
    from /home/alex/esp/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:46,
    from /home/alex/esp/esp-idf/components/freertos/include/freertos/portable.h:52,
    from /home/alex/esp/esp-idf/components/freertos/include/freertos/FreeRTOS.h:64,
    from /home/alex/esp/Firmware/main/main.cpp:23:
    /home/alex/esp/Firmware/main/main.cpp:1685:57: warning: 'esp_err_t esp_event_loop_init(system_event_cb_t, void
    )' is deprecated [-Wdeprecated-declarations]
    ESP_ERROR_CHECK(esp_event_loop_init(event_handler, NULL));
    ^
    /home/alex/esp/esp-idf/components/esp_common/include/esp_err.h:119:31: note: in definition of macro 'ESP_ERROR_CHECK'
    esp_err_t __err_rc = (x);
    ^
    In file included from /home/alex/esp/esp-idf/components/esp_event/include/esp_event.h:26,
    from /home/alex/esp/esp-idf/components/esp_wifi/include/esp_wifi.h:64,
    from /home/alex/esp/Firmware/main/main.cpp:32:
    /home/alex/esp/esp-idf/components/esp_event/include/esp_event_legacy.h:239:11: note: declared here
    esp_err_t esp_event_loop_init(system_event_cb_t cb, void ctx) attribute ((deprecated));
    ^~~~~~~~~~~~~~~~~~~
    In file included from /home/alex/esp/esp-idf/components/esp_timer/include/esp_timer.h:45,
    from /home/alex/esp/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:46,
    from /home/alex/esp/esp-idf/components/freertos/include/freertos/portable.h:52,
    from /home/alex/esp/esp-idf/components/freertos/include/freertos/FreeRTOS.h:64,
    from /home/alex/esp/Firmware/main/main.cpp:23:
    /home/alex/esp/Firmware/main/main.cpp:1698:65: error: cannot convert 'esp_interface_t' to 'wifi_interface_t'
    ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &WiFiConfig));
    ^
    /home/alex/esp/esp-idf/components/esp_common/include/esp_err.h:119:31: note: in definition of macro 'ESP_ERROR_CHECK'
    esp_err_t __err_rc = (x);
    ^
    In file included from /home/alex/esp/Firmware/main/main.cpp:32:
    /home/alex/esp/esp-idf/components/esp_wifi/include/esp_wifi.h:791:48: note: initializing argument 1 of 'esp_err_t esp_wifi_set_config(wifi_interface_t, wifi_config_t
    )'
    esp_err_t esp_wifi_set_config(wifi_interface_t interface, wifi_config_t *conf);
    ~~~~~~~~~~~~~~~~~^~~~~~~~~
    /home/alex/esp/Firmware/main/main.cpp: In function 'void StartAppCPU()':
    /home/alex/esp/Firmware/main/main.cpp:1877:2: error: 'cpu_configure_region_protection' was not declared in this scope
    cpu_configure_region_protection();
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /home/alex/esp/Firmware/main/main.cpp:1877:2: note: suggested alternative: 'esp_cpu_configure_region_protection'
    cpu_configure_region_protection();
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    esp_cpu_configure_region_protection
    In file included from /home/alex/esp/esp-idf/components/esp_rom/include/esp32/rom/cache.h:18,
    from /home/alex/esp/esp-idf/components/esp32/include/rom/cache.h:2,
    from /home/alex/esp/Firmware/main/main.cpp:42:
    /home/alex/esp/Firmware/main/main.cpp: In function 'void app_main()':
    /home/alex/esp/Firmware/main/main.cpp:1929:31: error: 'DPORT_APPCPU_CTRL_B_REG' was not declared in this scope
    if (!DPORT_GET_PERI_REG_MASK(DPORT_APPCPU_CTRL_B_REG, DPORT_APPCPU_CLKGATE_EN)) {
    ^~~~~~~~~~~~~~~~~~~~~~~
    /home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:186:67: note: in definition of macro 'DPORT_GET_PERI_REG_MASK'
    #define DPORT_GET_PERI_REG_MASK(reg, mask) (DPORT_READ_PERI_REG(reg) & (mask))
    ^~~
    /home/alex/esp/Firmware/main/main.cpp:1929:31: note: suggested alternative: 'DPORT_READ_PERI_REG'
    if (!DPORT_GET_PERI_REG_MASK(DPORT_APPCPU_CTRL_B_REG, DPORT_APPCPU_CLKGATE_EN)) {
    ^~~~~~~~~~~~~~~~~~~~~~~
    /home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:186:67: note: in definition of macro 'DPORT_GET_PERI_REG_MASK'
    #define DPORT_GET_PERI_REG_MASK(reg, mask) (DPORT_READ_PERI_REG(reg) & (mask))
    ^~~
    /home/alex/esp/Firmware/main/main.cpp:1929:56: error: 'DPORT_APPCPU_CLKGATE_EN' was not declared in this scope
    if (!DPORT_GET_PERI_REG_MASK(DPORT_APPCPU_CTRL_B_REG, DPORT_APPCPU_CLKGATE_EN)) {
    ^~~~~~~~~~~~~~~~~~~~~~~
    /home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:186:75: note: in definition of macro 'DPORT_GET_PERI_REG_MASK'
    define DPORT_GET_PERI_REG_MASK(reg, mask) (DPORT_READ_PERI_REG(reg) & (mask))
    ^~~~

/home/alex/esp/Firmware/main/main.cpp:1931:29: error: 'DPORT_APPCPU_CTRL_C_REG' was not declared in this scope
DPORT_CLEAR_PERI_REG_MASK(DPORT_APPCPU_CTRL_C_REG, DPORT_APPCPU_RUNSTALL);
^~~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
#define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t )(addr))) = (uint32_t)(val)
^~~~
/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:180:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
#define DPORT_CLEAR_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)&(~(mask))))
^~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1931:3: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
DPORT_CLEAR_PERI_REG_MASK(DPORT_APPCPU_CTRL_C_REG, DPORT_APPCPU_RUNSTALL);
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1931:29: note: suggested alternative: 'DPORT_READ_PERI_REG'
DPORT_CLEAR_PERI_REG_MASK(DPORT_APPCPU_CTRL_C_REG, DPORT_APPCPU_RUNSTALL);
^~~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
#define _DPORT_WRITE_PERI_REG(addr, val) (
((volatile uint32_t )(addr))) = (uint32_t)(val)
^~~~
/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:180:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
#define DPORT_CLEAR_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)&(~(mask))))
^~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1931:3: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
DPORT_CLEAR_PERI_REG_MASK(DPORT_APPCPU_CTRL_C_REG, DPORT_APPCPU_RUNSTALL);
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1931:54: error: 'DPORT_APPCPU_RUNSTALL' was not declared in this scope
DPORT_CLEAR_PERI_REG_MASK(DPORT_APPCPU_CTRL_C_REG, DPORT_APPCPU_RUNSTALL);
^~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
RT_WRITE_PERI_REG(addr, val) (
((volatile uint32_t *)(addr))) = (uint32_t)(val)
^~~

/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:180:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
#define DPORT_CLEAR_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)&(~(mask))))
^~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1931:3: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
DPORT_CLEAR_PERI_REG_MASK(DPORT_APPCPU_CTRL_C_REG, DPORT_APPCPU_RUNSTALL);
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1931:54: note: suggested alternative: 'GPIO_APPCPU_INT_H'
DPORT_CLEAR_PERI_REG_MASK(DPORT_APPCPU_CTRL_C_REG, DPORT_APPCPU_RUNSTALL);
^~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
RT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
^~~

/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:180:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
#define DPORT_CLEAR_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)&(~(mask))))
^~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1931:3: note: in expansion of macro 'DPORT_CLEAR_PERI_REG_MASK'
DPORT_CLEAR_PERI_REG_MASK(DPORT_APPCPU_CTRL_C_REG, DPORT_APPCPU_RUNSTALL);
^~~~~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1932:27: error: 'DPORT_APPCPU_CTRL_A_REG' was not declared in this scope
DPORT_SET_PERI_REG_MASK(DPORT_APPCPU_CTRL_A_REG, DPORT_APPCPU_RESETTING);
^~~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
#define _DPORT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t )(addr))) = (uint32_t)(val)
^~~~
/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:183:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
#define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
^~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1932:3: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
DPORT_SET_PERI_REG_MASK(DPORT_APPCPU_CTRL_A_REG, DPORT_APPCPU_RESETTING);
^~~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1932:27: note: suggested alternative: 'DPORT_READ_PERI_REG'
DPORT_SET_PERI_REG_MASK(DPORT_APPCPU_CTRL_A_REG, DPORT_APPCPU_RESETTING);
^~~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:67: note: in definition of macro '_DPORT_WRITE_PERI_REG'
#define _DPORT_WRITE_PERI_REG(addr, val) (
((volatile uint32_t )(addr))) = (uint32_t)(val)
^~~~
/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:183:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
#define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
^~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1932:3: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
DPORT_SET_PERI_REG_MASK(DPORT_APPCPU_CTRL_A_REG, DPORT_APPCPU_RESETTING);
^~~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1932:52: error: 'DPORT_APPCPU_RESETTING' was not declared in this scope
DPORT_SET_PERI_REG_MASK(DPORT_APPCPU_CTRL_A_REG, DPORT_APPCPU_RESETTING);
^~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
RT_WRITE_PERI_REG(addr, val) (
((volatile uint32_t *)(addr))) = (uint32_t)(val)
^~~

/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:183:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
#define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
^~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1932:3: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
DPORT_SET_PERI_REG_MASK(DPORT_APPCPU_CTRL_A_REG, DPORT_APPCPU_RESETTING);
^~~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1932:52: note: suggested alternative: 'EXT_CPU_RESET'
DPORT_SET_PERI_REG_MASK(DPORT_APPCPU_CTRL_A_REG, DPORT_APPCPU_RESETTING);
^~~~~~~~~~~~~~~~~~~~~~
/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:154:88: note: in definition of macro '_DPORT_WRITE_PERI_REG'
RT_WRITE_PERI_REG(addr, val) (*((volatile uint32_t *)(addr))) = (uint32_t)(val)
^~~

/home/alex/esp/esp-idf/components/soc/esp32/include/soc/dport_access.h:183:46: note: in expansion of macro 'DPORT_WRITE_PERI_REG'
#define DPORT_SET_PERI_REG_MASK(reg, mask) DPORT_WRITE_PERI_REG((reg), (DPORT_READ_PERI_REG(reg)|(mask)))
^~~~~~~~~~~~~~~~~~~~
/home/alex/esp/Firmware/main/main.cpp:1932:3: note: in expansion of macro 'DPORT_SET_PERI_REG_MASK'
DPORT_SET_PERI_REG_MASK(DPORT_APPCPU_CTRL_A_REG, DPORT_APPCPU_RESETTING);
^~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [/home/alex/esp/esp-idf/make/component_wrapper.mk:292: main.o] Fehler 1
make: *** [/home/alex/esp/esp-idf/make/project.mk:635: component-main-build] Fehler 2`

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions