-
Notifications
You must be signed in to change notification settings - Fork 20
Description
- Sytem: Archlinux
When i import the Project_basic
folder as a cmake project will configure failed, but it's successed when i use make
command to build the project. It seems has something wrong in CMakeList.txt
of project Project_basic
(By the way, seem many projects can't be import as cmake project). I compared the dfferend of Makefile
and CMakeLists.txt
and found that there missing some variables in CMakeLists.txt
or proj.conf
file. Like CONFIG_ROMAPI
, CHIP
, BOARD
.
When I just configure CHIP
and BOARD
variables and configure project again, it will work as normal, and when i build it, will throws some compile errors. And when i set CONFIG_ROMAPI
to 1
, it's not only passed configure process but also passed build process, and after make combine
, the product also flashable. By the way, i don't know what is the mean of the variable, it's seems some function that can let you modify ROM or something.
The cmake spawned makefile is hard to read but i think it can make manage project more easier. Anyway, can you fix this problem?
You can find more information about this problem in this post: http://bbs.ai-thinker.com/forum.php?mod=viewthread&tid=43422&extra=page%3D1&_dsign=893fe532
Attachment(The error of not set CONFIG_ROMAPI to 1):
In file included from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/rf/inc/wl_api.h:5,
from /path/to/aithinker_Ai-M6X_SDK/drivers/rfparam/Inc/rfparam_adapter.h:5,
from /path/to/aithinker_Ai-M6X_SDK/drivers/rfparam/Src/rfparam_adapter.c:1:
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/rf/inc/wl_config.h:22:9: note: '#pragma message: None of WL_WB03/WL_BL618M/WL_BL616 defined, compile for BL616 by default'
22 | #pragma message "None of WL_WB03/WL_BL618M/WL_BL616 defined, compile for BL616 by default"
| ^~~~~~~
/path/to/aithinker_Ai-M6X_SDK/drivers/rfparam/Src/rfparam_adapter.c: In function 'rfparam_get_cap_code_with_option':
/path/to/aithinker_Ai-M6X_SDK/drivers/rfparam/Src/rfparam_adapter.c:329:13: warning: unused variable 'capcode' [-Wunused-variable]
329 | uint8_t capcode[RFTLV_MAXLEN_XTAL/4]={0};
| ^~~~~~~
/path/to/aithinker_Ai-M6X_SDK/drivers/rfparam/Src/rfparam_adapter.c: In function 'rfparam_init':
/path/to/aithinker_Ai-M6X_SDK/drivers/rfparam/Src/rfparam_adapter.c:681:31: warning: assignment to 'int8_t (*)(struct wl_param_t *)' {aka 'signed char (*)(struct wl_param_t *)'} from incompatible pointer type 'int32_t (*)(struct wl_param_t *)' {aka 'long int (*)(struct wl_param_t *)'} [-Wincompatible-pointer-types]
681 | g_rfparam_cfg->param_load = rfparam_load;
| ^
At top level:
/path/to/aithinker_Ai-M6X_SDK/drivers/rfparam/Src/rfparam_adapter.c:22:16: warning: 'g_rfparam_buf' defined but not used [-Wunused-variable]
22 | static uint8_t g_rfparam_buf[RFPARAM_WL_API_MEM_SIZE] = {0};
| ^~~~~~~~~~~~~
/path/to/aithinker_Ai-M6X_SDK/components/net/lwip/lwip_apps/ping/ping.c: In function 'ping':
/path/to/aithinker_Ai-M6X_SDK/components/net/lwip/lwip_apps/ping/ping.c:173:17: warning: 'ttl' may be used uninitialized in this function [-Wmaybe-uninitialized]
173 | printf("%d bytes from %s icmp_seq=%d ttl=%d time=%d ms\n\r", recv_len, inet_ntoa(ina), send_times,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174 | ttl, elapsed_time);
| ~~~~~~~~~~~~~~~~~~
In file included from /path/to/Project_basic/components/wifi/wifi_event.c:19:
/path/to/aithinker_Ai-M6X_SDK/components/wireless/wifi6/inc/wifi_mgmr_ext.h:507:30: warning: 'struct mac_scan_result' declared inside parameter list will not be visible outside of this definition or declaration
507 | void show_auth_cipher(struct mac_scan_result *result);
| ^~~~~~~~~~~~~~~
In file included from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/rf/inc/wl_api.h:5,
from /path/to/aithinker_Ai-M6X_SDK/drivers/rfparam/Inc/rfparam_adapter.h:5,
from /path/to/Project_basic/components/wifi/wifi_event.c:27:
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/rf/inc/wl_config.h:22:9: note: '#pragma message: None of WL_WB03/WL_BL618M/WL_BL616 defined, compile for BL616 by default'
22 | #pragma message "None of WL_WB03/WL_BL618M/WL_BL616 defined, compile for BL616 by default"
| ^~~~~~~
/path/to/Project_basic/components/wifi/wifi_event.c:32: warning: "DBG_TAG" redefined
32 | #define DBG_TAG "WIFI EVENT"
|
In file included from /path/to/Project_basic/components/wifi/wifi_event.c:30:
/path/to/aithinker_Ai-M6X_SDK/components/utils/log/log.h:31: note: this is the location of the previous definition
31 | #define DBG_TAG ""
|
/path/to/Project_basic/components/wifi/wifi_event.c: In function 'wifi_event_handler':
/path/to/Project_basic/components/wifi/wifi_event.c:91:16: warning: unused variable 'xHigherPriorityTaskWoken' [-Wunused-variable]
91 | BaseType_t xHigherPriorityTaskWoken;
| ^~~~~~~~~~~~~~~~~~~~~~~~
/path/to/Project_basic/components/wifi/wifi_event.c: In function 'wifi_connect':
/path/to/Project_basic/components/wifi/wifi_event.c:163:14: warning: unused variable 'ipv4_addr' [-Wunused-variable]
163 | uint32_t ipv4_addr = 0;
| ^~~~~~~~~
/path/to/Project_basic/components/wifi/wifi_event.c:161:9: warning: unused variable 'ret' [-Wunused-variable]
161 | int ret = 255;
| ^~~
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c: In function 'GLB_Set_SFlash_IO_PARM':
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:2521:9: warning: implicit declaration of function 'GLB_Embedded_Flash_Pad_Enable' [-Wimplicit-function-declaration]
2521 | GLB_Embedded_Flash_Pad_Enable(swapIo2Cs);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_hbn.c:40:10: fatal error: bl616_xip_sflash.h: No such file or directory
40 | #include "bl616_xip_sflash.h"
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/build.make:199:build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_hbn.c.o] 错误 1
make[2]: *** 正在等待未完成的任务....
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c: In function 'GLB_Trim_Ldo18ioVoutSel':
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3366:5: error: unknown type name 'Efuse_Ana_Ldo18ioVoutSel_Type'
3366 | Efuse_Ana_Ldo18ioVoutSel_Type trim;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3369:5: warning: implicit declaration of function 'EF_Ctrl_Read_Ldo18ioVoutSel_Trim' [-Wimplicit-function-declaration]
3369 | EF_Ctrl_Read_Ldo18ioVoutSel_Trim(&trim);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3370:13: error: request for member 'ldo18ioVoutSelEn' in something not a structure or union
3370 | if (trim.ldo18ioVoutSelEn) {
| ^
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3371:17: error: request for member 'ldo18ioVoutSelParity' in something not a structure or union
3371 | if (trim.ldo18ioVoutSelParity == EF_Ctrl_Get_Trim_Parity(trim.ldo18ioVoutSelAon, 4)) {
| ^
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3371:42: warning: implicit declaration of function 'EF_Ctrl_Get_Trim_Parity' [-Wimplicit-function-declaration]
3371 | if (trim.ldo18ioVoutSelParity == EF_Ctrl_Get_Trim_Parity(trim.ldo18ioVoutSelAon, 4)) {
| ^~~~~~~~~~~~~~~~~~~~~~~
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3371:70: error: request for member 'ldo18ioVoutSelAon' in something not a structure or union
3371 | if (trim.ldo18ioVoutSelParity == EF_Ctrl_Get_Trim_Parity(trim.ldo18ioVoutSelAon, 4)) {
| ^
In file included from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_ef_cfg.h:40,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_aon.h:43,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_hbn.h:40,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_glb.h:44,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_clock.h:42,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:37:
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3373:76: error: request for member 'ldo18ioVoutSelAon' in something not a structure or union
3373 | tmpVal = BL_SET_REG_BITS_VAL(tmpVal, GLB_LDO18IO_VOUT_SEL, trim.ldo18ioVoutSelAon);
| ^
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_common.h:43:89: note: in definition of macro 'BL_SET_REG_BITS_VAL'
43 | #define BL_SET_REG_BITS_VAL(val, bitname, bitval) (((val)&bitname##_UMSK) | ((uint32_t)(bitval) << bitname##_POS))
| ^~~~~~
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c: In function 'GLB_Trim_Ldo18ioBypass':
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3392:5: error: unknown type name 'Efuse_Ana_Ldo18ioBypass_Type'
3392 | Efuse_Ana_Ldo18ioBypass_Type trim;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3395:5: warning: implicit declaration of function 'EF_Ctrl_Read_Ldo18ioBypass_Trim' [-Wimplicit-function-declaration]
3395 | EF_Ctrl_Read_Ldo18ioBypass_Trim(&trim);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3396:13: error: request for member 'ldo18ioBypassEn' in something not a structure or union
3396 | if (trim.ldo18ioBypassEn) {
| ^
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3397:17: error: request for member 'ldo18ioBypassParity' in something not a structure or union
3397 | if (trim.ldo18ioBypassParity == EF_Ctrl_Get_Trim_Parity(trim.ldo18ioBypassAon, 1)) {
| ^
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3397:69: error: request for member 'ldo18ioBypassAon' in something not a structure or union
3397 | if (trim.ldo18ioBypassParity == EF_Ctrl_Get_Trim_Parity(trim.ldo18ioBypassAon, 1)) {
| ^
In file included from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_ef_cfg.h:40,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_aon.h:43,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_hbn.h:40,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_glb.h:44,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_clock.h:42,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:37:
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3399:74: error: request for member 'ldo18ioBypassAon' in something not a structure or union
3399 | tmpVal = BL_SET_REG_BITS_VAL(tmpVal, GLB_LDO18IO_BYPASS, trim.ldo18ioBypassAon);
| ^
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_common.h:43:89: note: in definition of macro 'BL_SET_REG_BITS_VAL'
43 | #define BL_SET_REG_BITS_VAL(val, bitname, bitval) (((val)&bitname##_UMSK) | ((uint32_t)(bitval) << bitname##_POS))
| ^~~~~~
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c: In function 'GLB_Trim_Ldo18ioVoutTrim':
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3418:5: error: unknown type name 'Efuse_Ana_Ldo18ioVoutTrim_Type'
3418 | Efuse_Ana_Ldo18ioVoutTrim_Type trim;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3421:5: warning: implicit declaration of function 'EF_Ctrl_Read_Ldo18ioVoutTrim_Trim' [-Wimplicit-function-declaration]
3421 | EF_Ctrl_Read_Ldo18ioVoutTrim_Trim(&trim);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3422:13: error: request for member 'ldo18ioVoutTrimEn' in something not a structure or union
3422 | if (trim.ldo18ioVoutTrimEn) {
| ^
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3423:17: error: request for member 'ldo18ioVoutTrimParity' in something not a structure or union
3423 | if (trim.ldo18ioVoutTrimParity == EF_Ctrl_Get_Trim_Parity(trim.ldo18ioVoutTrimAon, 4)) {
| ^
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3423:71: error: request for member 'ldo18ioVoutTrimAon' in something not a structure or union
3423 | if (trim.ldo18ioVoutTrimParity == EF_Ctrl_Get_Trim_Parity(trim.ldo18ioVoutTrimAon, 4)) {
| ^
In file included from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_ef_cfg.h:40,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_aon.h:43,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_hbn.h:40,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_glb.h:44,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_clock.h:42,
from /path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:37:
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/src/bl616_glb.c:3425:77: error: request for member 'ldo18ioVoutTrimAon' in something not a structure or union
3425 | tmpVal = BL_SET_REG_BITS_VAL(tmpVal, GLB_LDO18IO_VOUT_TRIM, trim.ldo18ioVoutTrimAon);
| ^
/path/to/aithinker_Ai-M6X_SDK/drivers/soc/bl616/std/include/bl616_common.h:43:89: note: in definition of macro 'BL_SET_REG_BITS_VAL'
43 | #define BL_SET_REG_BITS_VAL(val, bitname, bitval) (((val)&bitname##_UMSK) | ((uint32_t)(bitval) << bitname##_POS))
| ^~~~~~
make[2]: *** [build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/build.make:185:build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/src/bl616_glb.c.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1012:build_out/drivers/soc/bl616/std/CMakeFiles/std.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
/path/to/aithinker_Ai-M6X_SDK/components/os/freertos/posix/source/FreeRTOS_POSIX_pthread_cond.c: In function 'pthread_cond_timedwait':
/path/to/aithinker_Ai-M6X_SDK/components/os/freertos/posix/source/FreeRTOS_POSIX_pthread_cond.c:282:9: warning: 'iLocalWaitingThreads' may be used uninitialized in this function [-Wmaybe-uninitialized]
282 | prvTestAndDecrement( pxCond, iLocalWaitingThreads + 1 );
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /path/to/aithinker_Ai-M6X_SDK/components/net/lwip/lwip/src/include/lwip/opt.h:52,
from /path/to/aithinker_Ai-M6X_SDK/components/net/lwip/lwip/src/include/lwip/apps/sntp_opts.h:40,
from /path/to/aithinker_Ai-M6X_SDK/components/net/lwip/lwip/src/include/lwip/apps/sntp.h:40,
from /path/to/aithinker_Ai-M6X_SDK/components/net/lwip/lwip/src/apps/sntp/sntp.c:51:
/path/to/aithinker_Ai-M6X_SDK/components/net/lwip/lwip/src/apps/sntp/sntp.c: In function 'sntp_process':
/path/to/Project_basic/config/lwipopts_user.h:144:34: warning: implicit declaration of function 'sntp_set_time'; did you mean 'sntp_format_time'? [-Wimplicit-function-declaration]
144 | #define SNTP_SET_SYSTEM_TIME_NTP sntp_set_time
| ^~~~~~~~~~~~~
/path/to/aithinker_Ai-M6X_SDK/components/net/lwip/lwip/src/apps/sntp/sntp.c:326:5: note: in expansion of macro 'SNTP_SET_SYSTEM_TIME_NTP'
326 | SNTP_SET_SYSTEM_TIME_NTP(sec, frac);
| ^~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:91:all] 错误 2