摘要
提出用编译的方法设计一款能直接生成MCS-51系列单片机的目标代码,不依赖操作系统和JVM的嵌入式Java编译器,使得Java语言在低档嵌入式系统中应用更加广泛,实现成本低廉的工业环境及家庭电器与Internet相结合实现远程监测和控制。详细分析了Java语言与嵌入式系统的特点,以实时版jRate及sun公司的GJC编译系统为参考,采用单遍扫描语法制导翻译模式,以语法分析程序单元为核心,构建嵌入式Java编译器的词法分析器、语法/语义分析器和代码生成器,并对测试方法进行了探讨。
In the paper,the method of compiling to design embedded Java compiler is proposed.It can directly generate the MCS-51 series microcontroller target code,does not rely on the operating system and the JVM.It makes the Java language more widely applied in the low-grade embedded system,and realizes the low-cost industrial environment and household appliances and Internet to achieve the remote monitoring and control.The characteristics of Java language and embedded system are analyzed in detail.The system is based on the realtime version jRate and sun of GJC compile system,and adopts the single pass grammar translation guidance mode.The syntax analysis program unit is used as the core to build an embedded Java compiler lexical analyzer,syntax/semantics analyzer and code generator,and the test methods are discused.
作者
滕海坤
刘心声
李伦彬
Teng Haikun;Liu Xinsheng;Li Lunbin(College of Computer and Information Engineering,Heihe University,Heihe 164300,China)
出处
《单片机与嵌入式系统应用》
2018年第4期16-19,共4页
Microcontrollers & Embedded Systems
基金
黑龙江省高校基本科研业务费黑河学院专项资金项目(编号:2017-KYYWF-0361)资助