diff -Nurb irmp.orig/irmp.c irmp/irmp.c
--- irmp.orig/irmp.c	2015-09-21 14:46:25.126889000 +0200
+++ irmp/irmp.c	2015-10-25 23:18:11.000000000 +0100
@@ -2013,6 +2013,9 @@
      ROM_GPIOPadConfigSet(IRMP_PORT_BASE, IRMP_PORT_PIN,
                           GPIO_STRENGTH_2MA,
                           GPIO_PIN_TYPE_STD_WPU);
+#elif defined(__SDCC_stm8)
+    IRMP_GPIO_STRUCT->CR1 |= (1<<IRMP_BIT);   // activate pullup
+    IRMP_GPIO_STRUCT->DDR &= ~(1<<IRMP_BIT);  // pin is input
 #else                                                                   // AVR
     IRMP_PORT &= ~(1<<IRMP_BIT);                                        // deactivate pullup
     IRMP_DDR &= ~(1<<IRMP_BIT);                                         // set pin to input
@@ -2521,7 +2524,11 @@
     time_counter++;
 #endif // ANALYZE
 
+#if defined(__SDCC_stm8)
+    irmp_input = input(IRMP_GPIO_STRUCT->IDR)
+#else
     irmp_input = input(IRMP_PIN);
+#endif
 
 #if IRMP_USE_CALLBACK == 1
     if (irmp_callback_ptr)
diff -Nurb irmp.orig/irmp.h irmp/irmp.h
--- irmp.orig/irmp.h	2015-09-21 14:46:25.126889000 +0200
+++ irmp/irmp.h	2015-10-25 23:19:17.000000000 +0100
@@ -73,6 +73,13 @@
 #  define input(x)                              ((uint8_t)(ROM_GPIOPinRead(IRMP_PORT_BASE, IRMP_PORT_PIN)))
 #  define sei()                                 IntMasterEnable()
 
+#elif defined(__SDCC_stm8)
+#  define _CONCAT(a,b)                          a##b
+#  define CONCAT(a,b)                           _CONCAT(a,b)
+#  define IRMP_GPIO_STRUCT                      CONCAT(GPIO, IRMP_PORT_LETTER)
+#  define IRMP_BIT                              IRMP_BIT_NUMBER
+#  define input(x)                              ((x) & (1 << IRMP_BIT))
+
 #endif
 
 #if IRMP_SUPPORT_TECHNICS_PROTOCOL == 1
diff -Nurb irmp.orig/irmpconfig.h irmp/irmpconfig.h
--- irmp.orig/irmpconfig.h	2015-09-21 14:46:25.126889000 +0200
+++ irmp/irmpconfig.h	2015-10-25 23:24:35.910908227 +0100
@@ -141,6 +141,13 @@
 #  define IRMP_BIT_NUMBER                       4
 
 /*---------------------------------------------------------------------------------------------------------------------------------------------------
+ * Change hardware pin here for ATMEL ATMega/ATTiny/XMega
+ *---------------------------------------------------------------------------------------------------------------------------------------------------
+ */
+#elif defined (SDCC_STM8)                                               // use PA1 as IR input on STM8
+#  define IRMP_PORT_LETTER                      A
+#  define IRMP_BIT_NUMBER                       1
+/*---------------------------------------------------------------------------------------------------------------------------------------------------
  * Handling of unknown target system: DON'T CHANGE
  *---------------------------------------------------------------------------------------------------------------------------------------------------
  */
diff -Nurb irmp.orig/irmpsystem.h irmp/irmpsystem.h
--- irmp.orig/irmpsystem.h	2015-05-18 12:52:14.715439000 +0200
+++ irmp/irmpsystem.h	2015-10-25 23:03:28.000000000 +0100
@@ -46,6 +46,8 @@
 #elif defined(TARGET_IS_BLIZZARD_RA2)                                               // TI Stellaris (tested on Stellaris Launchpad with Code Composer Studio)
 #  define STELLARIS_ARM_CORTEX_M4
 #  define F_CPU (SysCtlClockGet())
+#elif defined(__SDCC_stm8)
+#  define SDCC_STM8
 #elif defined(unix) || defined(WIN32) || defined(__APPLE__)                         // Unix/Linux or Windows or Apple
 #  define UNIX_OR_WINDOWS
 #else
@@ -116,6 +118,15 @@
 #  define PROGMEM
 #  define memcpy_P                      memcpy
 
+#elif defined(SDCC_STM8)
+
+#  include "stm8s.h"
+#  define PROGMEM
+#  define memcpy_P                      memcpy
+#  define __attribute__(x)
+#  define uint_fast8_t uint8_t
+#  define uint_fast16_t uint16_t
+
 #else
 
 #  define PROGMEM
