embedded

what is arm-linux-gcc and how to install this in ubuntu

五迷三道 提交于 2019-12-18 03:46:05
问题 In compiling qt I found that there is a qws target called arm-linux-gcc. I looked around a bit but unable to figure out how and where to find this. I tried installing and apt-cache gave me following output. apt-cache search armel asterisk-prompt-fr-armelle - French voice prompts for Asterisk by Armelle Desjardins rootstock - shellscript to create armel rootfs tarballs using a VM rootstock-gtk - graphical frontend to the rootstock rootfs builder tool icedtea-6-jre-cacao - Alternative JVM for

GCC --gc-sections and finding symbol dependencies

有些话、适合烂在心里 提交于 2019-12-18 03:45:37
问题 I'm trying to reduce the size of my elf executable. I'm compiling with -ffunction-sections -fdata-sections and linking with -gc-sections , but it appears some of the symbols that I believe are unused are not being discarded. Is there some command in the GNU toolchain I can run to find out which symbols are being used and where? Toolchain: GNU arm-none-eabi Platform: Cortex-M4 Language: C++ Here are my typical build flags: Compilation: arm-none-eabi-g++.exe -Wall -O3 -mthumb -std=c++11 -mcpu

Can I implement the Factory Method pattern in C++ without using new?

吃可爱长大的小学妹 提交于 2019-12-18 03:39:36
问题 I'm working in an embedded environment (Arduino/AVR ATMega328) and want to implement the Factory Method pattern in C++. However, the compiler I'm using (avr-gcc) doesn't support the new keyword. Is there a way of implementing this pattern without using new ? 回答1: Since the AVR compiler is based on the gcc compiler, it is very likely to support the new keyword. What exactly is the error you're getting. I'm guessing it's a link/compiler error along the lines of an undefined function, namely,

Binary data over serial terminal

情到浓时终转凉″ 提交于 2019-12-18 02:57:21
问题 My only way of communication with my embedded device is a serial port. By default, embedded Linux uses this port as a terminal. How do I disable this terminal and use the serial link to transfer binary data? I heard of commands like rx and tx but i cannot find them. I think I can just read() from and write() stuff to /dev/tty but I want to make sure no error messages or whatever mess with my data stream. 回答1: You can use an application like xmodem to transfer file over any terminal. Is the

The prefetch instruction

不问归期 提交于 2019-12-17 23:07:12
问题 It appears the general logic for prefetch usage is that prefetch can be added, provided the code is busy in processing until the prefetch instruction completes its operation. But, it seems that if too much of prefetch instructions are used, then it would impact the performance of the system. I find that we need to first have the working code without prefetch instruction. Later we need to various combination of prefetch instruction in various locations of code and do analysis to determine the

LZW compression/decompression under low memory conditions

落花浮王杯 提交于 2019-12-17 22:43:17
问题 Can anybody give pointers how I can implement lzw compression/decompression in low memory conditions (< 2k). is that possible? 回答1: The zlib library that everyone uses is bloated among other problems (for embedded). I am pretty sure it wont work for your case. I had a little more memory maybe 16K and couldnt get it to fit. It allocates and zeros large chunks of memory and keeps copies of stuff, etc. The algorithm can maybe do it but finding existing code is the challenge. I went with http:/

GUI-Library for microcontroller [closed]

你说的曾经没有我的故事 提交于 2019-12-17 21:51:16
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 4 years ago . I want to create a GUI driven application for a micro-controller (Atmel XMEGA) that is connected to a 128x64 dots graphics LCD (EA DOGL128-6) and 4 buttons for navigation. Controlling the display itself (e.g. drawing pixels and characters) is no problem but in order to prevent me from reinventing the wheel I was

Pimpl idiom without using dynamic memory allocation

爱⌒轻易说出口 提交于 2019-12-17 21:47:19
问题 we want to use pimpl idiom for certain parts of our project. These parts of the project also happen to be parts where dynamic memory allocation is forbidden and this decision is not in our control. So what i am asking is, is there a clean and nice way of implementing pimpl idiom without dynamic memory allocation? Edit Here are some other limitations: Embedded platform, Standard C++98, no external libraries, no templates. 回答1: Warning: the code here only showcases the storage aspect, it is a

Include object file or assembler file in C Project?

风格不统一 提交于 2019-12-17 21:35:21
问题 I am playing around a bit bit with Microsofts ELL library/compiler to deploy a simple learning algorithm to a micro controller. But my knowledge regarding embedded development has been better in the past. The Problem is the following: ELL creates an LLVM IR file and a C Header file from a CNTK machine learning model (There are no pure c/c++ files). So far so good. Now I can use the IR to tell llc to make an assembler or object file for the desired target from it (ARM Cortex M4 in my case). So

How to jump between programs in Stellaris

泄露秘密 提交于 2019-12-17 19:03:27
问题 I am working on a boot loader for Stellaris LM3S1607 chip. I am using Keil MicroVision4 C compiler. The idea is to create 2 independent firmware that one will update another. In firmware1 i downloaded firmware2 file and write it to flash in address 0x3200. untill here it is working. i also verifed that the data is being written to flash correct. Now i have in flash two applications. one is my uip boot loader and the seoncd one is my main project. i want to know how can i jump from the first