SlideShare ist ein Scribd-Unternehmen logo
1 von 32
Downloaden Sie, um offline zu lesen
Developing Embedded
Solutions on
Asymmetric Systems
using QT
Fernando Luiz Cola
fernando.cola@emc-logic.com
Whoami?
Fernando Luiz Cola
Embedded Software Developer
Emc Logic
fernando.cola@emc-logic.com
Understand AMP and SMP architecture1
Applications and solution where AMP is a good fit2
Overview I.MX7 Processor3
RPMSG and Inter Processor Communication4
Agenda / Objectives
Bottom-up example application with Qt / Linux /
FreeRTOS
5
Introduction AMP
vs SMP
Symmetric Multi-Processing
Kernel SMP
Core1
Core2
OS
APP APP APP
◆ Single OS controlling two or more cores
of the same architecture
◆ CPU shares memory space
◆ Dynamic Scheduling e load balancing
Chip
Asymmetric Multi-Processing
Multi Core API
Core1
Core2
OS
APP
Chip
APP
OS / RTOS / Other
Task Task
◆ Different OS on each core
◆ Different core architectures
◆ Each core may run full-feature OS, Real-time OS or
baremetal code
◆ Inter process communication protocol
◆ Efficient when the application can be statically
partitioned across cores
Example
Multi-Chip System
CPU1
MPU
Linux
Non Critical Task Critical Task
Same SoC AMP
FreeRTOS
CPU
MPU
Linux
Non Critical Task Critical Task
FreeRTOS
Chip 1 Chip 2
Dedicated Channel
Internal Communication
External
Communication
UART / I2C
Applications Examples
Robotics / Real-Time
Applications Examples
Mobile / Sensor Acquisition
Applications Examples
Wearable / Low-Power
Overview I.MX7
Architecture
NXP I.MX7 Overview
◆ Dual Cortex A7 core + Cortex M4
core
◆ Master/Slave architecture
◆ A7 is the master
◆ M4 is the Slave
◆ Inter processor communication
◆ MU – Message Unit
◆ RDC – Resource Domain Controller
NXP I.MX7 Overview
RDC – Resource Domain Controller
NXP I.MX7 Overview
◆ Enables two processors within the SoC to
communicate and coordinate by passing
messages( ex: data, status and control)
◆ Signal the other processor using interrupts
MU – Message Unit
Inter Processor Communication
Transport Layer
MAC Layer
OpenAMP RPMSG
VirtIO, Virtqueue, Vring
MU, Mailbox, shared memory Shared Memory
Inter-Core Interrupts
Physical Layer
VirtIO / Virtqueu
RPMSG
RPMSG on Linux
User space Kernel space
M4
/dev/ttyRP
MSG
endpoint
Platform driver
drivers/rpmsg/imx_rpmsg.c
VirtIO RPMsg driver
drivers/rpmsg/virtio_rpmsg_bus.c
RPMsg char driver
drivers/rpmsg/rpmsg_char.c
Platform bus
VirtIO bus
RPMsg bus
1 – Register Platform Driver
2 – Register VirtIO Device
3 – Register VirtIO Driver
4 – Register RPMsg device
5 – Register RPMsg driver
Remote Core
Linux and FreeRTOS talking
Linux - Master Domain FreeRTOS – Remote Domain
U-boot load and starts
M4 Core and Linux Kernel
RPMSG driver creates
virtqueues and endpoints
Notifies remote processor
RPMSG driver waits for
name service announcement
Send/Receive messages
RPMSG app creates virtqueues
Waits for link being up
App creates endpoints and
sends name service announcement
Send/Receive messages
Application
evelopment with Qt
Hybrid Linux Qt / FreeRTOS Demo
● IMU sensor (I2C) read by MCU
● Qt App read data from MCU using RPMSG
● Plot data on Linux using QtCharts
Hardware Setup
● Colibri iMX7D 512MB
● Iris Carrier Board
● 7” display
● MPU6050
Hardware Setup
Master / Linux
(A7)
Remote / FreeRTOS
(M4)
MU
Shared
Memory
RPMSG
Iris Board + I.MX7
MPU6050
Host PC
Uart 1
Uart 2
I2C
Qt Development
● Toolchain(cross-compile, rootfs, libraries) generated by Yocto-Project
● Configure Qt Kit for I.MX7 using toolchain generated by Yocto
● QtQuick and QML on i.MX7(no-GPU) Qt 2D Software Rendering
● qputenv("QMLSCENE_DEVICE", QbyteArray("softwarecontext"));
● Chart Visualization via QtCharts
− Add to your .pro: QT += charts
● QtCharts is GPLv3!
Architecture Overview
Kernel space
User space
/dev/RPMSG
rpmsg_char
readI2CData
Read Data Task
Qt App
IMU Sensor
Rpmsg
channel
Rpmsg
channel
Linux FreeRTOS
Realtime Class
Realtime {
id: realtime
}
class Realtime : public QObject
{
Q_OBJECT
Q_PROPERTY(int accX READ XAcc NOTIFY accChanged)
Q_PROPERTY(int accY READ YAcc NOTIFY accChanged)
Q_PROPERTY(int accZ READ ZAcc NOTIFY accChanged)
)
public:
Realtime(QObject *parent = nullptr);
virtual ~Realtime();
private:
QFile rpmsgDevice;
signals:
void accChanged();
public slots:
void update();
};
Realtime.h
Main.qml
Realtime Class
rpmsDevice.setFileName(“/dev/ttyRPMSG”);
rpmsgDevice.open(QIODevice::ReadWrite);
qDebug() << "Get Sensor Realtime Data";
if(!rpmsgDevice.isOpen()){
qDebug() << "RPMSG Device not open";
} else {
int accx, accy, accz;
QByteArray query("acc");
rpmsgDevice.write(query);
rpmsgDevice.flush();
QbyteArray response = rpmsgDevice.readLine(64);
sscanf(response.constData(),
"x:%d,y:%d,z:%d", &accx, &accy, &accz);
}
Realtime.cpp
QML
Timer {
id: timer
property int index: 0
running: true
repeat: true
interval: 1000
onTriggered: {
realtime.update();
accx.append(index,realtime.accX);
accy.append(index,realtime.accY);
accz.append(index,realtime.accZ);
index++;
axisX.min++;
axisX.max++;
}
}
Main.qml
QML
Main.qml
ChartView {
id: chartview
animationOptions: ChartView.NoAnimation
theme: ChartView.ChartThemeDark
antialiasing: true
anchors.fill: parent
ValueAxis {
id: axisX
min: -5
max: 5
}
ValueAxis {
id: axisY
min: -10
max: 10
}
}
LineSeries {
id: accx
name: "accx"
axisY: axisY
axisX: axisX
}
LineSeries {
id: accy
name: "accy"
axisY: axisY
axisX: axisX
}
LineSeries {
id: accz
name: "accz"
axisY: axisY
axisX: axisX
}
Demo Communication between cores
https://www.youtube.com/watch?v=SnLAySJPCBU
Demo QT charts
References
● M4 Firmware - https://github.com/ferlzc/Asymmetric_QT_demo_firmware
● QT Application - https://github.com/ferlzc/Asymmetric_QT_demo
References
● Linux and Zephry “talking” to each other in the same SoC
● https://events.linuxfoundation.org/wp-content/uploads/2017/12/Linux-and-Zephyr-%E2%80%9C
Talking%E2%80%9D-to-Each-Other-in-the-Same-SoC-Diego-Sueiro-Sepura-Embarcados.pdf
● OpenAMP Project Page - https://github.com/OpenAMP/
● An Introduction to Asymmetric Multiprocessing: When this Architecture can be a Game
Changer and How to Survive It (ELC 2018)
https://elinux.org/images/6/6e/AMP_-_Kynetics_ELC_2018_Portland.pdf
● Asymetric Multiprocessing and Embedded Linux (ELC 2017)
https://elinux.org/images/3/3b/NOVAK_CERVENKA.pdf
● Toradex FreeRTOS on Cortex-M4 of Colibri IMX7
https://developer.toradex.com/knowledge-base/freertos-on-the-cortex-m4-of-a-colibri-imx7
Fernando Luiz Cola
fernando.cola@emc-logic.com
Obrigado!
https://www.linkedin.com/in/ferlzc/
https://www.emc-logic.com/

Weitere ähnliche Inhalte

Was ist angesagt?

Virtualized network with openvswitch
Virtualized network with openvswitchVirtualized network with openvswitch
Virtualized network with openvswitchSim Janghoon
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequenceHoucheng Lin
 
Xen in Safety-Critical Systems - Critical Summit 2022
Xen in Safety-Critical Systems - Critical Summit 2022Xen in Safety-Critical Systems - Critical Summit 2022
Xen in Safety-Critical Systems - Critical Summit 2022Stefano Stabellini
 
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareLinaro
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013Wave Digitech
 
BUD17-416: Benchmark and profiling in OP-TEE
BUD17-416: Benchmark and profiling in OP-TEE BUD17-416: Benchmark and profiling in OP-TEE
BUD17-416: Benchmark and profiling in OP-TEE Linaro
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)Nanik Tolaram
 
SR-IOV: The Key Enabling Technology for Fully Virtualized HPC Clusters
SR-IOV: The Key Enabling Technology for Fully Virtualized HPC ClustersSR-IOV: The Key Enabling Technology for Fully Virtualized HPC Clusters
SR-IOV: The Key Enabling Technology for Fully Virtualized HPC ClustersGlenn K. Lockwood
 
ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...
ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...
ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...The Linux Foundation
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernelguest547d74
 
ABS 2012 - Android Device Porting Walkthrough
ABS 2012 - Android Device Porting WalkthroughABS 2012 - Android Device Porting Walkthrough
ABS 2012 - Android Device Porting WalkthroughBenjamin Zores
 
The Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxThe Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxPicker Weng
 

Was ist angesagt? (20)

Virtualized network with openvswitch
Virtualized network with openvswitchVirtualized network with openvswitch
Virtualized network with openvswitch
 
Embedded Android : System Development - Part I
Embedded Android : System Development - Part IEmbedded Android : System Development - Part I
Embedded Android : System Development - Part I
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
Xen in Safety-Critical Systems - Critical Summit 2022
Xen in Safety-Critical Systems - Critical Summit 2022Xen in Safety-Critical Systems - Critical Summit 2022
Xen in Safety-Critical Systems - Critical Summit 2022
 
Android Things : Building Embedded Devices
Android Things : Building Embedded DevicesAndroid Things : Building Embedded Devices
Android Things : Building Embedded Devices
 
gcc and friends
gcc and friendsgcc and friends
gcc and friends
 
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted FirmwareHKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
HKG15-505: Power Management interactions with OP-TEE and Trusted Firmware
 
U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
BUD17-416: Benchmark and profiling in OP-TEE
BUD17-416: Benchmark and profiling in OP-TEE BUD17-416: Benchmark and profiling in OP-TEE
BUD17-416: Benchmark and profiling in OP-TEE
 
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
"Learning AOSP" - Android Hardware Abstraction Layer (HAL)
 
Binder: Android IPC
Binder: Android IPCBinder: Android IPC
Binder: Android IPC
 
SR-IOV: The Key Enabling Technology for Fully Virtualized HPC Clusters
SR-IOV: The Key Enabling Technology for Fully Virtualized HPC ClustersSR-IOV: The Key Enabling Technology for Fully Virtualized HPC Clusters
SR-IOV: The Key Enabling Technology for Fully Virtualized HPC Clusters
 
Embedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernelEmbedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernel
 
Explore Android Internals
Explore Android InternalsExplore Android Internals
Explore Android Internals
 
ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...
ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...
ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...
 
Linux Internals - Part I
Linux Internals - Part ILinux Internals - Part I
Linux Internals - Part I
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
ABS 2012 - Android Device Porting Walkthrough
ABS 2012 - Android Device Porting WalkthroughABS 2012 - Android Device Porting Walkthrough
ABS 2012 - Android Device Porting Walkthrough
 
The Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on LinuxThe Theory and Implementation of DVFS on Linux
The Theory and Implementation of DVFS on Linux
 

Ähnlich wie Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS

AMP Kynetics - ELC 2018 Portland
AMP  Kynetics - ELC 2018 PortlandAMP  Kynetics - ELC 2018 Portland
AMP Kynetics - ELC 2018 PortlandKynetics
 
Asymmetric Multiprocessing - Kynetics ELC 2018 portland
Asymmetric Multiprocessing - Kynetics ELC 2018 portlandAsymmetric Multiprocessing - Kynetics ELC 2018 portland
Asymmetric Multiprocessing - Kynetics ELC 2018 portlandNicola La Gloria
 
OSN days 2019 - Open Networking and Programmable Switch
OSN days 2019 - Open Networking and Programmable SwitchOSN days 2019 - Open Networking and Programmable Switch
OSN days 2019 - Open Networking and Programmable SwitchChun Ming Ou
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Andriy Berestovskyy
 
Introduction to FreeRTOS
Introduction to FreeRTOSIntroduction to FreeRTOS
Introduction to FreeRTOSICS
 
Virtual platform
Virtual platformVirtual platform
Virtual platformsean chen
 
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)Yuuki Takano
 
Challenges in GPU compilers
Challenges in GPU compilersChallenges in GPU compilers
Challenges in GPU compilersAnastasiaStulova
 
Network-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQNetwork-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQICS
 
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...OpenShift Origin
 
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021StreamNative
 
IRQs: the Hard, the Soft, the Threaded and the Preemptible
IRQs: the Hard, the Soft, the Threaded and the PreemptibleIRQs: the Hard, the Soft, the Threaded and the Preemptible
IRQs: the Hard, the Soft, the Threaded and the PreemptibleAlison Chaiken
 
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Michelle Holley
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementationRajan Kumar
 
HiPEAC Computing Systems Week 2022_Mario Porrmann presentation
HiPEAC Computing Systems Week 2022_Mario Porrmann presentationHiPEAC Computing Systems Week 2022_Mario Porrmann presentation
HiPEAC Computing Systems Week 2022_Mario Porrmann presentationVEDLIoT Project
 
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...Linaro
 

Ähnlich wie Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS (20)

AMP Kynetics - ELC 2018 Portland
AMP  Kynetics - ELC 2018 PortlandAMP  Kynetics - ELC 2018 Portland
AMP Kynetics - ELC 2018 Portland
 
Asymmetric Multiprocessing - Kynetics ELC 2018 portland
Asymmetric Multiprocessing - Kynetics ELC 2018 portlandAsymmetric Multiprocessing - Kynetics ELC 2018 portland
Asymmetric Multiprocessing - Kynetics ELC 2018 portland
 
OSN days 2019 - Open Networking and Programmable Switch
OSN days 2019 - Open Networking and Programmable SwitchOSN days 2019 - Open Networking and Programmable Switch
OSN days 2019 - Open Networking and Programmable Switch
 
ucOS
ucOSucOS
ucOS
 
Multicore
MulticoreMulticore
Multicore
 
Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)Network Programming: Data Plane Development Kit (DPDK)
Network Programming: Data Plane Development Kit (DPDK)
 
Introduction to FreeRTOS
Introduction to FreeRTOSIntroduction to FreeRTOS
Introduction to FreeRTOS
 
Virtual platform
Virtual platformVirtual platform
Virtual platform
 
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
SF-TAP: Scalable and Flexible Traffic Analysis Platform (USENIX LISA 2015)
 
Challenges in GPU compilers
Challenges in GPU compilersChallenges in GPU compilers
Challenges in GPU compilers
 
Enduro/X Middleware
Enduro/X MiddlewareEnduro/X Middleware
Enduro/X Middleware
 
Network-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQNetwork-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQ
 
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
Extending OpenShift Origin: Build Your Own Cartridge with Bill DeCoste of Red...
 
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
Apache Pulsar with MQTT for Edge Computing - Pulsar Summit Asia 2021
 
IRQs: the Hard, the Soft, the Threaded and the Preemptible
IRQs: the Hard, the Soft, the Threaded and the PreemptibleIRQs: the Hard, the Soft, the Threaded and the Preemptible
IRQs: the Hard, the Soft, the Threaded and the Preemptible
 
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
Install FD.IO VPP On Intel(r) Architecture & Test with Trex*
 
RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
 
HiPEAC Computing Systems Week 2022_Mario Porrmann presentation
HiPEAC Computing Systems Week 2022_Mario Porrmann presentationHiPEAC Computing Systems Week 2022_Mario Porrmann presentation
HiPEAC Computing Systems Week 2022_Mario Porrmann presentation
 
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
HKG18-411 - Introduction to OpenAMP which is an open source solution for hete...
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 

Kürzlich hochgeladen

Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Call Girls in Nagpur High Profile
 
SM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdfSM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdfStefanoBiamonte1
 
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...amitlee9823
 
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...MOHANI PANDEY
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...drmarathore
 
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...Amil baba
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...Pooja Nehwal
 
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...Naicy mandal
 
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night StandCall Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理
一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理
一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理bbhul52a
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...motiram463
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Call Girls in Nagpur High Profile
 

Kürzlich hochgeladen (20)

Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...Top Rated  Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
Top Rated Pune Call Girls Chakan ⟟ 6297143586 ⟟ Call Me For Genuine Sex Serv...
 
SM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdfSM-N975F esquematico completo - reparación.pdf
SM-N975F esquematico completo - reparación.pdf
 
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Ashok Nagar  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Ashok Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
Call Girls Banashankari Just Call 👗 7737669865 👗 Top Class Call Girl Service ...
 
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
Get Premium Pimple Saudagar Call Girls (8005736733) 24x7 Rate 15999 with A/c ...
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
 
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Call Girls Chickpet ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Dharwad 7001035870 Whatsapp Number, 24/07 Booking
 
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
NO1 Verified Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi A...
 
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
Pooja 9892124323, Call girls Services and Mumbai Escort Service Near Hotel Th...
 
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
Makarba ( Call Girls ) Ahmedabad ✔ 6297143586 ✔ Hot Model With Sexy Bhabi Rea...
 
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night StandCall Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In RT Nagar ☎ 7737669865 🥵 Book Your One night Stand
 
一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理
一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理
一比一原版(nyu毕业证书)纽约大学毕业证学历认证靠谱办理
 
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
(👉Ridhima)👉VIP Model Call Girls Mulund ( Mumbai) Call ON 9967824496 Starting ...
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Kothrud Call Me 7737669865 Budget Friendly No Advance Booking
 
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...Top Rated  Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
Top Rated Pune Call Girls Shirwal ⟟ 6297143586 ⟟ Call Me For Genuine Sex Ser...
 

Building a QT based solution on a i.MX7 processor running Linux and FreeRTOS

  • 1. Developing Embedded Solutions on Asymmetric Systems using QT Fernando Luiz Cola fernando.cola@emc-logic.com
  • 2. Whoami? Fernando Luiz Cola Embedded Software Developer Emc Logic fernando.cola@emc-logic.com
  • 3. Understand AMP and SMP architecture1 Applications and solution where AMP is a good fit2 Overview I.MX7 Processor3 RPMSG and Inter Processor Communication4 Agenda / Objectives Bottom-up example application with Qt / Linux / FreeRTOS 5
  • 5. Symmetric Multi-Processing Kernel SMP Core1 Core2 OS APP APP APP ◆ Single OS controlling two or more cores of the same architecture ◆ CPU shares memory space ◆ Dynamic Scheduling e load balancing Chip
  • 6. Asymmetric Multi-Processing Multi Core API Core1 Core2 OS APP Chip APP OS / RTOS / Other Task Task ◆ Different OS on each core ◆ Different core architectures ◆ Each core may run full-feature OS, Real-time OS or baremetal code ◆ Inter process communication protocol ◆ Efficient when the application can be statically partitioned across cores
  • 7. Example Multi-Chip System CPU1 MPU Linux Non Critical Task Critical Task Same SoC AMP FreeRTOS CPU MPU Linux Non Critical Task Critical Task FreeRTOS Chip 1 Chip 2 Dedicated Channel Internal Communication External Communication UART / I2C
  • 9. Applications Examples Mobile / Sensor Acquisition
  • 12. NXP I.MX7 Overview ◆ Dual Cortex A7 core + Cortex M4 core ◆ Master/Slave architecture ◆ A7 is the master ◆ M4 is the Slave ◆ Inter processor communication ◆ MU – Message Unit ◆ RDC – Resource Domain Controller
  • 13. NXP I.MX7 Overview RDC – Resource Domain Controller
  • 14. NXP I.MX7 Overview ◆ Enables two processors within the SoC to communicate and coordinate by passing messages( ex: data, status and control) ◆ Signal the other processor using interrupts MU – Message Unit
  • 15. Inter Processor Communication Transport Layer MAC Layer OpenAMP RPMSG VirtIO, Virtqueue, Vring MU, Mailbox, shared memory Shared Memory Inter-Core Interrupts Physical Layer VirtIO / Virtqueu RPMSG
  • 16. RPMSG on Linux User space Kernel space M4 /dev/ttyRP MSG endpoint Platform driver drivers/rpmsg/imx_rpmsg.c VirtIO RPMsg driver drivers/rpmsg/virtio_rpmsg_bus.c RPMsg char driver drivers/rpmsg/rpmsg_char.c Platform bus VirtIO bus RPMsg bus 1 – Register Platform Driver 2 – Register VirtIO Device 3 – Register VirtIO Driver 4 – Register RPMsg device 5 – Register RPMsg driver Remote Core
  • 17. Linux and FreeRTOS talking Linux - Master Domain FreeRTOS – Remote Domain U-boot load and starts M4 Core and Linux Kernel RPMSG driver creates virtqueues and endpoints Notifies remote processor RPMSG driver waits for name service announcement Send/Receive messages RPMSG app creates virtqueues Waits for link being up App creates endpoints and sends name service announcement Send/Receive messages
  • 19. Hybrid Linux Qt / FreeRTOS Demo ● IMU sensor (I2C) read by MCU ● Qt App read data from MCU using RPMSG ● Plot data on Linux using QtCharts
  • 20. Hardware Setup ● Colibri iMX7D 512MB ● Iris Carrier Board ● 7” display ● MPU6050
  • 21. Hardware Setup Master / Linux (A7) Remote / FreeRTOS (M4) MU Shared Memory RPMSG Iris Board + I.MX7 MPU6050 Host PC Uart 1 Uart 2 I2C
  • 22. Qt Development ● Toolchain(cross-compile, rootfs, libraries) generated by Yocto-Project ● Configure Qt Kit for I.MX7 using toolchain generated by Yocto ● QtQuick and QML on i.MX7(no-GPU) Qt 2D Software Rendering ● qputenv("QMLSCENE_DEVICE", QbyteArray("softwarecontext")); ● Chart Visualization via QtCharts − Add to your .pro: QT += charts ● QtCharts is GPLv3!
  • 23. Architecture Overview Kernel space User space /dev/RPMSG rpmsg_char readI2CData Read Data Task Qt App IMU Sensor Rpmsg channel Rpmsg channel Linux FreeRTOS
  • 24. Realtime Class Realtime { id: realtime } class Realtime : public QObject { Q_OBJECT Q_PROPERTY(int accX READ XAcc NOTIFY accChanged) Q_PROPERTY(int accY READ YAcc NOTIFY accChanged) Q_PROPERTY(int accZ READ ZAcc NOTIFY accChanged) ) public: Realtime(QObject *parent = nullptr); virtual ~Realtime(); private: QFile rpmsgDevice; signals: void accChanged(); public slots: void update(); }; Realtime.h Main.qml
  • 25. Realtime Class rpmsDevice.setFileName(“/dev/ttyRPMSG”); rpmsgDevice.open(QIODevice::ReadWrite); qDebug() << "Get Sensor Realtime Data"; if(!rpmsgDevice.isOpen()){ qDebug() << "RPMSG Device not open"; } else { int accx, accy, accz; QByteArray query("acc"); rpmsgDevice.write(query); rpmsgDevice.flush(); QbyteArray response = rpmsgDevice.readLine(64); sscanf(response.constData(), "x:%d,y:%d,z:%d", &accx, &accy, &accz); } Realtime.cpp
  • 26. QML Timer { id: timer property int index: 0 running: true repeat: true interval: 1000 onTriggered: { realtime.update(); accx.append(index,realtime.accX); accy.append(index,realtime.accY); accz.append(index,realtime.accZ); index++; axisX.min++; axisX.max++; } } Main.qml
  • 27. QML Main.qml ChartView { id: chartview animationOptions: ChartView.NoAnimation theme: ChartView.ChartThemeDark antialiasing: true anchors.fill: parent ValueAxis { id: axisX min: -5 max: 5 } ValueAxis { id: axisY min: -10 max: 10 } } LineSeries { id: accx name: "accx" axisY: axisY axisX: axisX } LineSeries { id: accy name: "accy" axisY: axisY axisX: axisX } LineSeries { id: accz name: "accz" axisY: axisY axisX: axisX }
  • 28. Demo Communication between cores https://www.youtube.com/watch?v=SnLAySJPCBU
  • 30. References ● M4 Firmware - https://github.com/ferlzc/Asymmetric_QT_demo_firmware ● QT Application - https://github.com/ferlzc/Asymmetric_QT_demo
  • 31. References ● Linux and Zephry “talking” to each other in the same SoC ● https://events.linuxfoundation.org/wp-content/uploads/2017/12/Linux-and-Zephyr-%E2%80%9C Talking%E2%80%9D-to-Each-Other-in-the-Same-SoC-Diego-Sueiro-Sepura-Embarcados.pdf ● OpenAMP Project Page - https://github.com/OpenAMP/ ● An Introduction to Asymmetric Multiprocessing: When this Architecture can be a Game Changer and How to Survive It (ELC 2018) https://elinux.org/images/6/6e/AMP_-_Kynetics_ELC_2018_Portland.pdf ● Asymetric Multiprocessing and Embedded Linux (ELC 2017) https://elinux.org/images/3/3b/NOVAK_CERVENKA.pdf ● Toradex FreeRTOS on Cortex-M4 of Colibri IMX7 https://developer.toradex.com/knowledge-base/freertos-on-the-cortex-m4-of-a-colibri-imx7