HMAC-SHA1 implementation
You can make these #defines:

#define SHA1_DIGESTLENGTH 20
#define SHA1_BLOCK_LENGTH 64
#define COUNTER_LENGTH 8


into a more concise enum:

typedef enum { COUNTER=8, SHA1_DIGEST=20, SHA1_BLOCK=64 } Length;


This could also be done with SECRET and COUNTER, but each hex value would need a name.

If you use the enum recommendation, you may need to rename the second COUNTER to avoid possible name-clashing.  Perhaps rename it based on what the counter is for.
You don't need your own typedefs for these:

typedef unsigned           char uint8_t;
typedef unsigned short     int uint16_t;
typedef unsigned           int uint32_t;


Prefer to use the typedefs already defined in &lt;stdint.h&gt;.
For unformatted output with a newline, use puts() instead of printf():

puts("Some text...");

I'd recommend splitting this program into separate functions.  This will make it easier to tell how the it works and make it easier to maintain.  A function should have one purpose, andmain() should have minimal implementation (such as acquiring input and calling other functions).
There's no need to call exit(1) within main().  Just return 1.

The return 0 is also not needed at the end.  Reaching this point implies successful termination, so the compiler will do this return for you.