Error: L6218E: Undefined symbol 系列错误汇总 (referred from main.o)

keil 5 : Error: L6218E: Undefined symbol 问题解决方法小记 最近学习嵌入式开发,因项目框架较大,部分内容改动,在将别人单独写的串口读取数据源码添加到工程中后,编译出现以下问题: 通过查询资料,都是在说未定义引下的错误。 回头检查项目,源文件加入到工程,头文件也已包含。而后多次尝试编译,未果;关闭重启,亦未果。。。 询求正点原子技术支持,远程协助,还是未能解决。。。 编译通不过,调试无法进行,苦恼一天。。。。 后来,多次将源文件多项目中删除后重... 阅读详情
AI摘要

本文讲述了在STM32开发过程中遇到的三种链接器错误,包括函数未定义(如LED_GPIO_Init)、使用两个区域内存的错误以及HAL_RCC_GPIOB_CLK_ENABLE函数的引用问题。作者分享了解决这些问题的方法,提醒开发者注意函数命名规范和清理项目以避免低级错误。,

错误1: Undefined symbol(referred from main.o)

Cube_GPIO\Cube_GPIO.axf: Error: L6218E: Undefined symbol LED_GPIO_Init (referred from main.o).

在这里插入图片描述
问题背景:写了一个bsp_led.c 和bsp_led.h文件, 结果总是出现以下错误, bsp_led.c中的函数无法跳转、也没有代码提示。把错误复制到ChatGPT上问了一下:

在这里插入图片描述
大致是bsp_led.c中的“LED_GPIO_Init”函数在main中调用了,但确找不到这个符号,因此该文件中会出现函数右键无法跳转、无代码提示,因为bsp_led.c这个文件压根没出现在工程中。

解决方法:因为忘记添加 bsp_led.c了!!!!!!!就那么狗血的问题困扰我半小时!!!艹

Error: L6218E: Undefined symbol main (referred from entry9a.o). Error: L6218E: Undefined symbol main (referred from entry9a.o). Error: L6218E: Undefined symbol main (referred from rtentry2.o). 新手建立keil工程文件时出现main未定义出现上述错误; 1.如果main函数书写时出错,把main写mian,会出现 阅读详情

相关推荐

解决错误提示:Error: L6218E: Undefined symbol xQueueCreateMutex (referred from main.o).的方法

今天继续来分享一个关于FreeRTOS学习实践过程中遇到的一个错误。其实这个错误也是由于宏定义定义不对造成的,只是这次出现的错误提示多了一些其他说明。话不多说,我们先来看一下吧。 我们可以看到上面第一条的错误其实跟上一篇文章那三个错误一样,就是由于编译器在链接时候找不到该函数。但是这次仔细看下面还有两条提示,其大致意思就是你提供的信息太少,找不到相应的函数,可能看到这里会不太明白。我们下面讲了你就会明白,编译器为什么这么提示你。我们可以先从这个函数xQueueCreateMutex着手,从我们的工程中直接搜

OMGMac的博客 3105

..\OBJ\NRF24L01.axf: Error: L6218E: Undefined symbol IWDG_ReloadCounter (referred from main.o).

*** Using Compiler 'V5.06 update 5 (build 528)', folder: 'D:\Keil_v5\ARM\ARMCC\Bin' Build target 'LoRa' linking... ..\OBJ\NRF24L01.axf: Error: L6218E: Undefined symbol IWDG_ReloadCounter (referred fro...

qq_34287529的博客 3727

Keil报错L6218E Undefined symbol的成因与排查指南

在嵌入式开发中,编译器和链接器是两个关键但常被混淆的阶段。编译器负责将源码转为目标文件,而链接器则负责组合所有模块并解析符号引用。当链接器找不到某个函数或变量的实现时,就会抛出Undefined symbol错误。在Keil MDK环境下,L6218E是此类链接错误的典型代表,常见于工程管理疏漏,如源文件未加入工程、函数声明与定义不一致等。无论是STM32、AT32还是FreeRTOS项目,理解这一错误背后的链接机制都至关重要。本文以Delay函数未定义为例,系统分析L6218E的常见原因,提供实用的排查流

weixin_33866037的博客 625

用CentOS 7安装cadence搭建适合IC Design的科研环境(四)——IC617、MMSIM151、calibre2015安装过程step by step

以下操作都在root权限下执行。建立安装目录建议把这种大型软件装在/opt目录下。mkdir -p /opt/cadence/installscape mkdir -p /opt/mentor/Calibre2015其中-p参数是直接建立父目录。因为IC617和MMISM151会自己建立安装目录,所以在这里没有建相关目录。而calibre则是默认安装在安装包所在的目录下,所以需要提前建立。解压安

maxwell2ic的博客 7万+

Win11 24H2家庭版共享打印机失败?别慌,一个批处理脚本搞定所有设置

本文提供了Win11 24H2家庭版共享打印机失败的解决方案,通过一个批处理脚本自动修复所有设置问题。脚本包含安装组策略组件、修改关键注册表项等操作,帮助用户快速恢复打印机共享功能,适用于普通家庭用户。

weixin_30632089的博客 454

超声信号处理——硬件电路中的混频应用

本文介绍了超声多普勒系统的信号处理原理。系统通过波形振荡器产生高频信号,经换能器转换为超声波发射,接收反射信号后与原始信号混频,利用三角函数的积化和差特性产生包含多普勒频移的低频差频信号和高频和频信号。通过低通滤波器滤除高频成分后,即可获得纯净的多普勒信号。这种处理方法将MHz级高频信号转换为可听低频信号,降低了系统复杂度与成本。数学推导表明,差频信号频率正好

fcxgfdjy的博客 1133

微带T型一分四功分器HFSS仿真与实物制作教程

本文介绍了使用HFSS软件进行微带T型一分四功分器的仿真与使用国产立创EDA软件将HFSS仿真文件转为PCB可加工文件的方法

qq_52127343的博客 2万+

【QEMU系统分析之TPM篇(一)】

本文以 QEMU 8.2.2 为例,分析其 TPM-emulator 模块的实现,并为 QEMU 添加 Windows 平台的TPM 模拟器的支持。

David唐辉的博客 1198

Vue 10分钟入门VR全景显示 基于photo-sphere-viewer

文章目录前言一、引入photo-sphere-viewer?二、使用步骤1.引入库2.声明容器3.内容加载4.全部代码总结 前言 由于工作的需求,要实现全景图片的展示与预览,本来以为会是一个很难的内容,没想到使用现成的组件photo-sphere-viewer就可以轻松实现,上手只需要10分钟! 一、引入photo-sphere-viewer? 可以直接通过npm进行引入 npm install photo-sphere-viewer 二、使用步骤 1.引入库 photo-sphere-viewer

YIGE_MO的博客 5883

直流母线电压采集与缓冲调理电路

本文介绍了一种直流母线电压采集与缓冲调理电路的设计与应用。该电路通过电阻分压网络将高压直流母线电压降至适合ADC采样的范围,并采用运放电压跟随器实现高输入阻抗和低输出阻抗的缓冲功能,有效提高采样精度和抗干扰能力。文章重点阐述了低输出阻抗对驱动负载、抗干扰和电压稳定的重要性,并列举了该电路在工业电源监测、电动汽车BMS、通信电源和储能系统等领域的典型应用场景。

qq_37999850的博客 328

全国职业技能大赛网络安全-金砖技能大赛——应急响应内存镜像分析(超详细解析)

4.从内存文件中找到异常程序植入到系统的开机自启痕迹,使用Volatility工具分析出异常程序在注册表中植入的开机自启项的Virtual地址,将Virtual地址作为Flag值提交;DLL dlllist -p 查看一下这个进程的查看一下这个进程的DLL,发现程序是在temp目录下执行的,那这个应该就是恶意软件进程了。5.从内存文件中找到异常程序植入到系统的开机自启痕迹,将启动项最后一次更新的时间作为Flag值(只提交年月日,例如:20210314)提交。

Jay 2533

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...

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

lwip-2.0.3

lwip是瑞典计算机科学院(SICS)的Adam Dunkels 开发的一个小型开源的TCP/IP协议栈。实现的重点是在保持TCP协议主要功能的基础上减少对RAM 的占用。

深度学习工具包 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")

上一篇: Git初学入门指令
下一篇: git如何关联远程分支并推送更新
喵汪wow
博客等级 码龄7年 312粉丝 63原创
评论 6
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

喵汪wow

您的支持是我更新创作的动力!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值