grblHAL / ESP32

grblHAL driver for ESP32
Other
75 stars 43 forks source link

Unable to compile without USE_I2S_OUT #19

Closed petervanderwalt closed 2 years ago

petervanderwalt commented 2 years ago

I am just starting to setup a board definition to experiment with grblHal on ESP32

my pinmap:

#if N_ABC_MOTORS > 1
#error "Axis configuration is not supported!"
#endif

#define BOARD_NAME "Peter's little test"
#define HAS_IOPORTS
//#define HAS_BOARD_INIT

//#define USE_I2S_OUT  //  If I uncomment this and pin definitions, it compiles.  If I comment out I2S compilation fails. 
//#define I2S_OUT_BCK GPIO_NUM_16
//#define I2S_OUT_WS GPIO_NUM_17
//#define I2S_OUT_DATA GPIO_NUM_21

// timer definitions
#define STEP_TIMER_GROUP TIMER_GROUP_0
#define STEP_TIMER_INDEX TIMER_0

// Define step pulse output pins.
#define X_STEP_PIN          GPIO_NUM_12
#define Y_STEP_PIN          GPIO_NUM_27
#define Z_STEP_PIN          GPIO_NUM_15

// Define step direction output pins.
#define X_DIRECTION_PIN     GPIO_NUM_14
#define Y_DIRECTION_PIN     GPIO_NUM_26
#define Z_DIRECTION_PIN     GPIO_NUM_2

// Define homing/hard limit switch input pins and limit interrupt vectors.
#define X_LIMIT_PIN         GPIO_NUM_35
#define Y_LIMIT_PIN         GPIO_NUM_34
#define Z_LIMIT_PIN         GPIO_NUM_39

// Define ganged axis or A axis step pulse and step direction output pins.
#if N_ABC_MOTORS > 0
#define M3_AVAILABLE
#define M3_STEP_PIN         GPIO_NUM_33
#define M3_DIRECTION_PIN    GPIO_NUM_32
#define M3_LIMIT_PIN        GPIO_NUM_36
#endif

// Define spindle enable and spindle direction output pins.
#define SPINDLE_ENABLE_PIN  GPIO_NUM_4
#define SPINDLEPWMPIN       GPIO_NUM_25

// Define flood and mist coolant enable output pins.
// Only one can be enabled!

#define COOLANT_MIST_PIN    GPIO_NUM_21
//#define COOLANT_FLOOD_PIN   GPIO_NUM_21
// Define user-control CONTROLs (cycle start, reset, feed hold) input pins.
#if SAFETY_DOOR_ENABLE
#define SAFETY_DOOR_PIN     GPIO_NUM_16
#else
#define RESET_PIN           GPIO_NUM_16 //??
#endif

// Define probe switch input pin.
#if PROBE_ENABLE
#define PROBE_PIN           GPIO_NUM_22
#endif

#ifdef HAS_IOPORTS
#define AUXINPUT0_PIN       GPIO_NUM_13
#define AUXINPUT1_PIN       GPIO_NUM_0
#endif

// Pin mapping when using SPI mode.
// With this mapping, SD card can be used both in SPI and 1-line SD mode.
// Note that a pull-up on CS line is required in SD mode.
#define PIN_NUM_MISO        GPIO_NUM_19
#define PIN_NUM_MOSI        GPIO_NUM_23
#define PIN_NUM_CLK         GPIO_NUM_18
#define MOTOR_CS_PIN        GPIO_NUM_17
#if SDCARD_ENABLE
#define PIN_NUM_CS          GPIO_NUM_5
#endif

#if MODBUS_ENABLE
#define UART2_RX_PIN        GPIO_NUM_25
#define UART2_TX_PIN        GPIO_NUM_4
#endif

#if KEYPAD_ENABLE
#error No free pins for keypad!
#endif

Without USE_I2S_OUT it fails to compile. If I uncomment USE_I2S_OUT it compiles fine. My board (and plans for it) does not use I2S

 idf.py build
Executing action: all (aliases: build)
Running make in directory /root/ESP32/build
Executing "make -j 3 all"...
[  1%] Built target partition_table_bin
[  1%] Built target custom_bundle
[  1%] Built target esp32_linker_script
[  1%] Performing build step for 'bootloader'
[  1%] Built target _project_elf_src
[  1%] Built target __idf_ulp
[  2%] Built target __idf_esp_serial_slave_link
[  1%] Built target _project_elf_src
[  5%] Built target __idf_log
[  3%] Built target __idf_sdmmc
[ 11%] Built target __idf_esp_rom
[  4%] Built target __idf_esp_https_ota
[ 22%] Built target __idf_esp_hw_support
[  4%] Built target __idf_esp_http_server
[ 31%] Built target __idf_efuse
[  5%] Built target __idf_esp_http_client
[ 60%] Built target __idf_bootloader_support
[  5%] Built target __idf_tcp_transport
[ 62%] Built target __idf_spi_flash
[  5%] Built target __idf_esp-tls
[ 64%] Built target __idf_micro-ecc
[  7%] Built target __idf_nghttp
[  7%] Built target __idf_app_trace
[ 89%] Built target __idf_soc
[ 93%] Built target __idf_hal
[  7%] Built target __idf_cxx
[ 95%] Built target __idf_main
[  8%] Built target __idf_newlib
[ 98%] Built target bootloader.elf
[ 10%] Built target __idf_freertos
[100%] Built target gen_project_binary
[ 10%] Built target __idf_esp_timer
[100%] Built target app
[ 11%] Built target __idf_esp_common
[ 11%] No install step for 'bootloader'
[ 12%] Built target __idf_esp32
[ 12%] Completed 'bootloader'
[ 12%] Built target __idf_perfmon
[ 13%] Built target bootloader
[ 14%] Built target __idf_espcoredump
[ 15%] Built target __idf_xtensa
[ 17%] Built target __idf_driver
[ 17%] Built target __idf_esp_ringbuf
[ 17%] Built target __idf_esp_hw_support
[ 18%] Built target __idf_soc
[ 18%] Built target __idf_heap
[ 19%] Built target __idf_log
[ 25%] Built target __idf_lwip
[ 26%] Built target __idf_esp_wifi
[ 31%] Built target __idf_wpa_supplicant
[ 31%] Built target __idf_esp_event
[ 32%] Built target __idf_esp_netif
[ 32%] Built target __idf_tcpip_adapter
[ 33%] Built target __idf_esp_eth
[ 33%] Built target __idf_vfs
[ 36%] Built target __idf_hal
[ 36%] Built target __idf_esp_rom
[ 37%] Built target __idf_esp_system
[ 38%] Built target __idf_esp_gdbstub
[ 38%] Built target __idf_pthread
[ 39%] Built target __idf_nvs_flash
[ 41%] Built target __idf_spi_flash
[ 42%] Built target __idf_esp_ipc
[ 44%] Built target __idf_bootloader_support
[ 44%] Built target __idf_app_update
[ 45%] Built target __idf_efuse
[ 52%] Built target mbedcrypto
[ 52%] Built target mbedx509
[ 53%] Built target mbedtls
[ 53%] Built target __idf_mbedtls
[ 53%] Built target __idf_esp_pm
[ 54%] Built target __idf_json
[ 55%] Built target __idf_console
[ 55%] Built target __idf_protobuf-c
[ 55%] Built target __idf_asio
[ 55%] Built target __idf_cbor
[ 56%] Built target __idf_unity
[ 56%] Built target __idf_esp_adc_cal
[ 57%] Built target __idf_coap
[ 57%] Built target __idf_esp_websocket_client
[ 57%] Built target __idf_expat
[ 58%] Built target __idf_wear_levelling
[ 58%] Built target __idf_jsmn
[ 61%] Built target __idf_freemodbus
[ 62%] Built target __idf_mqtt
[ 82%] Built target __idf_bt
[ 90%] Built target __idf_libsodium
[ 91%] Built target __idf_spiffs
[ 92%] Built target __idf_openssl
[ 93%] Built target __idf_protocomm
[ 93%] Built target __idf_mdns
[ 93%] Built target __idf_esp_hid
[ 94%] Built target __idf_cmock
[ 95%] Built target __idf_fatfs
[ 95%] Built target __idf_esp_local_ctrl
[ 96%] Built target __idf_wifi_provisioning
Scanning dependencies of target __idf_main
[ 96%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/driver.c.obj
[ 96%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/ioports.c.obj
[ 96%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/esp32-hal-uart.c.obj
[ 96%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/i2c.c.obj
[ 96%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/ioexpand.c.obj
[ 96%] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/i2s_out.c.obj
/root/ESP32/main/i2s_out.c:120:17: error: unknown type name 'i2s_out_pulse_func_t'
 static volatile i2s_out_pulse_func_t i2s_out_pulse_func;
                 ^~~~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:125:17: error: unknown type name 'i2s_out_pulser_status_t'
 static volatile i2s_out_pulser_status_t i2s_out_pulser_status = PASSTHROUGH;
                 ^~~~~~~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:125:65: error: 'PASSTHROUGH' undeclared here (not in a function)
 static volatile i2s_out_pulser_status_t i2s_out_pulser_status = PASSTHROUGH;
                                                                 ^~~~~~~~~~~
/root/ESP32/main/i2s_out.c: In function 'i2s_clear_dma_buffer':
/root/ESP32/main/i2s_out.c:78:26: error: 'I2S_OUT_DMABUF_LEN' undeclared (first use in this function); did you mean 'I2S_OUT_DATA'?
 #define DMA_SAMPLE_COUNT I2S_OUT_DMABUF_LEN / I2S_SAMPLE_SIZE /* number of samples per buffer */
                          ^~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:190:25: note: in expansion of macro 'DMA_SAMPLE_COUNT'
     for (int i = 0; i < DMA_SAMPLE_COUNT; i++) {
                         ^~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:78:26: note: each undeclared identifier is reported only once for each function it appears in
 #define DMA_SAMPLE_COUNT I2S_OUT_DMABUF_LEN / I2S_SAMPLE_SIZE /* number of samples per buffer */
                          ^~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:190:25: note: in expansion of macro 'DMA_SAMPLE_COUNT'
     for (int i = 0; i < DMA_SAMPLE_COUNT; i++) {
                         ^~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c: In function 'i2s_clear_o_dma_buffers':
/root/ESP32/main/i2s_out.c:200:37: error: 'I2S_OUT_DMABUF_COUNT' undeclared (first use in this function); did you mean 'I2S_OUT_DATA'?
     for (int buf_idx = 0; buf_idx < I2S_OUT_DMABUF_COUNT; buf_idx++) {
                                     ^~~~~~~~~~~~~~~~~~~~
                                     I2S_OUT_DATA
/root/ESP32/main/i2s_out.c:205:45: error: 'I2S_OUT_DMABUF_LEN' undeclared (first use in this function); did you mean 'I2S_OUT_DATA'?
         o_dma.desc[buf_idx]->length       = I2S_OUT_DMABUF_LEN;
                                             ^~~~~~~~~~~~~~~~~~
                                             I2S_OUT_DATA
/root/ESP32/main/i2s_out.c: In function 'i2s_out_gpio_shiftout':
/root/ESP32/main/i2s_out.c:235:25: error: 'I2S_OUT_NUM_BITS' undeclared (first use in this function); did you mean 'I2S_OUT_DATA'?
     for (int i = 0; i < I2S_OUT_NUM_BITS; i++) {
                         ^~~~~~~~~~~~~~~~
                         I2S_OUT_DATA
/root/ESP32/main/i2s_out.c: In function 'i2s_fillout_dma_buffer':
/root/ESP32/main/i2s_out.c:340:34: error: 'STEPPING' undeclared (first use in this function); did you mean 'PENDING'?
     if (i2s_out_pulser_status == STEPPING) {
                                  ^~~~~~~~
                                  PENDING
/root/ESP32/main/i2s_out.c:78:26: error: 'I2S_OUT_DMABUF_LEN' undeclared (first use in this function); did you mean 'I2S_OUT_DATA'?
 #define DMA_SAMPLE_COUNT I2S_OUT_DMABUF_LEN / I2S_SAMPLE_SIZE /* number of samples per buffer */
                          ^~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:352:32: note: in expansion of macro 'DMA_SAMPLE_COUNT'
         while (o_dma.rw_pos < (DMA_SAMPLE_COUNT - SAMPLE_SAFE_COUNT)) {
                                ^~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:79:33: error: 'I2S_OUT_USEC_PER_PULSE' undeclared (first use in this function)
 #define SAMPLE_SAFE_COUNT (20 / I2S_OUT_USEC_PER_PULSE)       /* prevent buffer overrun (GRBL's $0 should be less than or equal 20) */
                                 ^~~~~~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:352:51: note: in expansion of macro 'SAMPLE_SAFE_COUNT'
         while (o_dma.rw_pos < (DMA_SAMPLE_COUNT - SAMPLE_SAFE_COUNT)) {
                                                   ^~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:358:44: warning: comparison between pointer and integer
                     if (i2s_out_pulse_func != NULL) {
                                            ^~
/root/ESP32/main/i2s_out.c:361:25: error: called object 'i2s_out_pulse_func' is not a function or function pointer
                         i2s_out_pulse_func();             // should be pushed into buffer max DMA_SAMPLE_SAFE_COUNT
                         ^~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:120:38: note: declared here
 static volatile i2s_out_pulse_func_t i2s_out_pulse_func;
                                      ^~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:365:54: error: 'WAITING' undeclared (first use in this function)
                         if (i2s_out_pulser_status == WAITING) {
                                                      ^~~~~~~
/root/ESP32/main/i2s_out.c: In function 'i2s_out_intr_handler':
/root/ESP32/main/i2s_out.c:438:42: error: 'STEPPING' undeclared (first use in this function); did you mean 'PENDING'?
             if (i2s_out_pulser_status == STEPPING) {
                                          ^~~~~~~~
                                          PENDING
/root/ESP32/main/i2s_out.c:78:26: error: 'I2S_OUT_DMABUF_LEN' undeclared (first use in this function); did you mean 'I2S_OUT_DATA'?
 #define DMA_SAMPLE_COUNT I2S_OUT_DMABUF_LEN / I2S_SAMPLE_SIZE /* number of samples per buffer */
                          ^~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:442:33: note: in expansion of macro 'DMA_SAMPLE_COUNT'
             for (int i = 0; i < DMA_SAMPLE_COUNT; i++) {
                                 ^~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c: In function 'i2sOutTask':
/root/ESP32/main/i2s_out.c:474:38: error: 'STEPPING' undeclared (first use in this function); did you mean 'PENDING'?
         if (i2s_out_pulser_status == STEPPING) {
                                      ^~~~~~~~
                                      PENDING
/root/ESP32/main/i2s_out.c:487:45: error: 'WAITING' undeclared (first use in this function)
         } else if (i2s_out_pulser_status == WAITING) {
                                             ^~~~~~~
/root/ESP32/main/i2s_out.c: In function 'i2s_out_delay':
/root/ESP32/main/i2s_out.c:523:22: error: 'I2S_OUT_USEC_PER_PULSE' undeclared (first use in this function)
         ets_delay_us(I2S_OUT_USEC_PER_PULSE * 2);
                      ^~~~~~~~~~~~~~~~~~~~~~
In file included from /root/ESP32/main/i2s_out.c:58:
/root/ESP32/main/i2s_out.c:527:15: error: 'I2S_OUT_DELAY_MS' undeclared (first use in this function); did you mean 'I2S_OUT_DATA'?
         delay(I2S_OUT_DELAY_MS);
               ^~~~~~~~~~~~~~~~
/root/ESP32/main/i2s.h:29:32: note: in definition of macro 'delay'
 #define delay(ms) hal.delay_ms(ms, 0);
                                ^~
/root/ESP32/main/i2s_out.c: In function 'i2s_out_push_sample':
/root/ESP32/main/i2s_out.c:79:33: error: 'I2S_OUT_USEC_PER_PULSE' undeclared (first use in this function)
 #define SAMPLE_SAFE_COUNT (20 / I2S_OUT_USEC_PER_PULSE)       /* prevent buffer overrun (GRBL's $0 should be less than or equal 20) */
                                 ^~~~~~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:556:15: note: in expansion of macro 'SAMPLE_SAFE_COUNT'
     if (num > SAMPLE_SAFE_COUNT) {
               ^~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c: At top level:
/root/ESP32/main/i2s_out.c:570:1: warning: data definition has no type or storage class
 i2s_out_pulser_status_t IRAM_ATTR i2s_out_get_pulser_status (void)
 ^~~~~~~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:570:1: error: type defaults to 'int' in declaration of 'i2s_out_pulser_status_t' [-Werror=implicit-int]
/root/ESP32/main/i2s_out.c:570:35: error: expected ',' or ';' before 'i2s_out_get_pulser_status'
 i2s_out_pulser_status_t IRAM_ATTR i2s_out_get_pulser_status (void)
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c: In function 'i2s_out_set_passthrough':
/root/ESP32/main/i2s_out.c:582:34: error: 'STEPPING' undeclared (first use in this function); did you mean 'PENDING'?
     if (i2s_out_pulser_status == STEPPING) {
                                  ^~~~~~~~
                                  PENDING
/root/ESP32/main/i2s_out.c:583:33: error: 'WAITING' undeclared (first use in this function)
         i2s_out_pulser_status = WAITING;  // Start stopping the pulser
                                 ^~~~~~~
In file included from /root/ESP32/main/i2s_out.c:58:
/root/ESP32/main/i2s_out.c:584:15: error: 'I2S_OUT_DELAY_MS' undeclared (first use in this function); did you mean 'I2S_OUT_DATA'?
         delay(I2S_OUT_DELAY_MS);
               ^~~~~~~~~~~~~~~~
/root/ESP32/main/i2s.h:29:32: note: in definition of macro 'delay'
 #define delay(ms) hal.delay_ms(ms, 0);
                                ^~
/root/ESP32/main/i2s_out.c: In function 'i2s_out_set_stepping':
/root/ESP32/main/i2s_out.c:593:34: error: 'STEPPING' undeclared (first use in this function); did you mean 'PENDING'?
     if (i2s_out_pulser_status == STEPPING) {
                                  ^~~~~~~~
                                  PENDING
/root/ESP32/main/i2s_out.c:599:34: error: 'WAITING' undeclared (first use in this function)
     if (i2s_out_pulser_status == WAITING) {
                                  ^~~~~~~
In file included from /root/ESP32/main/i2s_out.c:58:
/root/ESP32/main/i2s_out.c:603:19: error: 'I2S_OUT_DELAY_DMABUF_MS' undeclared (first use in this function)
             delay(I2S_OUT_DELAY_DMABUF_MS);
                   ^~~~~~~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s.h:29:32: note: in definition of macro 'delay'
 #define delay(ms) hal.delay_ms(ms, 0);
                                ^~
/root/ESP32/main/i2s_out.c: At top level:
/root/ESP32/main/i2s_out.c:636:44: error: unknown type name 'i2s_out_pulse_func_t'; did you mean 'i2s_out_dma_t'?
 void IRAM_ATTR i2s_out_set_pulse_callback (i2s_out_pulse_func_t func)
                                            ^~~~~~~~~~~~~~~~~~~~
                                            i2s_out_dma_t
/root/ESP32/main/i2s_out.c: In function 'i2s_out_reset':
/root/ESP32/main/i2s_out.c:645:34: error: 'STEPPING' undeclared (first use in this function); did you mean 'PENDING'?
     if (i2s_out_pulser_status == STEPPING) {
                                  ^~~~~~~~
                                  PENDING
/root/ESP32/main/i2s_out.c:648:41: error: 'WAITING' undeclared (first use in this function)
     } else if (i2s_out_pulser_status == WAITING) {
                                         ^~~~~~~
/root/ESP32/main/i2s_out.c: At top level:
/root/ESP32/main/i2s_out.c:661:31: error: unknown type name 'i2s_out_init_t'; did you mean 'i2s_out_dma_t'?
 bool IRAM_ATTR i2s_out_init2 (i2s_out_init_t init_param)
                               ^~~~~~~~~~~~~~
                               i2s_out_dma_t
/root/ESP32/main/i2s_out.c: In function 'i2s_out_init':
/root/ESP32/main/i2s_out.c:894:5: error: unknown type name 'i2s_out_init_t'; did you mean 'i2s_out_dma_t'?
     i2s_out_init_t default_param = {
     ^~~~~~~~~~~~~~
     i2s_out_dma_t
/root/ESP32/main/i2s_out.c:895:9: error: field name not in record or union initializer
         .ws_pin       = I2S_OUT_WS,
         ^
/root/ESP32/main/i2s_out.c:895:9: note: (near initialization for 'default_param')
/root/ESP32/main/i2s_out.c:896:9: error: field name not in record or union initializer
         .bck_pin      = I2S_OUT_BCK,
         ^
/root/ESP32/main/i2s_out.c:896:9: note: (near initialization for 'default_param')
In file included from /root/ESP32/main/driver.h:243,
                 from /root/ESP32/main/i2s_out.c:43:
/root/ESP32/main/BlackBox32X.h:32:21: warning: excess elements in scalar initializer
 #define I2S_OUT_BCK GPIO_NUM_16
                     ^~~~~~~~~~~
/root/ESP32/main/i2s_out.c:896:25: note: in expansion of macro 'I2S_OUT_BCK'
         .bck_pin      = I2S_OUT_BCK,
                         ^~~~~~~~~~~
/root/ESP32/main/BlackBox32X.h:32:21: note: (near initialization for 'default_param')
 #define I2S_OUT_BCK GPIO_NUM_16
                     ^~~~~~~~~~~
/root/ESP32/main/i2s_out.c:896:25: note: in expansion of macro 'I2S_OUT_BCK'
         .bck_pin      = I2S_OUT_BCK,
                         ^~~~~~~~~~~
/root/ESP32/main/i2s_out.c:897:9: error: field name not in record or union initializer
         .data_pin     = I2S_OUT_DATA,
         ^
/root/ESP32/main/i2s_out.c:897:9: note: (near initialization for 'default_param')
In file included from /root/ESP32/main/driver.h:243,
                 from /root/ESP32/main/i2s_out.c:43:
/root/ESP32/main/BlackBox32X.h:34:22: warning: excess elements in scalar initializer
 #define I2S_OUT_DATA GPIO_NUM_21
                      ^~~~~~~~~~~
/root/ESP32/main/i2s_out.c:897:25: note: in expansion of macro 'I2S_OUT_DATA'
         .data_pin     = I2S_OUT_DATA,
                         ^~~~~~~~~~~~
/root/ESP32/main/BlackBox32X.h:34:22: note: (near initialization for 'default_param')
 #define I2S_OUT_DATA GPIO_NUM_21
                      ^~~~~~~~~~~
/root/ESP32/main/i2s_out.c:897:25: note: in expansion of macro 'I2S_OUT_DATA'
         .data_pin     = I2S_OUT_DATA,
                         ^~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:898:9: error: field name not in record or union initializer
         .pulse_func   = NULL,
         ^
/root/ESP32/main/i2s_out.c:898:9: note: (near initialization for 'default_param')
/root/ESP32/main/i2s_out.c:898:25: warning: excess elements in scalar initializer
         .pulse_func   = NULL,
                         ^~~~
/root/ESP32/main/i2s_out.c:898:25: note: (near initialization for 'default_param')
/root/ESP32/main/i2s_out.c:899:9: error: field name not in record or union initializer
         .pulse_period = I2S_OUT_USEC_PER_PULSE,
         ^
/root/ESP32/main/i2s_out.c:899:9: note: (near initialization for 'default_param')
/root/ESP32/main/i2s_out.c:899:25: error: 'I2S_OUT_USEC_PER_PULSE' undeclared (first use in this function)
         .pulse_period = I2S_OUT_USEC_PER_PULSE,
                         ^~~~~~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:899:25: warning: excess elements in scalar initializer
/root/ESP32/main/i2s_out.c:899:25: note: (near initialization for 'default_param')
/root/ESP32/main/i2s_out.c:900:9: error: field name not in record or union initializer
         .init_val     = I2S_OUT_INIT_VAL,
         ^
/root/ESP32/main/i2s_out.c:900:9: note: (near initialization for 'default_param')
/root/ESP32/main/i2s_out.c:885:30: warning: excess elements in scalar initializer
 #    define I2S_OUT_INIT_VAL 0
                              ^
/root/ESP32/main/i2s_out.c:900:25: note: in expansion of macro 'I2S_OUT_INIT_VAL'
         .init_val     = I2S_OUT_INIT_VAL,
                         ^~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:885:30: note: (near initialization for 'default_param')
 #    define I2S_OUT_INIT_VAL 0
                              ^
/root/ESP32/main/i2s_out.c:900:25: note: in expansion of macro 'I2S_OUT_INIT_VAL'
         .init_val     = I2S_OUT_INIT_VAL,
                         ^~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:903:12: error: implicit declaration of function 'i2s_out_init2'; did you mean 'i2s_out_init'? [-Werror=implicit-function-declaration]
     return i2s_out_init2(default_param);
            ^~~~~~~~~~~~~
            i2s_out_init
At top level:
/root/ESP32/main/i2s_out.c:462:23: warning: 'i2sOutTask' defined but not used [-Wunused-function]
 static void IRAM_ATTR i2sOutTask(void* parameter)
                       ^~~~~~~~~~
/root/ESP32/main/i2s_out.c:410:23: warning: 'i2s_out_intr_handler' defined but not used [-Wunused-function]
 static void IRAM_ATTR i2s_out_intr_handler (void *arg)
                       ^~~~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:180:23: warning: 'i2s_out_reset_fifo' defined but not used [-Wunused-function]
 static void IRAM_ATTR i2s_out_reset_fifo (void)
                       ^~~~~~~~~~~~~~~~~~
/root/ESP32/main/i2s_out.c:90:22: warning: 'i2s_out_isr_handle' defined but not used [-Wunused-variable]
 static intr_handle_t i2s_out_isr_handle;
                      ^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [esp-idf/main/CMakeFiles/__idf_main.dir/build.make:169: esp-idf/main/CMakeFiles/__idf_main.dir/i2s_out.c.obj] Error 1
make[1]: *** [CMakeFiles/Makefile2:4934: esp-idf/main/CMakeFiles/__idf_main.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
make failed with exit code 2
root@firmwarebuild:~/ESP32#

What am I doing wrong (: or is the I2S code somewhere outside a "if" where it should have been inside?

terjeio commented 2 years ago

... is the I2S code somewhere outside a "if" where it should have been inside?

Yep - a regression, uncomment these lines:

https://github.com/grblHAL/ESP32/blob/a02a4a4202fc617c944a20bdff3bc43ae632e76d/main/i2s_out.c#L47 https://github.com/grblHAL/ESP32/blob/a02a4a4202fc617c944a20bdff3bc43ae632e76d/main/i2s_out.c#L906

petervanderwalt commented 2 years ago

Tested OK - compiled this time - onwards with testing (:

Thank you sooooo much image

petervanderwalt commented 2 years ago

Confirming that editing the files worked a treat, can close this issue - but please do remember to fix (:

terjeio commented 2 years ago

but please do remember to fix

Fix has been comitted already...

petervanderwalt commented 2 years ago

Thank you! Closing issue then (: