FreeRTOS挂起和恢复任务调度器与stm\stm.axf: Error: L6406E: No space in execution regions with 芯片内存不足解决

keil5软件报错 Error: L6406E: No space in execution regions with .ANY selector matching xxx 对 Error: L6406E: No space in execution regions with .ANY selector matching xxx 的综合分析 阅读详情

1.挂起和恢复任务调度器

任务挂起函数

void vTaskSuspend( TaskHandle_t xTaskToSuspend )

  • xTaskToSuspend:待挂起任务的任务句柄,为NULL表示挂起任务自身。
  • 需将宏INCLUDE_vTaskSuspend配置为 1。

任务恢复函数

void vTaskResume( TaskHandle_t xTaskToResume )

  • INCLUDE_vTaskSuspend必须定义为 1。
  • 不论任务被使用 vTaskSuspend() 挂起多少次,只需调用 vTaskResume() 一次,即可使其继续执行。被恢复的任务会重新进入就绪状态。

任务恢复函数(中断中恢复)函数说明

BaseType_t xTaskResumeFromISR( TaskHandle_t xTaskToResume )

返回值如下:

  • pdTRUE:任务恢复后需要进行任务切换。
  • pdFALSE:任务恢复后不需要进行任务切换。

注意事项

  • INCLUDE_vTaskSuspend 和 INCLUDE_xTaskResumeFromISR 必须定义为 1。
  • 在中断服务程序中调用FreeRTOS的API函数时,中断的优先级不能高于FreeRTOS所管理的最高中断优先级。

挂起与恢复调度器

  • vTaskSuspendAll():挂起任务调度器,调度器不会进行任务切换,当前任务一直运行。
  • xTaskResumeAll():恢复任务调度器,调度器继续任务切换。

实验目的

  • task3:判断按键按下逻辑,KEY1短按下,挂起task1;KEY1长按任务中恢复task1;KEY2按下,挂起调度器;KEY2长按下,恢复调度器,并打印任务的状态。

开启宏定义

/* 开启任务挂起与恢复的功能 */
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_xResumeFromISR 1

/* 开启跟踪task信息 */
#define configUSE_TRACE_FACILITY 1
#define configUSE_STATS_FORMATTING_FUNCTIONS 1 
/**
 * @description: 任务三:判断按键按下逻辑,KEY1短按下,挂起task1;KEY1长按任务中恢复task1;KEY2按下,挂起调度器;KEY2长按下,恢复调度器,并打印任务的状态。
 * @param {void} *pvParameters
 * @return {*}
 */
struct keys key[3] = {0}; // 定义按键结构体
char task_info[500]; // 定义接收任务信息
void task3(void *pvParameters)
{
    while (1)
    {
        printf("task3 is running\r\n");
        if (key[0].short_flag == 1)
        {
            /* key1短按下,挂起task1 */
            printf("<<<挂起task1...\r\n");
            vTaskSuspend(task1_handle);
            key[0].short_flag = 0;
        }
        else if (key[0].long_flag == 1)
        {
            /* key1长按下,恢复task1 */
            printf(">>>恢复task1...\r\n");
            vTaskResume(task1_handle);
            key[0].long_flag = 0;
        }
        else if (key[1].short_flag == 1)
        {
            /* key2短按下,挂起调度器 */
            printf("<<<挂起调度器...\r\n");
            vTaskSuspendAll();
            key[1].short_flag = 0;
        }
        else if (key[1].long_flag == 1)
        {
            /* key2长按下,恢复调度器 */
            printf(">>>恢复调度器...\r\n");
            xTaskResumeAll();
            key[1].long_flag = 0;
        }
        /* 打印任务状态 */
        vTaskList(task_info);
        printf("%s\r\n", task_info);
        vTaskDelay(500);
        // HAL_Delay(500); //这种delay不会让任务进入阻塞态,不会让出cpu使用权
    }
}

 创建任务和task1和task2和之前一样

stm\stm.axf: Error: L6406E: No space in execution regions with .ANY selector matching freertos_demo.o(.bss).芯片内存不足

现象:

注意事项:使用静态任务创建的时候,stm32f103c8t6芯片的RAM内存可能不足(如下图)

我们如何去查看stm32f103c8t6芯片的ROM、RAM内存

这个是我们创建任务时候自动生成的一个ROM内存和RAM内存

计算stmf103c8t6的大小

内存十六进制十进制(字节)
ROM64K0x1000065536
RAM20K0x500020480

查看程序的内存 

各个参数表示的含义:

Code(代码段)

含义:编译后的机器指令(如函数、逻辑代码)。

存储位置:ROM(只读存储器)。

RO-data(只读数据段)

含义:常量数据(如字符串常量、全局常量数组)。

存储位置:ROM。

RW-data(可读写数据段)

含义:已初始化的全局变量和静态变量。

存储位置:运行时占用RAM空间。

初始值存储在ROM中(程序启动时需加载到RAM)。

ZI-data(零初始化数据段)

含义:未初始化或显式初始化为零的全局变量和静态变量。

存储位置:RAM(程序启动时分配内存并清零)。

ROM需求 = Code + RO-data + RW-data的初始值
RAM需求 = RW-data(运行时占用) + ZI-data

在这里我们可以计算大小

ROM = 12976 (Code)+312 (RO-data)+152 (RW-data)=13440 字节 (≈13.1 KB)

RAM = 152 (RW-data)+23656 (ZI-data)=23808 字节 (≈23.25 KB)  > 20 KB

这里看到我们的一个RAM内存不足

 解决方法

寻找到占用内存比较大的一些调用函数,转换成其他的函数或者其他方式编写或者更换内存更多的芯片

对 Error: L6406E: No space in execution regions with .ANY selector matching xxx 的综合分析 文章目录学习记录遇到问题查看空间空间分析解决问题参考文献 学习记录 在编程的过程中,遇到了下列问题,从此走上了百度的不归路。百度到的信息很多,但比较乱,整理一下,方便后续查阅。 ..\OBJ\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching malloc.o(.bss). 遇到问题 产生的背景原因是把一个RCT6上的程序移植到了C8T6上,由于C8T6空间不够产生报错。 到底是什么 阅读详情

相关推荐

..\Output\led.axf: Error: L6406E: No space in execution regions with .ANY selector matching malloc.o

在malloc.h文件下修改关于mem1内存参数的定义,改小一点,报一堆错误,意思就是没有足够空间。,具体设为多少依个人情况而定。

坏蛋阿土的博客 1万+

编译报错: Error: L6406E: No space in execution regions with .ANY selector matching xx.o(.data).

No space in execution regions with .ANY selector matching xx.o(.data). 当我们的MCU的没有足够RAM空间,因此我们会得到一个这样的错误。可以考虑减小对内存的使用以及增加堆栈空间大小,比如:1、不使用malloc来申请内存,使用全局变量或者静态变量。2、增大堆栈空间大小(根据MCU资源来修改)3、优化一些没有使用到的变量。

weixin_39939185的博客 6891

GD32F303移植UCOSII实战:从原理到代码详解

实时操作系统(RTOS)是嵌入式开发中管理多任务、提升系统可靠性的核心技术,其核心原理在于任务调度、中断管理和资源同步。通过抢占式调度和确定性响应,RTOS能够有效解耦复杂应用逻辑,特别适用于工控、物联网等对实时性要求高的场景。本文以经典的UCOSII实时操作系统为例,结合**GD32F303**微控制器,深入讲解RTOS移植的底层机制与工程实践。内容涵盖Cortex-M4内核的PendSV异常利用、任务上下文切换的汇编实现、以及针对**国产MCU**的资源优化配置,为开发者提供从理论到实战的完整指导,帮助

aoe41606的博客 384

Error: L6406E: No space in execution regions with .ANY selector matching startup_stm32f10x_md.o

Error: L6406E: No space in execution regions with .ANY selector matching startup_stm32f10x_md.o(STACK).

weixin_53944340的博客 7374

Error: L6406E: No space in execution regions with .ANY selector matching tasks.o(.data).解决办法

应该是Flash中堆栈分配不适配,导致.bss段和.data段空间不够导致的。

Yin_w的博客 3473

keil空间不足,L6406E: No space in execution regions with .ANY selector

关于keil空间报错,我总结了一下集中解决方案: 1、有可能是所选主控芯片RAM,ROM真的被用完了,这是需要更换主控芯片 2、keil里面的优化还可以继续优化省出一点空间 下面红色标的选择跟你的主控芯片一样大小的空间数值 3、还可以做如下优化,打开优化等级,优化等级越高程序优化的越多 3、有可能是程序里面的配置出错了,实际上芯片空间没用多少但是编译后报错空间没有了,解决如下,红色标的可以改为0x00000000 ...

zxm8513CSDN博客 2万+

解决方法: No space in execution regions with .ANY selector matching

Error: L6406E: No space in execution regions with .ANY selector matching dunder.o(i.__mathlib_dbl_underflow). 单片机资源受限,出现这种错误,一般可以从以下几个方面进行优化: 第一,增加堆栈空间的大小,修改对应的汇编文件: 第二,修改编译器中的优化等级为O3 第三,去除掉冗余的不需要的库文件,不要编译到工程中,只保留自己需要的外设 如果以上三步还是不行,那么需要进一步的裁减.

sgmcy的专栏 5万+

操作系统期末大题类型题解

额,OS主要这回考程序分析题,PV操作、生产者消费者啊,哲学家进餐问题,死锁问题啊,如何避免死锁,经典银行家算法,页面置换算法啥的,磁盘调度......总计还有很多,就不一一说了 PV操作 谈到PV操作,首先要了解什么是信号量,其实就是用来解决互斥与同步问题的,分为原语wait(S)和signal(S),也就是我们常说的PV操作,在这里给出王道上的概念 wait(S){ while(S>0) S=S-1; } signal(S){ S=S+1; } 记录型信号量

ZXxxiaoxuan的博客 799

Keil 链接错误 Error: L6406E: No space in execution regions with .ANY selector matching

在开发过程当中遇到Keil build错误,检查发现时是链接时出错了。 错误内容为: Error: L6406E: No space in execution regions with .ANY selector matching Error: L6407E: Sections of aggregate size 0x44 bytes could not fit into .ANY sele...

weixin_30482383的博客 3147

iOS开发者必备:从越狱设备里提取IPA的三种方法(含Filza、iTools实战)

本文详细介绍了iOS开发者从越狱设备提取IPA文件的三种实用方法,包括使用Filza文件管理器、AFC2配合桌面工具以及命令行高级技术。内容涵盖环境准备、操作步骤和技术原理,帮助开发者高效获取应用包文件,适用于逆向工程、测试分析等场景。

weixin_28717969的博客 850

Virtuoso集成HspiceD:打通模拟设计全流程的仿真与PEX实战

本文详细介绍了Virtuoso集成HspiceD在模拟设计全流程中的应用,包括仿真与PEX实战。通过无缝衔接Virtuoso和HspiceD,设计师可以在同一环境中完成从原理图设计到PEX后仿真的全流程,大幅提升工作效率。文章还提供了仿真环境配置、前仿真关键设置、PEX全流程详解以及性能调优等实用技巧。

weixin_29271263的博客 99

.axf: Error: L6406E: No space in execution regions with .ANY selector matching hea

这是我在移植freertos时发现的问题,因为我把一个内存大的单片机的示例文件替换到内存小的单片机中,堆栈分配空间不够导致的。由于我这个单片机flash和ram较小,所有需要根据你的实际大小分配堆栈。我尝试大断点debug发现程序进入了硬件错误中断。因为我这个单片机ram只有8k所以我暂时分配5k。如果还是报错请检查你的keil配置。你应该懂我意思吧哈哈。

fh2331的博客 3286

从Zemax到Speos:HUD设计数据无缝迁移避坑指南(含STEP文件精度验证)

本文详细介绍了从Zemax到Speos的HUD设计数据无缝迁移方法,重点解决Zernike曲面参数保真、虚拟厚度设置和坐标系对齐等核心问题。通过STEP文件精度验证和工程化解决方案,帮助工程师避免数据迁移中的常见陷阱,提升HUD系统设计效率。适用于Ansys Zemax和Ansys Speos用户,优化光学性能验证流程。

h6i7j8的博客 1070

STM32 Keil5编译报错: Error: L6406E: No space in execution regions with .ANY......问题

04:ZI-data代表定义了但未初始化的可读写数据,ZI英语是zero initial,就是程序中用到的变量并且被系统初始化为0的变量的字节数,keil编译器默认是把你没有初始化的变量都赋值一个0,这些变量在程序运行时是保存在RAM中的。03:RW-data代表已初始化的读写数据,程序中定义并且初始化的全局变量和静态变量;ROM占用空间:Code + RO-data + RW-data。02:RO-data 代表只读数据,程序中所定义的全局常量数据;01:Code 代表执行的代码,程序中所有的函数;

lin 3973

高级数据结构之R树(R-tree)

R树(R-tree)是一种将B树扩展到多维情况下得到的数据结构,它最初由Antonin Guttman于1984年提出。B树的结点中会存储一个键的集合,这些键把线分成片段,沿着那条线的点仅属于一个片段。因此,B树使得我们可以很容易地找到点。如果把沿线各处的点表示成B树结点,我们就能够确定点所属唯一子结点,在那里可以找到该点。 Antonin Guttman在他提出R树的经典论文中给出的R树例子...

白马负金羁 1万+

C#串口通信革命:RJCP.DLL.SerialPortStream实战全解析

本文介绍了如何通过RJCP.DLL.SerialPortStream库实现高性能串口通信解决方案。相比.NET自带的SerialPort类,该库提供了完全的异步非阻塞IO、动态缓冲区控制和多线程事件驱动等优势,特别适合工业自动化和物联网场景。文章详细讲解了环境搭建、核心功能对比,并通过代码示例展示了端口配置、异步通信管道搭建等关键技术。最后以Modbus RTU协议为例,演示了高级协议封装方法,为开发者提供了完整的工业级串口通信实现方案。

墨夶的博客 1888

Error: L6406E: No space in execution regions with .ANY selector matching lcd.o(.text).片外SRAM编译报错

RT-Thread移植u8g2出现No space in execution regions的分析以及初始化相同优先级线程后第一次调度的机制 better_coder 发布时间 2021.03.09阅读数 659评论数 0 Error: L6406E: No space in execution regions with .ANY selector matching 问题描述 今天往stm32f407的工程里面加入了u8g2这个12864点阵液晶的驱动库的时候,compile编..

二进制模----细微行动改变影响世界 1435

ZooKeeper 实战:使用 Docker Compose 部署 ZooKeeper 集群

ZooKeeper是一个开源的分布式协调服务,用于管理大型分布式系统中的数据。它由Apache软件基金会提供,最初是Hadoop的一个子项目,但后来发展成为一个独立的顶级项目。ZooKeeper提供的一致性协调服务对于构建分布式应用和服务非常重要,特别是在需要精确的领导选举、配置管理、命名服务、分布式同步和提供分布式锁等功能时。

SmartSi 1545

Error: L6406E: No space in execution regions with .ANY selector matching xxx

(1)字库或者图片这种静态数组常量数组太多了,删减或者放Flash,有SD卡放卡里,需要的时候读。实在不行也可以换芯片hhh,用大数组就很容易爆炸,一般放flash够了。在一些情况下不适合使用代码优化,自己注意。(2)有LVGL的,可以把lv_conf.h这个数组改大。点击编译,成功后查看工程目录路径下的map文件。调大IRAM1的Size大小,比实际大小大。太大也不行,太小也不行,自己调整。(3)代码优化等级太低了,调高。

m0_64089565的博客 4946

Docker MySQL 全量+增量定时备份 小白保姆级教程

Linux CentOS / Ubuntu 服务器Docker 容器化部署 MySQL8线上生产库、测试库均适用MYSQL_CONTAINER="mysql8" # 你的Docker MySQL容器名称MYSQL_PWD="Root@123456" # 你的MySQL root账号密码DB_NAME="test_db_a" # 你自己要备份的数据库名称BACKUP_DIR="备份目录路径" # 自定义备份存放路径改完重新授权、手动测试一遍即可。

与海 285

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

No space in execution regions with .ANY selector matching

KEIL编译错误:..\..\Output\Template.axf: Error: L6406E: No space in execution regions with .ANY selector matching htpa32.o(.bss).芯片环境:STM32F103C8T6   64KB+20KB错误原因:使用大数组,导致RAM溢出解决办法:将比较大的常量数组定义成const,也就是放在...

oHuanCheng的博客 3570

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Error: L6406E: No space in execution regions with .ANY selector matching通过map文件缩小代码量

没有link成功的话,map文件虽然会生成 但是只生成了Section Cross References。FLASH中的被占用的空间为:Code + RO Data + RW Data。一般来说没有用的库不会编译到生成代码里面,尽量看变量声明有没有可以减小的空间。可能是某个数组声明太大了,printf函数也可以去掉,尽量根据项目需要修改。不建议 堆栈改小了局部变量多了,函数嵌套过多容易堆栈逸出。自己去看使用的芯片手册的FLASH和RAM是多少。去模仿棒里面把ROM和RAM改大,map文件里面可以看到。

qq_45777875的博客 1062

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

Data-Structures-and-Algorithm-Analysis-in-Java.pdf

作者: Weiss, Mark A. 出版社: Addison Wesley Data Structures and Algorithm Analysis in Java is an “advanced algorithms” book that fits between traditional CS2 and Algorithms Analysis courses. In the old ACM Curriculum Guidelines, this course was known as CS7. This text is for readers who want to learn good programming and algorithm analysis skills simultaneously so that they can develop such programs with the maximum amo...

stm32移植u8g2库内存不足解决办法

而我们常用的字库不过是那一两个,或者某几个特定的字库,所以需要对这两个字库进行瘦身(删除那些不常用的,保留一两个常用的)。另一个u8x8_fonts.c的修改方法也是大同小异的,由于没有内存不足的报错,我也没再去修改它了,可能以后再发生内存不足时我就要对它下手了。直接打开u8g2_fonts.c文件,暂时只保留了u8g2_font_inb24_mf和u8g2_font_wqy12_t_chinese1两个字库。但需要注意,当我们以后需要使用其他字库时,就要将其从移植的源文件中添加进来。

qq_43965022的博客 2974

Error: L6406E: No space in execution regions with .ANY selector matching xxx.o(.xxx).

使用STM32F4的FreeRTOS做项目实验过程中遇到报错:提示内存大小不足以存储当前代码,简单的说就是:芯片的存储空间不够。

l晚安 6523

程序报错: Error: L6406E: No space in execution regions with .ANY selector matching stm32f10x_it.o(i.TAMP

查询Microlib得到:microlib 是缺省 C 库的备选库,microlib 进行了高度优化以使代码变得很小。1.查询后可能是FLASH空间不够,但是设置空间已经开到最大,给的建议是代码优化,优化等级越高,程序优化越多,占用空间就小。更改后程序经常重启,可能是程序写的不够严谨,有些程序优化后不能正常运行。microlib 不提供互斥锁来防止非线程安全的代码。microlib 对 C99 函数提供有限的支持。microlib 不支持与位置无关的代码。microlib 不支持操作系统函数。

D_s123456的博客 2487
上一篇: FreeRTOS静态任务的创建、删除和软件定时器的开启(尚硅谷学习笔记)
下一篇: STMCubeMX使用TB6612驱动编码轮并进行测速
爱学习的小旭
博客等级 码龄3年 302粉丝 24原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址