<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>link error &#8211; richliu&#039;s blog</title>
	<atom:link href="https://richliu.com/tag/link-error/feed/" rel="self" type="application/rss+xml" />
	<link>https://richliu.com</link>
	<description>Linux, 工作, 生活, 家人</description>
	<lastBuildDate>Sat, 25 Feb 2012 13:38:04 +0000</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>KEIL uVersion Link Error</title>
		<link>https://richliu.com/2012/02/15/1197/keil-uversion-link-error/</link>
					<comments>https://richliu.com/2012/02/15/1197/keil-uversion-link-error/#comments</comments>
		
		<dc:creator><![CDATA[richliu]]></dc:creator>
		<pubDate>Tue, 14 Feb 2012 16:56:00 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[keil]]></category>
		<category><![CDATA[link error]]></category>
		<guid isPermaLink="false">https://richliu.com/?p=1197</guid>

					<description><![CDATA[<p>Compile 時最後碰到這個問題. 這是在 C 中去 Link C++ 的 Code 產生的. [TEXT] [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://richliu.com/2012/02/15/1197/keil-uversion-link-error/">KEIL uVersion Link Error</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Compile 時最後碰到這個問題. </p>
<p>這是在 C 中去 Link C++ 的 Code 產生的. </p>
<p>[TEXT]<br />
linking&#8230;<br />
.\Obj\Memory.axf: Error: L6218E: Undefined symbol __aeabi_unwind_cpp_pr0 (referred from array_new.o).<br />
.\Obj\Memory.axf: Error: L6218E: Undefined symbol __rt_new_handler_addr (referred from new.o).<br />
.\Obj\Memory.axf: Error: L6218E: Undefined symbol abort (referred from arm_exceptions_terminate.o).<br />
.\Obj\Memory.axf: Error: L6218E: Undefined symbol __rt_eh_globals_addr (referred from arm_exceptions_globs.o).<br />
Target not created<br />
[/TEXT]</p>
<p>解決方法就是 Option -> Target -> Use MicroLib 關掉. </p>
<p>如果要引入一些標準的 C Library, 也不能使用 MicroLib .<br />
像是要初始化 <a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0349bc/Cihfiabf.html" target="_blank" rel="noopener">Heap , _init_alloc</a> 也是要關掉 MicroLib 的支援. </p>
<p>註:<br />
當使用 malloc 時, 會去 heap 取得一塊 memory 給程式使用, 但是<br />
Keil 本身並沒有 heap 的管理機制, 要指定一塊 memory 給 heap 用.<br />
這時就要先 initial heap, 要使用 _init_alloc 這個 function 才可以 allocate . </p>
<p>Ref.<br />
<a href="http://www.keil.com/arm/microlib.asp" target="_blank" rel="noopener">MicroLib</a></p>
<p>The post <a rel="nofollow" href="https://richliu.com/2012/02/15/1197/keil-uversion-link-error/">KEIL uVersion Link Error</a> appeared first on <a rel="nofollow" href="https://richliu.com">richliu&#039;s blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://richliu.com/2012/02/15/1197/keil-uversion-link-error/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
	</channel>
</rss>
