There was a strange bug I found which took me ages to find. I was implementing some stuff on a Atmel A90S8515 microcontroller. This device is quite old and has very limited memory. Both Flash and RAM. The problem occurred when sprintf from the standard library was called. When called, any internal variables were changed… Continue reading embedded stack collision with the variable-memory
Tag: C
my atmel microcontroller is continuously reseting
A problem I had multiple times was: I reuse software from the internet, but when i use the software / simulate it, it is constantly resetting! The reason why this is happening is (or can be) undefined reset vectors. This means, the hardware raises an interrupt, which is not hadled by your software. Therefore, make… Continue reading my atmel microcontroller is continuously reseting
compile C and C++ code into one binary in Linux
Sometimes you have a project written in C and you want to add some code (may be open source software) which is provided in C++. So you may want to call a function written in C++ from C. For that purpose, you have to change the function prototype of the concerned C++ function like: #ifdef… Continue reading compile C and C++ code into one binary in Linux