embedded

llvm optimizes with library functions

爷,独闯天下 提交于 2019-12-30 09:51:29
问题 Starting with code like this void lib_memset( unsigned char *dest, unsigned char c, unsigned int n) { while(n--) { *dest=c; dest++; } } using llvm as a cross compiler clang -Wall -m32 -emit-llvm -fno-builtin --target=arm-none-eabi -c lib_memset.c -o lib_memset.bc opt -std-compile-opts -strip-debug -march=arm -mcpu=mpcore -mtriple=arm-none-eabi lib_memset.bc -o lib_memset.opt.bc llc -march=arm -mcpu=mpcore -disable-simplify-libcalls lib_memset.opt.bc -o lib_memset.opt.s llc -march=arm -mcpu

structs with uint8_t on a MCU without uint8_t datatype

别等时光非礼了梦想. 提交于 2019-12-30 09:22:34
问题 I am an Embedded Software developer and I want to interface to an external device. This device sends data via SPI. The structure of that data is predefined from the external device manufacturer and can't be edited. The manufacturer is providing some Header files with many typedefs of all the data send via SPI. The manufacturer also offers an API to handle the received packets in the correct way(I have access to the source of that API). Now to my problem: The typedefed structures contain many

structs with uint8_t on a MCU without uint8_t datatype

為{幸葍}努か 提交于 2019-12-30 09:22:20
问题 I am an Embedded Software developer and I want to interface to an external device. This device sends data via SPI. The structure of that data is predefined from the external device manufacturer and can't be edited. The manufacturer is providing some Header files with many typedefs of all the data send via SPI. The manufacturer also offers an API to handle the received packets in the correct way(I have access to the source of that API). Now to my problem: The typedefed structures contain many

Problems cross compiling Qt 4.7 from source for ARM

我只是一个虾纸丫 提交于 2019-12-30 06:55:46
问题 I'm trying to cross-compile Qt 4.7.1 from source, here are some notes on my setup: my expected output is the shared object libraries that are required to be present in order to run a Qt application. My target platform is a TI AM335x processor which is of the ARM Cortex-A8 architecture. My development platform is a x86 64-bit Ubuntu virtual machine My understanding of how this should work is that I download the toolchain for my target platform (this is the Linaro toolchain from TI), I download

what dbus performance issue could prevent it from embedded system?

*爱你&永不变心* 提交于 2019-12-30 06:12:31
问题 From my reading dbus performance should be twice slower than other messaging ipc mechanisms due to existence of a daemon. In the discussion of the so question which Linux IPC technique to use someones mention performance issues. Do you see performance issues other than the twice slower factor? Do you see the issue that prevent dbus from being used in embedded system? To my understanding if dbus is intended for small messages. If large amount of data need to be passed around, one of the

Using boost in embedded system with memory limitation

六眼飞鱼酱① 提交于 2019-12-30 06:08:20
问题 We are using c++ to develop an application that runs in Windows CE 4 on an embedded system. One of our constraint is that all the memory used by the application shall be allocated during startup only . We wrote a lot of containers and algorithms that are using only preallocated memory instead of allocating new one. Do you think it is possible for us to use the boost libraries instead of our own containers in these conditions? Any comments and/or advice are welcomed! Thanks a lot, Nic 回答1: You

Using boost in embedded system with memory limitation

吃可爱长大的小学妹 提交于 2019-12-30 06:08:05
问题 We are using c++ to develop an application that runs in Windows CE 4 on an embedded system. One of our constraint is that all the memory used by the application shall be allocated during startup only . We wrote a lot of containers and algorithms that are using only preallocated memory instead of allocating new one. Do you think it is possible for us to use the boost libraries instead of our own containers in these conditions? Any comments and/or advice are welcomed! Thanks a lot, Nic 回答1: You

Implementation of Goertzel algorithm in C

时光毁灭记忆、已成空白 提交于 2019-12-30 01:02:29
问题 I am implementing BFSK frequency hopping communication system on a DSP processor. It was suggested by some of the forum members to use Goertzel algorithm for the demodulation of frequency hopping at specific frequencies. I have tried implementing the goertzel algorithm in C. the code is follows: float goertzel(int numSamples,int TARGET_FREQUENCY,int SAMPLING_RATE, float* data) { int k,i; float floatnumSamples; float omega,sine,cosine,coeff,q0,q1,q2,result,real,imag; floatnumSamples = (float)

Small libc for embedded systems [closed]

瘦欲@ 提交于 2019-12-29 18:38:49
问题 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 last month . I am looking for a small libc for embedded use with freertos on a ARM7 microcontroller. I have looked at newlib, but it is a bit too complex for my needs. Newlib calls malloc() in a number of functions (e.g. printf()), which is not good for small embedded realtime systems. Does anyone know of a small, portable,

Monitoring pthread context switching

孤街浪徒 提交于 2019-12-29 09:15:10
问题 I would like to monitor the the context switching behavior in a multi-threaded pthread application. In other RTOSes(Micro C OS) I have been able to register a context switch callback for each thread in the application, and then log (or toggle a gpio) and watch the thread context switching in real time. This was a valuable tool for debugging the real time behavior and interaction of the multiple threads. My current environment is embedded linux utilizing the pthread api. Is there a way to