SlideShare a Scribd company logo
1 of 32
Download to read offline
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/

More Related Content

What's hot

Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic ControlSUSE Labs Taipei
 
Linux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownLinux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownScyllaDB
 
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceBrendan Gregg
 
eBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KerneleBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KernelThomas Graf
 
Trace kernel code tips
Trace kernel code tipsTrace kernel code tips
Trace kernel code tipsViller Hsiao
 
Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Kynetics
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingViller Hsiao
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at NetflixBrendan Gregg
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux SystemJian-Hong Pan
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsHisaki Ohara
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/CoreShay Cohen
 
Velocity 2017 Performance analysis superpowers with Linux eBPF
Velocity 2017 Performance analysis superpowers with Linux eBPFVelocity 2017 Performance analysis superpowers with Linux eBPF
Velocity 2017 Performance analysis superpowers with Linux eBPFBrendan Gregg
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCKernel TLV
 
USENIX Vault'19: Performance analysis in Linux storage stack with BPF
USENIX Vault'19: Performance analysis in Linux storage stack with BPFUSENIX Vault'19: Performance analysis in Linux storage stack with BPF
USENIX Vault'19: Performance analysis in Linux storage stack with BPFTaeung Song
 

What's hot (20)

Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic Control
 
Linux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance ShowdownLinux Kernel vs DPDK: HTTP Performance Showdown
Linux Kernel vs DPDK: HTTP Performance Showdown
 
OpenCL Heterogeneous Parallel Computing
OpenCL Heterogeneous Parallel ComputingOpenCL Heterogeneous Parallel Computing
OpenCL Heterogeneous Parallel Computing
 
LISA2019 Linux Systems Performance
LISA2019 Linux Systems PerformanceLISA2019 Linux Systems Performance
LISA2019 Linux Systems Performance
 
eBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux KerneleBPF - Rethinking the Linux Kernel
eBPF - Rethinking the Linux Kernel
 
Trace kernel code tips
Trace kernel code tipsTrace kernel code tips
Trace kernel code tips
 
Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7Heterogeneous multiprocessing on androd and i.mx7
Heterogeneous multiprocessing on androd and i.mx7
 
Meet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracingMeet cute-between-ebpf-and-tracing
Meet cute-between-ebpf-and-tracing
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
 
Launch the First Process in Linux System
Launch the First Process in Linux SystemLaunch the First Process in Linux System
Launch the First Process in Linux System
 
Intel DPDK Step by Step instructions
Intel DPDK Step by Step instructionsIntel DPDK Step by Step instructions
Intel DPDK Step by Step instructions
 
Embedded Linux on ARM
Embedded Linux on ARMEmbedded Linux on ARM
Embedded Linux on ARM
 
eBPF maps 101
eBPF maps 101eBPF maps 101
eBPF maps 101
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/Core
 
Velocity 2017 Performance analysis superpowers with Linux eBPF
Velocity 2017 Performance analysis superpowers with Linux eBPFVelocity 2017 Performance analysis superpowers with Linux eBPF
Velocity 2017 Performance analysis superpowers with Linux eBPF
 
Building Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCCBuilding Network Functions with eBPF & BCC
Building Network Functions with eBPF & BCC
 
USENIX Vault'19: Performance analysis in Linux storage stack with BPF
USENIX Vault'19: Performance analysis in Linux storage stack with BPFUSENIX Vault'19: Performance analysis in Linux storage stack with BPF
USENIX Vault'19: Performance analysis in Linux storage stack with BPF
 
mTCP使ってみた
mTCP使ってみたmTCP使ってみた
mTCP使ってみた
 
Hands-on ethernet driver
Hands-on ethernet driverHands-on ethernet driver
Hands-on ethernet driver
 

Similar to 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
 

Similar to 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
 

Recently uploaded

Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gapedkojalkojal131
 
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查awo24iot
 
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
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...Suhani Kapoor
 
Develop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointDevelop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointGetawu
 
Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...
Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...
Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...Pooja Nehwal
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...Pooja Nehwal
 
Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006Pooja Nehwal
 
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)kojalkojal131
 
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
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...anilsa9823
 
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...tanu pandey
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...Pooja Nehwal
 
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
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
 
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Pooja Nehwal
 
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsPooja Nehwal
 
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...Call Girls in Nagpur High Profile
 

Recently uploaded (20)

Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
 
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
 
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...
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
 
Develop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power pointDevelop Keyboard Skill.pptx er power point
Develop Keyboard Skill.pptx er power point
 
Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...
Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...
Call Girls in Thane 9892124323, Vashi cAll girls Serivces Juhu Escorts, powai...
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
 
Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006Call Girls in Vashi Escorts Services - 7738631006
Call Girls in Vashi Escorts Services - 7738631006
 
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
(=Towel) Dubai Call Girls O525547819 Call Girls In Dubai (Fav0r)
 
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...
 
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(ANIKA) Wanwadi Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
Lucknow 💋 Call Girls Adil Nagar | ₹,9500 Pay Cash 8923113531 Free Home Delive...
 
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...Shikrapur Call Girls Most Awaited Fun  6297143586 High Profiles young Beautie...
Shikrapur Call Girls Most Awaited Fun 6297143586 High Profiles young Beautie...
 
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
9892124323 Pooja Nehwal Call Girls Services Call Girls service in Santacruz A...
 
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Bhavna Call 7001035870 Meet With Nagpur Escorts
 
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...
 
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service NashikLow Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
Low Rate Call Girls Nashik Vedika 7001305949 Independent Escort Service Nashik
 
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
 
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call Girls
 
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
VVIP Pune Call Girls Kalyani Nagar (7001035870) Pune Escorts Nearby with Comp...
 

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