-
Notifications
You must be signed in to change notification settings - Fork 132
failed to compile Arduino_core_STM32 V1.8.0 based projects. V1.7.0 works fine #1143
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
Comments
I don't see a 1.8 version |
I found that builds with stm32/1.8.0 will fail, whereas changing to stm32/1.7.0 will succeed. This is with building a simple 'Blink' sketch for a BluePill board. |
The current json from stm32duino has 1.8.0: |
indeed doesn't seem to work. |
It looks like the ArduinoIDE using stm32 is on v1.8.0 and is able successfully do builds. Seems like the problem is specific to Sloeber-Eclipse. |
Hi, It seems Sloeber doesn't handle properly the prebuild recipe from the platform.txt. |
@fpistm This should be 2 relatively easy fixes. |
the # comment problem only existed in non-boards related files like platform.txt. |
welcome @jantje |
As I expected the test failed |
I'm hitting a CDT issue that I see as very unlikely to be fixed. |
also started using DirectoryDelimiter and upgraded arduino IDE version See https://bugs.eclipse.org/bugs/show_bug.cgi?id=560330 for why A.BUILD.PATH={ProjDirPath}{DirectoryDelimiter}{ConfigName} doesn't work
Now the 2 issues in Sloeber are fixed there seems to be a remaining issue. |
Unfortunately, this is not possible else this not produce the correct output with Arduino IDE: sketch\SrcWrapper.cpp:1:10: error: #include expects "FILENAME" or <FILENAME>
1 | #include SrcWrapper.h
| ^~~~~~~~~~
exit status 1 I've tested a lot of combination, the only one working is using the '^' escape character. |
The problem is that -on windows- arduino uses java to run windows commands via cygwin (a linux emulator) where Sloeber uses java to run a windows command that starts a make (there are several makes each with their pro's and con's) which currently starts a windows sh (again their are several sh's each with their pro's and con's). What I'm most curiously about is: |
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/echo#remarks
As said I've tried several syntax, with this one: sketch\SrcWrapper.cpp:1:1: error: expected unqualified-id before string constant
1 | "#include <SrcWrapper.h>"
| ^~~~~~~~~~~~~~~~~~~~~~~~~
exit status 1
|
Seems like a windows specific thing. Strange as this goes against my understanding arduino IDE uses cygwin and not native windows.
Again this is native windows behaviour and goes against the idea arduino IDE uses cygwin. But then I do not understand why |
This is due also to |
I have been investigating these prebuild commands and now I understand the complexities you face and how it works. Problem 1: Problem2: Alternative idea 1: Alternative idea 2: |
Well, copy can be an option. Comment in build_opt.h not as this will not be accepted by gcc. |
This works in windows in sloeber nightly because {build.source.path} was not yet defined
|
Thinking about the define ... |
Unfortunately, if a library is not included at sketch level this will not work and ScrWrapper is a library. |
What I'm saying is that your core is dependent on the inclusion of the SrcWrapper library but nowhere mentions it. If I understood correctly Arduino IDE will not pick this up but Sloeber will (and other advanced IDE's as well) and maybe Arduino IDE will in a later stage. |
@jantje yes i have followed your workaround, by deleting -mthumb "@{build.opt.path}" from platform.txt, also added blank build_opt.h in sketch root folder, and included "SrcWrapper.h" in .ino file. but the combiner is still giving me error, arm-none-eabi-gcc: error: .\libraries\SrcWrapper\src\HAL\stm32yyx_hal_spi_ex.c.o: No such file or directory and i have searched in Release\libraries\SrcWrapper\src\HAL all files have prefix of stm32yyxx, means double yy and double xx, and spi file do exist but with double xx, and combiner is searching with single x, am i thinking right? |
I assumed one could put a subfolder in the variants folder, but that was wrong. Arduino IDE ignores subfolders in the variants folder 😞 |
Yes, I continue to think about this and try to find a way to answer all constraint. If I found one I will come back to you. |
@fpistm |
No, could you point which one, please? |
Still searching for the build_opt. I'm running a lot of tests (600+ boards) and I saw it pass by. |
I found the boards that set the build ops on/of. It workes with a define which may not be acceptable for you. |
The -include SrcWrapper.h doesn't work in sloeber the way I had hoped.
|
I added some very special workaround for these boards to sloeber on windows. Note that the workaround disables build_opt and the prebuild commands |
@fpistm The only solution I can think of to make ScrWrapper work in both Arduino IDE and Sloeber is to put the parts that can not be archived of scrWrapper in all the variants folders and the rest in the core folder. |
Right. Thant's why I didn't add it as an include in Arudino.h. This would be to easy... 😁
Unfotunately, I don't think I will do that. this will duplicate a lot of files. |
@fpistm
we solve the ScrWrapper issue in Sloeber without impacting Arduino IDE |
Sloeber/arduino-eclipse-plugin#1143 Thanks @jantje Signed-off-by: Frederic Pillon <[email protected]>
I've made a PR with your proposition. Let me know if it is ok. |
Seems fine to me |
Sloeber/arduino-eclipse-plugin#1143 Thanks @jantje Signed-off-by: Frederic Pillon <[email protected]>
Is there a solution for this? I am getting |
@hasikp1 |
It still persists:
(eclipse/embedcpp-2022-03/eclipse/arduinoPlugin/packages/STMicroelectronics/hardware/stm32/2.4.0) P.S.: Since it failed to automatically install the STM32 core, so I copied the STM32 functional installation folder in the Arduino IDE to the eclipse folder. |
Why can't Sloeber use the Arduino IDE functional installation files? Wouldn't it be possible to indicate a folder path to use the same files? Since the Arduino IDE installation is functional? |
@rtek1000 please do not resurrect old issues. |
I have 4.3.1 sloeber installed, all other repositories are compiling fine, except Arduino_Core_STM32, its 1.8.0 version installed.
I have created empty arduino project and selected Bluepill as controller, then after compilation it is giving error in the end while 'starting combiner' appears.
D:/sloeber431/sloeber/arduinoPlugin/tools/make/make --no-print-directory main-build
'Starting combiner'
"D:\sloeber431\sloeber\arduinoPlugin\packages\STM32\tools\xpack-arm-none-eabi-gcc\9.2.1-1.1/bin/arm-none-eabi-gcc" -mcpu=cortex-m3 -mthumb -Os --specs=nano.specs -Wl,--defsym=LD_FLASH_OFFSET=0x2000 -Wl,--defsym=LD_MAX_SIZE=65536 -Wl,--defsym=LD_MAX_DATA_SIZE=20480 -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--entry=Reset_Handler -Wl,--unresolved-symbols=report-all -Wl,--warn-common "-TD:\sloeber431\sloeber\arduinoPlugin\packages\STM32\hardware\stm32\1.8.0\variants\PILL_F103XX/ldscript.ld" "-Wl,-Map,Z:/Arduino/EclipseWorkspace/ArduinoCoreSTM32_test/Release/ArduinoCoreSTM32_test.map" "-LD:\sloeber431\sloeber\arduinoPlugin\packages\STM32\tools\CMSIS\5.5.1/CMSIS/DSP/Lib/GCC/" -larm_cortexM3l_math -o "Z:/Arduino/EclipseWorkspace/ArduinoCoreSTM32_test/Release/ArduinoCoreSTM32_test.elf" "-LZ:/Arduino/EclipseWorkspace/ArduinoCoreSTM32_test/Release" -Wl,--start-group .\ArduinoCoreSTM32_test.cpp.o .\core\variant\PeripheralPins.c.o .\core\variant\variant.cpp.o Z:/Arduino/EclipseWorkspace/ArduinoCoreSTM32_test/Release/arduino.ar -lc -Wl,--end-group -lm -lgcc -lstdc++
d:/sloeber431/sloeber/arduinoplugin/packages/stm32/tools/xpack-arm-none-eabi-gcc/9.2.1-1.1/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: Z:/Arduino/EclipseWorkspace/ArduinoCoreSTM32_test/Release/arduino.ar(startup_stm32yyxx.S.o): in function
LoopFillZerobss': makefile:90: recipe for target 'ArduinoCoreSTM32_test.elf' failed (.text.Reset_Handler+0x26): undefined reference to
SystemInit'makefile:69: recipe for target 'all' failed
d:/sloeber431/sloeber/arduinoplugin/packages/stm32/tools/xpack-arm-none-eabi-gcc/9.2.1-1.1/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: Z:/Arduino/EclipseWorkspace/ArduinoCoreSTM32_test/Release/arduino.ar(main.cpp.o): in function
premain()': main.cpp:(.text.startup._Z7premainv+0x4): undefined reference to
HAL_NVIC_SetPriorityGrouping'd:/sloeber431/sloeber/arduinoplugin/packages/stm32/tools/xpack-arm-none-eabi-gcc/9.2.1-1.1/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: Z:/Arduino/EclipseWorkspace/ArduinoCoreSTM32_test/Release/arduino.ar(board.c.o): in function
init': board.c:(.text.init+0x0): undefined reference to
hw_config_init'collect2.exe: error: ld returned 1 exit status
make[1]: *** [ArduinoCoreSTM32_test.elf] Error 1
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: