编译最新的sdk v4.0 老是报错,查看是stdatomic.h文件里报错

137502805@qq.com
Posts: 2
Joined: Thu Feb 13, 2020 6:10 am

编译最新的sdk v4.0 老是报错,查看是stdatomic.h文件里报错

Postby 137502805@qq.com » Thu Feb 13, 2020 6:16 am

In file included from /home/bruce/esp-idf-v4.0/components/driver/spi_master.c:140:0:
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h: In function 'atomic_flag_test_and_set_explicit':
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:246:2: error: implicit declaration of function '__c11_atomic_exchange' [-Werror=implicit-function-declaration]
__c11_atomic_exchange(object, desired, order)
^
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:312:17: note: in expansion of macro 'atomic_exchange_explicit'
return ((_Bool)atomic_exchange_explicit(&__object->__flag, 1, __order));
^
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h: In function 'atomic_flag_clear_explicit':
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:260:2: error: implicit declaration of function '__c11_atomic_store' [-Werror=implicit-function-declaration]
__c11_atomic_store(object, desired, order)
^
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:319:2: note: in expansion of macro 'atomic_store_explicit'
atomic_store_explicit(&__object->__flag, 0, __order);
^
/home/bruce/esp-idf-v4.0/components/driver/spi_master.c: In function 'spi_bus_free':
/home/bruce/esp-idf-v4.0/components/newlib/include/stdatomic.h:258:2: error: implicit declaration of function '__c11_atomic_load' [-Werror=implicit-function-declaration]
__c11_atomic_load(object, order)
^
我也没找到这些函数的定义,请问该如何解决?

137502805@qq.com
Posts: 2
Joined: Thu Feb 13, 2020 6:10 am

Re: 编译最新的sdk v4.0 老是报错,查看是stdatomic.h文件里报错

Postby 137502805@qq.com » Fri Feb 14, 2020 3:20 am

不好意思,是工具链的问题,需要更新最新的工具链 :lol:

Who is online

Users browsing this forum: No registered users and 5 guests