<?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: Hardfault during Expedited access using LPC CANAPI with -Os compiler optimization</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hardfault-during-Expedited-access-using-LPC-CANAPI-with-Os/m-p/680710#M27381</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;Could you please confirm the IDE you are using?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Soledad&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>Thu, 06 Jul 2017 21:15:29 GMT</pubDate>
    <dc:creator>soledad</dc:creator>
    <dc:date>2017-07-06T21:15:29Z</dc:date>
    <item>
      <title>Hardfault during Expedited access using LPC CANAPI with -Os compiler optimization</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hardfault-during-Expedited-access-using-LPC-CANAPI-with-Os/m-p/680709#M27380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Morning!&lt;/P&gt;&lt;P&gt;I'm implementing currently a firmware for a LPC11C14 MCU which should communicate with other nodes over CANopen.&lt;/P&gt;&lt;P&gt;Since the chip provides a CANopen API in its ROM, I decided to use it for my purpose according to the App note AN11238, LPC11Cxx CANopen network demo. Everything works fine so far as long as I compile the code with either the optimization -Od or -O1 to -O3. As soon as I compile the code with optimization for size activated (-Os), I get a hardfault during a CANopen Expedited request, segmented access works fine still. The hardfault even occurs when the callback function for the reqeusts is totally empty. Timingwise, the callback "CANopen_SDOS_Exp_Write" and "CANopen_SDOS_Exp_Read" is called correctly and returns normally. After the return of the callback, the MCU crashes.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached the code of the canopen library I'm using. Most parts are taken from the Appnote's driver, just some defines for better readability have been added as well as a method for adding entries to the object dictionary before the start of the CAN interface. Further, I attached the linker scripts.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards, Raphael&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338089"&gt;canopen.h.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338089"&gt;ldscripts.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338089"&gt;can_node_sdo.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338089"&gt;can_node_sdo.h.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-338089"&gt;canopen.c.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jul 2017 07:42:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Hardfault-during-Expedited-access-using-LPC-CANAPI-with-Os/m-p/680709#M27380</guid>
      <dc:creator>raphaelmeyer</dc:creator>
      <dc:date>2017-07-03T07:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Hardfault during Expedited access using LPC CANAPI with -Os compiler optimization</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Hardfault-during-Expedited-access-using-LPC-CANAPI-with-Os/m-p/680710#M27381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Arial, sans-serif; font-size: small; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;Could you please confirm the IDE you are using?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;Soledad&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>Thu, 06 Jul 2017 21:15:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Hardfault-during-Expedited-access-using-LPC-CANAPI-with-Os/m-p/680710#M27381</guid>
      <dc:creator>soledad</dc:creator>
      <dc:date>2017-07-06T21:15:29Z</dc:date>
    </item>
  </channel>
</rss>

