<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Question about to serial C files in the demo project from LPC2138 NXP</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/34442/question-about-to-serial-c-files-in-the-demo-project-from-lpc2138-nxp</link><description> 
I am trying to run the NXP LPC2138 UART sample bundle code. I was
having trouble since there is 
a serial.c and a retarget.c file. If I added them both into a project
I would get a error because both files have sendchar functions and
they conflict.</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Question about to serial C files in the demo project from LPC2138 NXP</title><link>https://community.arm.com/thread/93451?ContentTypeID=1</link><pubDate>Tue, 09 Jun 2015 19:57:51 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:53c375f4-2ec0-4a57-b306-d627aedd2da7</guid><dc:creator>Westonsupermare Pier</dc:creator><description>&lt;p&gt;&lt;p&gt;
retarget.c deals with the software hosting for the console STDIO,
which could use serial or SWV, etc. It replaces code that the &amp;quot;OS&amp;quot;
would provide via SWI which you don&amp;#39;t have, and has the #pragma to
tell the compiler/linker it&amp;#39;s going to replace that.&lt;/p&gt;

&lt;p&gt;
serial.c deals with the specific hardware you want the IO to go
through, on a specific chip, on a specific board&lt;/p&gt;

&lt;p&gt;
I condense this into a single block of code in my main.c, but
there are dozens of ways to do it. If you have multiple definitions
in your code, you should evaluate why you need the routines outside
of serial.c, and whether you duplicating the same code, or outputting
data some place else. This would need to be a judgement call on your
part.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Question about to serial C files in the demo project from LPC2138 NXP</title><link>https://community.arm.com/thread/63806?ContentTypeID=1</link><pubDate>Tue, 09 Jun 2015 18:49:13 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0af6373d-9199-4f11-b6bd-c92693171003</guid><dc:creator>John Linq</dc:creator><description>&lt;p&gt;&lt;p&gt;
Serial.c uses UART1. Retarget.c uses UART0.&lt;br /&gt;
int main (void) enables and disables the interrupt of UART0.&lt;/p&gt;

&lt;p&gt;
I believe Retarget.c is for something like this:&lt;br /&gt;
&lt;a href="http://www.keil.com/uvision/db_sim_prf_uart.asp"&gt;http://www.keil.com/uvision/db_sim_prf_uart.asp&lt;/a&gt;&lt;br /&gt;

A Serial Window in uVision.&lt;/p&gt;

&lt;p&gt;
Serial.c is for common serial communication.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>