NUCLEO-F103RB内存分配在SRAM而不是闪存中 [英] NUCLEO-F103RB memory allocation in the SRAM rather than flash

查看:98
本文介绍了NUCLEO-F103RB内存分配在SRAM而不是闪存中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只能将数据保存到只有20KB的SRAM上。我需要定义端口并包含其他非常重要的库。这些占用总共12KB。这为我的程序留下了8KB的内存。如何将数据保存到闪存中?闪存为128KB。我将嵌入连接到USB并将程序放到mbed驱动器上(它的图标显示在我的计算机屏幕上)。



我使用的是mbed在线编译器

登录或注册| mbed [ ^ ]



我尝试了什么:



我试图优化我的程序以缩短它但是所有的我想要实现的东西无法在8KB的数据内实现。

我已经阅读了针对这个特定mbed的在线手册。

I am only able to save the data on to the SRAM which is only 20KB. I need to define the ports and include other libraries which are very important. These take up a total of 12KB. Which leaves me with 8KB of memory for my program. How do you save the data onto the flash memory? The flash memory is 128KB. I connect the embed to the USB and drop the program onto the mbed drive (the icon for it appears on my computer screen).

I am using an mbed online compiler
Login or Signup | mbed[^]

What I have tried:

I have tried to optimize my program to make it short but all the things i want to achieve cannot be achieved within 8KB of data.
I have read the online hand book that is given for this specific mbed.

推荐答案

你最好在专门讨论你正在使用的硬件的论坛。



但是,我不知道有哪一款微型游戏可以让你使用Flash作为内存。



您需要获得具有更多内存的硬件(您最好的选择!)和/或找到一个能够从您的源生成更好/更小的垃圾箱的编译器。机会真的很好这个选项将花费你几百美元。



最后一个选项是非常有创意地重写你的代码以减少它的大小。这将拯救你多少记忆取决于你的技能,但这只会让你到目前为止。您仍然可能无法获得足够的积蓄来在有限的空间内使用您的代码。
You'd be better off asking this in a forum dedicated to the hardware you're using.

But, I don't know of a single micro that will let you use Flash as RAM.

You either need to get hardware that has more memory in it (your best option!) and/or find a compiler that generates better/smaller bins from your source. Chances are really good this option is going to cost you a few hundred dollars.

The last option is to rewrite your code very creatively to reduce it's size. How much memory this is going to save you depends on your skills, but this will only get you so far. You still may not be able to get enough savings to fit your code in the limited space.


这篇关于NUCLEO-F103RB内存分配在SRAM而不是闪存中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆