<?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>CodeWarrior for MCUのトピックRe: Linking Error L1822</title>
    <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linking-Error-L1822/m-p/194287#M7101</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Looking at the generated message, I would say implementation for functions CEcFramework_addStatemachine &amp;amp; CEcFramework_startStatemachines&amp;nbsp; are missing in your application.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Where are those functions implemented?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I guess you have to add the object file or library file, which contains these implementations, to your project.&lt;/DIV&gt;&lt;DIV&gt;Actually you need to add the appropriate file to the -add linker option.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Oct 2008 16:49:06 GMT</pubDate>
    <dc:creator>CrasyCat</dc:creator>
    <dc:date>2008-10-16T16:49:06Z</dc:date>
    <item>
      <title>Linking Error L1822</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linking-Error-L1822/m-p/194286#M7100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello everybody.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am&amp;nbsp;using the command line compiler chc08 and SmartLinker in order to merge&amp;nbsp;an EasyCode Statecharts IDE with CodeWarrior 6.2.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;EasyCode has an ability to generate a C code from the visually drawn Statecharts.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So I am trying to build the CW project by EasyCode means using the following Compiler-Linker commands:&lt;/DIV&gt;&lt;DIV&gt;--- Compiler:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;"C:\Programme\Freescale\CodeWarrior for Microcontrollers V6.2\prog\chc08.exe" -W2 -Os -Cs08 -Ms -NoPath -I"H:\EC\HCS08_C" -I"C:\Programme\Freescale\CodeWarrior for Microcontrollers V6.2\lib\hc08c\include\"&amp;nbsp; -I"C:\Programme\Freescale\CodeWarrior for Microcontrollers V6.2\lib\hc08c\device\include" -Env"OBJPATH=H:\EC\HCS08_C\C_Data\HCS08_C_Target\ObjectCode" H:\EC\HCS08_C\Sources\main.c H:\EC\HCS08_C\Sources\Start08.c "C:\Programme\Freescale\CodeWarrior for Microcontrollers V6.2\lib\hc08c\device\src\mc9s08gb60.c" H:\EC\HCS08_C\EC_FSM.c&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;---Linker:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;--- "C:\Programme\Freescale\CodeWarrior for Microcontrollers V6.2\prog\Linker.exe" H:\EC\HCS08_C\EC_prm\EC_HCS08_C_Target_linker.prm -WmsgSd1100 -WmsgSd1912 -Env"ABSPATH=H:\EC\HCS08_C\bin" -Env"TEXTPATH=H:\EC\HCS08_C\bin" -add(H:\EC\HCS08_C\C_Data\HCS08_C_Target\ObjectCode\EC_FSM.o H:\EC\HCS08_C\C_Data\HCS08_C_Target\ObjectCode\main.o H:\EC\HCS08_C\C_Data\HCS08_C_Target\ObjectCode\Start08.o H:\EC\HCS08_C\C_Data\HCS08_C_Target\ObjectCode\mc9s08gb60.o)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;After the commands execution the linker gives me the following warnings and errors:&lt;/DIV&gt;&lt;DIV&gt;WARNING L1823: External object theEcFramework in H:\EC\HCS08_C\C_Data\HCS08_C_Target\ObjectCode\main.o created by default&lt;/DIV&gt;&lt;DIV&gt;ERROR L1822: Symbol CEcFramework_addStatemachine in file H:\EC\HCS08_C\C_Data\HCS08_C_Target\ObjectCode\main.o is undefined&lt;/DIV&gt;&lt;DIV&gt;ERROR L1822: Symbol CEcFramework_startStatemachines in file H:\EC\HCS08_C\C_Data\HCS08_C_Target\ObjectCode\main.o is undefined&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The main.c looks like that:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#include &amp;lt;hidef.h&amp;gt; /* for EnableInterrupts macro */&lt;BR /&gt;#include &amp;lt;mc9s08gb60.h&amp;gt; /* include peripheral declarations */&lt;BR /&gt;#include "./EC_FSM.h"&lt;/DIV&gt;&lt;DIV&gt;void main(void)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CUnnamed m_statemachine1;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; extern CEcFramework theEcFramework;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CEcFramework_addStatemachine(&amp;amp;theEcFramework, &amp;amp;m_statemachine1 );&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CEcFramework_startStatemachines(&amp;amp;theEcFramework);&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The EC_FSM.h file contains the string #include "./EcFramework.h". And EcFramework.h looks like that:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#if !defined(EC_FRAMEWORK_H__INCLUDED)&lt;BR /&gt;#define EC_FRAMEWORK_H__INCLUDED&lt;/DIV&gt;&lt;DIV&gt;/////////////////////////////////////////////////////////////////////////////&lt;/DIV&gt;&lt;DIV&gt;#include "EcBaseStatemachine.h"&lt;/DIV&gt;&lt;DIV&gt;/////////////////////////////////////////////////////////////////////////////&lt;BR /&gt;#ifdef __cplusplus&lt;BR /&gt;extern "C"&lt;BR /&gt;{&lt;BR /&gt;#endif&lt;BR /&gt;typedef struct&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;CEcBaseStatemachine* m_pFirstStatemachine;&amp;nbsp; // pointer to the first added statemachine&lt;BR /&gt;&amp;nbsp;unsigned short m_countStatemachines;&lt;BR /&gt;} CEcFramework;&lt;/DIV&gt;&lt;DIV&gt;CEcFramework* CEcFramework_Constructor( CEcFramework* pThis );&lt;BR /&gt;void CEcFramework_Destructor( CEcFramework* pThis );&lt;/DIV&gt;&lt;DIV&gt;BOOL CEcFramework_addStatemachine( CEcFramework* pThis, CEcBaseStatemachine* pStatemachine );&lt;/DIV&gt;&lt;DIV&gt;...&lt;/DIV&gt;&lt;DIV&gt;void CEcFramework_startStatemachines( CEcFramework* pThis );&lt;BR /&gt;...&lt;/DIV&gt;&lt;DIV&gt;extern unsigned char CEcFramework_countInstances;&lt;/DIV&gt;&lt;DIV&gt;///////////////////////////&lt;BR /&gt;#ifndef USE_SYSTEM_HEAP&lt;BR /&gt;///////////////////////////&lt;BR /&gt;&amp;nbsp;extern EcEvent CEcFramework_eventMemory[MAX_NUMBER_ALLOCATED_EVENTS];&lt;BR /&gt;&amp;nbsp;extern CEcEventPool CEcFramework_eventPool;&lt;BR /&gt;///////////////////////////&lt;BR /&gt;#endif&amp;nbsp; // #ifndef USE_SYSTEM_HEAP&lt;BR /&gt;///////////////////////////&lt;/DIV&gt;&lt;DIV&gt;///////////////////////////&lt;BR /&gt;#ifdef USE_FUNCTION_ON_ASSERT&lt;BR /&gt;///////////////////////////&lt;BR /&gt;&amp;nbsp;void CEcFramework_onAssert( const char* pFile, unsigned int line );&amp;nbsp; // see Customize.c in order to define this function&lt;BR /&gt;///////////////////////////&lt;BR /&gt;#endif&amp;nbsp; // #ifdef USE_FUNCTION_ON_ASSERT&lt;BR /&gt;///////////////////////////&lt;/DIV&gt;&lt;DIV&gt;/////////////////////////////////////////////////////////////////////////////&lt;/DIV&gt;&lt;DIV&gt;// the one and only framework object:&lt;BR /&gt;extern CEcFramework theEcFramework;&lt;/DIV&gt;&lt;DIV&gt;/////////////////////////////////////////////////////////////////////////////&lt;BR /&gt;#ifdef __cplusplus&lt;BR /&gt;}&amp;nbsp; // extern "C"&lt;BR /&gt;#endif&lt;BR /&gt;/////////////////////////////////////////////////////////////////////////////&lt;/DIV&gt;&lt;DIV&gt;#endif // !defined(EC_FRAMEWORK_H__INCLUDED)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;So the functions CEcFramework_addStatemachine and CEcFramework_startStatemachines are defined in EcFramework.h which is included into EC_FSM.h.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Does anybody have an idea why the linker does not see the function-declaration?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Many thanks in advance.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 16:24:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linking-Error-L1822/m-p/194286#M7100</guid>
      <dc:creator>Aibolit</dc:creator>
      <dc:date>2008-10-16T16:24:32Z</dc:date>
    </item>
    <item>
      <title>Re: Linking Error L1822</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linking-Error-L1822/m-p/194287#M7101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Looking at the generated message, I would say implementation for functions CEcFramework_addStatemachine &amp;amp; CEcFramework_startStatemachines&amp;nbsp; are missing in your application.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Where are those functions implemented?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I guess you have to add the object file or library file, which contains these implementations, to your project.&lt;/DIV&gt;&lt;DIV&gt;Actually you need to add the appropriate file to the -add linker option.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 16:49:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linking-Error-L1822/m-p/194287#M7101</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2008-10-16T16:49:06Z</dc:date>
    </item>
    <item>
      <title>Re: Linking Error L1822</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linking-Error-L1822/m-p/194288#M7102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Thank you very much, CrasyCat.&lt;/DIV&gt;&lt;DIV&gt;However, after I have added all the object files of EasyCODE framework new questions have appeared.&lt;/DIV&gt;&lt;DIV&gt;ERROR L1822: Symbol _CALL_STAR08 in file H:\EC\HCS08_C\C_Data\HCS08_C_Target\ObjectCode\EcBaseStatemachine.o is undefined&lt;/DIV&gt;&lt;DIV&gt;I could not find the declaration &amp;amp; implementation of _CALL_STAR08 symbol. Does anybody know where can it be?&lt;/DIV&gt;&lt;DIV&gt;Another question is if the Windows application can be called/started from the 9S08 microcontroller application in Debug mode?&lt;BR /&gt;Just because EasyCODE guys have implemented the statecharts debugger through the WinAPI application call WinExec.&lt;BR /&gt;&amp;nbsp;//! \author EasyCODE&lt;BR /&gt;&amp;nbsp;//! \version 8.0&lt;BR /&gt;&amp;nbsp;//! By default called via macro EC_DEBUG_INFO().&lt;BR /&gt;&amp;nbsp;//! Sends debug information to EasyCODE,&lt;BR /&gt;&amp;nbsp;//! in order to highlight the active state and/or transition.&lt;BR /&gt;void CEcFramework_sendDebugInfoToEasyCODE( char* pFilePath, int stateID, int transitionID, BOOL bEnd, char* pComment )&lt;BR /&gt;&amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;// TODO:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;// Call DebugStatechart.exe via command line.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;// Pass the debug information as arguments.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;char cmdLine[500];&lt;BR /&gt;&amp;nbsp;&amp;nbsp;if ( bEnd )&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;sprintf(cmdLine, "\"%s\" -end", PATH_OF_DEBUGSTATECHART_EXE)&lt;BR /&gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;sprintf(cmdLine, "\"%s\" \"%s\" stateID=%d transitionID=%d time=%d", PATH_OF_DEBUGSTATECHART_EXE, pFilePath, stateID, transitionID, ++CEcFramework_m_countDebugInfos)&lt;BR /&gt;;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WinExec(cmdLine, SW_SHOWMINIMIZED);&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;}&lt;/DIV&gt;&lt;DIV&gt;Many thanks in advance.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Oct 2008 20:47:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linking-Error-L1822/m-p/194288#M7102</guid>
      <dc:creator>Aibolit</dc:creator>
      <dc:date>2008-10-16T20:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Linking Error L1822</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linking-Error-L1822/m-p/194289#M7103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This is a run time function for from&amp;nbsp;the compiler.&lt;/DIV&gt;&lt;DIV&gt;You need to&amp;nbsp;link&amp;nbsp;the appropriate&amp;nbsp;ANSI library file to your project.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;ANSI library files are located in {Install}\lib\hc08c\lib.&lt;/DIV&gt;&lt;DIV&gt;Please refer to file \lib\hc08c\README.TXT to determine which is the appropriate ANSI library file.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The appropriate library file depends on the compiler options you are using in your project.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CrasyCat&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 13:05:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linking-Error-L1822/m-p/194289#M7103</guid>
      <dc:creator>CrasyCat</dc:creator>
      <dc:date>2008-10-17T13:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: Linking Error L1822</title>
      <link>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linking-Error-L1822/m-p/194290#M7104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Oh, thank you&amp;nbsp;CrasyCat!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I thought the .lib libraries&amp;nbsp;are automatically included by compiler when the appropriate options are set.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Does anybody know the way to call the Win application from the 9S08 microcontroller application&amp;nbsp;in Debug mode?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Many thanks in advance.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Oct 2008 14:05:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/CodeWarrior-for-MCU/Linking-Error-L1822/m-p/194290#M7104</guid>
      <dc:creator>Aibolit</dc:creator>
      <dc:date>2008-10-17T14:05:48Z</dc:date>
    </item>
  </channel>
</rss>

