<?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>MCUXpresso IDEのトピックRe: invalid character '#' when compiling</title>
    <link>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771478#M2364</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The error is reported in the linker script (.ld file). not your C source file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Feb 2018 09:06:55 GMT</pubDate>
    <dc:creator>thefallguy</dc:creator>
    <dc:date>2018-02-26T09:06:55Z</dc:date>
    <item>
      <title>invalid character '#' when compiling</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771477#M2363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When trying to compile this simple code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#include "mbed.h"&lt;/P&gt;&lt;P&gt;DigitalOut myled(LED1);&lt;BR /&gt;nt main() {&lt;BR /&gt; while(1) {&lt;BR /&gt; myled = 1;&lt;BR /&gt; wait(0.2);&lt;BR /&gt; myled = 0;&lt;BR /&gt; wait(0.2);&lt;BR /&gt; }&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;P&gt;d:/nxp/mcuxpressoide_10.1.1_606/ide/tools/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe:C:\Users\Johannes\Documents\MCUXpressoIDE_10.1.1_606\workspace\JCBTest1\mbed\TARGET_LPC1768\TOOLCHAIN_GCC_ARM\LPC1768.ld:2: ignoring invalid character `#' in expression&lt;BR /&gt;d:/nxp/mcuxpressoide_10.1.1_606/ide/tools/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe:C:\Users\Johannes\Documents\MCUXpressoIDE_10.1.1_606\workspace\JCBTest1\mbed\TARGET_LPC1768\TOOLCHAIN_GCC_ARM\LPC1768.ld:2: syntax error&lt;BR /&gt;collect2.exe: error: ld returned 1 exit status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas on why?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Feb 2018 23:26:35 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771477#M2363</guid>
      <dc:creator>johannesheupel</dc:creator>
      <dc:date>2018-02-25T23:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: invalid character '#' when compiling</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771478#M2364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The error is reported in the linker script (.ld file). not your C source file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Feb 2018 09:06:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771478#M2364</guid>
      <dc:creator>thefallguy</dc:creator>
      <dc:date>2018-02-26T09:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: invalid character '#' when compiling</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771479#M2365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="314049" data-username="johannesheupel" href="https://community.nxp.com/people/johannesheupel"&gt;Johannes Heupel&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Yes, as Fall Guy said, pleaes check the file of LPC1768.ld.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&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>Tue, 27 Feb 2018 02:56:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771479#M2365</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2018-02-27T02:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: invalid character '#' when compiling</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771480#M2366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks but I guess I am not seeing anything wrong. Does the compiler not understand #if or # define statements???&lt;/P&gt;&lt;P&gt;I even took out the first 6 lines, yet I still get the error WITHOUT any # sign in the .ld file....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the original LPC1768.ld content:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Linker script for mbed LPC1768 */&lt;BR /&gt;#if !defined(MBED_APP_START)&lt;BR /&gt; #define MBED_APP_START 0x00000000&lt;BR /&gt;#endif&lt;/P&gt;&lt;P&gt;#if !defined(MBED_APP_SIZE)&lt;BR /&gt; #define MBED_APP_SIZE 512K&lt;BR /&gt;#endif&lt;BR /&gt;/* Linker script to configure memory regions. */&lt;BR /&gt;MEMORY&lt;BR /&gt;{&lt;BR /&gt; FLASH (rx) : ORIGIN = MBED_APP_START, LENGTH = MBED_APP_SIZE&lt;BR /&gt; RAM (rwx) : ORIGIN = 0x100000C8, LENGTH = (32K - 0xC8 - 32) /* topmost 32 bytes used by IAP functions */&lt;/P&gt;&lt;P&gt;USB_RAM(rwx) : ORIGIN = 0x2007C000, LENGTH = 16K&lt;BR /&gt; ETH_RAM(rwx) : ORIGIN = 0x20080000, LENGTH = 16K&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Linker script to place sections and symbol values. Should be used together&lt;BR /&gt; * with other linker script that defines memory regions FLASH and RAM.&lt;BR /&gt; * It references following symbols, which must be defined in code:&lt;BR /&gt; * Reset_Handler : Entry of reset handler&lt;BR /&gt; * &lt;BR /&gt; * It defines following symbols, which code can use without definition:&lt;BR /&gt; * __exidx_start&lt;BR /&gt; * __exidx_end&lt;BR /&gt; * __etext&lt;BR /&gt; * __data_start__&lt;BR /&gt; * __preinit_array_start&lt;BR /&gt; * __preinit_array_end&lt;BR /&gt; * __init_array_start&lt;BR /&gt; * __init_array_end&lt;BR /&gt; * __fini_array_start&lt;BR /&gt; * __fini_array_end&lt;BR /&gt; * __data_end__&lt;BR /&gt; * __bss_start__&lt;BR /&gt; * __bss_end__&lt;BR /&gt; * __end__&lt;BR /&gt; * end&lt;BR /&gt; * __HeapLimit&lt;BR /&gt; * __StackLimit&lt;BR /&gt; * __StackTop&lt;BR /&gt; * __stack&lt;BR /&gt; */&lt;BR /&gt;ENTRY(Reset_Handler)&lt;/P&gt;&lt;P&gt;SECTIONS&lt;BR /&gt;{&lt;BR /&gt; .text :&lt;BR /&gt; {&lt;BR /&gt; KEEP(*(.isr_vector))&lt;BR /&gt; /* Code Read Protect data */&lt;BR /&gt; . = 0x000002FC ;&lt;BR /&gt; KEEP(*(.CRPSection))&lt;BR /&gt; /* End of Code Read Protect */&lt;BR /&gt; *(.text*)&lt;/P&gt;&lt;P&gt;KEEP(*(.init))&lt;BR /&gt; KEEP(*(.fini))&lt;/P&gt;&lt;P&gt;/* .ctors */&lt;BR /&gt; *crtbegin.o(.ctors)&lt;BR /&gt; *crtbegin?.o(.ctors)&lt;BR /&gt; *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors)&lt;BR /&gt; *(SORT(.ctors.*))&lt;BR /&gt; *(.ctors)&lt;/P&gt;&lt;P&gt;/* .dtors */&lt;BR /&gt; *crtbegin.o(.dtors)&lt;BR /&gt; *crtbegin?.o(.dtors)&lt;BR /&gt; *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors)&lt;BR /&gt; *(SORT(.dtors.*))&lt;BR /&gt; *(.dtors)&lt;/P&gt;&lt;P&gt;*(.rodata*)&lt;/P&gt;&lt;P&gt;KEEP(*(.eh_frame*))&lt;BR /&gt; &lt;BR /&gt; &lt;BR /&gt; } &amp;gt; FLASH&lt;/P&gt;&lt;P&gt;.ARM.extab : &lt;BR /&gt; {&lt;BR /&gt; *(.ARM.extab* .gnu.linkonce.armextab.*)&lt;BR /&gt; } &amp;gt; FLASH&lt;/P&gt;&lt;P&gt;__exidx_start = .;&lt;BR /&gt; .ARM.exidx :&lt;BR /&gt; {&lt;BR /&gt; *(.ARM.exidx* .gnu.linkonce.armexidx.*)&lt;BR /&gt; } &amp;gt; FLASH&lt;BR /&gt; __exidx_end = .;&lt;/P&gt;&lt;P&gt;__etext = .;&lt;BR /&gt; &lt;BR /&gt; .data : AT (__etext)&lt;BR /&gt; {&lt;BR /&gt; __data_start__ = .;&lt;BR /&gt; Image$$RW_IRAM1$$Base = .;&lt;BR /&gt; *(vtable)&lt;BR /&gt; *(.data*)&lt;/P&gt;&lt;P&gt;. = ALIGN(4);&lt;BR /&gt; /* preinit data */&lt;BR /&gt; PROVIDE (__preinit_array_start = .);&lt;BR /&gt; KEEP(*(.preinit_array))&lt;BR /&gt; PROVIDE (__preinit_array_end = .);&lt;/P&gt;&lt;P&gt;. = ALIGN(4);&lt;BR /&gt; /* init data */&lt;BR /&gt; PROVIDE (__init_array_start = .);&lt;BR /&gt; KEEP(*(SORT(.init_array.*)))&lt;BR /&gt; KEEP(*(.init_array))&lt;BR /&gt; PROVIDE (__init_array_end = .);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; . = ALIGN(4);&lt;BR /&gt; /* finit data */&lt;BR /&gt; PROVIDE (__fini_array_start = .);&lt;BR /&gt; KEEP(*(SORT(.fini_array.*)))&lt;BR /&gt; KEEP(*(.fini_array))&lt;BR /&gt; PROVIDE (__fini_array_end = .);&lt;/P&gt;&lt;P&gt;. = ALIGN(4);&lt;BR /&gt; /* All data end */&lt;BR /&gt; __data_end__ = .;&lt;/P&gt;&lt;P&gt;} &amp;gt; RAM&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; .bss :&lt;BR /&gt; {&lt;BR /&gt; __bss_start__ = .;&lt;BR /&gt; *(.bss*)&lt;BR /&gt; *(COMMON)&lt;BR /&gt; __bss_end__ = .;&lt;BR /&gt; Image$$RW_IRAM1$$ZI$$Limit = . ;&lt;BR /&gt; } &amp;gt; RAM&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; .heap :&lt;BR /&gt; {&lt;BR /&gt; __end__ = .;&lt;BR /&gt; end = __end__;&lt;BR /&gt; *(.heap*)&lt;BR /&gt; __HeapLimit = .;&lt;BR /&gt; } &amp;gt; RAM&lt;/P&gt;&lt;P&gt;/* .stack_dummy section doesn't contains any symbols. It is only&lt;BR /&gt; * used for linker to calculate size of stack sections, and assign&lt;BR /&gt; * values to stack symbols later */&lt;BR /&gt; .stack_dummy :&lt;BR /&gt; {&lt;BR /&gt; *(.stack)&lt;BR /&gt; } &amp;gt; RAM&lt;/P&gt;&lt;P&gt;/* Set stack top to end of RAM, and stack limit move down by&lt;BR /&gt; * size of stack_dummy section */&lt;BR /&gt; __StackTop = ORIGIN(RAM) + LENGTH(RAM);&lt;BR /&gt; __StackLimit = __StackTop - SIZEOF(.stack_dummy);&lt;BR /&gt; PROVIDE(__stack = __StackTop);&lt;BR /&gt; &lt;BR /&gt; /* Check if data + heap + stack exceeds RAM limit */&lt;BR /&gt; ASSERT(__StackLimit &amp;gt;= __HeapLimit, "region RAM overflowed with stack")&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; /* Code can explicitly ask for data to be &lt;BR /&gt; placed in these higher RAM banks where&lt;BR /&gt; they will be left uninitialized. &lt;BR /&gt; */&lt;BR /&gt; .AHBSRAM0 (NOLOAD):&lt;BR /&gt; {&lt;BR /&gt; Image$$RW_IRAM2$$Base = . ;&lt;BR /&gt; *(AHBSRAM0)&lt;BR /&gt; Image$$RW_IRAM2$$ZI$$Limit = .;&lt;BR /&gt; } &amp;gt; USB_RAM&lt;/P&gt;&lt;P&gt;.AHBSRAM1 (NOLOAD):&lt;BR /&gt; {&lt;BR /&gt; Image$$RW_IRAM3$$Base = . ;&lt;BR /&gt; *(AHBSRAM1)&lt;BR /&gt; Image$$RW_IRAM3$$ZI$$Limit = .;&lt;BR /&gt; } &amp;gt; ETH_RAM&lt;BR /&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2018 03:18:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771480#M2366</guid>
      <dc:creator>johannesheupel</dc:creator>
      <dc:date>2018-02-27T03:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: invalid character '#' when compiling</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771481#M2367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post your entire project here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2018 08:57:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771481#M2367</guid>
      <dc:creator>thefallguy</dc:creator>
      <dc:date>2018-02-27T08:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: invalid character '#' when compiling</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771482#M2368</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure how I can upload a zip here, so I added it to a webserver location. Download a zipped version from:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.agra-gps.com/download/JCBTest1.zip" title="http://www.agra-gps.com/download/JCBTest1.zip"&gt;http://www.agra-gps.com/download/JCBTest1.zip&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This project was created on mbed.org and then exported using the LCPXpresso option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;THANKS for your help!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Feb 2018 14:41:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771482#M2368</guid>
      <dc:creator>johannesheupel</dc:creator>
      <dc:date>2018-02-27T14:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: invalid character '#' when compiling</title>
      <link>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771483#M2369</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think I see what you are trying to do, but it isn't going to work (at least the way you are trying).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Linker scripts ar NOT pre-processed so you cannot use #define etc. To define a symbol you need to do something like this:&lt;/P&gt;&lt;P&gt;MBED_APP_START = 0 ;&lt;/P&gt;&lt;P&gt;MBED_APP_SIZE = 512k ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know of a way of defining a symbol if it doesn't exist, but you can define a different symbol. e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MBED_APP_START = DEFINED(MBED_APP_START_INPUT) ? MBED_APP_START_INPUT : 0x0 ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Feb 2018 10:44:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-IDE/invalid-character-when-compiling/m-p/771483#M2369</guid>
      <dc:creator>thefallguy</dc:creator>
      <dc:date>2018-02-28T10:44:42Z</dc:date>
    </item>
  </channel>
</rss>

