2904 views|20 replies

3180

Posts

0

Resources
The OP
 

Program space issues [Copy link]

 

I use STM32F103VCT6 to write programs, and the program space is 256K.

It shows that more than 180K has been used. I didn’t expect that I wrote so many programs.

Is this accurate? I still have a lot of code to write, I don't know if it will be enough.

Please give me some advice, thank you.

This post is from stm32/stm8

Latest reply

What a big program!   Details Published on 2020-9-14 11:38
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 

1w

Posts

142

Resources
2
 

The amount of compiled code depends on the program structure and data type. It is not necessarily the case that if the source code is not large, the amount of compiled code will be small, especially when there are a large number of program area constants. As for whether the capacity is sufficient, how can others know this? You can only judge it yourself.

This post is from stm32/stm8

Comments

I can't judge it myself.  Details Published on 2020-9-8 17:28
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 

3180

Posts

0

Resources
3
 
chunyang posted on 2020-9-8 17:20 The amount of compiled code is related to the program structure and the data type. It does not necessarily mean that the amount of compiled code is small if the source code is not large, especially when there are a lot of...

I can't judge it myself.

This post is from stm32/stm8

Comments

You should know how much work you have done, right? Excluding the space occupied by the program area constants, the remaining space is compared with your remaining work.  Details Published on 2020-9-8 17:34
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 

1w

Posts

142

Resources
4
 
chenbingjy posted on 2020-9-8 17:28 I can’t tell for myself

You should know how much work you have done, right? Excluding the space occupied by the program area constants, the remaining space is compared with your remaining work.

This post is from stm32/stm8

Comments

It's hard to calculate. This thing is hard to estimate. There is too much water. I'd better simplify the code.  Details Published on 2020-9-8 17:38
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 

3180

Posts

0

Resources
5
 
chunyang posted on 2020-9-8 17:34 You should know how much work you have completed, right? Excluding the space occupied by constants in the program area, the remaining space is compared with your remaining workload.

It’s hard to calculate. This thing is hard to estimate because it contains too much water.

I'd better simplify the code.

This post is from stm32/stm8

Comments

It seems that you didn't write all the programs yourself. If you wrote all the programs yourself, you can't possibly not know how much work you've done. If you modify other people's programs, the premise for estimating the workload is that you must have a full understanding of the structure and functions of other people's programs.  Details Published on 2020-9-8 17:42
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 

1w

Posts

142

Resources
6
 
chenbingjy posted on 2020-9-8 17:38 It's hard to calculate. This thing is hard to estimate. There is too much water. I'd better simplify the code

It seems that you didn't write all the programs yourself. If you wrote all the programs yourself, you can't possibly not know how much work you've done. If you modify other people's programs, the premise for estimating the workload is that you must have a full understanding of the structure and functions of other people's programs.

This post is from stm32/stm8

Comments

Great, I wrote all of them. However, I don't know how to write the rest of the part. I don't know the whole thing about the device I wrote. I just heard the introduction of the workshop workers.  Details Published on 2020-9-8 17:56
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 

3180

Posts

0

Resources
7
 
chunyang posted on 2020-9-8 17:42 It seems that not all programs are written by you. If you write them all by yourself, you can't not know how much work you have completed. Modify the program based on others, then estimate...

Great, I wrote all of them. However, I don't know how to write the rest of the part. I don't know the whole thing about the device I wrote. I just heard the introduction of the workshop workers.

This post is from stm32/stm8

Comments

After compilation, the code with a storage capacity of several hundred KB is a source program with tens of thousands of lines of code, unless there are a lot of constants in the program area. If this is not the case, it means that you need to improve your programming efficiency.  Details Published on 2020-9-8 18:09
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 

1w

Posts

142

Resources
8
 
chenbingjy posted on 2020-9-8 17:56 Great Master, I wrote all of them. However, I don’t know how to write the rest of the part. I am not fully clear about the device I wrote. I just listened to the workshop...

After compilation, the code with a storage capacity of several hundred KB is a source program with tens of thousands of lines of code unless there are a lot of constants in the program area. If this is not the case, it means that you need to improve your programming efficiency.

This post is from stm32/stm8

Comments

It is in the tens of thousands of lines level, with multiple files, the largest of which has more than 16,000 lines  Details Published on 2020-9-8 18:49
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 

3180

Posts

0

Resources
9
 
chunyang posted on 2020-9-8 18:09 After compilation, the code with hundreds of KB storage capacity is a source program with tens of thousands of lines of code unless there are a large number of program area constants. If not, it means...

It is in the tens of thousands of lines level, with multiple files, the largest of which has more than 16,000 lines

This post is from stm32/stm8

Comments

If you wrote all this code yourself, you must be a very skilled programmer...  Details Published on 2020-9-8 19:16
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 

1w

Posts

142

Resources
10
 
chenbingjy posted on 2020-9-8 18:49 It is at the level of tens of thousands of lines, with multiple files, the largest of which has more than 16,000 lines

If you wrote all this code yourself, you must be a very skilled programmer...

This post is from stm32/stm8

Comments

Some of the underlying drivers were downloaded from the Internet and modified.  Details Published on 2020-9-8 20:08
 
Personal signature上传了一些书籍资料,也许有你想要的:http://download.eeworld.com.cn/user/chunyang
 
 

3180

Posts

0

Resources
11
 
chunyang posted on 2020-9-8 19:16 If you wrote all these codes yourself, you should be a very skilled programmer...

Some of the underlying drivers were downloaded from the Internet and modified.

This post is from stm32/stm8
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 

7422

Posts

2

Resources
12
 

More than 180K does require a lot of code.

This post is from stm32/stm8
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 

4005

Posts

0

Resources
13
 

Pure code rarely takes up so much storage space. Generally, the data table that is stored takes up a lot of space. The data table or code that is not accessed will be optimized. Another special case is that the storage address of the data table is specified. In this case, the largest address is used.

This post is from stm32/stm8

Comments

What does it mean to specify the storage address of the data table? Does it specify the MCU FLASH address? I did not specify it, but I did specify the storage address of W25Q16.  Details Published on 2020-9-10 11:39
 
 
 

3180

Posts

0

Resources
14
 
huo_hu Published on 2020-9-10 11:26 Pure code rarely takes up so much storage space. Generally, the stored data tables take up a lot of space. The data tables or codes that are not accessed will be optimized. In addition...

What does it mean to specify the storage address of a data table?

Is it to specify the MCU FLASH address?

I did not specify, have specified the storage address of W25Q16.

This post is from stm32/stm8

Comments

_at_ or define the section name to specify the flash address  Details Published on 2020-9-10 11:48
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 

4005

Posts

0

Resources
15
 
chenbingjy posted on 2020-9-10 11:39 What does it mean to specify the storage address of the data table? Is it to specify the MCU FLASH address? I didn't specify it, but I did specify the storage address of W25Q16...

_at_ or define the section name to specify the flash address

This post is from stm32/stm8
 
 
 

4005

Posts

0

Resources
16
 

You can check the list file to see the allocation

This post is from stm32/stm8

Comments

Thanks!  Details Published on 2020-9-10 11:54
 
 
 

3180

Posts

0

Resources
17
 
huo_hu posted on 2020-9-10 11:50 You can see the allocation by checking the list file

Thanks!

This post is from stm32/stm8
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 

4005

Posts

0

Resources
18
 

Another possibility is the LIB library usage

This post is from stm32/stm8
 
 
 

6062

Posts

4

Resources
19
 
This post was last edited by damiaa on 2020-9-10 15:49

There are still quite a few. If it is really not enough, optimize it. If it is still not enough, change the chip of VDt6 VEt6. The board has 384K 512K.

You should first install the largest one, then switch to the smaller one. Buy both large and small chips.

This post is from stm32/stm8

Comments

Makes sense  Details Published on 2020-9-10 17:54
 
 
 

3180

Posts

0

Resources
20
 
damiaa posted on 2020-9-10 15:42 There are still quite a few. If it is really not enough, optimize it. If it is still not enough, change the VDt6 VEt6 chip. The board has 384K 512K. It should be fixed first...

Makes sense

This post is from stm32/stm8
 
Personal signature为江山踏坏了乌骓马,为社稷拉断了宝雕弓。
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list