- UID
- 3387
- 麦力
- 78
- 注册时间
- 2017-3-11
- 最后登录
- 2017-11-13
- 精华
- 0
- 阅读权限
- 20
- 在线时间
- 4 小时
|
本帖最后由 王克_jRj95 于 2017-3-12 14:23 编辑
系统:win10
表盘模拟器
VisualMWatch_W32
模拟器路径 (结尾大图)
E:\VisualMWatch_W32
arm路径:(结尾大图)
C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2014q2\bin
系统环境变量path:
(结尾大图)
C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2014q2\bin;E:\VisualMWatch_W32\mbcc\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;%JAVA_HOME%\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;E:\AMULU\MYSQL\bin;%CATALINA_HOME%\lib;%CATALINA_HOME%\bin;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\
测试对象
卖萌天气表盘 来源于官方开源代码。
主函数代码:
int main()
{
simulator_init();
/*创建消息列表窗口*/
P_Window p_window = init_window();
/*放入窗口栈显示*/
g_window_id = app_window_stack_push(p_window);
//请求GPS数据并注册回调
request_gps_info();
/*注册接受手机数据回调函数*/
maibu_comm_register_phone_callback(gps_info_callback);
//test
//char city_name[20] = "深圳";
//request_weather_info(city_name);
//maibu_comm_register_web_callback(weather_info_callback);
uint32_t request_time = 15 * 60 * 1000;//默认5分钟请求数据
if(get_date_flag() == false)
{
request_time = 15 * 60 * 1000;
}
if(strlen(g_city) == 0)
{//在没有城市数据的情况下进行快速查询
request_time = 5 * 1000;//在没有获取过数据的情况下5秒获取一次数据
g_callback_request_flag = 1;//设置快速查询标志
}
app_service_timer_subscribe(request_time, app_weather_update_timer_callback, NULL);
/*注册一个事件通知回调,当有时间改变时,立即更新时间*/
maibu_service_sys_event_subscribe(time_change);
/*注册通讯结果回调*/
maibu_comm_register_result_callback(weather_comm_result_callback);
simulator_wait();
return 0;
}
测试日志: 主要报错+详情
not found file:.\build\maibu_code readelf: Error: '.\build\maibu_code': No such file not found file:.\build\maibu_code
create pack failed E:\VisualMWatch_W32\new_weather_watchface.c: In function 'request_gps_info':
E:\VisualMWatch_W32\new_weather_watchface.c:594:2: error: too few arguments to function 'maibu_comm_request_phone' mbcc\bin\mw.exe' 不是内部或外部命令,也不是可运行的程序
或批处理文件。 详情
生成资源文件...
-------------read appinfo.json-------------
uuid:39fe260221d9717da155d14404ca4054
app_id:33280
name:��������
icon:5001
version:127
watchface:0
sysapp:1
res_num:10
res:0, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_BG, file:watchface-bg.bmp
res:1, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_UPDATING, file:updating.bmp
res:2, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_CLOUDY_DAY, file:cloudy_day.bmp
res:3, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_CLOUDY_NIGHT, file:cloudy_night.bmp
res:4, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_FOG, file:fog.bmp
res:5, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_OVERCAST, file:overcast.bmp
res:6, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_RAIN, file:rain.bmp
res:7, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_SNOW, file:snow.bmp
res:8, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_SUNNY_DAY, file:sunny_day.bmp
res:9, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_SUNNY_NIGHT, file:sunny_night.bmp
-----------------begin create res.h-------------
-----------------create res.h ok-------------
-----------------begin create res_file-------------
type:0, res_key:5001, offset:171, res_size:2048, width:128, height:128
type:0, res_key:5002, offset:2219, res_size:1600, width:128, height:100
type:0, res_key:5003, offset:3819, res_size:600, width:80, height:60
type:0, res_key:5004, offset:4419, res_size:600, width:80, height:60
type:0, res_key:5005, offset:5019, res_size:600, width:80, height:60
type:0, res_key:5006, offset:5619, res_size:600, width:80, height:60
type:0, res_key:5007, offset:6219, res_size:600, width:80, height:60
type:0, res_key:5008, offset:6819, res_size:600, width:80, height:60
type:0, res_key:5009, offset:7419, res_size:600, width:80, height:60
type:0, res_key:5010, offset:8019, res_size:600, width:80, height:60
-------------create res_file ok---------------
---------------prepare pack head----------
---------------read res_file----------
---------------read code----------
not found file:.\build\maibu_code
create pack failed
正在编译...
arm-none-eabi-gcc -c -mthumb -mcpu=cortex-m0 new_weather_watchface.c -I .\SDK\
In file included from new_weather_watchface.c:7:0:
maibu_res.h:3:0: warning: "RES_BITMAP_WATCHFACE_WEATHER_BG" redefined [enabled by default]
In file included from .\SDK/maibu_sdk.h:120:0,
from new_weather_watchface.c:6:
.\SDK/maibu_res_bitmap_base_sdk.h:76:0: note: this is the location of the previous definition
new_weather_watchface.c: In function 'set_waiting_info_str':
new_weather_watchface.c:272:22: warning: initialization makes pointer from integer without a cast [enabled by default]
new_weather_watchface.c: In function 'weather_info_callback':
new_weather_watchface.c:390:22: warning: initialization makes pointer from integer without a cast [enabled by default]
new_weather_watchface.c: In function 'city_info_callback':
new_weather_watchface.c:505:22: warning: initialization makes pointer from integer without a cast [enabled by default]
new_weather_watchface.c: In function 'request_gps_info':
new_weather_watchface.c:594:2: error: too few arguments to function 'maibu_comm_request_phone'
In file included from .\SDK/maibu_sdk.h:126:0,
from new_weather_watchface.c:6:
.\SDK/maibu_ble.h:135:17: note: declared here
new_weather_watchface.c: In function 'time_change':
new_weather_watchface.c:611:23: warning: initialization makes pointer from integer without a cast [enabled by default]
new_weather_watchface.c: In function 'app_weather_update_timer_callback':
new_weather_watchface.c:831:23: warning: initialization makes pointer from integer without a cast [enabled by default]
new_weather_watchface.c: In function 'weather_comm_result_callback':
new_weather_watchface.c:873:4: error: too few arguments to function 'maibu_comm_request_phone'
In file included from .\SDK/maibu_sdk.h:126:0,
from new_weather_watchface.c:6:
.\SDK/maibu_ble.h:135:17: note: declared here
new_weather_watchface.c: In function 'main':
new_weather_watchface.c:903:2: warning: passing argument 1 of 'maibu_comm_register_phone_callback' from incompatible pointer type [enabled by default]
In file included from .\SDK/maibu_sdk.h:126:0,
from new_weather_watchface.c:6:
.\SDK/maibu_ble.h:121:13: note: expected 'CBCommPhone' but argument is of type 'void (*)(enum ERequestPhone, void *)'
arm-none-eabi-ld: cannot find .\*.o: Invalid argument
readelf: Error: '.\build\maibu_code': No such file
正在打包...
-------------read appinfo.json-------------
uuid:39fe260221d9717da155d14404ca4054
app_id:33280
name:��������
icon:5001
version:127
watchface:0
sysapp:1
res_num:10
res:0, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_BG, file:watchface-bg.bmp
res:1, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_UPDATING, file:updating.bmp
res:2, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_CLOUDY_DAY, file:cloudy_day.bmp
res:3, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_CLOUDY_NIGHT, file:cloudy_night.bmp
res:4, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_FOG, file:fog.bmp
res:5, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_OVERCAST, file:overcast.bmp
res:6, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_RAIN, file:rain.bmp
res:7, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_SNOW, file:snow.bmp
res:8, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_SUNNY_DAY, file:sunny_day.bmp
res:9, type:0, name:RES_BITMAP_WATCHFACE_WEATHER_SUNNY_NIGHT, file:sunny_night.bmp
-----------------begin create res.h-------------
-----------------create res.h ok-------------
-----------------begin create res_file-------------
type:0, res_key:5001, offset:171, res_size:2048, width:128, height:128
type:0, res_key:5002, offset:2219, res_size:1600, width:128, height:100
type:0, res_key:5003, offset:3819, res_size:600, width:80, height:60
type:0, res_key:5004, offset:4419, res_size:600, width:80, height:60
type:0, res_key:5005, offset:5019, res_size:600, width:80, height:60
type:0, res_key:5006, offset:5619, res_size:600, width:80, height:60
type:0, res_key:5007, offset:6219, res_size:600, width:80, height:60
type:0, res_key:5008, offset:6819, res_size:600, width:80, height:60
type:0, res_key:5009, offset:7419, res_size:600, width:80, height:60
type:0, res_key:5010, offset:8019, res_size:600, width:80, height:60
-------------create res_file ok---------------
---------------prepare pack head----------
---------------read res_file----------
---------------read code----------
not found file:.\build\maibu_code
create pack failed
正在编译...
E:\VisualMWatch_W32\new_weather_watchface.c: In function 'request_gps_info':
E:\VisualMWatch_W32\new_weather_watchface.c:594:2: error: too few arguments to function 'maibu_comm_request_phone'
g_comm_id_gps = maibu_comm_request_phone(ERequestPhoneGPSAltitude, NULL);
^
In file included from e:\visualmwatch_w32\mbcc\include\maibu_sdk.h:23:0,
from E:\VisualMWatch_W32\new_weather_watchface.c:6:
e:\visualmwatch_w32\mbcc\include\os_comm.h:305:10: note: declared here
uint32_t maibu_comm_request_phone(enum ERequestPhone type, uint8_t *context, uint16_t context_size);
^
E:\VisualMWatch_W32\new_weather_watchface.c: In function 'weather_comm_result_callback':
E:\VisualMWatch_W32\new_weather_watchface.c:873:4: error: too few arguments to function 'maibu_comm_request_phone'
g_comm_id_gps = maibu_comm_request_phone(ERequestPhoneGPSAltitude, NULL);
^
In file included from e:\visualmwatch_w32\mbcc\include\maibu_sdk.h:23:0,
from E:\VisualMWatch_W32\new_weather_watchface.c:6:
e:\visualmwatch_w32\mbcc\include\os_comm.h:305:10: note: declared here
uint32_t maibu_comm_request_phone(enum ERequestPhone type, uint8_t *context, uint16_t context_size);
^
E:\VisualMWatch_W32\new_weather_watchface.c: In function 'main':
E:\VisualMWatch_W32\new_weather_watchface.c:903:2: warning: passing argument 1 of 'maibu_comm_register_phone_callback' from incompatible pointer type [enabled by default]
maibu_comm_register_phone_callback(gps_info_callback);
^
In file included from e:\visualmwatch_w32\mbcc\include\maibu_sdk.h:23:0,
from E:\VisualMWatch_W32\new_weather_watchface.c:6:
e:\visualmwatch_w32\mbcc\include\os_comm.h:306:6: note: expected 'CBCommPhone' but argument is of type 'void (*)(enum ERequestPhone, void *)'
void maibu_comm_register_phone_callback(CBCommPhone phone_callback);
^
'mbcc\bin\mw.exe' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|