How can I prevent GCC from optimizing out a busy wait loop?

I developed this answer after following a link from dmckee’s answer, but it takes a different approach than his/her answer. Function Attributes documentation from GCC mentions: noinline This function attribute prevents a function from being considered for inlining. If the function does not have side-effects, there are optimizations other than inlining that causes function calls … Read more

What is the purpose of __cxa_pure_virtual?

If anywhere in the runtime of your program an object is created with a virtual function pointer not filled in, and when the corresponding function is called, you will be calling a ‘pure virtual function’. The handler you describe should be defined in the default libraries that come with your development environment. If you happen … Read more

How to prevent GCC from optimizing out a busy wait loop?

I developed this answer after following a link from dmckee’s answer, but it takes a different approach than his/her answer. Function Attributes documentation from GCC mentions: noinline This function attribute prevents a function from being considered for inlining. If the function does not have side-effects, there are optimizations other than inlining that causes function calls … Read more

Writing a parser like Flex/Bison that is usable on 8-bit embedded systems

If you want an easy way to code parsers, or you are tight on space, you should hand-code a recursive descent parser; these are essentially LL(1) parsers. This is especially effective for languages which are as “simple” as Basic. (I did several of these back in the 70s!). The good news is these don’t contain … Read more

How can I unit test Arduino code?

Don’t Run Unit Tests on the Arduino Device or Emulator The case against microcontroller Device/Emulator/Sim-based tests There’s a lot of discussion about what unit test means and I’m not really trying to make an argument about that here. This post is not telling you to avoid all practical testing on your ultimate target hardware. I … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)