mbEDITOR.zip http://pan.baidu.com/s/1gf5kHhh

在无空格路径下解压解压并运行 注册.CMD 并注册编译目录成功后双击 _BUILD_MB.CMD 可编译相应目录中的工程,并运行MBX.EXE模拟表盘或APP

双击_BUILD_MB -WATCH.CMD生成OUT.MAI可装进手表中运行

@echo on
@set proj=%cd%
@set USE_SIMULATOR=TRUE
@rem @set CCDIR=E:\DESIGN\MBSDK_BN\EDITOR\tools
@REM @set CCDIR=D:\net\mbSDK-BEST_2\EDITOR\tools
@if not exist %MB_EDITOR_DIR%\cedt.exe (
@echo CAN NOT FOUND EDITOR AND TOOLS!!
@goto err_theend
)
@set CCDIR=%MB_EDITOR_DIR%\tools
@PROMPT $g
@rem MODE CON:COLS=120 LINES=40
@ECHO  on
@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
@REM color 0a
@color f6
@set PATH=%CCDIR%\mbcc\mingw32\bin;%CCDIR%\compiler\bin;%CCDIR%\mbcc\bin;%path%;%CCDIR%\bin
@rem 目录名作程序名
@for %%i in (.) do set fileName=%%~ni
@set exeName=%fileName%.exe
@title  %fileName%
@if not exist %proj%\sys.mai     copy /y /b %CCDIR%\mbcc\add\sys.mai %proj%\sys.mai
@if not exist %proj%\build     xcopy /y /e /i %CCDIR%\mbcc\add\build %proj%\build
@rem @if exist OUT.MAI @del /f  /q  OUT.MAI >>nul
@if exist %exeName%  @del /f  /q   %exeName%
@echo.
@echo ***pack resource***
pack
rem pause
@echo.
@echo ***compiling***
arm-none-eabi-gcc -c *.c  -mthumb -mcpu=cortex-m0  -I %CCDIR%\SDK -I %proj%\build
@REM @echo ERRORLEVEL=%ERRORLEVEL%
@if ERRORLEVEL 1 goto err_theend
@echo.
@echo ***linking***
arm-none-eabi-ld -r  *.o -o %proj%\build\maibu_code
@REM @echo ERRORLEVEL=%ERRORLEVEL%
@if ERRORLEVEL 1 goto err_theend
@echo.
@echo ***listing***
arm-none-eabi-readelf -a %proj%\build\maibu_code
@REM @echo ERRORLEVEL=%ERRORLEVEL%
@if ERRORLEVEL 1 goto err_theend
@echo.
@echo ***BUILD SUCCESSFULLY***
@REM copy OUT.MAI .\mbcc\bin\OUT.MAI
@rem copy maibu_res.h .\mbcc\include\maibu_res.h
@rem gcc.exe *.c -o "%CCDIR%\mbcc\bin\MBY.exe"  -I "%CCDIR%\mbcc\include" -L "%CCDIR%\mbcc\lib" -lmaibu -lpthreadGC2 -DLINUX -DWINDOW -DHAVE_STRUCT_TIMESPEC -DNEW -lm -lwsock32 -lcurl -lcurldll
@if "%USE_SIMULATOR%"=="TRUE" (
@echo CREATING WINDOWS SIMULATOR...
@if exist %exeName%  @del /f  /q   %exeName%
gcc.exe    *.c -o %exeName% -DUSE_SIMULATOR -I %proj%\build -I "%CCDIR%\mbcc\include" -L "%CCDIR%\mbcc\lib" -lmaibu -lpthreadGC2 -DLINUX -DWINDOW -DHAVE_STRUCT_TIMESPEC -DNEW -lm -lwsock32 -lcurl -lcurldll
@echo.
@echo  add statements below for simulating
@echo  int main^(^)
@echo  {
@echo       #ifdef USE_SIMULATOR
@echo                 simulator_init^(^);
@echo       #endif
@echo.
@echo.
@echo       #ifdef USE_SIMULATOR
@echo                 simulator_wait^(^);
@echo       #endif
@echo                return 0;
@echo  }
@if exist %exeName% (
@echo.
@echo successful
@echo running simulator...
start  mbx.exe
@rem ping 127.0.0.1 -n 2 >nul
sleep 200
@echo running application...
%exeName%
)
)
@if not %errorlevel% equ 0 (
@echo 编译出错了,详细查看上面
@CMD /K
@pause
)
exit
:err_theend
@echo ERROR:SOMETHING WRONG HAPPENED
cmd /k
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>set fileName=部落图腾
***pack resource***
>pack
-------------read appinfo.json-------------
uuid:f457188bcc659dd2de84e08170abb3c3
app_id:30208
name:閮ㄨ惤鍥捐吘
icon:5001
version:120
watchface:1
sysapp:0
res_num:23
res:0, type:0, name:NUMBER_0_BMP, file:0.bmp
res:1, type:0, name:NUMBER_1_BMP, file:1.bmp
res:2, type:0, name:NUMBER_2_BMP, file:2.bmp
res:3, type:0, name:NUMBER_3_BMP, file:3.bmp
res:4, type:0, name:NUMBER_4_BMP, file:4.bmp
res:5, type:0, name:NUMBER_5_BMP, file:5.bmp
res:6, type:0, name:NUMBER_6_BMP, file:6.bmp
res:7, type:0, name:NUMBER_7_BMP, file:7.bmp
res:8, type:0, name:NUMBER_8_BMP, file:8.bmp
res:9, type:0, name:NUMBER_9_BMP, file:9.bmp
res:10, type:0, name:NUMBER_10_BMP, file:10.bmp
res:11, type:0, name:NUMBER_0B_BMP, file:0b.bmp
res:12, type:0, name:NUMBER_1B_BMP, file:1b.bmp
res:13, type:0, name:NUMBER_2B_BMP, file:2b.bmp
res:14, type:0, name:NUMBER_3B_BMP, file:3b.bmp
res:15, type:0, name:NUMBER_4B_BMP, file:4b.bmp
res:16, type:0, name:NUMBER_5B_BMP, file:5b.bmp
res:17, type:0, name:NUMBER_6B_BMP, file:6b.bmp
res:18, type:0, name:NUMBER_7B_BMP, file:7b.bmp
res:19, type:0, name:NUMBER_8B_BMP, file:8b.bmp
res:20, type:0, name:NUMBER_9B_BMP, file:9b.bmp
res:21, type:0, name:NUMBER_10B_BMP, file:10b.bmp
res:22, type:0, name:FULL_BLACK_BMP, file:full_black.bmp
-----------------begin create res.h-------------
-----------------create res.h ok-------------
-----------------begin create res_file-------------
type:0, res_key:5001, offset:366, res_size:60, width:20, height:20
type:0, res_key:5002, offset:426, res_size:60, width:20, height:20
type:0, res_key:5003, offset:486, res_size:60, width:20, height:20
type:0, res_key:5004, offset:546, res_size:60, width:20, height:20
type:0, res_key:5005, offset:606, res_size:60, width:20, height:20
type:0, res_key:5006, offset:666, res_size:60, width:20, height:20
type:0, res_key:5007, offset:726, res_size:60, width:20, height:20
type:0, res_key:5008, offset:786, res_size:60, width:20, height:20
type:0, res_key:5009, offset:846, res_size:60, width:20, height:20
type:0, res_key:5010, offset:906, res_size:60, width:20, height:20
type:0, res_key:5011, offset:966, res_size:60, width:20, height:20
type:0, res_key:5012, offset:1026, res_size:270, width:45, height:45
type:0, res_key:5013, offset:1296, res_size:270, width:45, height:45
type:0, res_key:5014, offset:1566, res_size:270, width:45, height:45
type:0, res_key:5015, offset:1836, res_size:270, width:45, height:45
type:0, res_key:5016, offset:2106, res_size:270, width:45, height:45
type:0, res_key:5017, offset:2376, res_size:270, width:45, height:45
type:0, res_key:5018, offset:2646, res_size:270, width:45, height:45
type:0, res_key:5019, offset:2916, res_size:270, width:45, height:45
type:0, res_key:5020, offset:3186, res_size:270, width:45, height:45
type:0, res_key:5021, offset:3456, res_size:270, width:45, height:45
type:0, res_key:5022, offset:3726, res_size:270, width:45, height:45
type:0, res_key:5023, offset:3996, res_size:2048, width:128, height:128
-------------create res_file ok---------------
---------------prepare pack head----------
---------------read res_file----------
---------------read code----------
---------------write pack head----------
---------------write res ----------
---------------write code ----------
---------------pack file:閮ㄨ惤鍥捐吘 ok ----------
>rem pause
***compiling***
>arm-none-eabi-gcc -c *.c  -mthumb -mcpu=cortex-m0  -I D:\design\mbEDITOR\tools\SDK -I D:\design\mbEDITOR\workspace\个性时间样式\部落图腾\build
Tribal_V01.c: In function 'sys_time_change_callback':
Tribal_V01.c:203:31: warning: initialization makes pointer from integer without a cast [enabled by default]
***linking***
>arm-none-eabi-ld -r  *.o -o D:\design\mbEDITOR\workspace\个性时间样式\部落图腾\build\maibu_code
***listing***
>arm-none-eabi-readelf -a D:\design\mbEDITOR\workspace\个性时间样式\部落图腾\build\maibu_code
ELF Header:
Magic:   7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class:                             ELF32
Data:                              2's complement, little endian
Version:                           1 (current)
OS/ABI:                            UNIX - System V
ABI Version:                       0
Type:                              REL (Relocatable file)
Machine:                           ARM
Version:                           0x1
Entry point address:               0x0
Start of program headers:          0 (bytes into file)
Start of section headers:          1640 (bytes into file)
Flags:                             0x5000000, Version5 EABI
Size of this header:               52 (bytes)
Size of program headers:           0 (bytes)
Number of program headers:         0
Size of section headers:           40 (bytes)
Number of section headers:         11
Section header string table index: 8
Section Headers:
[Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
[ 0]                   NULL            00000000 000000 000000 00      0   0  0
[ 1] .text             PROGBITS        00000000 000034 0004cc 00  AX  0   0  4
[ 2] .rel.text         REL             00000000 000820 000128 08      9   1  4
[ 3] .rodata           PROGBITS        00000000 000500 000068 00   A  0   0  4
[ 4] .data             PROGBITS        00000000 000568 00000c 00  WA  0   0  4
[ 5] .bss              NOBITS          00000000 000574 000008 00  WA  0   0  4
[ 6] .comment          PROGBITS        00000000 000574 000071 01  MS  0   0  1
[ 7] .ARM.attributes   ARM_ATTRIBUTES  00000000 0005e5 000031 00      0   0  1
[ 8] .shstrtab         STRTAB          00000000 000616 000051 00      0   0  1
[ 9] .symtab           SYMTAB          00000000 000948 000340 10     10  31  4
[10] .strtab           STRTAB          00000000 000c88 00027a 00      0   0  1
Key to Flags:
W (write), A (alloc), X (execute), M (merge), S (strings)
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)
O (extra OS processing required) o (OS specific), p (processor specific)
There are no section groups in this file.
There are no program headers in this file.
Relocation section '.rel.text' at offset 0x820 contains 37 entries:
Offset     Info    Type            Sym.Value  Sym. Name
0000001c  0000240a R_ARM_THM_CALL    00000000   res_get_user_bitmap
0000002e  0000260a R_ARM_THM_CALL    00000000   app_window_get_layer_b
00000040  0000310a R_ARM_THM_CALL    00000000   app_layer_set_bitmap_b
00000070  0000240a R_ARM_THM_CALL    00000000   res_get_user_bitmap
0000009e  0000280a R_ARM_THM_CALL    00000000   app_layer_create_bitma
000000b2  0000200a R_ARM_THM_CALL    00000000   app_layer_set_bg_color
000000d0  00002b0a R_ARM_THM_CALL    00000000   app_service_get_dateti
000000de  0000300a R_ARM_THM_CALL    00000000   __aeabi_uidiv
000000f8  0000330a R_ARM_THM_CALL    00000000   __aeabi_uidivmod
00000110  0000300a R_ARM_THM_CALL    00000000   __aeabi_uidiv
00000128  0000330a R_ARM_THM_CALL    00000000   __aeabi_uidivmod
0000013c  0000300a R_ARM_THM_CALL    00000000   __aeabi_uidiv
00000156  0000330a R_ARM_THM_CALL    00000000   __aeabi_uidivmod
0000016e  0000300a R_ARM_THM_CALL    00000000   __aeabi_uidiv
00000186  0000330a R_ARM_THM_CALL    00000000   __aeabi_uidivmod
0000024e  0000230a R_ARM_THM_CALL    00000000   app_window_add_layer
000002b8  0000230a R_ARM_THM_CALL    00000000   app_window_add_layer
000003a8  00002502 R_ARM_ABS32       00000000   time_xpos
000003ac  00002102 R_ARM_ABS32       00000004   time_ypos
000003b0  00002f02 R_ARM_ABS32       0000000c   get_bigicon_by_num
000003b4  00000302 R_ARM_ABS32       00000000   .data
000003b8  00002a02 R_ARM_ABS32       00000008   date_xpos
000003bc  00003202 R_ARM_ABS32       00000038   get_liticon_by_num
000003c0  00000302 R_ARM_ABS32       00000000   .data
000003c4  00000402 R_ARM_ABS32       00000000   .bss
000003c8  00000402 R_ARM_ABS32       00000000   .bss
000003e6  0000220a R_ARM_THM_CALL    00000000   memcpy
00000408  0000230a R_ARM_THM_CALL    00000000   app_window_add_layer
00000414  00000202 R_ARM_ABS32       00000000   .rodata
00000422  00002c0a R_ARM_THM_CALL    00000000   app_window_create
00000464  0000290a R_ARM_THM_CALL    00000000   app_window_stack_get_w
00000480  0000270a R_ARM_THM_CALL    00000000   app_window_update
0000048c  00000302 R_ARM_ABS32       00000000   .data
000004a8  00002d0a R_ARM_THM_CALL    00000000   app_window_stack_push
000004b6  00001f0a R_ARM_THM_CALL    00000000   maibu_service_sys_even
000004c4  00000302 R_ARM_ABS32       00000000   .data
000004c8  00001b02 R_ARM_ABS32       00000449   sys_time_change_callba
There are no unwind sections in this file.
Symbol table '.symtab' contains 52 entries:
Num:    Value  Size Type    Bind   Vis      Ndx Name
0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
1: 00000000     0 SECTION LOCAL  DEFAULT    1
2: 00000000     0 SECTION LOCAL  DEFAULT    3
3: 00000000     0 SECTION LOCAL  DEFAULT    4
4: 00000000     0 SECTION LOCAL  DEFAULT    5
5: 00000000     0 SECTION LOCAL  DEFAULT    6
6: 00000000     0 SECTION LOCAL  DEFAULT    7
7: 00000000     0 FILE    LOCAL  DEFAULT  ABS Tribal_V01.c
8: 00000000     0 NOTYPE  LOCAL  DEFAULT    3 $d
9: 00000000     0 NOTYPE  LOCAL  DEFAULT    4 $d
10: 00000000     4 OBJECT  LOCAL  DEFAULT    4 main_window_id
11: 00000004     4 OBJECT  LOCAL  DEFAULT    4 time_icon_layer_id
12: 00000008     4 OBJECT  LOCAL  DEFAULT    4 date_icon_layer_id
13: 00000000     0 NOTYPE  LOCAL  DEFAULT    5 $d
14: 00000000     0 NOTYPE  LOCAL  DEFAULT    5 time_old
15: 00000004     0 NOTYPE  LOCAL  DEFAULT    5 date_old
16: 00000000     0 NOTYPE  LOCAL  DEFAULT    1 $t
17: 00000001    74 FUNC    LOCAL  DEFAULT    1 replace_old_layer
18: 0000004d   116 FUNC    LOCAL  DEFAULT    1 creat_icon_layer
19: 000000c1   246 FUNC    LOCAL  DEFAULT    1 get_time_date
20: 000001b9   532 FUNC    LOCAL  DEFAULT    1 creat_update_time_layer
21: 000003a8     0 NOTYPE  LOCAL  DEFAULT    1 $d
22: 000003cc     0 NOTYPE  LOCAL  DEFAULT    1 $t
23: 000003cd    80 FUNC    LOCAL  DEFAULT    1 creat_background_layer
24: 00000414     0 NOTYPE  LOCAL  DEFAULT    1 $d
25: 0000041c     0 NOTYPE  LOCAL  DEFAULT    1 $t
26: 0000041d    42 FUNC    LOCAL  DEFAULT    1 init_main_window
27: 00000449    72 FUNC    LOCAL  DEFAULT    1 sys_time_change_callback
28: 0000048c     0 NOTYPE  LOCAL  DEFAULT    1 $d
29: 00000490     0 NOTYPE  LOCAL  DEFAULT    1 $t
30: 000004c4     0 NOTYPE  LOCAL  DEFAULT    1 $d
31: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND maibu_service_sys_event_s
32: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND app_layer_set_bg_color
33: 00000004     4 OBJECT  GLOBAL DEFAULT    3 time_ypos
34: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND memcpy
35: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND app_window_add_layer
36: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND res_get_user_bitmap
37: 00000000     4 OBJECT  GLOBAL DEFAULT    3 time_xpos
38: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND app_window_get_layer_by_i
39: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND app_window_update
40: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND app_layer_create_bitmap
41: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND app_window_stack_get_wind
42: 00000008     4 OBJECT  GLOBAL DEFAULT    3 date_xpos
43: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND app_service_get_datetime
44: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND app_window_create
45: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND app_window_stack_push
46: 00000491    60 FUNC    GLOBAL DEFAULT    1 main
47: 0000000c    44 OBJECT  GLOBAL DEFAULT    3 get_bigicon_by_num
48: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __aeabi_uidiv
49: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND app_layer_set_bitmap_bitm
50: 00000038    44 OBJECT  GLOBAL DEFAULT    3 get_liticon_by_num
51: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND __aeabi_uidivmod
No version information found in this file.
Attribute Section: aeabi
File Attributes
Tag_CPU_name: "Cortex-M0"
Tag_CPU_arch: v6S-M
Tag_CPU_arch_profile: Microcontroller
Tag_THUMB_ISA_use: Thumb-1
Tag_ABI_PCS_wchar_t: 4
Tag_ABI_FP_denormal: Needed
Tag_ABI_FP_exceptions: Needed
Tag_ABI_FP_number_model: IEEE 754
Tag_ABI_align_needed: 8-byte
Tag_ABI_align_preserved: 8-byte, except leaf SP
Tag_ABI_enum_size: small
Tag_ABI_optimization_goals: Aggressive Debug
***BUILD SUCCESSFULLY***
CREATING WINDOWS SIMULATOR...
add statements below for simulating
int main()
{
#ifdef USE_SIMULATOR
simulator_init();
#endif
#ifdef USE_SIMULATOR
simulator_wait();
#endif
return 0;
}
successful
running simulator...
Sleep 200 ms,total:0.2 sec
running application...
send(ip:127.0.0.1, port:12314)

hacking 麦步手表之(2)命令行编译工程相关推荐

  1. hacking 麦步手表之(1)精简模拟界面

    有一次看了一集Hacking the System(黑客智多星) 感叹,主持人真是天才 临渊羡鱼不如退而结网 接下来我们来hacking 麦步手表的模拟界面 编译生成.MAI是手表的程序.打开模拟开着 ...

  2. VC6命令行编译工程方法

    VC6命令行编译工程方法 昨天下载一个界面库wxWidgets,编译里面的库很痛苦,有好几个工程,我的在一边等待,痛苦!!于是上网找到命令行编译的方法,可以写一个批处理文件,呵呵,想起以前经理编译工程 ...

  3. hacking 麦步手表之(4)制作一个大数字表盘xzy-big-number

    用大个的数字填充表盘会是怎么样的? 本来设想这样 但是就是麦步不支持超过20个layer害我以为哪有BUG,查到最后,发现创建到21个layer时返回-1. 最后成了这个样子 /** ======== ...

  4. VS2019 使用命令行编译工程sln

    需要使用 devenv.com这个工具 具体的执行如下: test>"C:\Program Files (x86)\Microsoft Visual Studio\2019\Profe ...

  5. 麦步手表编程纪实(1)

    2018-01-1100:23:32 早想买一个智能手表,之前买过埃微手环,之后亮哥又送我一个小米手环2,但是都不是我想要的,最后在网上发现了一款可以自主编程的手表-麦步手表, 爽歪歪,399太贵,最 ...

  6. win10 uwp 使用 msbuild 命令行编译 UWP 程序

    原文:win10 uwp 使用 msbuild 命令行编译 UWP 程序 版权声明:博客已迁移到 http://lindexi.gitee.io 欢迎访问.如果当前博客图片看不到,请到 http:// ...

  7. VisualStudio 命令行编译 build 通过 rebuild 不通过

    在使用命令行编译项目,发现使用 build 可以编译通过,但是通过 rebuild 编译提示找不到项目,明明在对应的文件夹存在项目输出的 dll 文件,但是会提示找不到 在命令行编译的 build 和 ...

  8. 命令行编译运行CSharp文件

    命令行编译运行CSharp文件 找到csc.exe所在的路径.如我本机上为"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727" 在环境变量 ...

  9. Windows使用MSVC,命令行编译,链接64位dll,Python调用

    文章目录 代码 编译 链接 Python调用 前一篇博客: Windows下使用Visual Studio自带的MSVC,命令行编译C/C++程序 代码 mylib.h代码如下: #ifndef MY ...

最新文章

  1. 3.1.3 awk命令用法
  2. WinApi学习笔记-获取电脑中磁盘信息
  3. gcc 使用 stdio.h
  4. boost::safe_numerics模块实现隐式转换更改数据值的测试程序
  5. 评论语义分析 分词 分类python_用python调用ICTCLAS50进行中文分词
  6. 零基础入门深度学习(4) - 卷积神经网络
  7. 网络爬虫之java基础篇QueryRunner(Ⅲ)
  8. android 练习之路 (三)
  9. oracle添加联合主键
  10. fanuc机器人与示教器配对_看FANUC机器人在重力浇铸行业,都是又累又重的活儿啊!...
  11. Python 之图片对比
  12. 语言模型总结(待完善)
  13. 70多套java必练项目,适合小白上手!
  14. java 汉字区位码表,中文汉字编码知识及各种中文编码对应的编码区间总结
  15. 如何保证MQ消息队列的高可用
  16. “女主播翻车”骂声不断,店湾妹感慨:主播界怎么了?三观已毁!
  17. 中国移动日渐步履蹒跚,中国电信在5G商用上取得领先优势
  18. 鼠标双击成了查看属性是怎么回事?怎样解决?
  19. Android——UI开发的点点滴滴1
  20. 轮盘赌算法原理(ACO算法概率选择方法)

热门文章

  1. 就凭这些,蕴含清华百年历史的《无问西东》唤起了一片赤子之心
  2. pycharm提示softmax() got an unexpected keyword argument 'axis'错误
  3. 数博会”为何落户贵州?
  4. 解决rdm连接虚拟机redis失败,idea无法连接
  5. linux启动jar后运行其他命令,Linux 部署jar 后台持续运行
  6. Mysql操作联系题
  7. 电信百兆宽带使用攻略
  8. 树莓派+DS18B20+Canal 实现 温度报警系统
  9. yolox的正负样本分配策略mmdet代码详解
  10. 数据挖掘算法与现实生活中的应用案例