Hi,
Are there some information available to use the Core2 Board tovether with (modern) Arduino and PlatformIO?
I know the board is outdated but it works very well and mbed is EOL.
Especially I am looking for the Arduino configuration files variant.h, board.json and so on.
An help is welcomeđ
Michael
Hi @MichaelT
The Core 2 has not been sold as a standalone product for a long time. The PCB has undergone several subsequent revisions, which are used in the ROSbot 3. The firmware for these boards is written using PlatformIO. Link to the rosbot-firmware source code.
I expect that it wonât take much change to make it work on the predecessor and this is a possible starting point.
Hi @RafalGorecki,
Thanks for your answer.
What does that mean concrete?
- Can I use the board file, platform url and platform description url (in platformio.ini from this repo?
- Are the pin mappings the same?
- Are MCU the same, so that the Hal initialisation works?
Michael
Can I use the board file, platform url and platform description url (in platformio.ini from this repo?
The platformio.ini file should work. It contains definitions for two configurations; the one you need is the Rosbot, not the Rosbot XL.
Are the pin mappings the same?
I canât guarantee that. Most of the pins likely match, but it would be worth comparing the files.
Are MCU the same, so that the Hal initialisation works?
MCU is the same
Thanks, that sounds good. But I have a few more questions:
- Shall I use the main or the jazzy branch? The platformio.ini targets different boards.
- Where are the files which corresponds to the ones in TARGET_CORE2 directory in the mbed repository?
- Which is the exact type of the mcu?
- Shall I use the main or the jazzy branch? The platformio.ini targets different boards.
Both branches of the repository will work. Even though the board isnât named âcore2,â it should work on the core2.
- Where are the files which corresponds to the ones in TARGET_CORE2 directory in the mbed repository?
Unfortunately, you are referring to an old detail that I am not familiar with.
- Which is the exact type of the mcu?
stm32f407
Thanks, my problem is that I canât find the pin definitions in the rosbot_firmware repo (which pin number is e.g. PA5 for the battery ADC pin)âŚ
The mappings in the old files are (more or less) clear.
There is no such mapping; in our implementation, every pin has a specific assigned function. We do not rely on generic names in the firmware. I am unable to help with this particular aspect.
You can examine the old project and the aliases used on the board; hExt.pin1, for instance, must be mapped to an STM32 pin name (such as PA5) in one of the files.
I tried that and get the following error message while building the release version (the normal version works):
~\.platformio\packages\framework-arduinoststm32\cores\arduino\Print.cpp: In member function 'int Print::printf(const char*, ...)':
~\.platformio\packages\framework-arduinoststm32\cores\arduino\Print.cpp:266:16: error: 'vdprintf' was not declared in this scope; did you mean 'vprintf'?
266 | int retval = vdprintf((int)this, format, ap);
| ^~~~~~~~
| vprintf
compilation terminated due to -Wfatal-errors.
*** [.pio\build\rosbot_release\FrameworkArduino\Print.cpp.o] Error 1
The same error message occurs when I checked out the rosbot_firmware version, jazzy branch.
Any ideas?
Hi @MichaelT ,
I cannot reproduce the error. Please send me the instructions how to reproduce that.
This is my output:
Bests,
JD
Hi @JakubDelicat
Thanks for your answer,.
I just run build an PlatformIO in vscode in both cases. Obviously the compiler canât find the definition of the vdprintf function. It seems that it is not in the stm32duino files. Donât know why the error only occurs in the release version.
Currently I am working at a Windows 11 PC, so maybe that is the problem. What Do you think?
Regards
Michael
Can you try correcting to 'vprintf' and build?
Line 266
Hi @Tomasz_Lejkowski
Thanks for your suggestion, I will try that in the next days (due to limited time at the moment).
But it is a little bit strange to me to patch an official framework file.
This repo is not the official one. It was modified 3 years ago and this bug is probably releated with windows system rosbot-firmware/platformio.ini at jazzy ¡ husarion/rosbot-firmware ¡ GitHub