ESP8266 Developer Zone The Official ESP8266 Forum 2015-06-07T22:27:28+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=555 2015-06-07T22:27:28+08:00 2015-06-07T22:27:28+08:00 https://bbs.espressif.com:443/viewtopic.php?t=555&p=2080#p2080 <![CDATA[Re: 有api可得知是否使用了2nd boot否?]]>
alexchang wrote:
我也有這個問題,我後來是在編譯 USER1 的時候傳入 -DBIN_USER1,編譯 USER2 的時候傳入 -DBIN_USER2,這樣在程式裡面就可以知道自己是 USER1 還是 USER2 了:
#ifdef BIN_USER1
#endif

#ifdef BIN_USER2
#endif

傳入 -DBIN_USER1 或 -DBIN_USER2 這個寫在 Makefile 就可以了。



好主意,thx。

Statistics: Posted by alexsunmiu — Sun Jun 07, 2015 10:27 pm


]]>
2015-06-07T18:45:47+08:00 2015-06-07T18:45:47+08:00 https://bbs.espressif.com:443/viewtopic.php?t=555&p=2078#p2078 <![CDATA[Re: 有api可得知是否使用了2nd boot否?]]> #ifdef BIN_USER1
#endif

#ifdef BIN_USER2
#endif

傳入 -DBIN_USER1 或 -DBIN_USER2 這個寫在 Makefile 就可以了。

Statistics: Posted by alexchang — Sun Jun 07, 2015 6:45 pm


]]>
2015-06-05T23:40:35+08:00 2015-06-05T23:40:35+08:00 https://bbs.espressif.com:443/viewtopic.php?t=555&p=2071#p2071 <![CDATA[有api可得知是否使用了2nd boot否?]]> Statistics: Posted by alexsunmiu — Fri Jun 05, 2015 11:40 pm


]]>