Questions tagged [c++]

C++ is a compiled general-purpose programming language that adds object-oriented features and other enhancements to the C language, which it is largely a superset of. It is popular for both embedded and PC software development.

Filter by
Sorted by
Tagged with
184 votes
16 answers
103k views

Is C++ suitable for embedded systems?

A common question, here and elsewhere. Is C++ suitable for embedded systems? Microcontrollers? RTOSes? Toasters? Embedded PCs? Is OOP useful on microcontrollers? Does C++ remove the programmer too ...
9 votes
1 answer
7k views

Bug in Keil ARM compiler with interrupt handlers and C++?

I have a problem with writing interrupt handlers in Keil ARM compiler for LPC1114. When I write program in C++ and specify --cpp compiler option all code from interrupt handlers disappears, it is ...
x4mer's user avatar
  • 1,016
10 votes
2 answers
7k views

MCU programming - C++ O2 optimization breaks while loop

I know people says code optimization should only bring out the hidden bug in the program, but hear me out. I am staying on a screen, until some input via an interrupt is met. Here is what I see in ...
Daniel Cheung's user avatar
3 votes
2 answers
7k views

Use PWM and ISR at same time on AVR

Is it possible to use AVR PWM outputs and ISR interrupts at the same time? I've got a project I'm trying to do on an ATMega328P and I need 3 PWM outputs but ALSO need to be able to use ISR interrupts ...
Adam Haile's user avatar
  • 1,613
23 votes
10 answers
37k views

Programming languages for electronics engineers

I am an Electronics and Communications Engineering student, before I got to college, I have been interested in programming and computer applications. I had focused on designing Windows applications ...
Siraj Muhammad's user avatar
9 votes
1 answer
5k views

STM32 interrupts and C++ don't go well together [duplicate]

I set up TIM3 to fire an interrupt in my project and it just wouldn't work. I tried everything I could and still couldn't find whats the problem. Then I created a clean project and copy/pasted only ...
John's user avatar
  • 1,381
8 votes
1 answer
5k views

Can an ATmega or ATtiny device signature be read while running?

While programming an ATtiny or ATmega, avrdude prints the device signature, in this example it is an ATtiny. avrdude: Device signature = 0x1e910a Can I read this ...
jippie's user avatar
  • 33.2k
6 votes
1 answer
1k views

STM32 crashes when FreeRTOS project is converted to C++

I am experimenting with STM32F303RE Nucleo board on SW4STM32 with FreeRTOS v10.1.1 and I was thinking of parsing NMEA sentences by adding the characters to a buffer using UART interrupt and then ...
scriptsNgiggles's user avatar
3 votes
2 answers
5k views

Memory management problems with ATTiny85

The setup is as follows: I have a little program to drive single color 8x8 led matrix using 595 shift registers that are supplied with data by ATTiny85 through USI as SPI Master. I upload program to ...
Tomek's user avatar
  • 33
2 votes
2 answers
3k views

How to read data from this sensor?

I am using the MLX90393 Magnetometer IC from Melexis. More specifically, I am using the breakout board by Sparkfun. I am still a beginner when it comes to programming, and this is my first time trying ...
Curious's user avatar
  • 482
2 votes
1 answer
2k views

Implementing the Digilent EPP

I am trying to implement Digilent Parallel Interface from their SDK. You can specifically read up on the interface in this manual. I am using the Basys 2 250k board. I am trying to figure out what I ...
MLM's user avatar
  • 858