Hi, I tried to compile the firmware (master branch) on my macbook pro and I’m facing an issue, I’m getting
arm-none-eabi-g++: error: unrecognized command line option '-std=c++14'
if I change to
-std=c++1y it passes through but I get another error
arm-none-eabi-g++ -std=c++1y -c MotorControl/protocol.cpp -DHW_VERSION_MAJOR=3 -DHW_VERSION_MINOR=1 -DHW_VERSION_VOLTAGE=24 -DUSB_PROTOCOL_NATIVE -DUART_PROTOCOL_LEGACY -D__weak="__attribute__((weak))" -D__packed="__attribute__((__packed__))" -DUSE_HAL_DRIVER -DSTM32F405xx -mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -Wall -fdata-sections -ffunction-sections -g -gdwarf-2 -Og -ffast-math -fstack-usage -IDrivers/DRV8301 -IMotorControl -IBoard/v3/Middlewares/Third_Party/FreeRTOS/Source/portable/GCC/ARM_CM4F -IBoard/v3/Middlewares/Third_Party/FreeRTOS/Source/include -IBoard/v3/Middlewares/Third_Party/FreeRTOS/Source/CMSIS_RTOS -IBoard/v3/Middlewares/ST/STM32_USB_Device_Library/Core/Inc -IBoard/v3/Middlewares/ST/STM32_USB_Device_Library/Class/CDC/Inc -IBoard/v3/Drivers/STM32F4xx_HAL_Driver/Inc -IBoard/v3/Drivers/STM32F4xx_HAL_Driver/Inc/Legacy -IBoard/v3/Drivers/CMSIS/Device/ST/STM32F4xx/Include -IBoard/v3/Drivers/CMSIS/Include -IBoard/v3/Inc -IMotorControl -IDrivers/DRV8301 -o build/MotorControl_protocol.cpp.o MotorControl/protocol.cpp: In member function 'void Endpoint::write_json(size_t, bool*, StreamSink*) const': MotorControl/protocol.cpp:69:50: error: 'snprintf' was not declared in this scope snprintf(id_buf, sizeof(id_buf), "%u", id); // TODO: get rid of printf
I have the latest gcc installed using brew
arm-none-eabi-g++ --version arm-none-eabi-g++ (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204] Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204] Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I suspect has to do with the specified C++ dialect, did anyone see this?