Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

platformIO compile errors #124

Open
matthewryanburgin191 opened this issue Apr 14, 2022 · 1 comment
Open

platformIO compile errors #124

matthewryanburgin191 opened this issue Apr 14, 2022 · 1 comment

Comments

@matthewryanburgin191
Copy link

Hi,

When compiling through platformIO on windows.

added protocol .h and .c file to inc and src directory but still no luck.

Executing task in folder bipropellant-hoverboard-firmware-master: C:.platformio\penv\Scripts\platformio.exe run <

Processing control_usart2 (platform: ststm32; framework: stm32cube; board: genericSTM32F103RC)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F103RC.html
PLATFORM: ST STM32 (15.2.0) > STM32F103RC (48k RAM. 256k Flash)
HARDWARE: STM32F103RCT6 72MHz, 48KB RAM, 256KB Flash
DEBUG: Current (stlink) External (blackmagic, cmsis-dap, jlink, stlink)
PACKAGES:

  • framework-stm32cubef1 1.8.4
  • tool-ldscripts-ststm32 0.2.0
  • toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
    LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 28 compatible libraries
    Scanning dependencies...
    No dependencies
    Building in release mode
    Warning! '-Wl,-T' option for specifying linker scripts is deprecated. Please use 'board_build.ldscript' option in your 'platformio.ini' file.
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_adc.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_adc_ex.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_can.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_cec.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_cortex.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_crc.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_dac.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_dac_ex.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_dma.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_eth.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_exti.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_flash.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_flash_ex.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_gpio.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_gpio_ex.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_hcd.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_i2c.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_i2s.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_irda.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_iwdg.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_mmc.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_nand.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_nor.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_pccard.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_pcd.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_pcd_ex.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_pwr.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_rcc.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_rcc_ex.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_rtc.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_rtc_ex.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_sd.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_smartcard.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_spi.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_sram.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_tim.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_tim_ex.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_uart.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_usart.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_hal_wwdg.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_adc.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_crc.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_dac.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_dma.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_exti.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_fsmc.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_gpio.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_i2c.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_pwr.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_rcc.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_rtc.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_sdmmc.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_spi.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_tim.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_usart.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_usb.o
    Compiling .pio\build\control_usart2\FrameworkHALDriver\Src\stm32f1xx_ll_utils.o
    Compiling .pio\build\control_usart2\src\BLDC_controller.o
    Compiling .pio\build\control_usart2\src\BLDC_controller_data.o
    Compiling .pio\build\control_usart2\src\ascii_proto_funcs.o
    Compiling .pio\build\control_usart2\src\bldc.o
    Compiling .pio\build\control_usart2\src\comms.o
    Compiling .pio\build\control_usart2\src\control.o
    Compiling .pio\build\control_usart2\src\deadreckoner.o
    Compiling .pio\build\control_usart2\src\flashaccess.o
    Compiling .pio\build\control_usart2\src\hallinterrupts.o
    src\bldc.c: In function 'BldcController_Init':
    src\bldc.c:131:3: warning: implicit declaration of function 'sprintf' [-Wimplicit-function-declaration]
    sprintf(tmp, "cf_speedCoef %d, n_commDeacvHi %d, n_commAcvLo %d\r\n", rtP.cf_speedCoef, rtP.n_commDeacvHi, rtP.n_commAcvLo);
    ^~~~~~~
    src\bldc.c:131:3: warning: incompatible implicit declaration of built-in function 'sprintf'
    src\bldc.c:131:3: note: include '<stdio.h>' or provide a declaration of 'sprintf'
    Compiling .pio\build\control_usart2\src\main.o
    Compiling .pio\build\control_usart2\src\pid.o
    Compiling .pio\build\control_usart2\src\protocol.o
    src\flashaccess.c: In function 'writeFlash':
    src\flashaccess.c:35:5: warning: implicit declaration of function 'sprintf' [-Wimplicit-function-declaration]
    sprintf(tmp, "\r\nflash root %lx", (uint32_t)flash_data);
    ^~~~~~~
    src\flashaccess.c:35:5: warning: incompatible implicit declaration of built-in function 'sprintf'
    src\flashaccess.c:35:5: note: include '<stdio.h>' or provide a declaration of 'sprintf'
    src\flashaccess.c: In function 'readFlash':
    src\flashaccess.c:137:13: warning: incompatible implicit declaration of built-in function 'sprintf'
    sprintf(tmp, "\r\nflashread - len %d seems wrong?", i);
    ^~~~~~~
    src\flashaccess.c:137:13: note: include '<stdio.h>' or provide a declaration of 'sprintf'
    src\flashaccess.c:149:5: warning: incompatible implicit declaration of built-in function 'sprintf'
    sprintf(tmp, "\r\nflashread - no end found?");
    ^~~~~~~
    src\flashaccess.c:149:5: note: include '<stdio.h>' or provide a declaration of 'sprintf'
    src\flashaccess.c: In function 'writeflashchunk':
    src\flashaccess.c:201:13: warning: incompatible implicit declaration of built-in function 'sprintf'
    sprintf(tmp, "\r\nerase fail %d", (int)res);
    ^~~~~~~
    src\flashaccess.c:201:13: note: include '<stdio.h>' or provide a declaration of 'sprintf'
    src\flashaccess.c:216:13: warning: incompatible implicit declaration of built-in function 'sprintf'
    sprintf(tmp, "\r\nwrite fail %d", (int)res);
    ^~~~~~~
    src\flashaccess.c:216:13: note: include '<stdio.h>' or provide a declaration of 'sprintf'
    Compiling .pio\build\control_usart2\src\protocolfunctions.o
    Compiling .pio\build\control_usart2\src\sensorcoms.o
    Compiling .pio\build\control_usart2\src\setup.o
    Compiling .pio\build\control_usart2\src\softwareserial.o
    src\main.c: In function 'main':
    src\main.c:911:9: warning: implicit declaration of function 'sprintf' [-Wimplicit-function-declaration]
    sprintf(tmp, "power off in %ds\r\n", (powerofftimer*DELAY_IN_MAIN_LOOP)/1000 );
    ^~~~~~~
    src\main.c:911:9: warning: incompatible implicit declaration of built-in function 'sprintf'
    src\main.c:911:9: note: include '<stdio.h>' or provide a declaration of 'sprintf'
    Compiling .pio\build\control_usart2\src\stm32f1xx_it.o
    Compiling .pio\build\control_usart2\src\system_stm32f1xx.o
    src\protocolfunctions.c: In function 'fn_FlashContentMagic':
    src\protocolfunctions.c:356:17: warning: implicit declaration of function 'sprintf' [-Wimplicit-function-declaration]
    sprintf(temp, "incorrect magic %d, should be %d\r\nFlash not written\r\n", FlashContent.magic, CURRENT_MAGIC);
    ^~~~~~~
    src\protocolfunctions.c:356:17: warning: incompatible implicit declaration of built-in function 'sprintf'
    src\protocolfunctions.c:356:17: note: include '<stdio.h>' or provide a declaration of 'sprintf'
    Compiling .pio\build\control_usart2\FrameworkCMSISDevice\gcc\startup_stm32f103xe.o
    Compiling .pio\build\control_usart2\FrameworkCMSISDevice\system_stm32f1xx.o
    Archiving .pio\build\control_usart2\libFrameworkCMSISDevice.a
    Linking .pio\build\control_usart2\firmware.elf
    arm-none-eabi-gcc: error: 1\Downloads\bipropellant-hoverboard-firmware-master\bipropellant-hoverboard-firmware-master/STM32F103RCTx_FLASH.ld: No such file or directory
    *** [.pio\build\control_usart2\firmware.elf] Error 1
    =================================================================================== [FAILED] Took 8.99 seconds ===================================================================================
    Environment Status Duration

control_usart2 FAILED 00:00:08.990

@btsimonh
Copy link
Contributor

it's a long time since I built this, but I think there is a sub-repo you may need to ensure is checked out? The protocol is in a separate repo...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants