diff --git a/zephyr/mpconfigport.h b/zephyr/mpconfigport.h
index 32dc9f1ff998b4d6fc21135cc24cfeb18bbe4b4d..0208dc737e55a6fa4f41d94f5826019c633e3056 100644
--- a/zephyr/mpconfigport.h
+++ b/zephyr/mpconfigport.h
@@ -1,5 +1,8 @@
 #include <alloca.h>
 
+// Include Zephyr's autoconf.h, which should be made first by Zephyr makefiles
+#include "autoconf.h"
+
 // Saving extra crumbs to make sure binary fits in 128K
 #define MICROPY_COMP_CONST_FOLDING  (0)
 #define MICROPY_COMP_CONST (0)
@@ -49,9 +52,6 @@ typedef long mp_off_t;
     mp_obj_t mp_kbd_exception; \
     const char *readline_hist[8];
 
-// Include Zephyr's autoconf.h, which should be made first by Zephyr makefiles
-#include "autoconf.h"
-
 // extra built in names to add to the global namespace
 #define MICROPY_PORT_BUILTINS \
     { MP_OBJ_NEW_QSTR(MP_QSTR_help), (mp_obj_t)&mp_builtin_help_obj }, \