Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By cal
#19680 Moin,

on 2 occasions I saw people struggling with missing os_intr_lock and os_intr_unlock when migrating to
SDK 1.1.0. (May be interesting for @scargill, inspired by @tve)

In SDK 0.9.5 both were #defines to some ets functions which reside in rom:
Code: Select allinclude-sdk-0.9.5/osapi.h:#define os_intr_lock ets_intr_lock
include-sdk-0.9.5/osapi.h:#define os_intr_unlock ets_intr_unlock


Code: Select allld/eagle.rom.addr.v6.ld:PROVIDE ( ets_intr_lock = 0x40000f74 );
ld/eagle.rom.addr.v6.ld:PROVIDE ( ets_intr_unlock = 0x40000f80 );


So when code references os_intr_lock it really used ets_intr_lock.

In SDK 1.1.0 those defines where removed.

Add to that poor programming style using no prototypes that goes undetected and linker
tries to resolve a function called os_intr_lock which does not exist.

Solution:
Either add defines to your code or change code to use the ets_* functions directly.

And please encourage people to use prototypes!

Hope that helps,
Cal