-
Notifications
You must be signed in to change notification settings - Fork 342
Description
Hi, i am trying to built Px4flow, when i try to run "make" command for built. I get the following error. i think there is a conflict between the "gcc-arm-none-eabi" with the source repository. I am new to this. Need your guidance. the links are not working that are provided in repository. if there is a problem with version of "gcc-arm-none-eabi", kindly do tell me. I am using windows 11.
Thanks in advance.
arm-none-eabi-gcc -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -O1 -g -std=gnu99 -Wall -MD -Iinc -Ilib -Ilib/STM32F4xx_StdPeriph_Driver/inc -Ilib/STM32_USB_Device_Library/Class/cdc/inc -Ilib/STM32_USB_Device_Library/Core/inc -Ilib/STM32_USB_HOST_Library/Core/inc -Ilib/STM32_USB_OTG_Driver/inc -Imavlink/include/mavlink/v1.0 -Imavlink/include/mavlink/v1.0/pixhawk -DMAVLINK_SEND_UART_BYTES=mavlink_send_uart_bytes src/main.c src/utils.c src/led.c src/settings.c src/communication.c src/flow.c src/dcmi.c src/mt9v034.c src/gyro.c src/usart.c src/sonar.c src/debug.c src/usb_bsp.c src/usbd_cdc_vcp.c src/usbd_desc.c src/usbd_usr.c src/i2c.c src/reset.c src/system_stm32f4xx.c src/stm32f4xx_it.c lib/startup_stm32f4xx.s lib/STM32F4xx_StdPeriph_Driver/src/misc.c lib/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_rcc.c lib/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dma.c lib/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_dcmi.c lib/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_i2c.c lib/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_tim.c lib/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_spi.c lib/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_usart.c lib/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_adc.c lib/STM32F4xx_StdPeriph_Driver/src/stm32f4xx_gpio.c lib/STM32_USB_OTG_Driver/src/usb_core.c lib/STM32_USB_OTG_Driver/src/usb_dcd_int.c lib/STM32_USB_OTG_Driver/src/usb_dcd.c lib/STM32_USB_Device_Library/Core/src/usbd_core.c lib/STM32_USB_Device_Library/Core/src/usbd_req.c lib/STM32_USB_Device_Library/Core/src/usbd_ioreq.c lib/STM32_USB_Device_Library/Class/cdc/src/usbd_cdc_core.c -o px4flow.elf -mthumb -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -lnosys -Tstm32f4.ld -Wl,-gc-sections -lm
In file included from mavlink/include/mavlink/v1.0/pixhawk/../protocol.h:41,
from mavlink/include/mavlink/v1.0/pixhawk/pixhawk.h:26,
from mavlink/include/mavlink/v1.0/pixhawk/mavlink.h:25,
from src/main.c:47:
mavlink/include/mavlink/v1.0/pixhawk/../mavlink_helpers.h: In function '_mavlink_send_uart':
mavlink/include/mavlink/v1.0/pixhawk/../mavlink_helpers.h:556:32: warning: passing argument 2 of 'mavlink_send_uart_bytes' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
556 | MAVLINK_SEND_UART_BYTES(chan, (const uint8_t *)buf, len);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/main.c:46:
inc/mavlink_bridge_header.h:52:71: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'const uint8_t *' {aka 'const unsigned char *'}
52 | extern void mavlink_send_uart_bytes(mavlink_channel_t chan, uint8_t * ch, uint16_t length);
| ~~~~~~~~~~^~
In file included from src/main.c:49:
inc/utils.h: At top level:
inc/utils.h:45:6: error: conflicting types for 'itoa'
45 | void itoa(char *buf, unsigned int i, int base);
| ^~~~
In file included from src/main.c:38:
c:\program files (x86)\gnu arm embedded toolchain\10 2021.10\arm-none-eabi\include\stdlib.h:227:8: note: previous declaration of 'itoa' was here
227 | char * itoa (int, char *, int);
| ^~~~
In file included from inc/usbd_conf.h:31,
from lib/STM32_USB_Device_Library/Core/inc/usbd_def.h:34,
from lib/STM32_USB_Device_Library/Core/inc/usbd_ioreq.h:34,
from lib/STM32_USB_Device_Library/Class/cdc/inc/usbd_cdc_core.h:33,
from src/main.c:60:
inc/usb_conf.h:112: warning: "__packed" redefined
112 | #define __packed attribute ((packed))
|
In file included from c:\program files (x86)\gnu arm embedded toolchain\10 2021.10\arm-none-eabi\include\stdlib.h:19,
from src/main.c:38:
c:\program files (x86)\gnu arm embedded toolchain\10 2021.10\arm-none-eabi\include\sys\cdefs.h:247: note: this is the location of the previous definition
247 | #define __packed attribute((packed))
|
src/main.c: In function 'main':
src/main.c:258:6: warning: variable 'pixel_flow_count' set but not used [-Wunused-but-set-variable]
258 | int pixel_flow_count = 0;
| ^~~~~~~~~~~~~~~~
src/main.c:252:8: warning: variable 'pixel_flow_y_sum' set but not used [-Wunused-but-set-variable]
252 | float pixel_flow_y_sum = 0.0f;
| ^~~~~~~~~~~~~~~~
src/main.c:251:8: warning: variable 'pixel_flow_x_sum' set but not used [-Wunused-but-set-variable]
251 | float pixel_flow_x_sum = 0.0f;
| ^~~~~~~~~~~~~~~~
src/main.c:233:7: warning: variable 'distance_valid' set but not used [-Wunused-but-set-variable]
233 | bool distance_valid = false;
| ^~~~~~~~~~~~~~
In file included from mavlink/include/mavlink/v1.0/pixhawk/../protocol.h:41,
from mavlink/include/mavlink/v1.0/pixhawk/pixhawk.h:26,
from mavlink/include/mavlink/v1.0/pixhawk/mavlink.h:25,
from src/communication.c:41:
mavlink/include/mavlink/v1.0/pixhawk/../mavlink_helpers.h: In function '_mavlink_send_uart':
mavlink/include/mavlink/v1.0/pixhawk/../mavlink_helpers.h:556:32: warning: passing argument 2 of 'mavlink_send_uart_bytes' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
556 | MAVLINK_SEND_UART_BYTES(chan, (const uint8_t *)buf, len);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/communication.c:40:
inc/mavlink_bridge_header.h:52:71: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'const uint8_t *' {aka 'const unsigned char *'}
52 | extern void mavlink_send_uart_bytes(mavlink_channel_t chan, uint8_t * ch, uint16_t length);
| ~~~~~~~~~~^~
src/communication.c: In function 'handle_mavlink_message':
src/communication.c:144:31: warning: comparison of constant '36' with boolean expression is always true [-Wbool-compare]
144 | if (0 <= set.param_index < ONBOARD_PARAM_COUNT)
| ^
src/communication.c:144:12: warning: comparisons like 'X<=Y<=Z' do not have their mathematical meaning [-Wparentheses]
144 | if (0 <= set.param_index < ONBOARD_PARAM_COUNT)
| ~~^~~~~~~~~~~~~~~~~~
In file included from mavlink/include/mavlink/v1.0/pixhawk/../protocol.h:41,
from mavlink/include/mavlink/v1.0/pixhawk/pixhawk.h:26,
from mavlink/include/mavlink/v1.0/pixhawk/mavlink.h:25,
from src/flow.c:43:
mavlink/include/mavlink/v1.0/pixhawk/../mavlink_helpers.h: In function '_mavlink_send_uart':
mavlink/include/mavlink/v1.0/pixhawk/../mavlink_helpers.h:556:32: warning: passing argument 2 of 'mavlink_send_uart_bytes' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
556 | MAVLINK_SEND_UART_BYTES(chan, (const uint8_t *)buf, len);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/flow.c:42:
inc/mavlink_bridge_header.h:52:71: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'const uint8_t *' {aka 'const unsigned char *'}
52 | extern void mavlink_send_uart_bytes(mavlink_channel_t chan, uint8_t * ch, uint16_t length);
| ~~~~~~~~~~^~
In file included from mavlink/include/mavlink/v1.0/pixhawk/../protocol.h:41,
from mavlink/include/mavlink/v1.0/pixhawk/pixhawk.h:26,
from mavlink/include/mavlink/v1.0/pixhawk/mavlink.h:25,
from src/dcmi.c:39:
mavlink/include/mavlink/v1.0/pixhawk/../mavlink_helpers.h: In function '_mavlink_send_uart':
mavlink/include/mavlink/v1.0/pixhawk/../mavlink_helpers.h:556:32: warning: passing argument 2 of 'mavlink_send_uart_bytes' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
556 | MAVLINK_SEND_UART_BYTES(chan, (const uint8_t *)buf, len);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/dcmi.c:38:
inc/mavlink_bridge_header.h:52:71: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'const uint8_t *' {aka 'const unsigned char *'}
52 | extern void mavlink_send_uart_bytes(mavlink_channel_t chan, uint8_t * ch, uint16_t length);
| ~~~~~~~~~~^~
In file included from mavlink/include/mavlink/v1.0/pixhawk/../protocol.h:41,
from mavlink/include/mavlink/v1.0/pixhawk/pixhawk.h:26,
from mavlink/include/mavlink/v1.0/pixhawk/mavlink.h:25,
from src/debug.c:36:
mavlink/include/mavlink/v1.0/pixhawk/../mavlink_helpers.h: In function '_mavlink_send_uart':
mavlink/include/mavlink/v1.0/pixhawk/../mavlink_helpers.h:556:32: warning: passing argument 2 of 'mavlink_send_uart_bytes' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
556 | MAVLINK_SEND_UART_BYTES(chan, (const uint8_t *)buf, len);
| ^~~~~~~~~~~~~~~~~~~~
In file included from src/debug.c:35:
inc/mavlink_bridge_header.h:52:71: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'const uint8_t *' {aka 'const unsigned char *'}
52 | extern void mavlink_send_uart_bytes(mavlink_channel_t chan, uint8_t * ch, uint16_t length);
| ~~~~~~~~~~^~
src/debug.c: In function 'debug_message_send_one':
src/debug.c:171:4: warning: 'strncat' specified bound 50 equals destination size [-Wstringop-overflow=]
171 | strncat(msg, " ", DEBUG_MAX_LEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/debug.c:178:4: warning: 'strncat' specified bound 50 equals destination size [-Wstringop-overflow=]
178 | strncat(msg, " ", DEBUG_MAX_LEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/debug.c:170:4: warning: 'strncat' specified bound 50 equals destination size [-Wstringop-overflow=]
170 | strncat(msg, m_debug_buf_pointer[m_debug_index_read], DEBUG_MAX_LEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/debug.c:172:4: warning: 'strncat' specified bound 50 equals destination size [-Wstringop-overflow=]
172 | strncat(msg, ftoa(m_debug_buf_int[m_debug_index_read]), DEBUG_MAX_LEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/debug.c:177:4: warning: 'strncat' specified bound 50 equals destination size [-Wstringop-overflow=]
177 | strncat(msg, m_debug_buf_pointer[m_debug_index_read], DEBUG_MAX_LEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/debug.c:179:4: warning: 'strncat' specified bound 50 equals destination size [-Wstringop-overflow=]
179 | strncat(msg, ftoa(m_debug_buf_float[m_debug_index_read]), DEBUG_MAX_LEN);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/i2c.c: In function 'I2C1_EV_IRQHandler':
src/i2c.c:116:13: warning: variable 'dataRX' set but not used [-Wunused-but-set-variable]
116 | uint8_t dataRX;
| ^~~~~~
src/system_stm32f4xx.c: In function 'SetSysClock':
src/system_stm32f4xx.c:352:5: warning: this 'while' clause does not guard... [-Wmisleading-indentation]
352 | while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL);
| ^~~~~
src/system_stm32f4xx.c:353:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'while'
353 | {
| ^
lib/STM32_USB_OTG_Driver/src/usb_core.c: In function 'USB_OTG_WritePacket':
lib/STM32_USB_OTG_Driver/src/usb_core.c:183:7: warning: 'packed' attribute ignored for type 'uint32_t *' {aka 'long unsigned int *'} [-Wattributes]
183 | USB_OTG_WRITE_REG32( fifo, *((__packed uint32_t *)src) );
| ^~~~~~~~~~~~~~~~~~~
lib/STM32_USB_OTG_Driver/src/usb_core.c: In function 'USB_OTG_ReadPacket':
lib/STM32_USB_OTG_Driver/src/usb_core.c:208:5: warning: 'packed' attribute ignored for type 'uint32_t *' {aka 'long unsigned int *'} [-Wattributes]
208 | *(__packed uint32_t *)dest = USB_OTG_READ_REG32(fifo);
| ^
make: *** [px4flow.elf] Error 1