Let us say we need to process a large vector, which is only locally used inside a member function. Do we have any advantage in declaring it as a member function to save reallocation time? Because everytime a 10000 ints are being created and destroyed? Assume this is running in a mission critical embedded system. ..
Category : embedded
I have been developing embedded software for the Microblaze processor for more than a year using C++. My designs were not so complex, so I wasn’t using the powerful, object-oriented features of the language. For a while, I have been trying to enhance the structure of my designs. For this purpose, I try to widely ..
Say that I need to decode some messages into Animal objects which has a public member type. For each Animal.type I create a derived class: Dog if type=0, Bird if type=1, etc. and each type of Animal has a unique member property. Below is an abstract example: class Animal { public: Animal(int type) : type(type) ..
In this term, I have Microprocessors lectures and we’re working on ARM Development with C/C++ and Assembly. For a while I’ve been looking for an alternative for Keil uVision which is compatible with Linux Distributions (now using Arch) and able to assemble ARM and flash, but could not find anything. The most related platform was ..
Hello software engineers, I have recently started learning C/C++. My goal is embedded systems. Lots of tutorials talk about Arduino and Raspberry Pi. I will start experimenting with those once i feel comfortable with the languages. My question though is: is there any platform that creates virtual hardware in order for me to experiment? I ..
An motor driver that is written in C ++ but cannot be connected to the Qt. We also talked to the manufacturer, but to no avail. But the Library works in Raspberry Pi and has example. Is there a way for the Qt program to connect and exchange data with the program running the engine ..
I have a class called DE1SoCfpga that allows me to get the mapping of the physical address of my machine to the virtual address. My main program runs perfectly fine with two pointers to objects but when I create the third pointer, my program returns mmap() failed… I am thinking there is not enough memory ..
I am trying to get a pulse of 100us to occur 4 times a second through GPIO. The way I am doing this is by having two timer-based interrupts; one that triggers 4 times every second, and another that gets triggered 100us after the first. Within the interrupt handler of the first timer, the target ..
I am trying to recognise a sequence of audio frames on an embedded system – an audio frame being a frequency or interpolation of two frequencies for a variable amount of time. I know the sounds I am trying to recognise (i.e. the start and end frequencies which are being linearly interpolated and the duration ..
I’m implementing a compile time dispatcher which makes use of static polymorphism and metaprogramming. I have a list of types which I would like to instantiate into a runtime std::array. struct Test { typedef std::integral_constant<int,0> nop; typedef std::integral_constant<int,1> A; typedef std::integral_constant<int,2> B; typedef std::integral_constant<int,3> C; using list = mp_list<A, B, C>; // mp_list expands to: ..
Recent Comments