Problems with CANOPEN on arm Cortex
-
Hello there , I’m using Qt5 on an Oracle VirtualMachine with Ubuntu 20.04. I need to implement the CANopen protocol. I’m using an embedded board with A53 NXP ARM Cortex, with this board I should able to communicate to actuators through the servo drivers. I have already used some examples from Qt but when I use them there are some problems during the compilation. How can implement this protocol on my architecture? Are there documents o guides to show me?
Thanks in advance
BR
Nunzio -
@Nunzio said in Problems with CANOPEN on arm Cortex:
there are some problems during the compilation
Please post the errors (as text)!
Are you cross compiling these examples for the board?
-
good morning
thank you for your interest.
Using the example sw I get this error when I connect my embedded board.
I would like to fix this part of sw and then insert it in my project.
my project foresees 3 servo drives that move using the canopen protocol.
I should realize an application with some buttons using qt5 and when I push them I move the actuators.
The protocol used is the canopen so how to use it into qt? Are there some example -
@Nunzio I asked you to post errors as text...
You do not get this error if you connect your embedded board, you get it when you compile the application.You also did not answer this question: Are you cross compiling these examples for the board?
What Qt version do you use?
-
@Nunzio
I know nothing about this, and @jsulm knows more and you should answer his questions, but just looking at the errors in your screenshot and comparing against the docs forQCanBusDeviceInfo
at https://doc.qt.io/qt-5/qcanbusdeviceinfo.html I can indeed see that neitherplugin()
noralias()
are listed as members of that class, while e.g.name()
(which you use but does not error) is there.... -
@jsulm
/home/dom/qtserialbus/examples/serialbus/can/canbusdeviceinfobox.cpp:90: error: ‘const class QCanBusDeviceInfo’ has no member named ‘plugin’
90 | m_ui->pluginLabel->setText(tr("Plugin: %1").arg(info.plugin()));
| ^~~~~~/home/dom/qtserialbus/examples/serialbus/can/canbusdeviceinfobox.cpp:97: error: ‘const class QCanBusDeviceInfo’ has no member named ‘alias’
97 | QString alias = info.alias();
| ^~~~~/home/dom/qtserialbus/examples/serialbus/can/bitratebox.cpp:62: error: no matching function for call to ‘BitRateBox::connect(BitRateBox*, <unresolved overloaded function type>, BitRateBox*, void (BitRateBox::*)(int))’
62 | this, &BitRateBox::checkCustomSpeedPolicy);
| ^Thanks for all
-
@Nunzio said in Problems with CANOPEN on arm Cortex:
Qt Creator 4.11.0 based on Qt 5.12.12.8 (GCC 9.3.0, 64bit).
I asked which Qt version you're using, not what Qt was used to build QtCreator.
So, which Qt version do you use? -
I hope that these info can help us
How you can see I'm new in this world.
I have realized a program ( that works) with qt to move through relays some pistons; now I need to use the canopen protocol to move them. This is what I Know.
Thanks a lot for helping me and spending time for me
{noformat}
Qt 5.12.8 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 9.3.0) on "xcb"
OS: Ubuntu 20.04.3 LTS [linux version 5.13.0-37-generic]Architecture: x86_64; features: SSE2 SSE3 SSSE3 SSE4.1 SSE4.2 AVX AVX2
Environment:
QT_ACCESSIBILITY="1"
QT_IM_MODULE="ibus"Features: QT_NO_EXCEPTIONS
Library info:
PrefixPath: /usr
DocumentationPath: /usr/share/qt5/doc
HeadersPath: /usr/include/x86_64-linux-gnu/qt5
LibrariesPath: /usr/lib/x86_64-linux-gnu
LibraryExecutablesPath: /usr/lib/x86_64-linux-gnu/qt5/libexec
BinariesPath: /usr/lib/qt5/bin
PluginsPath: /usr/lib/x86_64-linux-gnu/qt5/plugins
ImportsPath: /usr/lib/x86_64-linux-gnu/qt5/imports
Qml2ImportsPath: /usr/lib/x86_64-linux-gnu/qt5/qml
ArchDataPath: /usr/lib/x86_64-linux-gnu/qt5
DataPath: /usr/share/qt5
TranslationsPath: /usr/share/qt5/translations
ExamplesPath: /usr/lib/x86_64-linux-gnu/qt5/examples
TestsPath: /usr/tests
SettingsPath: /etc/xdgStandard paths [... denote writable entry]:
DesktopLocation: "Desktop" /home/dom/Desktop
DocumentsLocation: "Documents" /home/dom/Documents
FontsLocation: "Fonts" /home/dom/.local/share/fonts /home/dom/.fonts
ApplicationsLocation: "Applications" /home/dom/.local/share/applications /usr/share/ubuntu/applications /usr/local/share/applications /usr/share/applications /var/lib/snapd/desktop/applications
MusicLocation: "Music" /home/dom/Music
MoviesLocation: "Movies" /home/dom/Videos
PicturesLocation: "Pictures" /home/dom/Pictures
TempLocation: "Temporary Directory" /tmp
HomeLocation: "Home" /home/dom
AppLocalDataLocation: "Application Data" /home/dom/.local/share/QtProject/qtdiag /usr/share/ubuntu/QtProject/qtdiag /usr/local/share/QtProject/qtdiag /usr/share/QtProject/qtdiag /var/lib/snapd/desktop/QtProject/qtdiag
CacheLocation: "Cache" /home/dom/.cache/QtProject/qtdiag
GenericDataLocation: "Shared Data" /home/dom/.local/share /usr/share/ubuntu /usr/local/share /usr/share /var/lib/snapd/desktop
RuntimeLocation: "Runtime" /run/user/1000
ConfigLocation: "Configuration" /home/dom/.config /etc/xdg/xdg-ubuntu /etc/xdg
DownloadLocation: "Download" /home/dom/Downloads
GenericCacheLocation: "Shared Cache" /home/dom/.cache
GenericConfigLocation: "Shared Configuration" /home/dom/.config /etc/xdg/xdg-ubuntu /etc/xdg
AppDataLocation: "Application Data" /home/dom/.local/share/QtProject/qtdiag /usr/share/ubuntu/QtProject/qtdiag /usr/local/share/QtProject/qtdiag /usr/share/QtProject/qtdiag /var/lib/snapd/desktop/QtProject/qtdiag
AppConfigLocation: "Application Configuration" /home/dom/.config/QtProject/qtdiag /etc/xdg/xdg-ubuntu/QtProject/qtdiag /etc/xdg/QtProject/qtdiagFile selectors (increasing order of precedence):
en_US unix linux ubuntuNetwork:
Using "OpenSSL 1.1.1f 31 Mar 2020", version: 0x1010106fPlatform capabilities: ThreadedPixmaps OpenGL ThreadedOpenGL WindowMasks MultipleWindows ForeignWindows NonFullScreenWindows NativeWidgets WindowManagement SyncState RasterGLSurface SwitchableWidgetComposition
Style hints:
mouseDoubleClickInterval: 400
mousePressAndHoldInterval: 500
startDragDistance: 8
startDragTime: 500
startDragVelocity: 0
keyboardInputInterval: 400
keyboardAutoRepeatRate: 30
cursorFlashTime: 1200
showIsFullScreen: 0
showIsMaximized: 0
passwordMaskDelay: 0
passwordMaskCharacter: U+2022
fontSmoothingGamma: 1.7
useRtlExtensions: 0
setFocusOnTouchRelease: 0
tabFocusBehavior: Qt::TabFocusAllControls
singleClickActivation: 0Additional style hints (QPlatformIntegration):
ReplayMousePressOutsidePopup: 0Theme:
Platforms requested : ubuntu,gtk3,gnome,generic
available : gtk3
Styles requested : fusion,windows
available : Windows,Fusion
Icon theme : Yaru, from /usr/share/icons,/var/lib/snapd/desktop/icons
System font : "Ubuntu" 11
Native file dialog
Native color dialog
Native font dialogFonts:
General font : "Ubuntu" 11
Fixed font : "monospace" 11
Title font : "DejaVu Sans" 12
Smallest font: "DejaVu Sans" 12Palette:
QPalette::WindowText: #ff000000
QPalette::Button: #ffefefef
QPalette::Light: #ffffffff
QPalette::Midlight: #ffcbcbcb
QPalette::Dark: #ff9f9f9f
QPalette::Mid: #ffb8b8b8
QPalette::Text: #ff000000
QPalette::BrightText: #ffffffff
QPalette::ButtonText: #ff000000
QPalette::Base: #ffffffff
QPalette::Window: #ffefefef
QPalette::Shadow: #ff767676
QPalette::Highlight: #ff308cc6
QPalette::HighlightedText: #ffffffff
QPalette::Link: #ff0000ff
QPalette::LinkVisited: #ffff00ff
QPalette::AlternateBase: #fff7f7f7
QPalette::NoRole: #ff000000
QPalette::ToolTipBase: #ffffffdc
QPalette::ToolTipText: #ff000000
QPalette::PlaceholderText: #80000000Screens: 1, High DPI scaling: inactive
0 "Virtual1" Depth: 24 Primary: yes
Manufacturer:
Model:
Serial number:
Geometry: 1680x1050+0+0 Available: 1608x1023+72+27
Physical size: 445x278 mm Refresh: 59 Hz Power state: 0
Physical DPI: 95.8921,95.9353 Logical DPI: 96,96 Subpixel_None
DevicePixelRatio: 1 Pixel density: 1
Primary orientation: 2 Orientation: 2 Native orientation: 0 OrientationUpdateMask: 0LibGL Vendor: Mesa/X.org
Renderer: llvmpipe (LLVM 12.0.0, 256 bits)
Version: 3.1 Mesa 21.2.6
Shading language: 1.40
Format: Version: 3.1 Profile: 0 Swap behavior: 0 Buffer size (RGB): 8,8,8
Profile: None (QOpenGLFunctions_3_1), Core (QOpenGLFunctions_3_1_Core), Compatibility (QOpenGLFunctions_3_1_Compatibility)Unable to create a Vulkan instance, error code is0
Failed to load vulkan: Cannot load library vulkan: (vulkan: cannot open shared object file: No such file or directory)
initInstance: No Vulkan library available
Failed to create platform Vulkan instancePlugin information:
- Android 4.11.0
- AutoTest 4.11.0
AutotoolsProjectManager 4.11.0
BareMetal 4.11.0 - Bazaar 4.11.0
Beautifier 4.11.0 - BinEditor 4.11.0
- Bookmarks 4.11.0
Boot2Qt 4.11.0 - CMakeProjectManager 4.11.0
- CVS 4.11.0
ClangCodeModel 4.11.0
ClangFormat 4.11.0
ClangPchManager 4.11.0
ClangRefactoring 4.11.0 - ClangTools 4.11.0
- ClassView 4.11.0
ClearCase 4.11.0 - CodePaster 4.11.0
CompilationDatabaseProjectManager 4.11.0 - Core 4.11.0
- CppEditor 4.11.0
- CppTools 4.11.0
Cppcheck 4.11.0 - CtfVisualizer 4.11.0
- Debugger 4.11.0
- Designer 4.11.0
- DiffEditor 4.11.0
EmacsKeys 4.11.0 - FakeVim 4.11.0
- GLSLEditor 4.11.0
- GenericProjectManager 4.11.0
- Git 4.11.0
- Help 4.11.0
- ImageViewer 4.11.0
Ios 4.11.0 - LanguageClient 4.11.0
- Macros 4.11.0
McuSupport 4.11.0 - Mercurial 4.11.0
- ModelEditor 4.11.0
Nim 4.11.0 - PerfProfiler 4.11.0
Perforce 4.11.0 - ProjectExplorer 4.11.0
- Python 4.11.0
- QbsProjectManager 4.11.0
- QmakeProjectManager 4.11.0
- QmlDesigner 4.11.0
- QmlJSEditor 4.11.0
- QmlJSTools 4.11.0
- QmlPreview 4.11.0
- QmlProfiler 4.11.0
- QmlProjectManager 4.11.0
- Qnx 4.11.0
- QtSupport 4.11.0
- RemoteLinux 4.11.0
- ResourceEditor 4.11.0
- ScxmlEditor 4.11.0
SerialTerminal 4.11.0
SilverSearcher 4.11.0
StudioWelcome 4.11.0 - Subversion 4.11.0
- TaskList 4.11.0
- TextEditor 4.11.0
Todo 4.11.0
UpdateInfo 4.11.0 - Valgrind 4.11.0
- VcsBase 4.11.0
WebAssembly 4.11.0 - Welcome 4.11.0
WinRt 4.11.0
Qt Creator 4.11.0
Based on Qt 5.12.8 (GCC 9.3.0, 64 bit){noformat}
-
@Nunzio said in Problems with CANOPEN on arm Cortex:
qt 6.2.4
I don't think you're using Qt6.
Because Qt6 has the methods and you would not get these errors, see https://doc-snapshots.qt.io/qt6-dev/qcanbusdeviceinfo.html
Make sure you really use Qt6.