this article from http://blog.csdn.net/hellogv/ , the reference must be indicated by the source!
This year the wearable equipment suddenly fire up ... Wearable devices and concepts before the outbreak of electronic products are different from the "Internet" and "support app", so that a closed gadget can be added to the imagination of many people, Dick Silk's imagination is very rich said ....
wearable devices are now divided into "cock silk" and "high-handsome" two configuration, the so-called "cock wire" configuration is too weak to install Android, for a period of time, the watch and bracelet are mainly "cock wire" configuration, such as Pebble and Sony watch Arm cortex M3 core, but "Gao Fu Shuai" geek watch with Android ....
After blowing the water, say the focus of this article, how to let the weak performance device support app, that is, to transfer lua to stm32 .... This code can be downloaded here (http://download.csdn.net/detail/hellogv/5721915).
The Board on the hand is STM32F103RCT6 FLASH 256K RAM 48K, the configuration is barely running LUA. The development environment is IAR for ARM 6.4, and later it is also easy to use Eclipse CDT, porting the Focus:
1. Download lua:http://www.lua.org/download.html, this article with Lua 5.2.2;
2. Copy all the files in the/LUA/SRC to the IAR for STM32 project;
3. In the IAR for STM32 template project, create a new Lua folder under workspace and add all the source files:
4. Modify the project configuration
5. Remove LUA.C and LUAC.C from the project, or the compilation will prompt error[li006]: Duplicate definitions for "main";
6. Modify STM32F10X_FLASH.ICF, otherwise compile, run will prompt memory is insufficient:
Define symbol __icfedit_size_cstack__ = 0x00008000;
Define symbol __icfedit_size_heap__ = 0x00002000;
Code is not posted, run this program, you will find a simple LUA program with C program efficiency ratio is 1:100, and the larger the LUA operation, and C program efficiency gap is smaller .