Keil C51 big-endian mode and version selection cause the simulator Code size limit: 2k

Publisher:脑电狂潮Latest update time:2017-12-02 Source: eefocusKeywords:Keil Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

After half a day of debugging the magnet phone program, the debugging progress was slow due to some reasons, and the problem was not discovered in time:


1. Keil MDK version problem. When using C8051 debugger for debugging, a window will pop up saying that the simulation mode is set and the code size can only be less than 2K. However, it can be downloaded and burned using download.

Finally I found out that it was the version I chose when I was harmonizing. At first I thought that version 4.6 was too advanced. In fact, it was because when I used the cracking program, I changed the default standard to professional. It may be a cracking problem. After all, it is a professional version, how can it be that easy? Sin, sin.


2. When performing type conversion, pay attention to the big-endian mode of Keil C51. Keil's endian mode is big-endian mode, that is, the high byte is stored in the low address, and the low byte is stored in the high address. So when converting int/long type to char type or storing it in some place and reading it from it and saving it to a variable, you should take this into consideration.


Keywords:Keil Reference address:Keil C51 big-endian mode and version selection cause the simulator Code size limit: 2k

Previous article:DHT21 temperature and humidity sensor use
Next article:AT89S51 Pin Functions

Recommended ReadingLatest update time:2024-11-16 14:57

About the problem that KEIL MDK can't simulate debugging ARM program
In the process of debugging MCU programs, due to the small size of the program, the use of emulators for simulation debugging is convenient and intuitive, so it is often used. However, Keil often goes on strike and cannot be debugged with the emulator, as shown in the following figure: The solution is also very s
[Microcontroller]
About the problem that KEIL MDK can't simulate debugging ARM program
Quick tips, teach you how to use Keil C51 software in three minutes
The KEIL C51 standard C compiler provides a C language environment for software development of 8051 microcontrollers. However, many beginners whose interface is in English are confused after reading many tutorials. This site has specially produced a relatively simple tutorial. It can embed assembly language and retain
[Microcontroller]
Quick tips, teach you how to use Keil C51 software in three minutes
c51: 24C02 multi-byte read and write
//Function function, //Write 2 data and read them out. #include reg51.h #include intrins.h   //Variable declaration #define uchar unsigned char #define uint unsigned int //Convert the value to character uchar digit ="0123456789ABCDEF"; //延时 1ms void delayms() {  uchar i;  for(i=0;i 250;i++);  for(i
[Microcontroller]
c51: 24C02 multi-byte read and write
Several methods of space allocation of variables in C51 programming
There are several methods for allocating space for variables in C51. 1. The data area has a small space, so only variables that are frequently used or require high computing speed are placed in the data area, such as the count value in a for loop. 2. It is best to place local variables in the data area. Because the sp
[Microcontroller]
Using STlink II simulation debugging under Keil4 and Keil5
1. Close Keil software  2. Download the following compressed file STlink II related files, including three files ST-LINKII-KEIL.dll, StorAcc.dll and TOOLS.INI  3. Copy ST-LINKII-KEIL.dll and StorAcc.dll to the Keil\ARM\BIN directory.  4. Open the TOOLS.INI file, which is in the Keil directory. Add the following TDRV7=
[Microcontroller]
Using STlink II simulation debugging under Keil4 and Keil5
Using Keil Cx51 to achieve accurate timing of T0
A simple calendar clock system is designed using 89C51. The hardware of the clock system is mainly composed of a timing circuit controlled by a single-chip microcomputer, auxiliary circuits such as reset, a key circuit, a digital tube display circuit, and a power supply system. The calendar clock can display year, mont
[Microcontroller]
Using Keil Cx51 to achieve accurate timing of T0
Getting Started Tutorial Using HAL Library, STM32CubeMX and Keil 5 Development (Part 2): GPIO
The article is reproduced from http://blog.csdn.net/charmingsun/article/details/52095563. For the use of software and other preparations, please refer to: Getting Started Tutorial Using HAL Library, STM32CubeMX and Keil 5 Development (I): Lighting up an LED (NUCLEO-F411RE) 1. API Description The HAL library contain
[Microcontroller]
C51 Functions of ADC0809 Analog-to-Digital Converter
/*********************ADC0809 function****************/ //Start A/D conversion function: StartADC() void  StartADC(uchar Address) { PinC = (bit) (Address & 0x04); //C highest bit PinB = (bit) (Address & 0x02); PinA = (bit) (Address & 0x01); //The above 3 sentences output address CBA Pin
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号