STM8S RAM Re-understanding

Publisher:泥匠手Latest update time:2017-02-16 Source: eefocusKeywords:STM8S  RAM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

For example, STM8S003 has 1 RAM, and the maximum 512 is used for stack by default.

Only 512 are left for users

The 512 is divided into idata xdata according to the understanding of 51, that is, @tiny @near

Without keyword restriction, the default is idata area (address less than 256).

char tttds[258];

If the idata area exceeds the range, it will prompt segment.ubsct size overflow (5)

Adding keywords defines the area as above 256 addresses.

@near char ttt[51];

If this definition exceeds the range, it will prompt segment .bss size overflow (1)

The two addresses cannot be continuous and mixed, that is, if an array exceeds 256, then there is only one way to make the stack smaller and put it in the near area. Modify the Linker item in the STVD project settings, drop down the RAM address bar of INPUT in the category, and change 0X1FF to a larger value. This can be achieved. Of course, you must pay attention to the stack not overflowing because it has become smaller.



I still have some doubts, FILE: line 178: Address 0x1019 is out of range and is ignored! In my program, it is impossible to use address 1019, and the program can run normally. I don’t know why this prompt appears during STVP. I have also seen the HEX file, and there is indeed data at address 1019, which is 0. How is it generated? Is it a COSMIC BUG?


Keywords:STM8S  RAM Reference address:STM8S RAM Re-understanding

Previous article:Use of STM8 internal EEPROM
Next article:STM8 can communication

Recommended ReadingLatest update time:2024-11-16 13:56

A brief discussion on the role of F-RAM memory in the industrial robot market
The vision of Industry 4.0 is to combine smart sensors with industrial equipment to increase productivity, improve reliability, and reduce operating costs. Many of these sensors will be connected to each other wirelessly (for example, through a mesh configuration) or through sensor gateways. This network will then con
[Industrial Control]
A brief discussion on the role of F-RAM memory in the industrial robot market
Super large memory popularization storm, Savior Gaming Phone 2 Pro 18GB version is only 4999 yuan
Jiwei.com reported on May 20 that today Lenovo Legion Gaming Phone 2 Pro launched a large memory version, 16GB+256GB priced at 4799 yuan, 18GB+256GB priced at 5299 yuan. The first trial price of 16GB+256GB is only 4799 yuan, and 18GB+256GB is only 4999 yuan. Reservations are now open and it will be officially on sale
[Mobile phone portable]
STM8S long key recognition
I have recently been learning to develop the STM8S003 MCU. I have just got this MCU and don’t know many of its functions well. I can only develop and learn while recording the learning process. At present, it is necessary to realize the shutdown by pressing the KEY1 button for 3s. Under Linux, the start timestamp an
[Microcontroller]
Talk about the memory allocation and optimization of C51 in Keil
After reading this article on memory allocation and optimization of C51, I personally think that the analysis is very thorough, so I share it with you here.   The memory allocation of C51 is different from that of general PC. The memory space is limited and uses overlay and sharing technology. In Keil compiler, after
[Microcontroller]
ZTE Axon 30 Ultra Space Edition with 18GB RAM and 1TB storage is launched
     Today, ZTE Mobile announced that it will release the ZTE Axon 30 Ultra Space Edition on November 25. The phone will be endorsed by Liu Haocun, the heroine of Zhang Yimou's movie "One Second".   The primary highlight of this phone is the world's first 18GB memory + 1TB storage, which is currently the flagship phon
[Mobile phone portable]
How to generate burning files using IAR to compile STM8S
There are 4 burning file formats that can be generated after IAR compilation, as follows The first is Motorola, which generates files in the same format as the burning files generated by STVD. The second is hexadecimal, which is often used by Keil and others; The third type is binary, which I rarely use. What is th
[Microcontroller]
The importance of time base settings and memory depth
If by chance someone is looking for an oscilloscope to buy, the key parameter Memory Depth is usually only the third in the selection range, and even then. First, everyone is thinking about bandwidth, sample rate and acquisition rate or decoding options. However, if you take a few minutes to consider the value of, say
[Test Measurement]
The importance of time base settings and memory depth
New Product Release | Advantech's new generation CXL 2.0 memory revolutionizes data center efficiency!
In October 2024, Advantech announced the launch of the next-generation SQRAM CXL 2.0 Type 3 memory module. Compute Express Link (CXL) 2.0 is the next evolution of memory technology, which can achieve memory expansion and acceleration through high-speed, low-latency interconnection to meet the needs o
[Industrial Control]
New Product Release | Advantech's new generation CXL 2.0 memory revolutionizes data center efficiency!
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号