Tag Archives: C

Extending std::exception

So you’re writing some C++ code, feeling all object oriented and all, and you decide you’d like an application specific exception whenever one of your methods has an issue. You’d like to have error messages that the exception can print … Continue reading

Posted in Programming | Tagged , , , | 2 Comments

fx2lib documentation and source download

I’ve uploaded documentation and a source download for fx2lib. Here is the copy of the Sourceforge announcement. The fx2lib sources are stable enough to build complete firmware implementations for the cypress fx/fx2 variants of the 8051 chipset. The current release … Continue reading

Posted in Programming | Tagged , , , , , | Comments Off on fx2lib documentation and source download

An Open Source Library for Writing Firmware on the Cypress FX2 with SDCC

After playing around with the Cypress FX2 and SDCC for the past while, I’ve developed a library of utilities that make some of the common tasks for writing firmware and performing certain functions a little easier. I’m lucky to work … Continue reading

Posted in Hardware, Programming | Tagged , , , , , , , , , | 4 Comments

How much overhead does C++ bring compared to straight C?

The other day, I had a conversation about putting C code onto an embedded chip. I wondered if it was possible to put C++ code on there. The gist of the conversation was that the C++ libraries had a lot … Continue reading

Posted in Programming | Tagged , , | 2 Comments

3 Optimizations for speeding Visual C++ compiled code.

For fun, I participated in a programming contest. Instead of describing the process this time, I thought I’d include a function. Can you guess what it does? I’m changing some of the variable names so it isn’t obvious. unsigned short … Continue reading

Posted in Programming | Tagged , , , , | 2 Comments

Timing C/C++ Code on Linux

For my last post, I played around with C++ and a little programming competition. While on the topic, I decided I’d get slightly more serious and enter the next challenge. One of the things that slightly annoyed me during the … Continue reading

Posted in Programming | Tagged , , , | 5 Comments