<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>LPC MicrocontrollersのトピックRe: Extern variables (OscRateIn and RTCOscRateIn) not set in board.h</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686668#M27661</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="296551" data-username="d.m." href="https://community.nxp.com/people/d.m."&gt;David Meignan&lt;/A&gt; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: inherit; font-size: 15px; line-height: 1.5;"&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff; font-size: 15px;"&gt;the opportunity to serve you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;According to your statement, I got that the original project would change after copy/paste operation, whether my consideration is right.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt;Have a great day,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt;TIC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Jun 2017 04:23:19 GMT</pubDate>
    <dc:creator>jeremyzhou</dc:creator>
    <dc:date>2017-06-15T04:23:19Z</dc:date>
    <item>
      <title>Extern variables (OscRateIn and RTCOscRateIn) not set in board.h</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686667#M27660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a "linker" problem in a project that use the LPCOpen board configuration (board.c and board.h) on a LPC11U6X.&lt;/P&gt;&lt;P&gt;The physical setup:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Custom PCB with a LPC11U6X chip, and a design very close to the OM13058 LPC Xpresso v2 (Rev C) board (based on LPC11U68).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;IDE/firmware setup:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I am using&amp;nbsp;MCUXpresso IDE v10.0.0 [Build 344] [2017-03-21],&lt;/LI&gt;&lt;LI&gt;I already tested with success different project examples from LPCOpen (v3.01), and different custom tests, (all using the "LPC board library" included with &lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;#include "board.h"&lt;/SPAN&gt;)&lt;/LI&gt;&lt;LI&gt;I started the development of a firmware with a copy/paste from the blinky example:&lt;UL&gt;&lt;LI&gt;As for LPCOpen projects, the "custom_firmware" project includes and is linked to "lpc_board_nxp_lpcxpresso_11u68" and "lpc_chip_11u6x" projects (in the same workspace),&lt;/LI&gt;&lt;LI&gt;I included "board.h" in my main file to use the base configuration (pin muxing, clock, IO) of the LPCXpresso11U68,&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The problem:&lt;/P&gt;&lt;P&gt;Everything works fine until I start working with extern variables defined for the board or chip (e.g. IRQ handler). For no apparent reason, the linker raise two errors:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;liblpc_chip_11u6x.a(clock_11u6x.o): In function `Chip_Clock_GetMainOscRate':&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;clock_11u6x.h:518: undefined reference to `OscRateIn'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;liblpc_chip_11u6x.a(clock_11u6x.o): In function `Chip_Clock_GetRTCOscRate':&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;clock_11u6x.h:536: undefined reference to `RTCOscRateIn'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;The two variables "&lt;SPAN&gt;OscRateIn&lt;/SPAN&gt;" and "&lt;SPAN&gt;RTCOscRateIn&lt;/SPAN&gt;" are extern in "chip.h" , and defined in "board.c":&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;const uint32_t OscRateIn = 12000000;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;const uint32_t RTCOscRateIn = 32768;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Since I include "board.h", I see no reason that these variables are considered as not defined. For the moment (as a quick fix) I added the definition of the two variables in my main file, but I am afraid that there is a larger problem, and I am not sure if the board configuration is really taken into account or if the default chip configuration is used instead.&lt;/P&gt;&lt;P&gt;Thanks for your help,&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jun 2017 15:30:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686667#M27660</guid>
      <dc:creator>d_m_</dc:creator>
      <dc:date>2017-06-14T15:30:54Z</dc:date>
    </item>
    <item>
      <title>Re: Extern variables (OscRateIn and RTCOscRateIn) not set in board.h</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686668#M27661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="296551" data-username="d.m." href="https://community.nxp.com/people/d.m."&gt;David Meignan&lt;/A&gt; ,&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: inherit; font-size: 15px; line-height: 1.5;"&gt;Thank you for your interest in NXP Semiconductor products and&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="color: #000000; font-family: 微软雅黑; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; font-size: 16px; line-height: 1.5; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff; font-size: 15px;"&gt;the opportunity to serve you.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;According to your statement, I got that the original project would change after copy/paste operation, whether my consideration is right.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt;Have a great day,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt;TIC&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 15px;"&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2017 04:23:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686668#M27661</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-06-15T04:23:19Z</dc:date>
    </item>
    <item>
      <title>Re: Extern variables (OscRateIn and RTCOscRateIn) not set in board.h</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686669#M27662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Jeremy,&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;jeremyzhou wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;According to your statement, I got that the original project would change after copy/paste operation, whether my consideration is right.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Yes you're right. I reproduce this with a very simple example code.&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Copy/paste the blinky example project "demos_switch_blinky",&lt;/LI&gt;&lt;LI&gt;Modification of the main file "switch_blinky.c" with the following code (BTW, any option for formatted code in the post editor?):&lt;/LI&gt;&lt;/OL&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;/** Simple template with 1ms timer */&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;// For reusing clock configuration and pin-muxing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;#include "board.h"&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;// Timer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;#define TIMER_PRESCALE_2KHZ (0x5DC0)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;// Function declarations&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;void setup_1ms_timer();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;void start_1ms_timer();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;void stop_1ms_timer();&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;/** Handle interrupt from 16-bit timer 0 */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;void TIMER16_0_IRQHandler(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; static uint16_t counter_500ms = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; if (Chip_TIMER_MatchPending(LPC_TIMER16_0, 1)) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; // 1ms tick&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; Chip_TIMER_ClearMatch(LPC_TIMER16_0, 1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; // Process 1ms&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; //...&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;// Pseudo-timer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; if (counter_500ms &amp;gt;= 500) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; // 500ms tick&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; counter_500ms = 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; // Process 500ms&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; // ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; } else {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; counter_500ms++;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;/** Setup 1ms timer */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;void setup_1ms_timer() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; /* Initialize 16-bit timer 0 clock */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; Chip_TIMER_Init(LPC_TIMER16_0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; /* Timer setup for match and interrupt at TICKRATE_HZ */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; Chip_TIMER_Reset(LPC_TIMER16_0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; /* Enable timer to generate interrupts when time matches */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; Chip_TIMER_MatchEnableInt(LPC_TIMER16_0, 1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; /* Setup prescale value on 16-bit timer to extend range */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; Chip_TIMER_PrescaleSet(LPC_TIMER16_0, TIMER_PRESCALE_2KHZ);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; /* Setup 16-bit timer's duration (16-bit match time) */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; Chip_TIMER_SetMatch(LPC_TIMER16_0, 1, 0x0001);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; /* Setup timer to restart when match occurs */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; Chip_TIMER_ResetOnMatchEnable(LPC_TIMER16_0, 1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; /* Clear both timers of any pending interrupts */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; NVIC_ClearPendingIRQ(TIMER_16_0_IRQn);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; /* Enable timer interrupts */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; NVIC_EnableIRQ(TIMER_16_0_IRQn);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;/** Starts the 1ms timer */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;void start_1ms_timer() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; /* Reset timer counts */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; Chip_TIMER_Reset(LPC_TIMER16_0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; /* Clear match interrupt */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; Chip_TIMER_ClearMatch(LPC_TIMER16_0, 1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; /* Start timer */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; Chip_TIMER_Enable(LPC_TIMER16_0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;/**&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; * Stops 1ms timer */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;void stop_1ms_timer() {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; /* Stop timer */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; Chip_TIMER_Disable(LPC_TIMER16_0);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;/** Main routine */&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;int main(void)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; SystemCoreClockUpdate();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; // Initialize GPIO (and set system clock)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; Chip_GPIO_Init(LPC_GPIO);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;while (1) {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; __WFI();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; // Process after interrupt routine&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; // ...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt; return 0;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I expect that the "sysinit.c" procedure do the board config with no problem but I have the following error:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;13:07:04 **** Incremental Build of configuration Debug for project copy_demos_switch_blinky ****&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;make -r -j4 all &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;Building file: ../src/switch_blinky.c&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;Invoking: MCU C Compiler&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;arm-none-eabi-gcc -D__REDLIB__ -DDEBUG -D__CODE_RED -D__USE_LPCOPEN -DCORE_M0PLUS -D__USE_ROMDIVIDE -I"D:\MCUXpresso_LPCOpen_workspace\lpc_chip_11u6x\inc" -I"D:\MCUXpresso_LPCOpen_workspace\lpc_board_nxp_lpcxpresso_11u68\inc" -O0 -g3 -Wall -c -fmessage-length=0 -fno-builtin -ffunction-sections -fdata-sections -mcpu=cortex-m0 -mthumb -D__REDLIB__ -specs=redlib.specs -MMD -MP -MF"src/switch_blinky.d" -MT"src/switch_blinky.o" -MT"src/switch_blinky.d" -o "src/switch_blinky.o" "../src/switch_blinky.c"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;Finished building: ../src/switch_blinky.c&lt;/SPAN&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;Building target: copy_demos_switch_blinky.axf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;Invoking: MCU Linker&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;arm-none-eabi-gcc -nostdlib -L"D:\MCUXpresso_LPCOpen_workspace\lpc_chip_11u6x\Debug" -L"D:\MCUXpresso_LPCOpen_workspace\lpc_board_nxp_lpcxpresso_11u68\Debug" -Xlinker -Map="copy_demos_switch_blinky.map" -Xlinker --gc-sections -Xlinker --allow-multiple-definition -mcpu=cortex-m0 -mthumb -T "demos_switch_blinky_Debug.ld" -o "copy_demos_switch_blinky.axf" ./src/cr_startup_lpc11u6x.o ./src/crp.o ./src/switch_blinky.o ./src/sysinit.o -llpc_board_nxp_lpcxpresso_11u68 -llpc_chip_11u6x&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;D:\MCUXpresso_LPCOpen_workspace\lpc_chip_11u6x\Debug\liblpc_chip_11u6x.a(clock_11u6x.o): In function `Chip_Clock_GetMainOscRate':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;D:\MCUXpresso_workspace\lpc_chip_11u6x\inc/clock_11u6x.h:518: undefined reference to `OscRateIn'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;D:\MCUXpresso_LPCOpen_workspace\lpc_chip_11u6x\Debug\liblpc_chip_11u6x.a(clock_11u6x.o): In function `Chip_Clock_GetRTCOscRate':&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;D:\MCUXpresso_workspace\lpc_chip_11u6x\inc/clock_11u6x.h:536: undefined reference to `RTCOscRateIn'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;collect2.exe: error: ld returned 1 exit status&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace; font-size: 13px;"&gt;make: *** [copy_demos_switch_blinky.axf] Error 1&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jun 2017 11:08:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686669#M27662</guid>
      <dc:creator>d_m_</dc:creator>
      <dc:date>2017-06-15T11:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extern variables (OscRateIn and RTCOscRateIn) not set in board.h</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686670#M27663</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A _jive_internal="true" class="" data-content-finding="Community" data-userid="296551" data-username="d.m." href="https://community.nxp.com/people/d.m."&gt;David M.&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;I'd like to exemplify the steps of fix the error message.&lt;/P&gt;&lt;P&gt;1. First, I just use your code to replace the original code directly, the error happened as you mentioned before.&lt;/P&gt;&lt;P&gt;2. I think it must be something wrong, even I didn't figure it out, so I used another way to replace the code: insert the new codes bit by bit, the error doesn't happen again. It's a little weird.&lt;/P&gt;&lt;P&gt;Please have try.&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2017-06-16_10-46-24.jpg"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/22381i3A2725197102D1F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="2017-06-16_10-46-24.jpg" alt="2017-06-16_10-46-24.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jun 2017 02:48:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686670#M27663</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2017-06-16T02:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Extern variables (OscRateIn and RTCOscRateIn) not set in board.h</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686671#M27664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;@jeremyzhou Thanks for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I found the reason of the behavior I described. In fact, since I am not calling “Board_Init” or another function in “board.c” (I don’t need the debug and LED initialization and call directly “Chip_GPIO_Init(LPC_GPIO);”), the file “board.c” is not considered as a required unit in the compilation procedure. Therefore, “board.c” is not compiled and definitions of “OscRateIn” and “RTCOscRateIn” in “board.c” are not considered.&lt;/P&gt;&lt;P&gt;In fact, as I am only interested in clock and pin configuration from the board, I can simply:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;(Don’t include of “board.h” in my main file),&lt;/LI&gt;&lt;LI&gt;Define “OscRateIn” and “RTCOscRateIn” in my main file,&lt;/LI&gt;&lt;LI&gt;Use the “sysinit.c” that calls “Board_SystemInit();”,&lt;/LI&gt;&lt;LI&gt;Call “SystemCoreClockUpdate(); Chip_GPIO_Init(LPC_GPIO);” at the beginning of the main procedure.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;+&lt;BR /&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Jun 2017 14:15:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686671#M27664</guid>
      <dc:creator>d_m_</dc:creator>
      <dc:date>2017-06-20T14:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Extern variables (OscRateIn and RTCOscRateIn) not set in board.h</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686672#M27665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think know this kind of error. Have you tried to disable the usage of the board lib in the project settings?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In MCU XPresso (or older) go to&lt;/P&gt;&lt;P style="color: #3f7f5f; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;"Edit project settings" / "C/C++ Build" / "Settings" / "Tool Settings" Tab / "MCU C Compiler" / "Preprocessor"&lt;/P&gt;&lt;P style="color: #3f7f5f; margin: 0.0px 0.0px 0.0px 0.0px;"&gt;Add Symbol "NO_BOARD_LIB" in Debug AND/OR Release mode, whatever you need.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d;"&gt;Now the whole board.h branch should be disabled and the chip library is doing the rest.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;If you look into the code of the libs then you'll see that "&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;OscRateIn” and “RTCOscRateIn” will be excluded if&amp;nbsp;&lt;BR /&gt;&lt;SPAN style="color: #3f7f5f;"&gt;NO_BOARD_LIB&amp;nbsp;&lt;SPAN style="color: #3d3d3d;"&gt;is defined.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #3d3d3d; "&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #3d3d3d; "&gt;Jack&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jan 2019 12:06:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686672#M27665</guid>
      <dc:creator>baltobor</dc:creator>
      <dc:date>2019-01-29T12:06:04Z</dc:date>
    </item>
    <item>
      <title>Re: Extern variables (OscRateIn and RTCOscRateIn) not set in board.h</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686673#M27666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Indeed a better solution to set "NO_BOARD_LIB" or switch to Release mode.&lt;/P&gt;&lt;P&gt;Thanks for the comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2019 10:48:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Extern-variables-OscRateIn-and-RTCOscRateIn-not-set-in-board-h/m-p/686673#M27666</guid>
      <dc:creator>d_m_</dc:creator>
      <dc:date>2019-03-15T10:48:56Z</dc:date>
    </item>
  </channel>
</rss>

