cross-compiling

Writing and Compiling Program For OpenWrt

末鹿安然 提交于 2020-04-11 07:34:31
问题 I have a embedded device with MIPS arch working under OpenWRT system type: MediaTek MT7628AN ver:1 eco:2 machine: WRTnode2P processor: 0 cpu model: MIPS 24KEc V5.5 I want to compile compile a small program in C through my computer (ubuntu) #include <stdio.h> int main(void){ printf("HelloWorld"); return 0; } To compile it I use mips-linux-gnu-gcc command mips-linux-gnu-gcc -march=24kec -mabi=32 hello.c -o hello I send hello program to my device and make a chmod 755 chmod 755 hello When I try

Errors on assembling ARM asm on an x86 PC with GCC or `as`

无人久伴 提交于 2020-04-05 06:13:09
问题 So I have been doing an assembly tutorial, and I got stuck in the very beginning. Project name: asmtut.s The Code: .text .global _start start: MOV R0, #65 MOV R7, #1 SWI 0 Right off the beginning I'm welcomed by 3 error messages after I try this line: as -o asmtut.o asmtut.s asmtut.s:6: Error: expecting operand after ','; got nothing asmtut.s:7: Error: expecting operand after ','; got nothing asmtut.s:9: Error: no such instruction: 'swi 0' I'm confused, because this is the exact code in the

Errors on assembling ARM asm on an x86 PC with GCC or `as`

心不动则不痛 提交于 2020-04-05 06:12:12
问题 So I have been doing an assembly tutorial, and I got stuck in the very beginning. Project name: asmtut.s The Code: .text .global _start start: MOV R0, #65 MOV R7, #1 SWI 0 Right off the beginning I'm welcomed by 3 error messages after I try this line: as -o asmtut.o asmtut.s asmtut.s:6: Error: expecting operand after ','; got nothing asmtut.s:7: Error: expecting operand after ','; got nothing asmtut.s:9: Error: no such instruction: 'swi 0' I'm confused, because this is the exact code in the

Build SIP and PyGlobalShortcut for Windows

若如初见. 提交于 2020-03-22 10:58:26
问题 I am writing a Python2.7/PyQt4 programm under Ubuntu, but the application will be deployed on a Windows platform. One of the functions is that the application should capture several keystrokes (e.g. "Alt+A") even if it is not in focus/minimized. I use PyGlobalShortcut for this purpose, which is a Python/SIP wrapper around libxqt. Following the manual, I installed Qt4 + SIP and ran the pip install PyGlobalShortcut command, which automatically compiled and installed the libqxt library and the

stdint.h “no such file or directory” error on yocto sdk

南楼画角 提交于 2020-03-22 10:25:30
问题 I'm building an System with Yocto/poky (morty branch). Building the image and the sdk works fine. I've installed the SDK on an machine (other than the build machine) to cross compile a tool. I've loaded the environment with source /opt/mydistro/2.2.1/environment-setup-cortexa7hf-neon-vfpv4-poky-linux-gnueabi Building a test file with arm-poky-linux-gnueabi-gcc test.cpp will fail with message /opt/mydistro/2.2.1/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux

CMake project compilation error on VisualStudio using external SDK toolchain file

旧巷老猫 提交于 2020-03-16 08:48:52
问题 I am using VisualStudio CMake project on Windows machine. I am using an external SDK in order to cross compile my C++ program for Linux arm architecture . I added the SDK toolchain to cmakeToolchain path which is : /opt/poky-atmel/2.5.3/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmake and this is my CMakeLists.txt file : set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_PROCESSOR arm) set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_MULTITHREADED OFF) set(Boost_USE_STATIC_RUNTIME

Cross Compiling Python setup

泄露秘密 提交于 2020-02-28 21:30:13
问题 I am trying to build GObject-Introspection on Ubuntu 14.04 using Mingw-w64. I am currently running 64bit Linux and trying to build for a 32bit Windows target. My first attempt used Python 2.7.8 installed in Wine, however, this did not work because Python's path separator was set to '\' (well '\') instead of Linux's '/'. Due to this I tried using the Python 2.7 in Ubuntu. Using the Python provided by Ubuntu doesn't get past the configuration step. Config.log shows the following: In file

Cross Compiling Python setup

我怕爱的太早我们不能终老 提交于 2020-02-28 21:20:45
问题 I am trying to build GObject-Introspection on Ubuntu 14.04 using Mingw-w64. I am currently running 64bit Linux and trying to build for a 32bit Windows target. My first attempt used Python 2.7.8 installed in Wine, however, this did not work because Python's path separator was set to '\' (well '\') instead of Linux's '/'. Due to this I tried using the Python 2.7 in Ubuntu. Using the Python provided by Ubuntu doesn't get past the configuration step. Config.log shows the following: In file

Cross Compiling Python setup

假装没事ソ 提交于 2020-02-28 21:20:25
问题 I am trying to build GObject-Introspection on Ubuntu 14.04 using Mingw-w64. I am currently running 64bit Linux and trying to build for a 32bit Windows target. My first attempt used Python 2.7.8 installed in Wine, however, this did not work because Python's path separator was set to '\' (well '\') instead of Linux's '/'. Due to this I tried using the Python 2.7 in Ubuntu. Using the Python provided by Ubuntu doesn't get past the configuration step. Config.log shows the following: In file

GCC 8 Cross Compiler outputs ARMv7 executable instead of ARMv6

狂风中的少年 提交于 2020-02-24 06:52:52
问题 I'm trying to compile a C++ application for a Raspberry Pi Zero using GCC 8.2.1. I'm using this for a relatively large C++17 project that is being built using CMake, and I'm trying to cross-compile it on my x86-64 laptop. Even with the simplest code possible, I'm not able to compile it for ARMv6: int main() {} $ arm-linux-gnueabihf-g++ test.cpp -static -march=armv6 -mfpu=vfp -mfloat-abi=hard When running the file on the Pi, I get an Illegal instruction error, and readelf returns the following