So, I poked my stm32cube files before wiping them, and yup, they were corrupt. Wiped them out, and was able to build both the modified code from a few days ago (which I’d pinned to 0.6.6), as well as the current version from the repo (still sticking to just the Button example for now).
So, now that I have a working and non-working setup, time to compare. Framework/package versions are the same for both Linux (Arch) and Windows 10 …
PACKAGES:
- framework-stm32cube 2.0.181130
- tool-dfuutil 1.9.200310
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
… so no luck there.
Dependency graph is the same, so PlatformIO is reading the library dependency order correctly.
Dependency Graph
|-- <Luos> 0.6.7
| |-- <Robus> 1.2.0
|-- <Button> 0.6.0
| |-- <Luos> 0.6.7
| | |-- <Robus> 1.2.0
What does seem… moderately interesting, is that the compile order is identical at first, and then varies slightly…
This part is identical …
Building in release mode
Compiling .pio\build\l0\src\adc.o
Compiling .pio\build\l0\src\crc.o
Compiling .pio\build\l0\src\dma.o
Compiling .pio\build\l0\src\gpio.o
Compiling .pio\build\l0\src\main.o
Compiling .pio\build\l0\src\stm32f0xx_hal_msp.o
Compiling .pio\build\l0\src\stm32f0xx_it.o
Compiling .pio\build\l0\src\sys.o
Compiling .pio\build\l0\src\syscalls.o
Compiling .pio\build\l0\src\system_stm32f0xx.o
Compiling .pio\build\l0\src\usart.o
Then Windows goes …
Compiling .pio\build\l0\libbdc\hal\l0\hal.o
Compiling .pio\build\l0\libbdc\Robus_ID7111\detection.o
Compiling .pio\build\l0\libbdc\Robus_ID7111\reception.o
Compiling .pio\build\l0\libbdc\Robus_ID7111\robus.o
Compiling .pio\build\l0\libbdc\Robus_ID7111\sys_msg.o
.pio\libdeps\l0\Robus_ID7111\hal\l0\hal.c: In function 'crc':
.pio\libdeps\l0\Robus_ID7111\hal\l0\hal.c:75:57: warning: passing argument 2 of 'HAL_CRC_Calculate' from incompatible pointer type [-Wincompatible-pointer-types]
calc = (unsigned short)HAL_CRC_Calculate(&hcrc, data, size);
^~~~
In file included from C:\users\peter\.platformio\packages\framework-stm32cube\f0\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal_conf.h:217:0,
from C:\users\peter\.platformio\packages\framework-stm32cube\f0\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal.h:46,
from C:\users\peter\.platformio\packages\framework-stm32cube\f0\Drivers\CMSIS\Device\ST\STM32F0xx\Include/stm32f0xx.h:222,
from C:\users\peter\.platformio\packages\framework-stm32cube\f0\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_ll_usart.h:45,
from .pio\libdeps\l0\Robus_ID7111\hal\l0\hal.c:3:
C:\users\peter\.platformio\packages\framework-stm32cube\f0\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal_crc.h:293:10: note: expected 'uint32_t * {aka long unsigned int *}' but argument is of type 'unsigned char *'
uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t BufferLength);
^~~~~~~~~~~~~~~~~
.pio\libdeps\l0\Robus_ID7111\hal\l0\hal.c:79:58: warning: passing argument 2 of 'HAL_CRC_Accumulate' from incompatible pointer type [-Wincompatible-pointer-types]
calc = (unsigned short)HAL_CRC_Accumulate(&hcrc, data, 1);
^~~~
In file included from C:\users\peter\.platformio\packages\framework-stm32cube\f0\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal_conf.h:217:0,
from C:\users\peter\.platformio\packages\framework-stm32cube\f0\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal.h:46,
from C:\users\peter\.platformio\packages\framework-stm32cube\f0\Drivers\CMSIS\Device\ST\STM32F0xx\Include/stm32f0xx.h:222,
from C:\users\peter\.platformio\packages\framework-stm32cube\f0\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_ll_usart.h:45,
from .pio\libdeps\l0\Robus_ID7111\hal\l0\hal.c:3:
C:\users\peter\.platformio\packages\framework-stm32cube\f0\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal_crc.h:292:10: note: expected 'uint32_t * {aka long unsigned int *}' but argument is of type 'unsigned char *'
… whereas Linux goes …
Archiving .pio/build/l0/lib205/libRobus_ID7111.a
Indexing .pio/build/l0/lib205/libRobus_ID7111.a
Compiling .pio/build/l0/lib980/hal/l0/eeprom.o
Compiling .pio/build/l0/lib980/hal/l0/luos_board.o
.pio/libdeps/l0/Luos_ID7112/hal/l0/luos_board.c: In function 'node_init':
.pio/libdeps/l0/Luos_ID7112/hal/l0/luos_board.c:139:34: warning: passing argument 2 of 'HAL_ADC_Start_DMA' discards 'volatile' qualifier from pointer target type [-Wdiscarded-qualifiers]
HAL_ADC_Start_DMA(&luos_adc, node_analog.unmap, sizeof(node_analog_t) / sizeof(uint32_t));
^~~~~~~~~~~
In file included from /home/pfeerick/.platformio/packages/framework-stm32cube/f0/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_conf.h:201:0,
from /home/pfeerick/.platformio/packages/framework-stm32cube/f0/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal.h:46,
from inc/main.h:31,
from inc/adc.h:27,
from .pio/libdeps/l0/Luos_ID7112/hal/l0/luos_board.h:5,
from .pio/libdeps/l0/Luos_ID7112/hal/l0/luos_board.c:1:
/home/pfeerick/.platformio/packages/framework-stm32cube/f0/Drivers/STM32F0xx_HAL_Driver/Inc/stm32f0xx_hal_adc.h:922:25: note: expected 'uint32_t * {aka long unsigned int *}' but argument is of type 'volatile uint32_t * {aka volatile long unsigned int *}'
HAL_StatusTypeDef HAL_ADC_Start_DMA(ADC_HandleTypeDef* hadc, uint32_t* pData, uint32_t Length);
^~~~~~~~~~~~~~~~~
Compiling .pio/build/l0/lib980/Luos_ID7112/luos.o
To me, that’s looking like under Windows, Robus is processed before Luos, which is correct, due to the dependency order… but under Linux, it seems to be not be processing Robus properly first…
Full build logs for reference:
Edit: I’ve just done a verbose build of both, and am in the process of starting to dissect them to see if anything stands out… will be a few hours before I can do that though.
Verbose build logs…