<?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>topic Porting nxpUSBlib to Rowley CrossStudio for LPC1788 in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Porting-nxpUSBlib-to-Rowley-CrossStudio-for-LPC1788/m-p/524225#M6861</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CarlMle on Thu Mar 22 02:15:55 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working on porting the nxpUSBlib to work with Rowley, I thought I would share my experience/pain.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Specifically I need to get USB host working so my device can write to a USB Memory stick.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I created a new solution, imported the usblib files and latest CMSIS and for now the hosthid example. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added the preprocessor defines : USB_HOST_ONLY , __LPC17XX__&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and hit build.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first issue is CrossStudio doesn't like the __DATA(USBRAM_SECTION) statement that tells the linker to place the varibles in to AHBSRAM the Peripheral SRAM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To fix this ....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I looked at the flash_placement.xml file, I couldn't see AHBSRAM but there is a section called &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"&amp;lt;MemorySegment name="$(RAM2_NAME:RAM2)"&amp;gt;" &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but I could find no mention of RAM2 in the LPC1788_MemoryMap.xml, so I changed that line to :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"&amp;lt;MemorySegment name="AHBSRAM"&amp;gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I changed "__DATA(USBRAM_SECTION)" this to : "__attribute__ ((section(".bss2")))";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hit build and success it links, but examining the varible locations they were not in the correct place, AHBSRAM starts at 0x20000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the MemoryMap again the AHBSRAM start location is incorrect for the LPC1788, so I've changed it to :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;MemorySegment size="0x8000" access="Read/Write" start="0x20000000" name="AHBSRAM"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rebuilt and my variables are now correctly located in AHBSRAM. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I still have some work to do though as it hardfaults enabling clocks for the OTG/AHB, some my next job is to fix the peripheral initialisation I think.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 16:48:11 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T16:48:11Z</dc:date>
    <item>
      <title>Porting nxpUSBlib to Rowley CrossStudio for LPC1788</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Porting-nxpUSBlib-to-Rowley-CrossStudio-for-LPC1788/m-p/524225#M6861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CarlMle on Thu Mar 22 02:15:55 MST 2012&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working on porting the nxpUSBlib to work with Rowley, I thought I would share my experience/pain.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Specifically I need to get USB host working so my device can write to a USB Memory stick.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I created a new solution, imported the usblib files and latest CMSIS and for now the hosthid example. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I added the preprocessor defines : USB_HOST_ONLY , __LPC17XX__&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and hit build.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first issue is CrossStudio doesn't like the __DATA(USBRAM_SECTION) statement that tells the linker to place the varibles in to AHBSRAM the Peripheral SRAM.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To fix this ....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I looked at the flash_placement.xml file, I couldn't see AHBSRAM but there is a section called &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"&amp;lt;MemorySegment name="$(RAM2_NAME:RAM2)"&amp;gt;" &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;but I could find no mention of RAM2 in the LPC1788_MemoryMap.xml, so I changed that line to :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"&amp;lt;MemorySegment name="AHBSRAM"&amp;gt;"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I changed "__DATA(USBRAM_SECTION)" this to : "__attribute__ ((section(".bss2")))";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hit build and success it links, but examining the varible locations they were not in the correct place, AHBSRAM starts at 0x20000000&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Looking at the MemoryMap again the AHBSRAM start location is incorrect for the LPC1788, so I've changed it to :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;MemorySegment size="0x8000" access="Read/Write" start="0x20000000" name="AHBSRAM"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rebuilt and my variables are now correctly located in AHBSRAM. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I still have some work to do though as it hardfaults enabling clocks for the OTG/AHB, some my next job is to fix the peripheral initialisation I think.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 16:48:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Porting-nxpUSBlib-to-Rowley-CrossStudio-for-LPC1788/m-p/524225#M6861</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T16:48:11Z</dc:date>
    </item>
  </channel>
</rss>

