This is purely a personal preference. The system UI is getting better and better now, but I still like the command line inexplicably, it's a kind of nostalgia.
Once again, this is just a personal hobby.
Although it is manually compiled, it still requires a Keil installed environment.
detailed steps:
1. Use Notepad or Notepad++ to write super simple code
For example:
#include sbit L1 = P1^2; void main() { L1 = 0; while(1); } Save as test.c It is best to build this source code into the keilC51BIN directory to avoid typing too many paths. 2. Enter the keil installation directory keilC51BIN in cmd Execute the following command: c51x test.c lx51 test.obj TO test.abs ohx51 test.abs Note that "ohx51" is the letter "o". Then check if there is a hex file in the current directory. I tested the running light with STC89C52 successfully. I didn't try the big one, so I don't know how it works. There are also operations for multiple files. Source code is required. Assume there are two source code files example.c and sexample.c. Use c51x to generate obj files respectively. The operation is: c51x example.c c51xsexample.c Then use lx51. This is the key, because there are two files. There are also people on the Internet who complained about the inconvenience of Keil code editing and turned to VS2010 to write C51 code, but after configuration, they found that they could only compile one file and could not compile multiple files. This is the key. The configuration method I found on the Internet wrote the parameters of lx51 as follows: $(ItemDir)$(ItemFileName).obj TO $(ItemDir)$(ItemFileName).abs It seems to be OK, but it is probably because when passing parameters, not all obj file names were passed, so the problem occurred. You can try it manually. The operation is as follows: lx51 example.obj sexample.obj To hello.abs The last step is naturally to generate a hex file ohx51 hello.abs Try burning it :) Reference post: Problems with editing keil code in vs2010 http://bbs.csdn.net/topics/380233788?page=1
Previous article:AT89C51 single chip microcomputer --1. Preliminary preparation
Next article:51 single chip microcomputer water lamp control (5 methods)
Recommended ReadingLatest update time:2024-11-22 19:56
- Popular Resources
- Popular amplifiers
- 西门子S7-12001500 PLC SCL语言编程从入门到精通 (北岛李工)
- Siemens Motion Control Technology and Engineering Applications (Tongxue, edited by Wu Xiaojun)
- How to read electrical control circuit diagrams (Classic best-selling books on electronics and electrical engineering) (Zheng Fengyi)
- MCU C language programming and Proteus simulation technology (Xu Aijun)
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- Another technical solution for power-type plug-in hybrid: A brief discussion on Volvo T8 plug-in hybrid technology
- Current Sensing Using Nanopower Op Amps
- Portable ESP32-S2 Web Server
- Looking for a microcontroller model
- ZigBee Specification (I)
- Analysis of the problem that the program cannot run after F28004x online debugging reset
- Is the STM32 library function HAL_UART_Receive blocking?
- 【DIY Creative LED V2】Complete program
- The Engineer's Way of Quanhui, the author of "FPGA Timing Constraints and Analysis"
- ALTERA cyclone V sockit development board for sale at low price and can be exchanged for E coins
- Low quiescent current meets automotive electronic system requirements