Multi Source Translation Content

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Multi Source Translation Content

讨论

排序依据:
NXP BLE STACK: RT1060 Custom Profile This article explains how to implement a custom profile from both server and client side using the NXP BLE stack for the RT1060. Generic Attribute Profile To fully understand the procedure of how to implement a custom profile in this platform, we must understand the BLE basics. The GATT (Generic Attribute Profile) will help us establish in detail the way server and client exchanges data over a BLE connection. All standard BLE profiles are based on GATT and must comply with it to operate correctly. This means that if we want to have a successful connection and data transfer in our application, we must follow all the GATT procedures successfully. GATT roles: Server: This device will store the data to be transported or send and accepts the GATT requests, commands and confirmations from the client. Client: This device will access the data on the remote GATT server with operations such as read, write, notify or indicate. Figure 1. GATT Client-Server model GATT database defines a type of hierarchy to organize attributes. These are named as Profile, Service, Characteristic and Descriptor. The structure is shown in Figure 2. The profile is a high level definition that determines the behavior of the application as a whole. For example, a Temperature Sensor profile. This profiles are defined by at least one service. The service defines a specific functionality for the device (e.g. battery service). The next level in the structure is the characteristic. The service is defined by one or more characteristics that hold individual measurements, control points or other kind of data. Finally we find descriptors. Characteristics have descriptors that defines how characteristics have to be accessed to read or write information. Figure 2. GATT database structure Creating a New Profile With the GATT basics understood, we can start developing the code for our custom profile. In this case we will create a potentiometer custom profile. It will read the voltage drop of the potentiometer and send that value to the client every 5 seconds. Please note that in this document we will dismiss all the ADC initialization, the voltage value will be simulated. For time saving purposes, we will use the peripheral_ht and central_ht SDK examples structure to create this project. This means that the peripheral is going to be the server, the device that has the information. And the central will be the client, the device that gets the information. In case you don’t want to start this application from a SDK example, it is highly recommended to keep the same structure as in the examples, so if you would like to add your custom profile to an existing application, you have to prepare the project environment so all the new files where your service is declared is allocated in a specific path and avoid problems in the compiling process. For the case you want to add a new service to your project, it will be needed to create two folders called services and add our service files inside it. The first folder must be in the following route: ${ProjName}/edgefast/bluetooth/include/bluetooth. Inside this folder let´s create a new header file called pot.h. Note that if you are using the examples, you already have these folders so you only need to create the files. In this file we will declare the new UUID´s for our potentiometer service and the service characteristic. In this example we are declarin one profile, one service and one characteristic. To define a 128-bit UUID we are going to be using the macros available in the uuid.h file. The declarations will look like this: #define POTENTIOMETER_SERVICE_UUID 0xAA, 0x1C, 0x12, 0x5E, 0x40, 0xEE, 0xA1, 0xF1, 0xEE, 0xF4, 0x5E, 0xBA, 0x22, 0x33, 0xFF, 0x00 #define POTENTIOMETER_CHARACTERISTIC_UUID 0xAA, 0x1C, 0x12, 0x5E, 0x40, 0xEE, 0xA1, 0xF1, 0xEE, 0xF4, 0x5E, 0xBA, 0x22, 0x33, 0xFF, 0x01 #define POTENTIOMETER_SERVICE BT_UUID_DECLARE_128(POTENTIOMETER_SERVICE_UUID) #define POTENTIOMETER_CHARACTERISTIC BT_UUID_DECLARE_128(POTENTIOMETER_CHARACTERISTIC_UUID) In this case we are declaring a service with the 128-bit service UUID and a characteristic with its 128-bit characteristic UUID. These macros are helping us to declare a struct bt_uuid according to a specific UUID. The other service folder must be allocated in the following route: ${ProjName}/edgefast/bluetooth/source. Inside this folder we have to create a new source file called pot.c (for simplicity we will use the same #include as in hts.c). There are important configurations and declarations we need to have in this file like the read function callback and the service declaration. It will look something like this: static uint8_t pot_level = 0x01U; /* Read function */ static ssize_t read_plvl(struct bt_conn *conn, const struct bt_gatt_attr *attr, void *buf, uint16_t len, uint16_t offset) { uint8_t lvl = pot_level; pot_level ++; /* Voltage level simulation */ return bt_gatt_attr_read(conn, attr, buf, len, offset, &lvl, sizeof(lvl)); } /* Potentiometer Service Declaration */ BT_GATT_SERVICE_DEFINE(pot, /* Name of the service */ BT_GATT_PRIMARY_SERVICE(POTENTIOMETER_SERVICE), /* Primary sevice UUID */ BT_GATT_CHARACTERISTIC(POTENTIOMETER_CHARACTERISTIC, BT_GATT_CHRC_READ | BT_GATT_CHRC_NOTIFY, BT_GATT_PERM_READ, read_plvl, NULL, NULL), /* Potentiometer characteristic */ BT_GATT_CCC(NULL, BT_GATT_PERM_READ | BT_GATT_PERM_WRITE), /* Client Characteristic Configuration Descriptor */ ); As you can see we have this variable called pot_level. This variable is the one that has the “sensed” voltage drop of the potentiometer. In this case it is a simulated value. Every time a device requests for the voltage value, pot_level­ is increased by 1. We are also defining the potentiometer service with the macro BT_GATT_SERVICE_DEFINE. The name of our service is “pot” and we are defining the properties, permissions and the read callback for our service. We have finished with these two files and there is no need to modify them again. These files are used for both server and client. Finally we need to include the new folder´s to the project path. Once again, note that if you are using the examples, this step is not needed. To do this we have to open the project properties, and go to Settings of the C/C++ Build option. In the MCU C Compiler, we have to select the Includes folder and add the previous two paths. Figure 3. Path including We should be able the compile our service files without problem. Let’s start the server code. Server: We already have out service declared and now we have to create two new files that are going to handle the connections. We will be basing this part in the peripheral_ht SDK example. The new files should be allocated in the following route: ${ProjName}/source. These files are potentiometer.c and potentiometer.h. In the header file we will declare our potentiometer task, that is going to be our main task: void potentiometer_task(void *pvParameters); In the source file we will need to include the pot.h and potentiometer.h files and declare some new information. Use peripheral_ht.c as a base. We have to create and define the advertising and response packets, the connection callbacks and functions related to the connection. We are going to start declaring the connection variable: static struct bt_conn *default_conn; The advertising packet will have the following structure: static const struct bt_data ad[] = { BT_DATA_BYTES(BT_DATA_FLAGS, (BT_LE_AD_GENERAL | BT_LE_AD_NO_BREDR)), BT_DATA_BYTES(BT_DATA_UUID128_SOME, POTENTIOMETER_SERVICE_UUID), }; We are creating an advertising packet that is general discoverable and Bluetooth basic rate/enhanced data rate is not supported, we are also including the potentiometer service UUID. The response packet will have the following structure: #define DEVICE_NAME "pot" #define DEVICE_NAME_LEN (sizeof(DEVICE_NAME) - 1) static const struct bt_data sd[] = { BT_DATA(BT_DATA_NAME_COMPLETE, DEVICE_NAME, DEVICE_NAME_LEN), }; The response packet only has the device name, which in this case is pot. static void connected(struct bt_conn *conn, uint8_t error) { char addr[BT_ADDR_LE_STR_LEN]; struct bt_conn_info info; bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); if (error) { PRINTF("Failed to connect to %s (err %u)\n\r", addr, error); } else { error = bt_conn_get_info(conn, &info); /* Getting connection info */ if(error) { PRINTF("Failed to get info\n\r"); return; } default_conn = conn; PRINTF("Connected to: %s\n\r", addr); } } static void disconnected(struct bt_conn *conn, uint8_t reason) { PRINTF("Disconnected (reason 0x%02x/n", reason); if(default_conn) { bt_conn_unref(default_conn); default_conn = NULL; } } static struct bt_conn_cb conn_callbacks = { .connected = connected, .disconnected = disconnected, }; Let’s keep up with the code. The connected function is going to run when a device is successfully connected to our server, and the disconnected function is going to restore the connection to NULL every time a device gets disconnected. static void bt_ready(int error) { char addr_s[BT_ADDR_LE_STR_LEN]; bt_addr_le_t addr = {0}; size_t count = 1; if (error) { PRINTF("Bluetooth init failed (error %d)\n", error); return; } PRINTF("Bluetooth initialized\n\r"); bt_conn_cb_register(&conn_callbacks); /*Start advertising*/ error = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), sd, ARRAY_SIZE(sd)); if (error) { PRINTF("Advertising failed to start (error %d)\n", error); return; } bt_id_get(&addr, &count); bt_addr_le_to_str(&addr, addr_s, sizeof(addr_s)); PRINTF("Advertising as %s\n\r", addr_s); } void potentiometer_task(void *pvParameters) { int error, result; PRINTF("BLE POTENITOMETER [Server] Custom Profile Running...\n\r"); error = bt_enable(bt_ready); if(error) { PRINTF("Bluetooth init failed (error %d)\n\r", error); return; } while(1) { } } In the main task, we are going to initialize the BLE components, and then bt_ready is going to run. If the BLE initialization was correct, the advertising will start using the previous advertising and response packets. We will use xTaskCreate to create our new potentiometer task in the main file. Notice that this is the only task created in the main file. The server is done, we can get connected to it and start to receive the potentiometer voltage. But as we want two boards connected working in each role, we will also need to modify the code for the client. In the app_config.h file there should be the following macro defined. #define CONFIG_BT_PERIPHERAL 1​ Client: To create the Client part, we will be basing on the central_ht SDK example. We need to create a new file to handle the connections and initializations like we did before in the server. This file is going to have some similar functions to potentiometer.c. I will be using the same name for simplicity purposes. We need to import the potentiometer service by adding the the pot.c and pot.h files we did on previous steps. First thing to do is create the new variables. static struct bt_conn *default_conn; static struct bt_uuid_128 uuid = BT_UUID_INIT_128(0); static struct bt_gatt_discover_params discover_params; static struct bt_gatt_read_params read_params; static uint8_t connection_success; static uint8_t data_received; Using central_h.c as reference, we need to modify some functions as it follows: static uint8_t read_func(struct bt_conn *conn, uint8_t err, struct bt_gatt_read_params *params, const void *data, uint16_t length) { if ((data != NULL) && (err == 0)) { data_received = *(uint8_t*)data; PRINTF("Read successful - Pot voltage level: %d\n\r", data_received); } else { PRINTF("Read Failed\n\r"); } return BT_GATT_ITER_STOP; } static int bt_get_pot_lvl(void) { return bt_gatt_read(default_conn, &read_params); } static uint8_t discover_func(struct bt_conn *conn, const struct bt_gatt_attr *attr, struct bt_gatt_discover_params *params) { int32_t err; if (!attr) { PRINTF("Discover complete, No attribute found \n\r"); (void)memset(params, 0, sizeof(*params)); return BT_GATT_ITER_STOP; } if (bt_uuid_cmp(discover_params.uuid, POTENTIOMETER_SERVICE) == 0) { /* Potentiometer service discovered */ /* Next, Potentiometer characteristic */ PRINTF("POT service UUID found: 0x"); for(int i = 0; i val) ; i += sizeof(uint16_t)) { PRINTF("%X", uuid.val[i]); PRINTF("%X", uuid.val[i + 1]); } PRINTF("\n\r"); memcpy(&uuid, POTENTIOMETER_CHARACTERISTIC, sizeof(uuid)); discover_params.uuid = &uuid.uuid; discover_params.start_handle = attr->handle + 1; discover_params.type = BT_GATT_DISCOVER_CHARACTERISTIC; err = bt_gatt_discover(conn, &discover_params); if (err) { PRINTF("Discover failed (err %d)\n\r", err); } } else if(bt_uuid_cmp(discover_params.uuid, POTENTIOMETER_CHARACTERISTIC) == 0) { PRINTF("POT characteristic UUID found: 0x"); for(int i = 0; i val) ; i += sizeof(uint16_t)) { PRINTF("%X", uuid.val[i]); PRINTF("%X", uuid.val[i + 1]); } PRINTF("\n\n\r"); /* Read Potentiometer */ read_params.func = read_func; read_params.handle_count = 0; /* Selects the UUID characteristic handle */ read_params.by_uuid.start_handle = 0x0001; read_params.by_uuid.end_handle = 0xffff; read_params.by_uuid.uuid = &uuid.uuid; /* Potentiometer characteristic */ err = bt_gatt_read(conn, &read_params); if(err) { PRINTF("Read failed (err %d)\n\r", err); } else { connection_success = 1; } return BT_GATT_ITER_STOP; } return BT_GATT_ITER_STOP; } The read_func function is going to be the callback for the read parameters. The bt_get_pot_level function is going to use the read parameters to read the potentiometer value. The discover_func function is going to find every advertising device in the advertising channel. In this function we are going to force the connection to the potentiometer service, so if there is one device advertising with the potentiometer service UUID, we will verify if it has the characteristic we are interested in. In this case the potentiometer charactersic, and if this device also has this characteristic, we are going to read the data. static void connected(struct bt_conn *conn, uint8_t conn_err) { char addr[BT_ADDR_LE_STR_LEN]; int32_t err; bt_addr_le_to_str(bt_conn_get_dst(conn), addr, sizeof(addr)); if (conn_err) { PRINTF("Failed to connect to %s (err %u)\n\r", addr, conn_err); bt_conn_unref(default_conn); default_conn = NULL; /* Restart scanning */ scan_start(); return; } PRINTF("Connected to peer: %s\n\r", addr); if (conn == default_conn) { memcpy(&uuid, POTENTIOMETER_SERVICE, sizeof(uuid)); discover_params.uuid = &uuid.uuid; discover_params.func = discover_func; discover_params.start_handle = 0x0001; discover_params.end_handle = 0xffff; discover_params.type = BT_GATT_DISCOVER_PRIMARY; /* Start service discovery */ err = bt_gatt_discover(default_conn, &discover_params); if (err) { PRINTF("Discover failed(err %d)\n\r", err); } else { PRINTF("Starting service discovery\n\r"); } } } ​ In the device_scanned function we are going to create a connection with the server, so we need to compare the UUID we are scanning and check if there is a device with the potentiometer service UUID. static bool device_scanned(struct bt_data *data, void *user_data) { bt_addr_le_t *addr = user_data; struct bt_uuid_128 uuid_temp; int err; int i; char dev[BT_ADDR_LE_STR_LEN]; bool continueParse = true; /* return true to continue parsing or false to stop parsing */ switch (data->type) { case BT_DATA_UUID16_SOME: break; case BT_DATA_UUID16_ALL: break; case BT_DATA_UUID128_SOME: { if (data->data_len % sizeof(uint16_t) != 0U) { PRINTF("AD malformed\n\r"); return true; } uuid_temp.uuid.type = BT_UUID_TYPE_128; for(i = 0; i < data->data_len ; i += sizeof(uint32_t)) { uuid_temp.val[i] = data->data[i]; uuid_temp.val[i + 1] = data->data[i + 1]; uuid_temp.val[i + 2] = data->data[i + 2]; uuid_temp.val[i + 3] = data->data[i + 3]; } /* Search for the Potentiometer Service in the advertising data */ if ((bt_uuid_cmp(&uuid_temp.uuid, POTENTIOMETER_SERVICE) == 0)) { /* found the Potentiometer service - stop scanning */ err = bt_le_scan_stop(); if (err) { PRINTF("Stop LE scan failed (err %d)\n", err); break; } bt_addr_le_to_str(addr, dev, sizeof(dev)); PRINTF("Found device: %s\n\r", dev); /* Send connection request */ err = bt_conn_le_create(addr, BT_CONN_LE_CREATE_CONN, BT_LE_CONN_PARAM_DEFAULT, &default_conn); if (err) { PRINTF("Create connection failed (err %d)\n", err); scan_start(); } continueParse = false; break; } break; } /*CASE UUDI128_SOME*/ default: { break; } } return continueParse; } The device_found stays very similar to the example, we are just deleting the PRINTF’s functions because we don’t want to see every device found, we are just interested in our server. static void device_found(const bt_addr_le_t *addr, int8_t rssi, uint8_t type, struct net_buf_simple *ad) { /* We're only interested in connectable events */ if (type == BT_GAP_ADV_TYPE_ADV_IND || type == BT_GAP_ADV_TYPE_ADV_DIRECT_IND) { bt_data_parse(ad, device_scanned, (void *)addr); } } ​ The scan_start and disconnected stays the same. static int scan_start(void) { struct bt_le_scan_param scan_param = { .type = BT_LE_SCAN_TYPE_PASSIVE, .options = BT_LE_SCAN_OPT_NONE, .interval = BT_GAP_SCAN_FAST_INTERVAL, .window = BT_GAP_SCAN_FAST_WINDOW, }; return bt_le_scan_start(&scan_param, device_found); } static void disconnected(struct bt_conn *conn, uint8_t reason) { PRINTF("Disconnected reason 0x%02x\n\r", reason); int32_t err; connection_success = 0; if (default_conn != conn) { return; } bt_conn_unref(default_conn); default_conn = NULL; /* Restart scanning */ err = scan_start(); if (err) { PRINTF("Scanning failed to start (err %d)\n\r", err); } else { PRINTF("Scanning started\n\r"); } } The bt_ready is almost the same. static void bt_ready(int error) { if (error) { PRINTF("Bluetooth init failed (error %d)\n\r", error); return; } PRINTF("Bluetooth initialized\n\r"); bt_conn_cb_register(&conn_callbacks); /*Scan Starting*/ error = scan_start(); if(error) { PRINTF("Scanning failed to start (error %d)\n\r", error); return; } PRINTF("Scanning started\n\r"); } The last thing we are going to modify is the potentiometer task. We are going to read the potentiometer value every 5 seconds. void potentiometer_task(void *pvParameters) { int error, result; PRINTF("BLE POTENITOMETER [Client] Custom Profile Running...\n\r"); error = bt_enable(bt_ready); if(error) { PRINTF("Bluetooth init failed (error %d)\n\r", error); return; } while(1) { vTaskDelay(pdMS_TO_TICKS(5000)); if(connection_success) { error = bt_get_pot_lvl(); } } } Finally, we need to add some macros to enable some scanning and discover functions, please confirm you do have them defined in the preprocessor or another file like app_config.h : #define CONFIG_BT_OBSERVER 1 #define CONFIG_BT_CENTRAL 1 #define CONFIG_BT_GATT_CLIENT 1 Please take in mind that if there are other BT macros defined in the app_config.h file that weren’t mentioned in this article, the example may not run as expected. Additional modifications might be needed to make it work. Testing To test this application we are going to use the following: 2 x RT1060 EVK (Client and Server) AW-CM358-uSD (88W8987) AW-AM457-uSD (IW416) Take in mind that to run BT and BLE applications there might be some connections or reworking needed in your board and wireless module. For more information take a look to the Hardware Rework Guide for EdgeFast BT PAL document. It is important to take in mind the version of EVK that we will be using since there might be some differences in the supported modules. In this case, the test is with the A revision of the RT1060 EVK. Figure 4.  Server and client application running   Figure 5. Terminal output of the server (IW416)   Figure 6. Terminal output of the client (88W8987) Product: WiFi IW416 Protocol: Wi-Fi
查看全文
Building QT for i.MX6 Prerequisites: The build is verified on prebuilt rootfs(based on LTIB) which can be downloaded from freescale.com EGL uses framebuffer backend libEGL.so -> libEGL-fb.so libGAL.so -> libGAL-fb.so QT4.8 1. Download the git respository for qt4.8: $ git clone http://git.gitorious.org/qt/qt.git qt $ cd qt Let us consider this as <QTDir> 2. Create /tftpboot and point your target fileystem. As like $ mkdir -p /tftpboot $ cd /tftpboot $ ln -s $(ROOTFFS) rootfs TBD:Need to work on this to use sysroot option 3. Create a build directory to install for the qt4 packages. This directory can be  in any location. For example, $ mkdir /opt/qt4 $ sudo chown -R /opt/qt4 Let us consider the the as /opt/qt4 4. Extract the attached mkspecs(linux-imx6-g++.tar.gz) to  /mkspecs/qws/ 5. Apply the attached cd 0001-add-i.MX6-EGL-support.patch attached to enable egl support for i.MX6 $ cd $ patch -p1<0001-add-i.MX6-EGL-support.patch 6. Export CROSS-COMPILE location path to PATH $ export PATH=$PATH:/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/ 7. Enter to the <QTDir>. Do configure. You can select the options as you like. Here is an example $ cd $ ./configure -qpa -arch arm -xplatform qws/linux-imx6-g++ -no-largefile -no-accessibility \ -opensource -verbose -system-libpng -system-libjpeg -system-freetype -fast -opengl es2 -egl -confirm-license \ -qt-zlib  -qt-libpng  -no-webkit -no-multimedia \ -make examples -make demos \ -release -make libs -exceptions -no-qt3support -prefix 8. When the configure summary is shown make sure the Qt has OpenGL ES 2.0 support. Do build $ make $ make install 9. Now need to build eglfs plugin $ cd /src/plugins/platforms/eglfs $ make $ make install     Now the eglfs will be installed to the QT Install directory. 10. By now all required QT files are in 11. Copy the install directory to target filesystem $ cp -rf /opt/qt4 /tftpboot/rootfs/opt/. 12. Running Qt apps on target     - Boot the target either with NFS or SD Image     - Ensure that folder is copied on target file system at “/usr/local”.     - Launch application using $ cd /opt/qt4/examples/opengl/hellogl_es2 $ ./hellogl_es2 -platform eglfs QT5 These steps are performed on the host 1. Download the git respository for qt5: $ git clone git://gitorious.org/qt/qt5.git qt5 $ cd qt5     Let us consider this as 2. Create a build directory to install for the qt5 packages. This directory can be  in any loctation. For example, $ sudo mkdir /opt/qt5 $ sudo chown -R /opt/qt5 Let us consider the the installdir as /opt/qt5 3. Enter the Qt5 directory and run the init-repository script to download all the source code for    Qt5. To download all the source code will take about an hour. $ ./init-repository Update:  In the latest Qt5 release the webkit library is included by default and there are some issues trying to compile it. use the next line to avoid problems if not desired to use webkit. $ ./init-repository --no-webkit 4. From the following path $ gedit qtbase/mkspecs/devices/linux-imx6-g++/qmake.conf 5. At the top of the qmake.conf, there is a configure line. Copy and paste the configure line into a text file located    in your build build directory. Edit the configure line to find your toolchain and filesystem. Also make sure to    include the options -no-pch, -no-opengl, -opengl es2, Here is an example of    a configure line. Update: In the latest Qt5 stable, the option to compile the examples/demos is -compile-examples, instead of -make examples -make demos If you are running into problems with webkit,  use the option -no-icu, this will disable the webkit. $ cd $ cd qtbase $ ./configure -v -opensource -confirm-license -no-pch -no-xcb -no-opengl -opengl es2  \         -make libs -device imx6 \        -compile-examples \       -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- \        -sysroot -no-gcc-sysroot \       -prefix 7. Make the textfile that has the configure line and executable and run it. When the configure summary is shown make sure the Qt5 has openGL ES 2.0 support. Do build $ make $ sudo make install    When Qt5 has finished building, Qt5 will be installed in two places:            1. /            2. / This is good because now all the libraries and binaries for Qt5 are installed on the host and the target filesystem. Therefore, the target already has all the libraries and  binaries needed to run Qt5. 8. Also need to build qtjsbackend and qtdeclarative. $ cd $ cd qtjsbackend $ ../qtbase/bin/qmake -r $ make && sudo make install $ cd $ cd qtdeclarative $ ../qtbase/bin/qmake -r $ make && sudo sudo make install 9. Running Qt apps on target     - Boot the target either with NFS or SD Image     - Ensure that folder is copied on target file system at “/usr/local”.     - Launch application using $ cd /opt/qt5/examples/opengl/hellowindow $ ./hellowindow -platform eglfs FAQ: On the target file system, the location of target libaries and includes may present in arm-linux-gnueabi directory. Make sure to create soflinks to QT can find. For example $ cd $(ROOTFS)/usr/lib $ ln -s arm-linux-gnueabi/libffi.so.6 libffi.so.6 While building QT5, you may see a build error that libQt5V8.so.5 is not found. This might be some problem to be addressed in QT. Workaround is to copy all the binaries to correct path as like this $ cp  / /lib/* / /. What is coming up next: 1. QT on X is already available on Yocto filesystem. Steps to enable GPU Acceleration TDB. 2. QT with Wayland support. i.MX6_All Re: Building QT for i.MX6 I already done with it. On Fri, Aug 12, 2016 at 10:43 AM, aravinthkumarjayaprakasam < Re: Building QT for i.MX6 Hi, Post you query in Qt Form. They will give support. Home | Qt Forum Regards, Aravinth Re: Building QT for i.MX6 Hi aravinth, Yeah, you got my point. There is no target device platform for INTEGRITY in qt5.5/qtbase/mkspecs/devices/. Is there any possibility to create target platform in qt5.5/qtbase/mkspecs/devices/ by our own?? This is the full command I used to configure the target configure -embedded -xplatform qws/integrity-arm-cxarm -prefix / -qt-sql-sqlite -embedded - builds the embedded version of Qt -xplatform qws/integrity-arm-cxarm - selects the arm-cxarm mkspec for INTEGRITY -qt-sql-sqlite - links sqlite directly into the Qt library According to my task the target should be integrity-arm-cxarm On Fri, Aug 12, 2016 at 7:50 AM, aravinthkumar jayaprakasam < Re: Building QT for i.MX6 Hi bharathadwajakodanda​, In your Qt source Below location can you select which device  you want to use: ~/qt5.5/qtbase/mkspecs/devices/ After that i will give you the support. Re: Building QT for i.MX6 Hello every one, How to configure and build Qt5.5 for INTEGRITY RTOS??? Re: Building QT for i.MX6 Hi peterchiu​ in Qt 5.5 don't have qws. And also above mentioned problem i solved. Regards, Aravinth Re: Building QT for i.MX6 Hi aravinthkumar jayaprakasam, You can try to copy the qws.conf on qt4, then put the qws.conf into qt-everywhere-opensource-src-x.x.x/qtbase/mkspecs/common/  (x.x.x is your qt version). Then configure again. Re: Building QT for i.MX6 Hi All I have QT5.5.0, i want to crosscompile into imx6-linux. So i used the following configuration ./configure -v -opensource -confirm-license -no-pch -no-xcb -no-opengl -opengl es2  \         -make libs -device imx6 \        -compile-examples \       -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- \        -sysroot /home/zumi/Project/Imx6q/rootfs/L3.0.35_4.1.0_130816_images_MX6/Rootfs/opt/qt -no-gcc-sysroot \       -prefix /opt/qt-vision Following error i am getting, cc1plus: error: unrecognized command line option '-fuse-ld=gold' arm-fsl-linux-gnueabi-g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)." Symbolic function binding disabled. And one more thing, QT5.5.0 didn't have qws.conf file. so in your attached qmake.conf file i remove include(../../common/qws.conf) line. If i not remove the line it shows No such a file found error. After the removing i got the above mentioned error. Regards, Aravinth Re: Building QT for i.MX6 Hi nishad I have successfully build Qt4.8.5 for imx6. But when I tried to run the sample example I got the below error: root@freescale /opt/qt4.8.5-arm-opengl$ cd examples/opengl/hellogl_es2/ root@freescale /opt/qt4.8.5-arm-opengl/examples/opengl/hellogl_es2$ ls bubble.cpp       glwidget.h       main.cpp         texture.qrc bubble.h         hellogl_es2      mainwindow.cpp glwidget.cpp     hellogl_es2.pro  mainwindow.h <-opengl/examples/opengl/hellogl_es2$ ./hellogl_es2                     bubble.cpp       glwidget.h       main.cpp         texture.qrc bubble.h         hellogl_es2      mainwindow.cpp   glwidget.cpp     hellogl_es2.pro  mainwindow.h     <-opengl/examples/opengl/hellogl_es2$ ./hellogl_es2 -platform eglfs Segmentation fault root@freescale /opt/qt4.8.5-arm-opengl/examples/opengl/hellogl_es2$ Re: Building QT for i.MX6 Hello All, is anyone able to compile QT5.5 or QT 5.6 for imx6q. This page is not helping me much because QT 5 compilation section referring the gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12 fsl tool chain whcih is not available for download because it is pretty quite old.If i am using linaro latest tolchain 4.8 or 4.7 QT doesn't compile. I would really appreciate if someone let me know which is the correct tool-chain to compile QT 5.5 or QT 5.6 version on imx6. Re: Building QT for i.MX6 Hi all PrabhuSundararaj The git url  "git://gitorious.org/qt/qt5.git qt5"  is not work. Is it new git url  for qt5 ? Because I want to use LTIB porting Qt5. Please help, thanks all. Re: Building QT for i.MX6 These patches are for Qt4 not for Qt5 right? Re: Building QT for i.MX6 Hi Nishad, Thanks for replying. I am using LTIB for building my image. yes, I built QT4.8 manually with steps as mentioned on this page. Also, the configuration script is same as given here. ./configure -qpa -arch arm -xplatform qws/linux-imx6-g++ -no-largefile -no-accessibility \ -opensource -verbose -system-libpng -system-libjpeg -system-freetype -fast -opengl es2 -egl -confirm-license \ -qt-zlib  -qt-libpng  -no-webkit -no-multimedia \ -make examples -make demos \ -release -make libs -exceptions -no-qt3support -prefix /opt/qt4. Regards, Paritosh Singh Re: Building QT for i.MX6 Hi, Sorry for the delay in reply, Could you give me more information about your problem? Are you using LTIB to build your image or Yocto? Did you manually build the QT? Also can you mail me your configuration script? There could be a possibility that the QT is not properly built. Regards, nishad Re: Building QT for i.MX6 Hi, I have successfully build Qt4.8 for imx6. But when I tried to run the sample example I got the below error: "Could not create the egl surface: error = 0x300b" Please help me out of this. Regards, Paritosh Re: Building QT for i.MX6 HI nice tutorial.... can you pls give some insights about qt webkit as well how to render a fullscreen HTML5 based webpage using that... am really new to qt... pls guide me Re: Building QT for i.MX6 Hi all, I tried build qt5 like in this doc. My configuration command is: ./configure -v -opensource -confirm-license -make libs -device imx6  -device-option CROSS_COMPILE=/home/x0158990/hdd/tools/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-  -sysroot /home/x0158990/hdd/tools/poky/1.7/sysroots/x86_64-pokysdk-linux -no-gcc-sysroot  -prefix /home/x0158990/work/tools/QT5 I have got error: Precompiled-headers support enabled. /home/x0158990/hdd/tools/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ -c -fvisibility=hidden fvisibility.c Symbol visibility control enabled. /home/x0158990/hdd/tools/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ -o libtest.so -shared -Wl,-Bsymbolic-functions -fPIC bsymbolic_functions.c bsymbolic_functions.c:2:2: error: #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)." #error "Symbolic function binding on this architecture may be broken, disabling it (see QTBUG-36129)."   ^ Symbolic function binding disabled. In QTBUG-36129 bug's description I didn't found applicable solution. Please help! Re: Building QT for i.MX6 Configuration Script: ./configure -v -opensource -confirm-license -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-xcb -no-sql-mysql -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-odbc -no-sql-tds -no-sql-sqlite2 -no-pch -no-opengl -opengl es2  -wayland -make libs -device imx6 -make examples -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- -sysroot /home/sumeet/ltib/rootfs -no-gcc-sysroot -prefix /usr/local/QT_5 Link to be followed thoughtfully along with the procedure given on the current link above: http://qt-project.org/wiki/RaspberryPi_Beginners_guide I used the "cross-compiled-tools" to compile QT-5 and built individual modules using the link. you need to download it as use it taking reference of the script given below for setting up path. Cleaning a_config_if_compile_wrong: sudo git submodule foreach --recursive "git clean -dfx" Script for_setting_paths: ./fixQualifiedLibraryPaths /home/sumeet/ltib/rootfs /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++ You might get fontconfig errors, which you need to solve by analysing the error. Although i was able to install QT5 , i still have problems with fonts, i am not able to see fonts in the GUI. i am working on it. regards nishad Re: Building QT for i.MX6 Ok nishad, i'm waiting for your procedure ! thank's in advance ! Re: Building QT for i.MX6 Hi , I successfully cross compiled QT5 for my custom iMX6Q board, I used LTIB 3.0.35_4.1.0 kernel for building my u-boot, kernel and rootfs. I am attaching documents and links that i prepared to help anyone who wishes to build QT5, it might not help you directly, but the procedure should help you. regards, Nishad Re: Building QT for i.MX6 Hi all, i'm trying to build qt5 for a udoo quad board (use imx6 quad http://www.udoo.org/) but i'm blocked at ./configure. i had some errors : /home/modjo/Udoo/Qt5_build/fsl-linaro-toolchain/arm-fsl-linux-gnueabi/bin/g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=softfp -g -Wall -W -fPIE -I../../mkspecs/devices/linux-imx6-g++ -I. -I../../../../usr/include -I../../../../usr/bin -o arch.o arch.cpp g++: error trying to exec 'cc1plus': execvp: No such file or directory Messages de l'assembleur: Erreur fatale: option -march= invalide: « armv7-a » gmake: *** [arch.o] Erreur 1 Unable to determine architecture! Could not determine the target architecture! Turn on verbose messaging (-v) to see the final report. Determining architecture... () g++ -c -pipe -g -Wall -W -fPIE -I../../mkspecs/linux-g++ -I. -o arch.o arch.cpp g++ -o arch arch.o Found architecture in binary CFG_HOST_ARCH="i386" CFG_HOST_CPUFEATURES="" System architecture: 'unknown' Host architecture: 'i386' C++11 auto-detection... () /home/modjo/Udoo/Qt5_build/fsl-linaro-toolchain/arm-fsl-linux-gnueabi/bin/g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=softfp -O2 -std=c++0x -Wall -W -fPIE -I../../../mkspecs/devices/linux-imx6-g++ -I. -I/home/modjo/Udoo/Qt5_build/usr/include -I/home/modjo/Udoo/Qt5_build/usr/bin -o c++11.o c++11.cpp g++: error trying to exec 'cc1plus': execvp: No such file or directory Messages de l'assembleur: Erreur fatale: option -march= invalide: « armv7-a » gmake: *** [c++11.o] Erreur 1 C++11 disabled. ....... ...... ...... ...... OpenGL ES 2.x auto-detection... () /home/modjo/Udoo/Qt5_build/fsl-linaro-toolchain/arm-fsl-linux-gnueabi/bin/g++ -c -pipe -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -mfloat-abi=softfp -O2 -Wall -W -fPIE -I../../../mkspecs/devices/linux-imx6-g++ -I. -I/home/modjo/Udoo/Qt5_build/usr/include/GLES2 -I/home/modjo/Udoo/Qt5_build/usr/include -I/home/modjo/Udoo/Qt5_build/usr/bin -o opengles2.o opengles2.cpp g++: error trying to exec 'cc1plus': execvp: No such file or directory Messages de l'assembleur: Erreur fatale: option -march= invalide: « armv7-a » gmake: *** [opengles2.o] Erreur 1 OpenGL ES 2.x disabled. The OpenGL ES 2.0 functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in /home/modjo/Udoo/Qt5_build/qt5/qtbase/mkspecs/devices/linux-imx6-g++. For information the Udoobuntu file system : http://www.udoo.org/downloads/ the link for the tutorial : http://www.udoo.org/ProjectsAndTutorials/how-to-build-qt5-for-udoo/?portfolioID=1394 my qmake.conf : include(../common/linux_device_pre.conf) ROOTFS_PATH=/home/modjo/Udoo/Qt5_build TOOLCHAIN_PREFIX=/home/modjo/Udoo/Qt5_build/fsl-linaro-toolchain/arm-fsl-linux-gnueabi/bin EGLFS_PLATFORM_HOOKS_SOURCES = $$PWD/qeglfshooks_imx6.cpp QMAKE_INCDIR          += $${ROOTFS_PATH}/usr/include $${ROOTFS_PATH}/usr/bin QMAKE_LIBDIR          += $${ROOTFS_PATH}/usr/lib/arm-linux-gnueabihf $${ROOTFS_PATH}/usr/lib QMAKE_INCDIR_OPENGL_ES2 += /home/modjo/Udoo/Qt5_build/usr/include/GLES2 QMAKE_LIBDIR_OPENGL_ES2 += /home/modjo/Udoo/Qt5_build/usr/lib/GLESv2 #QMAKE_LIBS_EGL        += /home/modjo/Udoo/Qt5_build/usr/lib/GLESv2 #QMAKE_LIBS_OPENGL_ES2  += /home/modjo/Udoo/Qt5_build/usr/lib/GLESv2 #QMAKE_LIBS_OPENVG      += /home/modjo/Udoo/Qt5_build/usr/lib/OpenVG QMAKE_LIBS_EGL        += -lEGL QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL -lGAL QMAKE_LIBS_OPENVG      += -lOpenVG -lEGL -lGAL QMAKE_LFLAGS          += -Wl,-rpath-link,$$/home/modjo/Udoo/Qt5_build/lib/arm-linux-gnueabihf IMX6_CFLAGS            = -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 QMAKE_CFLAGS          += $$IMX6_CFLAGS QMAKE_CXXFLAGS        += $$IMX6_CFLAGS include(../common/linux_arm_device_post.conf) load(qt_config) and my configure : ./configure -prefix /opt/qt5 -make libs -no-pch -no-opengl -device imx6 -device-option CROSS_COMPILE=/home/modjo/Udoo/Qt5_build/fsl-linaro-toolchain/arm-fsl-linux-gnueabi/bin/ -no-largefile -opengl es2 -qt-zlib -qt-libpng -qt-libjpeg -no-nis -no-cups -gui -make examples -sysroot /home/modjo/Udoo/Qt5_build/exemples -no-gcc-sysroot -opensource -confirm-license -qreal float -v Do you an idea to resolve this ? Re: Building QT for i.MX6 I'm building qt-5.1.1 from dora branch of yocto project. All fine works instead HTML5 video from simple browser in qtwebkit-examples I see player controls, but it doesn't work. On some videos i can view freeze frame of videos, but it not playing. In console gstreamer output messages like this: Qt Warning: Could not find a location of the system's Compose files. Consider setting the QTCOMPOSE environment variable. libpng warning: iCCP: Not recognizing known sRGB profile that has been edited Received finished signal while progress is still: 10 Url:  QUrl( "http://qt-project.org/" )  Aiur: 3.0.11 Core: MPEG4PARSER_06.07.04  build on Dec  5 2013 11:41:38   mime: video/quicktime; audio/x-m4a; application/x-3gp   file: /usr/lib/imx-mm/parser/lib_mp4_parser_arm11_elinux.so.3.2 Content Info:     URI:           https://r1---sn-8xb5-px8e.googlevideo.com/videoplayback?ip=212.90.165.14&require           ssl=yes&mws=yes&source=youtube&upn=4-tA0Ie6tDA&mv=m&sparams=id,ip,ipbits,itag,ra           tebypass,requiressl,source,upn,expire&key=yt5&ipbits=0&mt=1401803916&id=o-ABczKx           qqFwtM_XhBgSvGnsGqyiHL18Wy6SqK0BZepcFQ&signature=121A2CB3142FB772CD72A9F1D872603           C749A2B74.0370EDFC498A96A43C8F8A98C10184E14158A0D2&sver=3&ratebypass=yes&expire=           1401827798&ms=au&fexp=908548,912321,913434,916611,923341,926122,930008&itag=18&c           pn=VgAqvxj2iI2hp45w&ptk=youtube_none&pltype=contentugc&c=WEB&cver=html5     Seekable  : Yes     Size(byte): 32830110 Movie Info:     Seekable  : Yes     Live      : No     Duration  : 0:11:52.503360000     ReadMode  : Track     Track     : 2 Track 00 [video_000000] Enabled     Duration: 0:11:52.503360000     Language: und     Mime:           video/x-h264, parsed=(boolean)true, width=(int)640, height=(int)360, framerate=(           fraction)24000/1001 Track 01 [audio_000000] Enabled     Duration: 0:11:52.503360000     Language: und     Mime:           audio/mpeg, mpegversion=(int)4, channels=(int)2, rate=(int)44100, bitrate=(int)9           6000, framed=(boolean)true, stream-format=(string)raw, codec_data=(buffer)121000           00000000000000000000000000 Beep: 3.0.11 Core: AAC decoder Wrapper  build on Jan 22 2014 15:42:53   mime: audio/mpeg, mpegversion=(int){2,4}   file: /usr/lib/imx-mm/audio-codec/wrap/lib_aacd_wrap_arm12_elinux.so.3 CODEC: BLN_MAD-MMCODECS_AACD_ARM_03.07.00_CORTEX-A8  build on Sep 18 2013 10:29:53. [--->FINALIZE aiurdemux QtMultimedia examples working correctly. Whats wrong and how can I fix it? Re: Building QT for i.MX6 I am trying to setup a cross compiler setup for the RIOT (IMX6) on opensuse 13.21 (64),  as I would like to use qt with qws under Ubuntu Image (Must still figure out how-to disable the GUI, as this is not a 'standard' Unbuntu startup) Step 6 assumes one has a cross compiler already installed.     export PATH=$PATH:/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/ How can I install this,  where can I download it, as it seem to 'included' in some BSD package. Thanks Re: Building QT for i.MX6 Hey, I successfully installed qt 4.8 in my target. Initially i had 4.6.0 on my target, which had audio demo codes. 4.8 doesn't seem to have any multimedia demos. The existing examples execute correctly. however any example which i used to run in 4.6.0 using qws doesn't seem to execute on 4.8. It crashes with a "segmentation fault". I have qtCreater 2.7.2  with Qt 4.8.4 on my host, and any example code for instance a system call code or a mmap call doesn't seem to work. I had shifted to 4.8 assuming and expecting better audio and Serial communication support. but simple codes compiled do not work in ltib. It is very frustrating. Can anyone please help me out with that. regards, nishad Re: Building QT for i.MX6 I found out that the hellogl_es2 example is not able to run when you dont have X11 or wayland. You need a windowing system because the hellogl_es2 encapsulates an QGLWidget within another widget. Better is to use QT5 + QML. I will give it a try. And probably your error is because you have to edit the file qtbase/mkspecs/devices/linux-imx6-g++/qmake.conf and add -mfloat-abi=hard in IMX6_CFLAGS. Give it a try. Re: Building QT for i.MX6 AFAIK the qt-in-use-image only produces a rootfs for Qt 4.8 - but still the version should be good enough to compile the hellogl_es2 example. I tried to compile the application with my Qt 5.1.1 toolchain (see link in my previous comment) but it didn't work - gnu/stubs-soft.h wasn't found... I didn't recognize this error before and don't know how to handle this - so sorry, I cant help you with that Re: Building QT for i.MX6 Hey I am experimenting with Yocto and my Mx6 Board. I am using dora and I used qte-in-use-image to "bake" an image. I want to experiment with QT + OpenGL using the framebuffer. I disable X11 and Wayland with the flag: DISTRO_FEATURES_remove = "x11 wayland" on my local.conf I am able to run the vivante vdk examples but I have not being able to run the hellogl_es2 example from OpenGL. I get a pitch black rendering. Have you being able to run the OpenGL examples from QT? Re: Building QT for i.MX6 Hello Bradley, I'm starting with IMX6 and Qt. I followed the instructions but I'm having the same issue as yours. I have the same directories after the install, nothing more, and some errors during "make" and "make install". Did you find a solution to build Qt4.8 for the IMX6? Nicolas Re: Building QT for i.MX6 Hi, I solved that issue. It would be a good choice to comment out those code which reports “EGLFS: OpenGL windows cannot be mixed with others”, that would make it fine. Kind regards Richard Chen Re: Building QT for i.MX6 I would suggest everyone who uses already YOCTO for their images to also use it to compile Qt See for a working Qt5 tutorial here: Everyone who doesn't use YOCTO not 'til now: DO IT :smileygrin: read more about it in the Yocto Training - HOME If you want to use Qt4, you can do this even easier because of the different layers that YOCTO delivers... for the board: qt-in-use-image or qte-in-use-image as toolchain: meta-toolchain-qt or meta-toolchain-qte Have fun! Re: Building QT for i.MX6 Hi, xicai chen. I have the same problem with hellowindow application in Qt 5 (EGLFS: OpenGL windows cannot be mixed with others) You solved it? Re: Building QT for i.MX6 As I noticed that there is a patch file 0001-add-i.MX6-EGL-support.patch for Qt 4.8, however, there is not such a patch for QT5. Did you miss it? There might be a similar patch to Qt5. As I tried the hellowindow application in Qt 5.1, I got error log as follow. Do you have any hints? QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed QEglFSImx6Hooks will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync. If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1 EGLFS: Unable to query physical screen size, defaulting to 100 dpi. EGLFS: To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters). EGLFS: OpenGL windows cannot be mixed with others. Aborted Re: Building QT for i.MX6 First: I'm a very beginner in developing software for Linux Embedded. So may be my questions are very basic. I'm sorry for that. I need to cross-compile a QT 5 program from a PC based Ubuntu system to a i.MX6 board. I already built the O.S. for the board following the instructions of the page "https://github.com/Freescale/fsl-community-bsp-platform". Now I'm trying to set up QT following the https://community.freescale.com/docs/DOC-94066 document, i.e. this page. I did step 1, 2, 3 and 4. At step 5 gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12 is referenced. Where can I find it? I looked for it on http://www.linaro.org/ site but I didn't find it. Thanks! Re: Building QT for i.MX6 Hi, I would like to cross compile tool chain and prebuilt rootfs based on ltib to cross compile Qt5.x for IMX6 Sabre AI board. Please let me know where can I download the same so that I can use the same cross compiler tool chain and rootfs used in this thread. Thanks, Ramakanth Re: Building QT for i.MX6 Thanks Juha, It seems with latest version of qtdeclarative this issue is fixed Thanks again Re: Building QT for i.MX6 That's a real bug in Qt, see workaround in: https://bugreports.qt-project.org/browse/QTBUG-34065 (I would guess you are actually compiling post 5.1 version, 5.1.1 should compile just fine. If you cloned the qt5 sources remember to checkout the appropriate git tag to get 5.1.1) Re: Building QT for i.MX6 Hello, I have following problem during build of latest Qt5.1 compiler/qv4isel_masm_p.h: In member function 'void QQmlJS::MASM::Assembler::storeUInt32(JSC::AbstractMacroAssembler<:armassembler>::RegisterID, QQmlJS::MASM::Assembler::Pointer)': compiler/qv4isel_masm_p.h:1212:63: error: 'convertUInt32ToDouble' was not declared in this scope compiler/qv4isel_masm_p.h: In member function 'void QQmlJS::MASM::InstructionSelection::convertUIntToDouble(QQmlJS::V4IR::Temp*, QQmlJS::V4IR::Temp*)': compiler/qv4isel_masm_p.h:1491:18: error: 'class QQmlJS::MASM::Assembler' has no member named 'convertUInt32ToDouble' compiler/qv4isel_masm_p.h:1493:18: error: 'class QQmlJS::MASM::Assembler' has no member named 'convertUInt32ToDouble' compiler/qv4isel_masm.cpp: In member function 'virtual void QQmlJS::MASM::InstructionSelection::visitRet(QQmlJS::V4IR::Ret*)': compiler/qv4isel_masm.cpp:1978:22: error: 'class QQmlJS::MASM::Assembler' has no member named 'convertUInt32ToDouble' compiler/qv4isel_masm.cpp: In member function 'JSC::AbstractMacroAssembler<:armassembler>::Jump QQmlJS::MASM::InstructionSelection::genTryDoubleConversion(QQmlJS::V4IR::Expr*, JSC::MacroAssemblerARM::FPRegisterID)': compiler/qv4isel_masm.cpp:2172:14: error: 'class QQmlJS::MASM::Assembler' has no member named 'convertUInt32ToDouble' Qt5 git version commit cb2d850b479fed9fed3c4a9fea698f924be942ef Author: Qt Submodule Update Bot <[email protected]> Date:   Tue Oct 15 22:00:06 2013 +0300 LTIB 4. Kindly let me know if you have solution? Thanks & Regards Re: Building QT for i.MX6 Hi,    My QT4.8 had been built success,but when I test the example in my target board,it shows error:    root@freescale /opt/qt4.8-arm-elink/examples/opengl/hellogl_es2$ ./hellogl_es2 -platform eglfs ./hellogl_es2: error while loading shared libraries: libQtOpenGL.so.4: cannot open shared object file: No such file or directory       what can I do to solve it? Re: Building QT for i.MX6 Hello, Building seems to work fine for me but when I try to start one of the example project I get this error: root@freescale /opt/qt5/examples/opengl/hellowindow$ ./hellowindow -platform eglfs QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open failed QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed idr_remove called for id=2126092104 which is not allocated. [<8004f72c>] (unwind_backtrace+0x0/0x138) from [<8024d930>] (idr_remove+0x1f8/0x208) [<8024d930>] (idr_remove+0x1f8/0x208) from [<802bb51c>] (drm_ctxbitmap_free+0x24/0x30) [<802bb51c>] (drm_ctxbitmap_free+0x24/0x30) from [<802bba28>] (drm_rmctx+0x5c/0x10c) [<802bba28>] (drm_rmctx+0x5c/0x10c) from [<802bc064>] (drm_ioctl+0x2d0/0x3b4) [<802bc064>] (drm_ioctl+0x2d0/0x3b4) from [<8010b344>] (do_vfs_ioctl+0x80/0x558) [<8010b344>] (do_vfs_ioctl+0x80/0x558) from [<8010b854>] (sys_ioctl+0x38/0x5c) [<8010b854>] (sys_ioctl+0x38/0x5c) from [<80048600>] (ret_fast_syscall+0x0/0x30) Segmentation fault root@freescale /opt/qt5/examples/opengl/hellowindow$ Any clue about what this can be? Re: Building QT for i.MX6 Hi, all. When i test qt5 example on target board, (./hellogl_es2) I have below error. "This application failed to start because it could not find or load the Qt platform plugin "eglfs"." Please share any tip about this eglfs error. thank you. jessie. Re: Building QT for i.MX6 Hi Michael, If you're running under X, you really want X to be accelerated, not Qt, and you should probably just use apt-get to install it. Re: Building QT for i.MX6 Hi Michael, eglvivante.h is included by eglplatform.h, which is included by egl.h. Do you have the configuration patches:      qt4: Enable OpenGL ES2 support for i.MX6 · edcd4a6 · Freescale/meta-fsl-arm · GitHub Re: Building QT for i.MX6 Eric, still question: I have a SABRElite board, which runs freescale Ubuntu image with X-window desktop. Now I want to run a QT application on X-window of my devboard. This manual (Building QT for i.MX6) Is suitable for my task? Thanks! Regards, Michael Re: Building QT for i.MX6 Hi Eric! Thanks for your answer. Yes, I have these declarations in  EGL/eglvivante.h, but in my qt-4.8.4/src/plugins/platforms/eglfs/qeglfsscreen.cpp (after EGL support patch) I have no link to EGL/eglvivante.h Where I need to add the reference to EGL/eglvivante.h, in qeglfsscreen.cpp, in qeglfsscreen.h or in eglfs.pro? I added everywhere, but the effect isn't present, there is the same compilation error. >> Did you include gpu-viv-bin-mx6q in your LTIB configuration? I don't use a LTIB, I use a ready freescale Ubuntu rootfs image L3.0.35_4.0.0_UBUNTU_RFS from https://community.freescale.com/docs/DOC-94809 How to solve this problem? Thanks again! Regards, Michael Re: Building QT for i.MX6 Hi Michael, These declarations should be in EGL/eglvivante.h : ~/ltib4-nox/rootfs/usr/include$ grep -r fbGetDisplayByIndex * EGL/eglvivante.h:fbGetDisplayByIndex( Did you include gpu-viv-bin-mx6q in your LTIB configuration? Re: Building QT for i.MX6 Hi all! I followed the instructions to build QT4.8 for my target, Boundary's SABRElite board. Unexpectedly, in step 9 (Now need to build eglfs plugin), I got the compiling error qeglfsscreen.cpp: In constructor 'QEglFSScreen::QEglFSScreen(EGLNativeDisplayType)': qeglfsscreen.cpp:109:43: error: 'fbGetDisplayByIndex' was not declared in this scope qeglfsscreen.cpp:110:57: error: 'fbGetDisplayGeometry' was not declared in this scope qeglfsscreen.cpp: In member function 'void QEglFSScreen::createAndSetPlatformContext()': qeglfsscreen.cpp:181:95: error: 'fbCreateWindow' was not declared in this scope make: *** [.obj/release-shared/qeglfsscreen.o] Error 1 Any help? Regards, Michael Re: Building QT for i.MX6 Yeah, I am also thinking to build it using QT5 now, Anyway thanks for your replies cheers Regards, Sarjoon Re: Building QT for i.MX6 Sorry, no, hopefully there will be an update with build in QT5 support... I also tried to work out things with Qt4, but not much success there either... = ( with Regards, Zoltan Re: Building QT for i.MX6 rossdehmoobed Re: Building QT for i.MX6 Oh.. you have any idea regarding that. With Regards, Sarjoon Re: Building QT for i.MX6 Anyway thanks for the replay Zoltan Re: Building QT for i.MX6 No, I don't have those solved yet unfortunately... with Regards, Zoltan Re: Building QT for i.MX6 U mean you also had that input issue.. The issue I am facing is once after I run the demo application ./hellowindow -platform eglfs.. i cant give any input(I want to use touch). Nothing is working regarding touch.. I exported all the necessary Tslib variables and all. Did the library files which u found is anything to do with the touch issue.. You also mentioned "unfortunately they didn't solve all the problems" Re: Building QT for i.MX6 Hi I found some libs, https://github.com/zOrg1331/fsl-gpu-viv-mx6q/tree/master/usr/lib, but those are old, and unfortunately they didn't solve all the problems. Incompatibility issues remain. with Regards, Zoltan Re: Building QT for i.MX6 I also have the same problem, Did U find any solution ragarding this Re: Building QT for i.MX6 edit the build/conf/local.conf Re: Building QT for i.MX6 Thanks. Yes, I am running Ubuntu. I followed the article from the "Yocto With Boundary Device's Nitrogen6x: 5 steps only!" . I did not install all the necessary software on my system. I will do the installation as you point to me. Thanks again. Re: Building QT for i.MX6 Hi squirem, I got run bitbake fsl-image-gui, but I found the MACHINE=imx6qsabresd is not I wanted. My board is Nitrogen6x board from Boundary. How to change it to MACHINE=nitrogen6x? Could you please help? By the way, I need Qt4.8.4 libraries on the image. Does the building image has been added Qt4.8.4? Thanks, Re: Building QT for i.MX6 Are you sure you followed the steps outlined here: https://github.com/Freescale/fsl-community-bsp-platform Also, are you sure you have all the necessary software installed on your system. See the Yocto Project Quick Start Guide and look under packages: https://www.yoctoproject.org/docs/current/yocto-project-qs/yocto-project-qs.html I'm guessing you're running Ubuntu, which means this command would install the software you need: sudo apt-get install gawk wget git-core diffstat unzip texinfo \   build-essential chrpath libsdl1.2-dev xterm Re: Building QT for i.MX6 Hi, I followed the instructions and when I ran "bitbake core-image-minimal". It pop up following error. Pseudo is not present but is required, building this first before the main build ERROR: OE-core's config sanity checker detected a potential misconfiguration. Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). Following is the list of potential problems / advisories: Please install the following missing utilities: gawk,chrpath Then I ran "apt-get install gawk  chrpath". It pop up info as below. The following packages were automatically installed and are no longer required: libp11-kit-dev libgpg-error-dev comerr-dev libqt3-headers libgnutls-openssl27 libkrb5-dev liblcms1-dev libgnutlsxx27 libgssrpc4 libxt-dev libxmu-dev libtasn1-3-dev libcups2-dev libqt3-compat-headers qt3-dev-tools libgcrypt11-dev libkadm5clnt-mit8 libaudio-dev libkadm5srv-mit8 libxmu-headers libkdb5-6 libgnutls-dev krb5-multidev Do I have to remove them using "apt-get autoremove     ......."? Re: Building QT for i.MX6 Hi Zoltan, i am having the same issue, also with another MPUs from several vendors. I have not solved it yet, but it looks like its a problem related with the rootfs, specifically with simlinks and lib paths. There is a nice guide for a raspberry-pi device which i tried, and worked nice, but only with the rootfs image they specified (raspbian wheezy image): http://qt-project.org/wiki/RaspberryPi_Beginners_guide When i tried to use my own rootfs, i have the problem you have had. Looks like the fix they propose could be the solution. That is to run a script to fix symlinks and libpaths, included in the croos-compiled-tools they provide. I tried that but with no succes. Eventhough, everywhere in the web looks like that old configures files, can be a really headache, so it's really important to clean the files generated in the configure. Here it's very important to say, that the only actual way to do that, is cleaning the repository with:     git submodule foreach --recursive "git clean -dfx" because "make confclean" doesn't really work in Qt5 and "make clean" only cleans ol the .o and others files, but no all the configurations generated with ./configure. So, to download a tar.gz and use this a source code, should not be an option for Qt5. Would really love to solve this problem with the imx6, using my own rootfs generated with buildroot (in my case). Any help? Regards, Santiago Re: Building QT for i.MX6 No @ -no-gcc-sysroot vs. -sysroot This was made for the freescale-linaro toolchain from ltib, because it doesn't allow you to set -sysroot as all the basic posix building-blooks were located within the toolchain and setting -sysroot in for gcc ruins it. So the combination  of '-sysroot' and '-no-gcc-sysroot' results in Qt5 to do some magic in the background (e.g. PKG variables) but doesn't result in adding '--sysroot' to the gnu flags Re: Building QT for i.MX6 Hi Joerg, Thanks for your replying my question. Currently I need to build QT4.8 on my image in LTIB. We shall late on consider the Yocto image since it has QT built in.  I googled and looked at the relate posts that mentioned needing to install libjpeg-dev. I wonder if any one in this thread knows how to fix? Re: Building QT for i.MX6 Hallo Bill, no need to do that for 4.8 Have a look at this https://community.freescale.com/message/339555#339555 Joerg Re: Building QT for i.MX6 Hi, I followed the instructions to build QT4.8 for my target, Boundary's Nitrogen6x board. Unfortunately, in step 8, when it was building, I got the compiling error "fatal error: jpeglib.h: No such file or directory". I wonder if you guys have any comment about the error listing below. cd "/home/byang/qt/./src/plugins/imageformats/jpeg" make Makefile make[4]: Entering directory `/home/byang/qt/src/plugins/imageformats/jpeg' make[4]: `Makefile' is up to date. make[4]: Leaving directory `/home/byang/qt/src/plugins/imageformats/jpeg' make[3]: Leaving directory `/home/byang/qt/src/plugins/imageformats/jpeg' make[3]: Entering directory `/home/byang/qt/src/plugins/imageformats/jpeg' arm-fsl-linux-gnueabi-g++ -c -pipe -O2 -O2 -march=armv7-a -mfpu=neon -DLINUX=1 -DEGL_API_FB=1 -fvisibility=hidden -fvisibility-inlines-hidden -D_REENTRANT -Wall -W -fPIC -DQT_NO_DEBUG -DQT_PLUGIN -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I../../../../mkspecs/qws/linux-imx6-g++ -I. -I../../../../include/QtCore -I../../../../include/QtNetwork -I../../../../include/QtGui -I../../../../include -I../../../gui/image -I.moc/release-shared -I/home/byang/ltib/rootfs/usr/include -I/tftpboot/rootfs/usr/include/arm-linux-gnueabi/ -o .obj/release-shared/qjpeghandler.o ../../../gui/image/qjpeghandler.cpp ../../../gui/image/qjpeghandler.cpp:71:21: fatal error: jpeglib.h: No such file or directory compilation terminated. make[3]: *** [.obj/release-shared/qjpeghandler.o] Error 1 Re: Building QT for i.MX6 Hi, I was recently trying to build QT5 for iMX6 board using the instructions above. rootfs: L3.0.35_4.0.0_UBUNTU_RFS configure: ./configure -v -opensource -confirm-license -no-pch -no-xcb -no-opengl -opengl es2 -make libs -device imx6 -device-option CROSS_COMPILE=/opt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.06_linux/bin/arm-linux-gnueabihf- -sysroot /home/max/Dev/rootfs -no-gcc-sysroot -prefix /opt/Qt5-imx6 unfortunately I have the following error: /opt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.06_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: error: opengles2 uses VFP register arguments, opengles2.o does not /opt/gcc-linaro-arm-linux-gnueabihf-4.8-2013.06_linux/bin/../lib/gcc/arm-linux-gnueabihf/4.8.2/../../../../arm-linux-gnueabihf/bin/ld: failed to merge target specific data of file opengles2.o ... /home/max/Dev/rootfs/usr/lib/libGAL.so: undefined reference to `XMapRaised' /home/max/Dev/rootfs/usr/lib/libGAL.so: undefined reference to `pthread_setspecific@GLIBC_2.4' /home/max/Dev/rootfs/usr/lib/libGAL.so: undefined reference to `_XReadPad' /home/max/Dev/rootfs/usr/lib/libGAL.so: undefined reference to `dlopen@GLIBC_2.4' /home/max/Dev/rootfs/usr/lib/libGAL.so: undefined reference to `pthread_key_delete@GLIBC_2.4' /home/max/Dev/rootfs/usr/lib/libGAL.so: undefined reference to `XPending' collect2: error: ld returned 1 exit status make: *** [opengles2] Error 1 OpenGL ES 2.x disabled. The OpenGL ES 2.0 functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in /home/max/Dev/repository/qt5/qtbase/mkspecs/devices/linux-imx6-g++. Then if I take out ES, I have: "Could not determine the target architecture!" Can somebody comment on this? Any help? Does the attached patch suppose to fix that? Thanks! Max Re: Building QT for i.MX6 Hello Brad, I will be the best someone who knows write a new Howto "Setup QT Creator" with Yocto based QT, rootfs and toolchain. But slowly I believe that no one really knows how to do that 😉 Joerg Re: Building QT for i.MX6 OK.  I used a link to ~/imx6/ltib/rootfs since I'm only doing NFS boot and I've already created a rootfs with LTIB. Running configure generates several errors. However, I am able to make and make install most of the files into /opt/qt4. But the second bullet in Step #12 makes no sense. Furthermore, there is no opt/qt4/examples directory.  Here is what is what is there: root@freescale /$ ls opt/qt4 bin      include  lib      plugins Any ideas of where I might be having problems.  I've followed the directions very carefully. Brad Re: Building QT for i.MX6 you  have to place  "/media/NameOfMountedRootFs"  as ROOTFFS Re: Building QT for i.MX6 I am trying to build Qt4 as per the instructions above. In Step #2 is this command: $ ln -s $(ROOTFFS) rootfs When I try to run it, it states that the variable "ROOTFFS: command not found." Any idea why this failed?  I tried ROOTFS and still had the same error. Is ROOTFFS the qt install directory?  Where is it defined?  It's not in my environment. Re: Building QT for i.MX6 It's on the master-next branch, so it's not ready quite yet. Re: Building QT for i.MX6 sure that Qt5 is added?  Witch repo to check out? dylan  and what to build? Joerg Re: Building QT for i.MX6 Follow the instructions that are in the documentation.  You can download the documentation package from freescale site. Re: Building QT for i.MX6 I have downloaded the Image (L3.0.35_4.0.0_130424_images_MX6)  How to put it on SD? Re: Building QT for i.MX6 I just checked what machines are supported in the BSP I linked to. It seems that your board nitrogen6x is supported, and there does appear to be a set of Qt4 recipes for the demo image you are referring to: Photo Album - Imgur Re: Building QT for i.MX6 So I can use a Image build with yocto? like fsl-image-gui-nitrogen6x.sdcard Re: Building QT for i.MX6 He is referring to the prebuilt images which can be found under the "Operating System Software - Board Support Packages" section of whatever chip you're using. In my case, for the SabreSD board: L3.0.35_4.0.0_DEMO_IMAGE You are right about LTIB and Yocto. Freescale is moving towards Yocto and the LTIB platform can be buggy. Use the Freescale community BSP instead: Freescale/fsl-community-bsp-platform · GitHub The instructions are in the link. After compilation, an SD card image is generated that can be directly copied to an actual SD card and will run on whatever board you're using. There is already full Qt4 support and Qt5 support is only recently being added (added about a week ago). Re: Building QT for i.MX6 Hi, what is the meaning of "The build is verified on prebuilt rootfs(based on LTIB) which can be downloaded from freescale.com"  I have to build it with ltib or can i download it?  When I can download it, please explain how to use it on host. To use LTIB makes little sense, because Yocto is preferred. I try now to do LTIB for a couple of days without success. regards Joerg Re: Building QT for i.MX6 Here's my configure script: #!/bin/sh ./configure -v -opensource -confirm-license -no-pch -no-xcb -opengl es2 \   -make libs -device imx6 \   -make examples -make demos \   -device-option CROSS_COMPILE=/home/squirem/Desktop/poky-dylan-9.0.0/build/tmp/sysroots/x86_64-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi- \   -sysroot /home/squirem/Desktop/poky-dylan-9.0.0/build/tmp/deploy/images/mountpoint \   -prefix /opt/qt5 Notice I removed the -no-opengl and -no-gcc-sysroot options. I think the -no-opengl option conflicts with the -opengl es2 option and the -no-gcc-sysroot option conflicts with the -sysroot option. You may also notice I added the -no-xcb option since xcb wasn't working for me. As a side note, I think you can add more options to remove SQL support. Run ./configure -h to look at your options. Re: Building QT for i.MX6 Question: I follow the instruction as above to build QT5, but I found the configure command is incorrect to my environment. so I change the configure command as below: ./configure -v -opensource -confirm-license -system-sqlite -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-xcb -no-sql-mysql -no-sql-db2 -no-sql-ibase -no-sql-oci -no-sql-odbc -no-sql-tds -no-sql-sqlite2  -no-pch -no-opengl -opengl es2  -wayland -make libs -device imx6 -make examples -make demos -device-option CROSS_COMPILE=/opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi- -sysroot /media/new-version/build/L3.0.35_4.0.0/ltib/rootfs -no-gcc-sysroot -prefix /usr/local/Trolltech/Qt5-imx6-1 It pass but I got problem when I run 'make' /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/arm-fsl-linux-gnueabi-g++ -Wl,-rpath-link,/media/new-version/build/L3.0.35_4.0.0/ltib/rootfs/usr/lib -Wl,--no-undefined -Wl,-O1 -Wl,-rpath,/usr/local/Qt-5.0.0/Qt5-imx6-1/lib -shared -o libqsqlmysql.so .obj/release-shared/main.o .obj/release-shared/qsql_mysql.o .obj/release-shared/moc_qsql_mysql_p.o  -L/media/new-version/build/L3.0.35_4.0.0/ltib/rootfs/usr/lib -L/usr/lib -Wl,-Bsymbolic-functions -rdynamic -L/usr/lib/mysql -lmysqlclient_r -L/media/new-version/build/ltib/rpm/BUILD/qt5/qtbase/lib -lQt5Sql -lQt5Core -lpthread  /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/libpthread_nonshared.a when searching for libpthread_nonshared.a /opt/freescale/usr/local/gcc-4.6.2-glibc-2.13-linaro-multilib-2011.12/fsl-linaro-toolchain/bin/../lib/gcc/arm-fsl-linux-gnueabi/4.6.2/../../../../arm-fsl-linux-gnueabi/bin/ld: skipping incompatible /usr/lib/libc_nonshared.a when searching for libc_nonshared.a .obj/release-shared/qsql_mysql.o: In function `QMYSQLDriver::open(QString const&, QString const&, QString const&, QString const&, int, QString const&)': qsql_mysql.cpp:(.text+0x2cb4): undefined reference to `mysql_set_character_set' collect2: ld returned 1 exit status I have cancel the option of the mysql when configure the QT5! How to solve this problem? thanks! Re: Building QT for i.MX6 FAQ: Question: But I can not build qtdeclarative… ../qtbase/bin/qmake -r Project WARNING: Unknown build part(s): demos Reading /home/hp-lablinux/ltib_imx6solo_duallite/qt5/qtdeclarative/src/src.pro Reading /home/hp-lablinux/ltib_imx6solo_duallite/qt5/qtdeclarative/src/qml/qml.pro Project MESSAGE: /home/hp-lablinux/ltib_imx6solo_duallite/qt5/qtbase/bin/syncqt -module QtQml -version 5.1.0 -outdir /home/hp-lablinux/ltib_imx6solo_duallite/qt5/qtdeclarative /home/hp-lablinux/ltib_imx6solo_duallite/qt5/qtdeclarative = /home/hp-lablinux/ltib_imx6solo_duallite/qt5/qtdeclarative = /home/hp-lablinux/ltib_imx6solo_duallite/qt5/qtdeclarative Project ERROR: Unknown module(s) in QT_PRIVATE: v8 Not sure what the problem is? I have looked around but not find any useful hints. Do you have an idea? Solution: “modify this file qtbase/bin/qt.conf and add the correct prefix, the one given on cofigure *configure Re: Building QT for i.MX6 After running the configure command,  in the summary of supported features, OpenVG appears as not supported, is this normal or it means some library is missing on my side? Re: Building QT for i.MX6 Works like a charm. Thank you! My only issue is that my mouse or keyboard doesn't work when running with eglfs. does eglfs support user input?
查看全文
PXP hands on with IMXRT1070 This hands on is based on the evkmimxrt1170_pxp_lab_cm7.zip which is from https://community.nxp.com/t5/i-MX-RT1170-CAS-Training/PXP-Multiple-Files/ta-p/1178709 this hands on give an example to understand pxp basic concept like letterbox background color, rotation, ps buffer coordination definition, output buffer coordination definition more clear   No Roation This test is based on no rotation, so define as below #define LAB1_BIT_BLIT_NO_ROTATION This demo output is that the rabbit picture shows on the upper left corner of lcd, and the offset width and height is 100   #ifdef LAB1_BIT_BLIT_NO_ROTATION     PXP_ps_bitblit(                    // input                    (void*)bmp_rabbit,                    PIXEL_BYTES,                    BMP_RABBIT_WIDTH,                    BMP_RABBIT_HEIGHT,                      // output                    s_BufferLcd[curLcdBufferIdx],                    DEMO_PANEL_WIDTH,                    DEMO_PANEL_HEIGHT,                    100,  // output offset x                    100,  // output offset y                    kPXP_No_Rotate); #endif       in this lab sample code, the background is set to black, PXP_SetProcessSurfaceBackGroundColor(APP_PXP, 0U); The output is   If we want to set the background to lighter blue, this is what I want to get   then I modify the code to PXP_SetProcessSurfaceBackGroundColor(APP_PXP, 0xFFF0U); But we get the same output like, without any difference     Check the code, find that the original code   void PXP_ps_sub_region_bitblit(…) { …..     outputBufferConfig.width = sub_region_width;     outputBufferConfig.height = sub_region_height;   …… }   This means that the output buffer width and height are the same as the picture width and height, so whatever background color you set, you couldn’t find anything difference, then change the output buffer width and height is the same as lcd width and height     void PXP_ps_sub_region_bitblit(…) { …..       outputBufferConfig.width = output_width;       outputBufferConfig.height= output_height;   …… }   Then the output change to   We can find the color on the top of display is still black and this isn’t what I need, still tracing the code   void PXP_ps_sub_region_bitblit(…) { …..  // Output buffer  outputBufferConfig.buffer0Addr   =  (uint32_t)output_buffer + output_offset_y * output_width * pic_bytes_per_pixel + output_offset_x * pic_bytes_per_pixel …… }   output_buffer is defined as lcd buffer start address, here the output buffer start address isn’t defined as lcd buffer start address(output_buffer), this is offset of lcd buffer start address, so change it like   void PXP_ps_sub_region_bitblit(…) { …..  // Output buffer  outputBufferConfig.buffer0Addr = (uint32_t)output_buffer …… }   Then the output is like     The output picture move to the upper left corner without offset, but this demo defines the offset is 100   void PXP_ps_sub_region_bitblit(…) { …..  // PS buffer PXP_SetProcessSurfacePosition(APP_PXP,0,0,BMP_RABBIT_WIDTH - 1U, BMP_RABBIT_HEIGHT - 1U); ….. }   In the original code, the PS buffer offset is 0, because the ps buffer start address is the same as the output buffer start address, and output buffer start address is offset + lcd output buffer start address, so set the PS output offset is 0, but I change the output buffer start address is the same as lcd buffer start address, so change the code   void PXP_ps_sub_region_bitblit(…) { …..             uint32_t psUlcX         = output_offset_x;             uint32_t psUlcY         = output_offset_y;             uint32_t psLrcX, psLrcY;             psLrcX = psUlcX   +  sub_region_width  - 1U;             psLrcY = psUlcY + sub_region_height- 1U;         // PS buffer         PXP_SetProcessSurfacePosition(APP_PXP,psUlcX,psUlcY,psLrcX,psLrcY); ….. }   The output is \   Now this is what we need     Roation Set Macro to #define LAB2_BIT_90_DEGREE_ROTATION The output is   When rotation is 90 degree and width is wider than the output height, the display part will be cut, so change the code from Before void PXP_ps_sub_region_bitblit(…) { …..       outputBufferConfig.width = output_width;       outputBufferConfig.height= output_height; ….. }   To   void PXP_ps_sub_region_bitblit(…) { …..  if  (rotate == kPXP_Rotate90)  {     outputBufferConfig.width          = output_height;        /*Joan*/     outputBufferConfig.height         = output_width;         /*Joan*/  } else {         outputBufferConfig.width          = output_width;         /*Joan*/         outputBufferConfig.height         = output_height;        /*Joan*/ }….. }   Because this demo only shows no rotation and 90 degree rotation, if customer needs 270 degree, 180 degree, can add by themselves
查看全文
[PN7462]How to set up CT's clock frequency with an alternative source PN7462 has an Integrated contact interface which supports Class A, B, and C cards with a Clock generation up to 13.56 MHz. Normally we use the default system clock of 27.12 MHz as the CT's reference clock, by which we may have 13.56 MHz, 9.04 MHz, 6.78 MHz, 5.42 MHz, 4.52 MHz, etc for the ISO7816 clock out frequency. Alternatively there is another refence clock available for this module : the 48MHz USB clock as shown on page 78 of https://www.nxp.com/docs/en/user-guide/UM10858.pdf , which provides more possibilities for the ICC clock configuration.  Users may verify this based on the demo of PN7462AU_ex_phExCT7816_mcux from NFC reader library for PN7462 version 6.11 or above. The configuration may be easily achieved with the following steps: 1.add USB PLL clock initialization in the main(). 2.comment out CT initialization called in phFlashBoot_Main() as it is recommended to get USB clock source ready before CT initialization, and since the CT gets initialized in main() as well in this demo , so no warry about it.  3. update parameters to generate BaudRate for the cases of TA1 = 0x1x. (so far I just updated the cases for TA1 = 0x1x, I will address more on how to extend the configuration for more cases later .) As you see, some cases could not have a 4.8MHz , that is due to Di parameter from the TA1 byte. I will let you know how to configure the parameters later. With above modification , I have managed to drive a 4.8MHz clk out of PN7462, please kindly refer to the following for details. The test result is shown as below:  Since I just used a Mifare SAM AV3 card in the test, the demo could not go to the end, but at least it shows the communication has no issue. You may just directly replace several files in that demo with the same files as attached to verify it from your side. To extend the definition of the configuration table above, please refer to the following for details. With such configuration, there is no problem to have an ICC clock between 4.7MHz and 5MHz. Using an alternative clock source to set up PN7462's contact interface clock , so that we have more options of the clock frequency. Contact Smart Card Reader ICs NFC Controller Solutions NFC Reader Library
查看全文
FRDM-KL25Z_PCF8563_示例项目 这里展示了一个使用 PCF8563 的示例项目,以演示 NXP 的 RTC 设备的简易使用。 PCF8563 是一款基于超低功耗振荡器并使用 I2C 总线进行接口的实时时钟。
查看全文
A Patch to Fix Display Mess Issue About TextView in i.MX6 Android ICS Overview The purpose of this document is to provide the patches to fix display mess issue in TextView based on MX6 Android R13.4-GA and R13.4.1 ICS release. Please note these patches are only validated basically for dedicated issues. If you find any side effect with these patches, please add the comments into this document. Issue Description Software: R13.4-GA or R13.4.1 Android releases Hardware: i.MX6Dual/Quad SabreSD board or i.MX6DualLite SabreSD board. Test steps: Install testviewtest.apk Run this APK and key in the text, you will see the text display mess after key in more texts. You can also get the issue descriptions from https://community.freescale.com/thread/303194 Patches You can get the patches from attached textview_fix.zip. For R13.4-GA, please apply the following patches: kernel_imx, unzip Kernel/r13.4-ga/kernel-patch-r13.4-ga-gpu4.6.9p10.tar.gz and apply the patches. device/fsl-proprietary/gpu-viv: unzip gpu_lib/gpu-viv-lib-4.6.9p10-font-libGAL-crash-fix.tar.gz and replace lib folder. For R13.4.1, please apply the following patches: kernel_imx, Apply the patch Kernel/r13.4.1/0001-upgrade-gpu-4.6.9p10-kernel-driver_r13.4.1.patc device/fsl-proprietary/gpu-viv: unzip gpu_lib/gpu-viv-lib-4.6.9p10-font-libGAL-crash-fix.tar.gz and replace lib folder. Android i.MX6DL i.MX6Dual i.MX6Quad i.MX6S
查看全文
FreeMASTER 3.2 - Release Announcement Version 3.2 of the NXP FreeMASTER tool has just been published online.  This is the first version of the new 3.2.x release line. It is backward compatible with previous 3.x and 2.x versions (see previous release announcements). The latest version brings new features and bugfixes described in this article. The updated installer is available along with documentation and other resources at http://www.nxp.com/freemaster.   Release description FreeMASTER is a powerful data visualization tool developed and provided by NXP to help users monitor and control embedded applications running on NXP’s targets. It works with almost all NXP Arm ® Cortex®-M microcontrollers from both Edge Processing and Automotive business lines as well as with DSC and legacy Power Architecture, ColdFire and HCS12/Z platforms. Note that the license terms and conditions does not allow using FreeMASTER with non-authorized systems from other vendors. Version 3.2.0 is the first version of the new 3.2.x release line. The installer does not replace the older installations in the system, version 3.2 it may co-exist simultaneously with the older versions.  Version 3.2 is fully backward compatible with all previous versions and it adds new features described here. Traditionally, it supports runtime monitoring of embedded applications, displaying variable values, oscilloscope real time graphs, fast transient recorder graphs and enables connectivity to 3rd party applications. The major new feature introduced by this version is a support of Microsoft Edge WebView2 browser component which can be used to render dashboard and other control applications running embedded in the FreeMASTER main application window. In total, there are now three options of hosting the active HTML content inside the FreeMASTER: the legacy Microsoft Internet Explorer component introduced in versions 1.x and 2.x; Chromium CEF component introduced in version 3.0 and the new Microsoft Edge WebView2 component. The new Edge WebView2 is also based on a Chromium engine so it is fully compatible with the FreeMASTER's JSON-RPC client interface. Additionally the Edge also partially supports the COM+ host object embedding which enables to access the "legacy" FreeMASTER ActiveX interface. Such versatility enables a smooth migration path for old dashboards and control pages created originally for Internet Explorer into the modern browser framework. Note that the Internet Explorer browser and related technology is being phased out by Microsoft and the IE-based applications may no longer operate properly in near future. Please read more in the IE migration whitepaper accessible at the FreeMASTER Welcome page. FreeMASTER Lite service which is a part of the FreeMASTER installation package provides the communication core for Windows and Linux systems. It is accessible similarly as the FreeMASTER desktop application over the JSON-RPC interface. FreeMASTER Lite also embeds the popular Node-RED framework for graphical programming and provides many examples of use with the FreeMASTER tool. Find more information related to Node-RED in the dedicated training video.  Note: Installing FreeMASTER Lite will require you to enter an activation code. Get your free code on the License Keys tab at the license information page. FreeMASTER Node.js Installable Modules enable convenient use of the FreeMASTER JSON-RPC components in a Node.js applications managed by the ‘npm’ package manager. New Features The key new feature is a support of Microsoft Edge WebView2 browser component which can be used to migrate old dashboards and other HTML applications running in FreeMASTER from Internet Explorer to the modern browser with minimal changes in the HTML and JScript code. Additionally, the ActiveX and JSON-RPC interface has been extended by new methods enabling to access project content and project options programmatically from a script environment. Release target audience Both FreeMASTER and FreeMASTER Lite are primarily targeted to our customers, engineers and developers of NXP embedded applications from Industrial, IoT and Automotive areas who want to monitor and control their applications at runtime. FreeMASTER is also a strong framework which can be used to create interactive demos and user interfaces helping to use the embedded applications by yet wider target audience. Prerequisites FreeMASTER tools run on the host computer and communicate with the target microcontroller application using Serial, CAN, Ethernet/WiFi network, JTAG, BDM or other physical interface. The microcontroller communication drivers are available as part of MCUXpresso SDK, S32 Design Studio or as a standalone installation package. Get familiar with the communication protocol and the microcontroller driver API before using the FreeMASTER tool. License terms and conditions permit use of FreeMASTER solely with systems based on NXP microprocessor or microcontroller systems. Packages A single self-extracting installation package which contains both FreeMASTER desktop application and the new FreeMASTER Lite service is available for Windows platforms. A package with the FreeMASTER Lite service is also available for Linux. Access the installation and documentation at the FreeMASTER home page at https://www.nxp.com/freemaster.
查看全文
Freescaleのi.Mx6q Sabre SDでのOpenGLアプリケーションの高速ブート <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Adeneo Embeddedのエンジニアの能力は次のとおりです。 Freescaleのi.Mx6q Sabre SDでのOpenGLアプリケーションの高速ブート (マイビデオで視聴)
查看全文
在 i.MX51 上运行的 CellWriter 应用程序 - Ubuntu Linux(EVK 板) <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 概述
查看全文
嵌入式图像处理 - 在 i.MX51 Freescale ARM 处理器上运行的 Canny 边缘检测器 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 概述
查看全文
[IDE Tool]Energy Measurement in MCUXpresso IDE Contents 1. Principle of energy measurement 2. Energy measurement test   2.1 Use in non-Debug state   2.2 Use in Debug state During the operation of MCU, real-time measurement of board current and voltage is of great significance to the stability of system power consumption. Especially in scenarios that are sensitive to voltage and current fluctuations, it is particularly important to collect and analyze high-frequency samples. MCUXpresso IDE integrates the power measurement function, which can measure the current and voltage of the development board in real time and calculate the real-time power consumption. Based on MCUXpresso IDE v11.5.0, this article mainly explains power measurement function usage. 1.   Principle of energy measurement Currently the MCUXpresso IDE energy measurement function supports the following development boards: -LPCXpresso546x8/540xx/54S0xx -LPCXpresso54102 -LPCXpresso51U68/54114 -QN9090-DK006/ JN5189-DK006/IOTZKB-DK006 -QN9080DK The power measurement actually uses the LPC-Link2/MCU-Link debugger on the development board to collect the conversion value of the A/D conversion chip, and perform software calculation to obtain the power measurement result. Taking LPCXpresso54628 development board as an example, the following is the circuit diagram of the power measurement part: Fig.1 The MAX9634TEUK+T is a precision current amplifier. And ADC122S021 is a 12-bit A/D converter with dual-channel sampling, its rate can reach 200ksps. ADC122S021 collects LPC54xx_CURR and SHLD_CURR voltages, IDE sets Target resistor (Total Rvsense in the figure) and Shield resistor (resistance value corresponding to SHLD_CURR) in advance. The LPC-Link2 debugger can calculate the voltage, current and power consumption information by collecting AD conversion values. 2.   Energy measurement test Taking LPCXpresso54628 development board as an example. Open the menu bar : Analysis->Energy Measurement. The Energy Measurement interface will appear in the lower right corner of the screen, which is divided into Plot drawing and Config configuration interface. It can be used in Debug state or in non-Debug state during measurement. Test the case of LED small light flickering and observe the changes of voltage, current and energy consumption. Note that the LPC-Link2 debugger version should be CMSIS-DAP probe version 5.147 and above. 2.1 Use in non-Debug state Click the button  in energy measurement interface and select the measured in the config interface. You can select the target voltage, target current and shielding current. The sampling rate can be selected as 50ksps, 62.5ksps or 100ksps. First select the model of the development board to be tested, and then continue to select the target resistance and shielding resistance. The target resistance value is selected according to the jumper cap description in Figure 1. The resistance value of the shielding resistance is the fixed resistance value of development board. As shown in the figure below: Fig.2 Select the target voltage to be measured, and click the button to run the Energy Measurement interface. You can see the slight fluctuation of voltage in the plot interface and view the average voltage through the delimited area of horizontal measurement, as follows: Fig.3 Select the target current to be measured. Before measuring the target current, click Read from target on the config interface to calculate the average value of the target voltage within 0.5s for subsequent power consumption calculation. Click the run button to see that the target current fluctuates slightly with the flashing of the small light in the plot interface. At the same time, check the average current, power consumption and energy consumption through the delimited area of horizontal measurement, as follows: Fig.4 2.2 Use in Debug state When used in the debug state, you can use MCUXpresso IDE or KEIL to enter the debugging state. Click the button on the energy measurement interface to read the power consumption in the debug state. The measurement process is the same as the non-Debug state, as follows: Fig.5 This is a general enablement document of how to use energy measurement feature in debug and non-debug mode. For more, please refer  MCUXpresso_IDE_Energy_Measurement. pdf under MCUXpresso IDE install folder.   LPC Marketing LPC51Uxx LPC546xx LPC54xxx
查看全文
MCUXpresso IDE v11.5.1 リリース この度、MCUXpresso IDE v11.5.1 (build 7266) がリリースされました。 これは、以前の MCUXpresso IDE v11.5.0 リリースを基にしたメンテナンス リリースであり、既存のすべてのユーザーにこの新しいバージョンをダウンロードしてインストールすることをお勧めします。 インストーラーのダウンロード  全プラットフォーム向けインストーラをダウンロードするには、当社のダウンロード・サイトに以下のリンクからログインしてください。 https://www.nxp.com/mcuxpresso/ide/download ドキュメント  最新ユーザー・ガイドおよびその他のドキュメントに補足情報が掲載されています。これらドキュメントには、「IDEのヘルプ・メニュー」から利用可能な内蔵ヘルプ・システムから、およびインストレーション・ディクショナリ内または以下のリンクからダウンロード可能なPDFフォーム形式でアクセス可能です。 https://www.nxp.com/mcuxpresso/ide/documentation   今後のリリースの通知  今後のリリースに関する通知を受け取るには、MCUXpresso IDE - リリース履歴に従ってください。  変更の概要 - バージョン 11.5.1 - 2022 年 4 月 アップグレード: CDT 10.3.0 から CDT 10.3.3 へのアップグレード。これは、 https://bugs.eclipse.org/bugs/show_bug.cgi?id=575903 問題に対処することを目的としています。 アップグレード:新しいSEGGER J-Linkソフトウェア(v7.62c)。 アップグレード:新しいPEmicroプラグイン(v5.2.0)。 追加:[NPI]RT1060X(RT1060ファントム)のサポート。 機能:[フラッシュプログラマ][RT1160/RT117x] FlexSPI2ポートAにQSPI用のフラッシュドライバを追加。 修正: [デバッガ] 新しい MCU-Link ファームウェアのリリースに関する通知が [プローブ検出] ダイアログに表示されない場合がある問題 修正: [デバッガー] レジスタが多いターゲット (RT1160 や RT117x など) で Peripherals+ ウィンドウが開いていると、デバッグ操作が遅くなる問題を修正しました。 修正:[プロジェクトマネージャー][RT1160/RT117x] .cprojectの-D__MULTICORE_MASTERが氾濫する。 【プロジェクトマネージャ】【RT1160/RT117x】M7 C++プロジェクトが特定のアプリケーションでM4プロジェクト(マルチコア構成の場合)を読み込めない不具合を修正しました。生成されたリンカー ファイルのヒープ セクションとスタック セクションの前に exdata セクションが配置されるようになりました (マネージド リンカー スクリプト構成を使用する場合) 以前のバージョンでは、exdata セクションがデータ セクションの前に配置されていました。 修正済み:[Peripherals+][LPC546xx] Peripherals+ウィンドウでEMCレジスタの位置/オフセットが正しくありません。 修正:[エネルギー計測]エネルギー計測ビューをSWOプロファイルと併用すると不安定になる 既知の問題 詳細なリストについては、インストール・レイアウトのKnownIssues.txtファイルを参照してください。 注:リリース後に見つかった他の問題は オンライン版 に追加され、可能な場合は回避策も説明されます。
查看全文
DSC - ハウツー このページでは、DSC 製品ファミリに関連するすべての Model-Based Design Toolbox のトピックをまとめています。 DSC のモデルベースデザインツールボックス - リリースノート: Rev 1.0.0 - DSC MC56F8x MCUs 向け NXP モデルベースデザインツールボックス - バージョン 1.0.0 
查看全文
如何在社区发布项目 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 1. 访问 community.freescale.com 并使用您的 www.Freescale.com 帐户 登录 ,如果您没有帐户, 请创建一个 。 2. 创建新文档 3. 写下您的项目名称以及一段对您的项目的简短描述。接下来,单击插入视频图标以添加您的项目工作视频。 4. 如果您的项目报告少于 3 页,请将其发布在视频下方。如果没有,请将其添加为附件。 5. 还要将完整的程序项目添加到 .zip 文件中文件作为附件。 6. 在类别部分中,选择是学生项目还是其他。 7. 在标签部分,添加任何可以帮助任何人找到您的项目的搜索词。使用University_Programs ,您的电子评估委员会名称(例如TWR-K40X256-KIT )及其系列(例如Kinetis)。如果您想添加your_university_name 、 region (例如),则是可选的。latin_america、emea)等。 8. 在“协作选项”中,如果您希望团队成员能够编辑它,请添加他们。并将评论设置为“开放”。 9. 完成后 选择 发布 。 回复:如何在社区发布项目 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 我很高兴它有帮助。 回复:如何在社区发布项目 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 这个文件很有用。感谢 Damaris Ochoa Flores!
查看全文
How to add a i.MX 8QuadMax PAD Wakeup.      The following steps allow you to add a pad Wakeup on i.MX 8QuadMax MEK CPU Board. On the Host. Cloning the Linux kernel repository. Clone the i.MX Linux Kernel repo to the home directory. cd ~ git clone -b lf-5.10.72-2.2.0 https://source.codeaurora.org/external/imx/linux-imx cd linux-imx/ Patching the device tree. Open the imx8qm-mek.dts file: vim arch/arm64/boot/dts/freescale/imx8qm-mek.dts Add the following lines: &lsio_gpio2{       pad-wakeup-num = <1>;       pad-wakeup = <81 4 1>; }; In the line pad-wakeup-num = <1>; , the number "1" corresponds to the number of pads that you want to add. The line pad-wakeup = <81 4 1>; has three parameters: The first parameter corresponds to the "pin_id", you can find it in include/dt-bindings/pinctrl/pads-imx8qm.h , in this example we are using "IMX8QM_MIPI_CSI1_I2C0_SDA". The second parameter corresponds to the "'type'", you can find it in the i.MX 8QuadMax Applications Processor Reference Manual, in the page 802:   For this example we are using "LOW". The third parameter corresponds to the "line", the number of bit in 32bit gpio group, you can find it in include/dt-bindings/pinctrl/pads-imx8qm.h In this example, "IMX8QM_MIPI_CSI1_I2C0_SDA" belongs to gpio group 2, line 1. Build the device tree. Setup your toolchain, for example: source /opt/fsl-imx-wayland/5.10-hardknott/environment-setup-cortexa53-crypto-poky-linux Generate config file. make imx_v8_defconfig Compile the device tree. make freescale/imx8qm-mek.dtb Copy the .dtb file to the MEK CPU Board, for example with scp: scp imx8qm-mek.dtb root@<MEK_CPU_Board_IP>:/home/root Alternatively, you may copy the .dtb file directly to the FAT32 partition where the Kernel and Device Tree files are located. On the MEK CPU Board. Switching the device tree. To copy the updated device tree to the corresponding partition, first create a directory. mkdir Partition_1 Mount the partition one. mount /dev/mmcblk1p1 Partition_1/ Copy or move the device tree into partition one. cp imx8qm-mek.dtb Partition_1/ Reboot the board. reboot How to wake up the i.MX 8QuadMax MEK CPU Board. In this example a wire was soldered on "R204":     Run the following command on the MEK CPU Board: echo mem > /sys/power/state And you will see something like: [   53.769266] PM: suspend entry (deep) [   53.902130] Filesystems sync: 0.129 seconds [   53.908068] Freezing user space processes ... (elapsed 0.002 seconds) done. [   53.917189] OOM killer disabled. [   53.920420] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [   53.929626] printk: Suspending console(s) (use no_console_suspend to debug) Connect the wire that was soldered on "R204" to ground, the MEK CPU Board will wake up and you will see something like: [   54.687125] fec 5b040000.ethernet eth0: Link is Down [   54.689876] PM: suspend devices took 0.756 seconds [   54.709570] Disabling non-boot CPUs ... [   54.710562] CPU1: shutdown [   54.711582] psci: CPU1 killed (polled 0 ms) [   54.714360] CPU2: shutdown [   54.715376] psci: CPU2 killed (polled 0 ms) [   54.717365] CPU3: shutdown [   54.718382] psci: CPU3 killed (polled 0 ms) [   54.719887] CPU4: shutdown [   54.720884] psci: CPU4 killed (polled 4 ms) [   54.722213] CPU5: shutdown [   54.723229] psci: CPU5 killed (polled 0 ms) [   54.724731] Enabling non-boot CPUs ... [   54.725388] Detected VIPT I-cache on CPU1 [   54.725423] GICv3: CPU1: found redistributor 1 region 0:0x0000000051b20000 [   54.725486] CPU1: Booted secondary processor 0x0000000001 [0x410fd034] [   54.726455] CPU1 is up [   54.726930] Detected VIPT I-cache on CPU2 [   54.726947] GICv3: CPU2: found redistributor 2 region 0:0x0000000051b40000 [   54.726976] CPU2: Booted secondary processor 0x0000000002 [0x410fd034] [   54.727478] CPU2 is up [   54.727955] Detected VIPT I-cache on CPU3 [   54.727971] GICv3: CPU3: found redistributor 3 region 0:0x0000000051b60000 [   54.728001] CPU3: Booted secondary processor 0x0000000003 [0x410fd034] [   54.728497] CPU3 is up [   54.729806] Detected PIPT I-cache on CPU4 [   54.729825] GICv3: CPU4: found redistributor 100 region 0:0x0000000051b80000 [   54.729857] CPU4: Booted secondary processor 0x0000000100 [0x410fd082] [   54.730490] CPU4 is up [   54.730985] Detected PIPT I-cache on CPU5 [   54.730999] GICv3: CPU5: found redistributor 101 region 0:0x0000000051ba0000 [   54.731021] CPU5: Booted secondary processor 0x0000000101 [0x410fd082] [   54.731679] CPU5 is up [   54.756440] hdmi_rx_hd_core_clk: failed to set clock parent -16 [   54.765828] gpio-mxc 5d0a0000.gpio: wakeup by pad, line 1 [   54.844242] ahci-imx 5f020000.sata: external osc is used. [   54.913582] caam 31400000.crypto: registering rng-caam [   54.918358] PM: resume devices took 0.148 seconds [   55.096663] OOM killer enabled. [   55.099814] Restarting tasks ... done. [   55.111833] PM: suspend exit   i.MX 8 Family | i.MX 8QuadMax (8QM) | 8QuadPlus Linux
查看全文
Auto Insmod Kernel Modules Through Modprobe with Extra Parameter Wireless HW module on i.MX 6 DQ HDMI dongle board is bcm4330 that is SDIO interface. Modprobe  default configuration will only insmod bcm4330.ko without any kernel module parameter, while bcm4330,ko needs extra firmware binary and nvram configuration file absolute path/filename  as parameter like firmware_path=/lib/firmware/bcm4330/fw_bcm4330.bin nvram_path=/lib/firmware/bcm4330/nvram_bcm4330.txt. To auto insmod bcm4330 kernel module with those parameters by modprobe we need a modprobe configuration file. Now create this file at /etc/modprobe.d/bc4330.conf, it's content as below: #For BCM4330 special install requirement options bcm4330 firmware_path=/lib/firmware/bcm4330/fw_bcm4330.bin nvram_path=/lib/firmware/bcm4330/nvram_bcm4330.txt Of course we need copy correct firmware and nvram configuration file to directory as /etc/modprobe.d/bc4330.conf set. i.MX6Dual i.MX6Quad Re: Auto Insmod Kernel Modules Through Modprobe with Extra Parameter wonderful
查看全文
MCUXpresso IDE v11.4.1 Now Available We are pleased to announce that MCUXpresso IDE v11.4.1 (build 6260) is now available. This is a maintenance release that builds upon the previous MCUXpresso IDE v11.4.0 release, and we recommend that all existing users download and install this new version. Installer Downloads  To download the installers for all platforms, please login to our download site via:  https://www.nxp.com/mcuxpresso/ide/download Documentation  Additional information can be found in the updated User Guide and other documentation, which can be accessed from the built in help system available via IDE's Help menu and in PDF form from within the installation directory or downloaded from: https://www.nxp.com/mcuxpresso/ide/documentation   Notification of future releases  To receive notifications about future releases, please follow : MCUXpresso IDE - Release History  Summary of Changes - version 11.4.1 - September 2021 Upgraded: Newer SEGGER J-Link software (v7.54b, 32-bit version on Windows, 64-bit version on Linux/macOS). Upgraded: Newer PEmicro plugin (v5.1.0). Added: MCU-Link Pro probe support. Improvement: [SWO/Energy Measurement] Improved data collection rate. This aims to decrease the rate of lost packets (SWO) and gaps (Energy Measurement) at higher speed rates. Improvement: [LPC55xx] Add support in LinkServer flash drivers for programming data to the last flash sector (up to and excluding the reserved region). Fixed: [SWO] NPE obtained in the case of some SWO error types. This prevents the error dialogs to appear (the exceptions go silently). Fixed: [Energy Measurement] Detect data stream corruption and gracefully terminate Energy Measurement or SWO data retrieval if this situation arises. Fixed: [Energy Measurement] Sometimes stale data remains after clearing the data. Fixed: [Energy Measurement] No energy consumption info is displayed when measuring high (> 1W) power. Fixed: [Energy Measurement] No data is displayed after a while when measuring high currents. Fixed: [FreeRTOS TAD] Heap5 data not shown in Heap Usage view. Fixed: [Azure RTOS TAD] Azure RTOS debug session closes unexpectedly when using non-CM7 devices.
查看全文
MC56F83000開発ガイド MC56F83000は最新のDSCファミリーであり、以前のファミリーにはない新機能を備えています。ここでは、お客様がアプリケーションプロジェクトを開発する前に機能を知ることができるように、ここにリストしています。 1)USBTAPデバイスはサポートされていません 2)ROMブートローダーがサポートされているため、ユーザーはリセット後にblhostツールを使用してブートローダーモードでコードをダウンロードできます 3)MC56F83xxxがFlashのアプリケーションコードから開始するかブートローダコードから開始するかを認識できるように構成フィールドを書き込みます。4)ISRの前に #pragma マクロをプレフィックスとして追加します。
查看全文
Change the console from UART 2 to UART 4 on the i.MX8MN The A53 Debug Console Changing consists in several major updates like: RDC settings, Pinmux, Clocks and Ecosystem Updates. i.MX 8M | i.MX 8M Mini | i.MX 8M Nano Linux
查看全文
Fast GPU Image Processing in the i.MX 6x Fast GPU Image Processing in the i.MX 6x by Guillermo Hernandez, Freescale Introduction Color tracking is useful as a base for complex image processing use cases, like determining what parts of an image belong to skin is very important for face detection or hand gesture applications. In this example we will present a method that is robust enough to take some noise and blur, and different lighting conditions thanks to the use of OpenGL ES 2.0 shaders running in the i.MX 6X  multimedia processor. Prerequisites This how-to assumes that the reader is an experienced i.mx developer and is familiar with the tools and techniques around this technology, also this paper assumes the reader has intermediate graphics knowledge and experience such as the RGBA structure of pictures and video frames and programming OpenGL based applications, as we will not dig in the details of the basic setup. Scope Within this paper, we will see how to implement a very fast color tracking application that uses the GPU instead of the CPU using OpenGL ES 2.0 shaders. Step 1: Gather all the components For this example we will use: 1.      i.MX6q ARD platform 2.      Linux ER5 3.      Oneric rootfs with ER5 release packages 4.      Open CV 2.0.0 source Step 2: building everything you need Refer to ER5 User´s Guide and Release notes on how to build and boot the board with the Ubuntu Oneric rootfs. After you are done, you will need to build the Open CV 2.0.0 source in the board, or you could add it to the ltib and have it built for you. NOTE: We will be using open CV only for convenience purposes, we will not use any if its advanced math or image processing  features (because everything happens on the CPU and that is what we are trying to avoid), but rather to have an easy way of grabbing and managing  frames from the USB camera. Step 3: Application setup Make sure that at this point you have a basic OpenGL Es 2.0 application running, a simple plane with a texture mapped to it should be enough to start. (Please refer to Freescale GPU examples). Step 4: OpenCV auxiliary code The basic idea of the workflow is as follows: a)      Get the live feed from the USB camera using openCV function cvCapture() and store into IplImage structure. b)      Create an OpenGL  texture that reads the IplImage buffer every frame and map it to a plane in OpenGL ES 2.0. c)      Use the Fragment Shader to perform fast image processing calculations, in this example we will examine the Sobel Filter and Binary Images that are the foundations for many complex Image Processing algorithms. d)      If necessary, perform multi-pass rendering to chain several image processing shaders  and get an end result. First we must import our openCV relevant headers: #include "opencv/cv.h" #include "opencv/cxcore.h" #include "opencv/cvaux.h" #include "opencv/highgui.h" Then we should define a texture size, for this example we will be using 320x240, but this can be easily changed to 640 x 480 #define TEXTURE_W 320 #define TEXTURE_H 240 We need to create an OpenCV capture device to enable its V4L camera and get the live feed: CvCapture *capture; capture = cvCreateCameraCapture (0); cvSetCaptureProperty (capture, CV_CAP_PROP_FRAME_WIDTH,  TEXTURE_W); cvSetCaptureProperty (capture, CV_CAP_PROP_FRAME_HEIGHT, TEXTURE_H); Note: when we are done, remember to close the camera stream: cvReleaseCapture (&capture); OpenCV has a very convenient structure used for storing pixel arrays (a.k.a. images) called IplImage IplImage *bgr_img1; IplImage *frame1; bgr_img1 = cvCreateImage (cvSize (TEXTURE_W, TEXTURE_H), 8, 4); OpenCV has a very convenient function for capturing a frame from the camera and storing it into a IplImage frame2 = cvQueryFrame(capture2); Then we will want to separate the camera capture process from the pos-processing filters and final rendering; hence, we should create a thread to exclusively handle the camera: #include pthread_t camera_thread1; pthread_create (&camera_thread1, NULL, UpdateTextureFromCamera1,(void *)&thread_id); Your UpdateTextureFromCamera() function should be something like this: void *UpdateTextureFromCamera2 (void *ptr) {       while(1)       {             frame2 = cvQueryFrame(capture);             //cvFlip (frame2, frame2, 1);  // mirrored image             cvCvtColor(frame2, bgr_img2, CV_BGR2BGRA);       }       return NULL;    } Finally, the rendering loop should be something like this: while (! window->Kbhit ())       {                         tt = (double)cvGetTickCount();             Render ();             tt = (double)cvGetTickCount() - tt;             value = tt/(cvGetTickFrequency()*1000.);             printf( "\ntime = %gms --- %.2lf FPS", value, 1000.0 / value);             //key = cvWaitKey (30);       }       Step 5: Map the camera image to a GL Texture As you can see, you need a Render function call every frame, this white paper will not cover in detail the basic OpenGL  or EGL setup of the application, but we would rather focus on the ES 2.0 shaders. GLuint _texture; GLeglImageOES g_imgHandle; IplImage *_texture_data; The function to map the texture from our stored pixels in IplImage is quite simple: we just need to get the image data, that is basically a pixel array void GLCVPlane::PlaneSetTex (IplImage *texture_data) {       cvCvtColor (texture_data, _texture_data, CV_BGR2RGB);       glBindTexture(GL_TEXTURE_2D, _texture);       glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB, _texture_w, _texture_h, 0, GL_RGB, GL_UNSIGNED_BYTE, _texture_data->imageData); } This function should be called inside our render loop: void Render (void) {   glClearColor (0.0f, 0.0f, 0.0f, 0.0f);   glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);   PlaneSetTex(bgr_img1); } At this point the OpenGL texture is ready to be used as a sampler in our Fragment Shader  mapped to a 3D plane Lastly,  when you are ready to draw your plane with the texture in it: // Set the shader program glUseProgram (_shader_program); … // Binds this texture handle so we can load the data into it /* Select Our Texture */ glActiveTexture(GL_TEXTURE0); //Select eglImage glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, g_imgHandle); glDrawArrays (GL_TRIANGLES, 0, 6); Step 6: Use the GPU to do Image Processing First we need to make sure we have the correct Vertex Shader and Fragment shader, we will  focus only in the Fragment Shader, this is where we will process our image from the camera. Below you will find the most simple fragment shader, this one only colors pixels from the sample texture const char *planefrag_shader_src =       "#ifdef GL_FRAGMENT_PRECISION_HIGH                    \n"       "  precision highp float;                            \n"       "#else                                          \n"       "  precision mediump float;                    \n"       "#endif                                        \n"       "                                              \n"       "uniform sampler2D s_texture;                  \n"       "varying  vec3      g_vVSColor;                      \n"       "varying  vec2 g_vVSTexCoord;                        \n"       "                                              \n"       "void main()                                    \n"       "{                                              \n"       "    gl_FragColor = texture2D(s_texture,g_vVSTexCoord);    \n"       "}                                              \n"; Binary Image The most Simple Image Filter is the Binary Image, this one converts a source image to a black/white output, to decide if a color should be black or white we need a threshold,  everything below that threshold will be black, and any color above should be white.               The shader code is as follows: const char* g_strRGBtoBlackWhiteShader =     #ifdef GL_FRAGMENT_PRECISION_HIGH                            precision highp float;                            #else                                            precision mediump float;                          #endif                                            varying  vec2 g_vVSTexCoord;                  uniform sampler2D s_texture;                    uniform float threshold;                                                                        void main() {                                    vec3 current_Color = texture2D(s_texture,g_vVSTexCoord).xyz;         float luminance = dot (vec3(0.299,0.587,0.114),current_Color);         if(luminance>threshold)                      \n"             gl_FragColor = vec4(1.0);                \n"           else                                  \n"                          gl_FragColor = vec4(0.0);                \n"       }                                        \n"; You can notice that the main operation is to get a luminance value of the pixel, in order to achieve that we have to multiply a known vector (obtained empirically) by the current pixel, then we simply compare that luminance value with a threshold. Anything below that threshold will be black, and anything above that threshold will be considered a white pixel. SOBEL Operator Sobel is a very common filter, since it is used as a foundation for many complex Image Processing processes, particularly in edge detection algorithms. The sobel operator is based in convolutions, the convolution is made of a particular mask, often called a kernel (on common therms, usually a 3x3 matrix). The sobel operator calculates the gradient of the image at each pixel, so it tells us how it changes from the pixels surrounding the current pixel , meaning how it increases or decreases (darker to brighter values).           The shader is a bit long, since several operations must be performed, we shall discuss each of its parts below: First we need to get the texture coordinates from the Vertex Shader: const char* plane_sobel_filter_shader_src = #ifdef GL_FRAGMENT_PRECISION_HIGH                    precision highp float;                          #else                                    precision mediump float;                        #endif                                          varying  vec2 g_vVSTexCoord;                  uniform sampler2D s_texture;                    Then we should define our kernel, as stated before, a 3x3 matrix should be enough, and the following values have been tested with good results: mat3 kernel1 = mat3 (-1.0, -2.0, -1.0,                                          0.0, 0.0, 0.0,                                              1.0, 2.0, 1.0);    We also need a convenient way to convert to grayscale, since we only need grayscale information for the Sobel operator, remember that to convert to grayscale you only need an average of the three colors: float toGrayscale(vec3 source) {                    float average = (source.x+source.y+source.z)/3.0;        return average;              } Now we go to the important part, to actually perform the convolutions. Remember that by the OpenGL ES 2.0 spec, nor recursion nor dynamic indexing is supported, so we need to do our operations the hard way: by defining vectors and multiplying them. See the following code:   float doConvolution(mat3 kernel) {                              float sum = 0.0;                                    float current_pixelColor = toGrayscale(texture2D(s_texture,g_vVSTexCoord).xyz); float xOffset = float(1)/1024.0;                    float yOffset = float(1)/768.0; float new_pixel00 = toGrayscale(texture2D(s_texture, vec2(g_vVSTexCoord.x-  xOffset,g_vVSTexCoord.y-yOffset)).xyz); float new_pixel01 = toGrayscale(texture2D(s_texture, vec2(g_vVSTexCoord.x,g_vVSTexCoord.y-yOffset)).xyz); float new_pixel02 = toGrayscale(texture2D(s_texture,  vec2(g_vVSTexCoord.x+xOffset,g_vVSTexCoord.y-yOffset)).xyz); vec3 pixelRow0 = vec3(new_pixel00,new_pixel01,new_pixel02); float new_pixel10 = toGrayscale(texture2D(s_texture, vec2(g_vVSTexCoord.x-xOffset,g_vVSTexCoord.y)).xyz);\n" float new_pixel11 = toGrayscale(texture2D(s_texture, vec2(g_vVSTexCoord.x,g_vVSTexCoord.y)).xyz); float new_pixel12 = toGrayscale(texture2D(s_texture, vec2(g_vVSTexCoord.x+xOffset,g_vVSTexCoord.y)).xyz); vec3 pixelRow1 = vec3(new_pixel10,new_pixel11,new_pixel12); float new_pixel20 = toGrayscale(texture2D(s_texture, vec2(g_vVSTexCoord.x-xOffset,g_vVSTexCoord.y+yOffset)).xyz); float new_pixel21 = toGrayscale(texture2D(s_texture, vec2(g_vVSTexCoord.x,g_vVSTexCoord.y+yOffset)).xyz); float new_pixel22 = toGrayscale(texture2D(s_texture, vec2(g_vVSTexCoord.x+xOffset,g_vVSTexCoord.y+yOffset)).xyz); vec3 pixelRow2 = vec3(new_pixel20,new_pixel21,new_pixel22); vec3 mult1 = (kernel[0]*pixelRow0);                  vec3 mult2 = (kernel[1]*pixelRow1);                  vec3 mult3 = (kernel[2]*pixelRow2);                  sum= mult1.x+mult1.y+mult1.z+mult2.x+mult2.y+mult2.z+mult3.x+     mult3.y+mult3.z;\n"     return sum;                                      } If you see the last part of our function, you can notice that we are adding the multiplication values to a sum, with this sum we will see the variation of each pixel regarding its neighbors. The last part of the shader is where we will use all our previous functions, it is worth to notice that the convolution needs to be applied horizontally and vertically for this technique to be complete: void main() {                                    float horizontalSum = 0.0;                            float verticalSum = 0.0;                        float averageSum = 0.0;                        horizontalSum = doConvolution(kernel1);        verticalSum = doConvolution(kernel2);            if( (verticalSum > 0.2)|| (horizontalSum >0.2)||(verticalSum < -0.2)|| (horizontalSum <-0.2))                        averageSum = 0.0;                      else                                                    averageSum = 1.0;                    gl_FragColor = vec4(averageSum,averageSum,averageSum,1.0);                }    Conclusions and future work At this point, if you have your application up and running, you can notice that Image Processing can be done quite fast, even with images larger than 640 480. This approach can be expanded to a variety of techniques like Tracking, Feature detection and Face detection. However, these techniques are out of scope for now, because this algorithms need multiple rendering passes (like face detection), where we need to perform an operation, then write the result to an offscreen buffer and use that buffer as an input for the next shader and so on.  But Freescale is planning to release an Application Note in Q4 2012 that will expand this white paper and cover these techniques in detail. Graphics & Display i.MX6_All Linux Re: Fast GPU Image Processing in the i.MX 6x Hi, jodipaul‌ Would you like to provide the complete sample code? Best regards. Re: Fast GPU Image Processing in the i.MX 6x Investigate using GStreamer (v4l2src or mfw_v4lsrc) instead of OpenCV for the image capture.  This would prevent you from having to do the Oneiric rootfs step. See this post to improve the performance of step 5. The glTexImage2D method is rather slow. Computer Vision on i.MX Processors: Video to Texture Streaming (Part 3) - i.MX6 processor
查看全文