This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

OMAP-L137 Simple SYSLINK Example

Other Parts Discussed in Thread: OMAPL138, OMAP-L137, TMS320C6747

Hello!

I am new in Softwaredevelopment for the OMAP Processor. I am currently working on a communication between the ARM and DSP Processors including loading and starting the DSP application from ARM side. I had working that easily using DSPLINK with DSP/BIOS 5.0. Now i have switched to SYS/BIOS 6 and the corresponding SYSLINK. Now i am searching for a SIMPLE example to get the same thing working with the updated environment. The suppied samples in the SYSLINK installation are compiling and working here fine. But how do i strip that down to a simple appliaction with one source file, one makefile and maybe one configuration file? The sample applications are a little bit complicated and scattered in my opinion.

So i am searching for a simple SYSLINK based example to load and start the DSP from the ARM side to get started with that topic. May be a CCS Project but may also be a standalone project.

Can anybody help me?

Best regards!

  • Dom,

    If you look in the examples/archive folder, you will see a few examples. For your device, I would recommend the OMAPL138_elf example.

    syslink_2_10_07_31/examples/archive/ti_platforms_evmOMAPL138_elf_linux

    Then edit the shared/config.bld file and change the platform name to OMAPL137.

    Build.platformTable["ti.platforms.evmOMAPL137:dsp"] = {

    Look at the readme files for some brief instructions.

    examples/readme.txt
    examples/archive/readme.txt

    ~Ramsey

  • Hello Ramsey,

    thanks for your reply. I tried your suggestion to compile the mentioned example from the archive folder in the SYSLINK installation. I was a little bit unconfident which compiler path i should specify for CGT_C674_ELF_INSTALL_DIR in the examples "products.mak" file for the ELF compiler. Is it correct, when i specify the default C674 compiler shipped with the CCS installation, e.g. /ccsv5/tools/compiler/c6000_7.3.4?

    So when i build the example using that compiler path after editing the platform to evmOMAPL137 i get the following error:

    js: "/opt/ti/syslink_2_10_06_28/examples/archive/ti_platforms_evmOMAPL138_elf_linux/ex02_messageq/dsp/Dsp.cfg", line 88: TypeError: Cannot read property "base" from undefined (/opt/ti/syslink_2_10_06_28/examples/archive/ti_platforms_evmOMAPL138_elf_linux/ex02_messageq/dsp/Dsp.cfg#88)

    When i look at that position in the "Dsp.cfg" file, i see the following lines:

    SharedRegion.setEntryMeta(0,
        new SharedRegion.Entry({
            name:           "IPC_Internal",
            base:           SR0Mem.base,
            len:            SR0Mem.len,
            ownerProcId:    MultiProc.getIdMeta("HOST"),
            cacheEnable:    false,
            isValid:        true
        })
    );

    By the way, this error is very similar to the error i am running in, when i try to compile one of the SYSLINK sample applications from "<SYSLINK_INSTAL_DIR>/packages/ti/syslink/samples" in CCS, following the instructions found on http://processors.wiki.ti.com/index.php/Creating_CCS_Project_for_SysLink_samples.

    So do i have a basic problem here, maybe with the platform definition for the EVM OMAP-L137? I should mention again, that SYSLINK itself and the samples build fine, when using the toplevel makefile of SYSLINK installation.


    Thanks in advance,

    Dom

  • Dom Banger said:

    js: "/opt/ti/syslink_2_10_06_28/examples/archive/ti_platforms_evmOMAPL138_elf_linux/ex02_messageq/dsp/Dsp.cfg", line 88: TypeError: Cannot read property "base" from undefined (/opt/ti/syslink_2_10_06_28/examples/archive/ti_platforms_evmOMAPL138_elf_linux/ex02_messageq/dsp/Dsp.cfg#88)

    Dom,

    This is most likely due to the following in ex02_messageq/dsp/makefile:
    configuro/linker.cmd: Dsp.cfg ../shared/config.bld
        @$(ECHO) "#"
        @$(ECHO) "# Making $@ ..."
        $(XDC_INSTALL_DIR)/xs --xdcpath="$(subst +,;,$(PKGPATH))" \
            xdc.tools.configuro -o configuro \
            -t ti.targets.elf.C674 -c $(CGT_C674_ELF_INSTALL_DIR) \
            -p ti.platforms.evmOMAPL138:dsp -b ../shared/config.bld \
            -r release Dsp.cfg

    Please try changing the above evmOMAPL138 to evmOMAPL137.

    Regards,

    - Rob

     

  • Hello,

    yes thats it. With that changes i get the example application to run. Now i am able to compile the DSP side with CCS also. But for that i had to add a ":dsp" to the target paltform in the RTSC dialog of CCS. I wonder, why this is necessary. I found that extension of ":dsp" when comparing the make process output of my CCS project and the example project.

    Thank you for your help!

    Best regards,

    Dom

  • Dom,

    The following syntax creates a new platform instance by the name "ti.platforms.evmOMAPL137:dsp".

    Build.platformTable["ti.platforms.evmOMAPL137:dsp"] = { ... }

    This new instance contains the memory map as defined in the config.bld script. The new instance is different from the default platform named "ti.platforms.evmOMAPL137" (without :dsp). In CCS, you need to tell it to use your new platform instance in order to get the correct memory map. That is why you must change the platform name in CCS.

    ~Ramsey

  • Thanks for the additional information Ramsey.

    But why do i need to create a new platform instance? The OMAP-L137 is already available in the default platforms i think. Is it because of the additional memory regions for shared memory used by IPC? Are threre any documents where things like that are pointed out? For SYSLINK 2.x i found the API description only. For the old version (DSPLINK) there was a user guide and a design guide with much more information for every module included in DSPLINK. Are there any documents like that related to SYSLINK?

    Thanks in advance again.

    Dom

  • Dom,

    Yes, you are correct. You need to create a new platform instance because we want to define a memory map which contains the Shared Region entries as well as specific code/data placement for the executable. In general, the default platform memory map will define the physical memory available on the device but it will not define any logical partitioning of the memory. That is typically done with a platform instance. You might create several platform instances each with a different memory map depending on your use-case and how to want to partition memory for that use-case.

    The SysLink User Guide is located at the following URL. You can also open the SysLink Release Notes in the installation folder and click on the Documentation link.

    http://processors.wiki.ti.com/index.php/SysLink_UserGuide

    You can also search the processors.wiki.ti.com web site for additional SysLink documentation.

    ~Ramsey

  • Hi Rob:

    I am having the same problem. I am working on the OMAPL138 Hawkboard. I have added the platform ti.platforms.evmOMAPL138:dsp; however, I am still getting the error (please see below). Also, i don't seem to have the '-b ../shared/config.bld' nor do I have the I have the '-r release Dsp.cfg' options.

    Could you please help resolve these issues?

    Thanks a lot!

    Cheers,

    Mushtaq

    **** Build of configuration Debug for project messageQ ****

    C:\ti\ccsv5\utils\bin\gmake -k all

    'Building file: ../MessageQ_omapl1xx_dsp.cfg'

    'Invoking: XDCtools'

    "C:/ti/xdctools_3_22_04_46/xs" --xdcpath="C:/ti/bios_6_32_05_54/packages;C:/omapl138/syslink/syslink_2_10_05_26/packages;C:/ti/ipc_1_23_05_40/packages;" xdc.tools.configuro -o configPkg -t ti.targets.C674 -p ti.platforms.evmOMAPL138:dsp -r release -c "C:/ti/ccsv5/tools/compiler/c6000" --compileOptions "-g --optimize_with_debug" "../MessageQ_omapl1xx_dsp.cfg"

    making package.mak (because of package.bld) ...

    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...

    configuring MessageQ_omapl1xx_dsp.x674 from package/cfg/MessageQ_omapl1xx_dsp_p674.cfg ...

    js: "C:/Documents and Settings/msyed/workspace_syslink_pjt/messageQ/SysLinkSamples_common.cfg.xs", line 91: TypeError: Cannot read property "base" from undefined

    "C:/Documents and Settings/msyed/workspace_syslink_pjt/messageQ/MessageApp_common.cfg.xs", line 63

    "C:/Documents and Settings/msyed/workspace_syslink_pjt/messageQ/MessageQ_omapl1xx_dsp.cfg", line 57

    "./package/cfg/MessageQ_omapl1xx_dsp_p674.cfg", line 196

    "./package/cfg/MessageQ_omapl1xx_dsp_p674.cfg", line 275

    "./package/cfg/MessageQ_omapl1xx_dsp_p674.cfg", line 183

    gmake.exe: *** [package/cfg/MessageQ_omapl1xx_dsp_p674.xdl] Error 1

    js: "C:/ti/xdctools_3_22_04_46/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.

    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

  • Mushtaq Syed said:
    Also, i don't seem to have the '-b ../shared/config.bld'

    The platform 'ti.platforms.evmOMAPL138:dsp' is defined in the file shared/config.bld for the SysLink examples that Ramsey referred to: syslink_2_10_07_31/examples/archive/ti_platforms_evmOMAPL138_elf_linux
    However, you are building one of the SysLink samples, which have a completely different build environment.

    I believe you want to instead use the platform instance "-p ti.platforms.evmDA830:dsp", which seems to be defined and usable in the SysLink samples world.

    Mushtaq Syed said:
    nor do I have the I have the '-r release Dsp.cfg' options.

    The option to which you refer is actually '-r release' (to specify build profile) and 'Dsp.cfg' is the name of the .cfg file being processed (in your case your .cfg file is at the end of the command - ../MessageQ_omapl1xx_dsp.cfg).

    Regards,

    - Rob

     

  • Ramsey,

    thank you for that extra explanations. Nevertheless it would be very helpful to have some more detailed user guides or simple examples, in my opinion.

    I dont know, whether i should open a new topic for my following question, but it is also related to the SYSLINK example, so i will add it here. Feel free to move that to a different topic, if necessary.

    In the SYSLINK example "ti_platforms_evmOMAPL138_elf_linux" a communication via messageQ is processed. But they do not really send a payload. The structure to define a message includes a pointer to a shared region. So is that something like the "Zero Copy Message" in the old DSPLINK? Do i have to allocate extra memory space using the shared region module to transmit payload and to free that allocated shared memory on the recevier side? So the message will only transport the address of the payload in the shared region?

    Best regards.

    Dom

  • Hi Dom and Ramsey,

    We are college students working on the OMAPL137/TMS320C6747 are are not so experienced in either the OMAPL137 nor CCS5. We read your post and we have the same problem using Syslink 2_10_06_28. We think we haven't done the setup of the products.mak file correctly. 

    We have fallowed the steps listed here but we are still getting errors.We are not exactly to sure what files to add in the project folder.

    Anything  to help us get this done would be appreciated 

    Thank you

    Kassem

  • kassem nabha said:

    We think we haven't done the setup of the products.mak file correctly. 

    We have fallowed the steps listed here but we are still getting errors.We are not exactly to sure what files to add in the project folder.

    Please post your errors log and products.mak file and we can check them out for issues.

    Regards,

    - Rob

  • Kassem,

    Did you try building one of the examples from the examples/archive directory?  You could attach your products.mak file here, if you don't think it is set up correctly.  Also, could you please post the errors you are getting?

    Thanks,

        Janet

  • Dom Banger said:

    In the SYSLINK example "ti_platforms_evmOMAPL138_elf_linux" a communication via messageQ is processed. But they do not really send a payload. The structure to define a message includes a pointer to a shared region. So is that something like the "Zero Copy Message" in the old DSPLINK? Do i have to allocate extra memory space using the shared region module to transmit payload and to free that allocated shared memory on the recevier side? So the message will only transport the address of the payload in the shared region?

    Since Ramsey is out of the office this week I will attempt an answer...

    The MessageQ example, as you pointed out, doesn't send a payload.  There are two options for doing so:
        1. Do as you say, allocating a payload buffer from the HeapBufMP that was created in the SR for the MessageQ_alloc() allocations, retrieving a SharedRegion_SRPtr for the buffer with SharedRegion_getSRPtr() and assigning that SRPtr to the App_Msg.buf element.  The receiver of the message could then free that buffer.
        2. Send a MessageQ message with the payload embedded in the message.  You change the App_Msg structure to contain a data array instead of the "SharedRegion_SRPtr buf" element, and since the example already passes sizeof(App_Msg) to MessageQ_alloc() then your bigger App_Msg with the embedded buffer would automatically be handled by the example.

    Keep in mind that the HeapBufMP that was created for the MessageQ is only big enough for 10 64-byte messages.  If you want further space allocated for a payload, you would need to increase this heap's buffer size if you choose the "embedded payload" method (#2 above).  For the SRPtr method (#1 above) you could leave the MessageQ heap alone and allocate payload buffers from a different heap that was created in a SR specifically for the purpose of allocating these payload buffers.

    Also, FYI, in case you don't already know, if you pass a SharedRegion_SRPtr to the other side, the receiving side needs to get a real pointer usable by C with the SharedRegion_getPtr() API call, and then use that real pointer for buffer access as well as the pointer to pass to HeapBufMP_free().

    Regards,

    - Rob

     

  • Hi Everyone, 

    Here is what I have in my project folder and my errors.

    File in the project folder are:

    AppCommon.h ; main_dsp.c ; Server.c  ; Server.h ; SystemCfg.h ; config.bld ; Dsp.cfg ; makefile ; products.mak

    All the include files have been add

    Errors getting :

    "D:/CCS_5/ccsv5/tools/compiler/c6000_7.3.4/bin/cl6x" -mv6740 -g --define=omapl137 --display_error_number --diag_warning=225 --abi=coffabi -z -m"NextTrYFORQmessageSYSLink.map" --stack_size=0x800 --heap_size=0x800 --define=DSP_CORE=1 --warn_sections --display_error_number -i"D:/CCS_5/ccsv5/tools/compiler/c6000_7.3.4/lib" -i"D:/CCS_5/ccsv5/tools/compiler/c6000_7.3.4/include" --reread_libs --rom_model -o "NextTrYFORQmessageSYSLink.out" -l"./configPkg/linker.cmd"  "./main_dsp.obj" "./Server.obj" -l"libc.a"

    error #10008-D: cannot find file "./configPkg/linker.cmd"

    I have add a link to my project and more details on the errors in the link below, and the products.mak file


    https://www.dropbox.com/sh/mfx1lwlw6cec6oy/GTt9l227Kv?m


    thank you all for you help 


  • Kessem,

    Did you follow the steps here for creating a CCS project:

    http://processors.wiki.ti.com/index.php/Creating_CCS_Project_for_SysLink_samples

    I don't see the configuration step in your log, only the link step.  The error message indicates that the file ./configPkg/linker.cmd cannot be found, and this file is generated in the configuration step.  Could you please post all of the build log?

    Best regards,

        Janet

  • hey Janet,

    I did fallow the link above but with no luck either 

    I have been working on this problem for days now.

    I think my problem is setting up SYSLink correctly, I use windows 7 and have just posted a more defined questions.

    due to the luck of right installation of SYSlink I dont think anything is working 

    her is the link for my questions 

    http://e2e.ti.com/support/embedded/linux/f/354/t/199832.aspx

    I would appreciate all the help thank you.

    here is the errors I get

    **** Build of configuration Debug for project AttemptSYSLink ****

    D:\CCS_5\ccsv5\utils\bin\gmake -k all 

    'Building file: ../Dsp.cfg'

    'Invoking: XDCtools'

    "D:/CCS_5/xdctools_3_23_03_53/xs" --xdcpath="D:/CCS_5/bios_6_33_04_39/packages;D:/Summer project 2012/syslink_2_10_06_28/packages;D:/CCS_5/ipc_1_24_02_27/packages;D:/CCS_5/grace_1_10_04_36/packages;D:/CCS_5/uia_1_01_00_04/packages;D:/CCS_5/xdais_7_21_01_07/packages;D:/CCS_5/xdais_7_21_01_07/examples;D:/CCS_5/ccsv5/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.C674 -p ti.platforms.evmOMAPL137 -r debug -c "D:/CCS_5/ccsv5/tools/compiler/c6000_7.3.4" --compileOptions "-g --optimize_with_debug" "../Dsp.cfg"

    making package.mak (because of package.bld) ...

    generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...

    configuring Dsp.x674 from package/cfg/Dsp_p674.cfg ...

    js: "D:/Users/kassem/workspace_v5_2/AttemptSYSLink/Dsp.cfg", line 88: TypeError: Cannot read property "base" from undefined (D:/Users/kassem/workspace_v5_2/AttemptSYSLink/Dsp.cfg#88)

        "./package/cfg/Dsp_p674.cfg", line 196

        "./package/cfg/Dsp_p674.cfg", line 275

        "./package/cfg/Dsp_p674.cfg", line 183

    gmake.exe: *** [package/cfg/Dsp_p674.xdl] Error 1

    js: "D:/CCS_5/xdctools_3_23_03_53/packages/xdc/tools/Cmdr.xs", line 51: Error: xdc.tools.configuro: configuration failed due to earlier errors (status = 2); 'linker.cmd' deleted.

    gmake: Target `all' not remade because of errors.

    **** Build Finished ****

  • Kassem,

    I will reply to your new post then.

    Best regards,

        Janet

  • Hello Kassem,

    1. You say you have problems to build one of the SYSLINK samples in CCS. So did you try to build the samples directly in the SYSLINK folder using the tolpevel makefile ("make samples")? Maybe you have to ensure that SYSLINK is installed and build properly before migration one of the samples to CCS. I think that would be the easier way. Are there any build errors, when building SYSLINK itself ("make syslink") using the toplevel makefile in the SYSLINK folder?

    2. I saw that you added the products.mak in you CCS project. I am not sure but i think that i did not add this makefile. I am not at my office, so i fell not very certain about that.

    3. I think your post of the error log was incomplete, could you please post the full build log, when the error occures?

    @Rob: Thanks for these information, thats similar to that what i did imagine. Greetings to Ramsey!

    Best regards,

    Dom

  • Hello Dom,

    I believe my main problem is setting up SYSLink correctly I am new to this.

    I am not exactly sure how to d the step 1 you have listed , If you can point me to the right direction I would appreciate it .

    Thank you all 

    kassem

  • Hello Kassem,

    to process the step 1 i mentioned in my post you can follow the installation guide found here: http://processors.wiki.ti.com/index.php/SysLink_Install_Guide I think all steps (or at least the steps belonging to the RTOS) should finish successfully before building any CCS Project using SYSLINK. There you find a description how to build the RTOS samples using the toplevel makefile from the SYSLINK install folder. Can you process this step sucessfully?

    I think your build log looks very similar to mine, i posted above. Important is the following line:

    kassem nabha said:

    js: "C:/Documents and Settings/msyed/workspace_syslink_pjt/messageQ/SysLinkSamples_common.cfg.xs", line 91: TypeError: Cannot read property "base" from undefined

    Thats the same error i had, and this was fixed editing the makefile in the example project, like mentioned by Rob:

    Robert Tivy said:
    This is most likely due to the following in ex02_messageq/dsp/makefile:
    configuro/linker.cmd: Dsp.cfg ../shared/config.bld
        @$(ECHO) "#"
        @$(ECHO) "# Making $@ ..."
        $(XDC_INSTALL_DIR)/xs --xdcpath="$(subst +,;,$(PKGPATH))" \
            xdc.tools.configuro -o configuro \
            -t ti.targets.elf.C674 -c $(CGT_C674_ELF_INSTALL_DIR) \
            -p ti.platforms.evmOMAPL138:dsp -b ../shared/config.bld \
            -r release Dsp.cfg

    Please try changing the above evmOMAPL138 to evmOMAPL137.

    Did you already try that?


    Best regards,

    Dom

  • Hi Dom,

    I have change the mentioned lines, but I believe my problem is installing the SYSLink I am not too experienced with Linux, and can't get to figure out what to fill in the products.mak File 

    Here Is a link of the work I have done.

    https://www.dropbox.com/s/mhl5x81xjjei3d0/failure%20to%20run%20SYSLink.pdf?m

    Thank you very much

  • Kassem,

    i read your document (https://www.dropbox.com/s/mhl5x81xjjei3d0/failure%20to%20run%20SYSLink.pdf?m).

    1. Is it correct, that you only need to build the DSP side of SYSLINK and do not need to build the ARM side part of the communication? Because in other cases, you will need to work on Linux, in my opinion.

    2. If (1) is true, there is only one path that is missing in your products.mak file (CGT_C674_ELF_INSTALL_DIR or CGT_C674_INSTALL_DIR). Which one you have to define is based on the loader you selected above in the products.mak file using LOADER =.  When you have the default (empty string), you are using COFF, when you have specified LOADER = ELF, you are using ELF. The path CGT_C674_ELF_INSTALL_DIR or CGT_C674_INSTALL_DIR is the path of the code generation tool used to build DSP applications, e.g. the compiler. This is installed during installation of CCS, in my opinion. My path is e.g. $(DEPOT)/ccsv5/tools/compiler/c6000_7.3.4. Please check, if you can find a corresponding path on your system and add it to the products.mak file.

    3. When you have specified the path, please try to build SYSLINK as described in http://processors.wiki.ti.com/index.php/SysLink_Install_Guide, e.g.:

    - Build SYSLINK for DSP side itself by calling "make syslink-rtos" (maybe gmake, when running on Windows)

    - Build the SYSLINK examples by calling "make samples-rtos" (maybe gmake, when running on Windows)

    Look at the prints during both build processes. Do you see any errors or do these build processes finish successfully? Maybe it is good to pipe the logs into a file, so nothing gets lost because of too few lines of scrool back buffer in your console. These steps should be sucessfull, before trying to build a CCS project with SYSLINK. When there are any errors, please upload the full log, so we can analyze it. When you have any path specified wrong in the products.mak, the build process will report this in the log. This is a good way to check., if the path are correctly.

    When these steps have finished successfully, we can ge on and try to build a SYSLINK project from CCS.

    @All: I am new to the OMAP and SYSLINK too, so if i am wrong in any of my statements, please feel free to correct them to help the community.

    Best regards!

    Dom

  • Hi Kassem:

    Sorry for the late reply.

    In order to build the DSP side of the Syslink messageq exaple code I followed the instructions in the the following document.

    http://processors.wiki.ti.com/index.php/Creating_CCS_Project_for_SysLink_samples

    Following the above I ended up with two errors, One was related to platform definition. This was resolved with help from JANET'S FIRST POST (see below).

    The second error was related to definitions of SR0 and SR1 memory section in config.bld. This was resolved by including config.bld from the message2 example and  editing it to appropriately resolve SR0 and SR1 symbol definitions. (See JANET'S SECOND POST below). After these changes I could successfull build the DSP side code for the OMAPL138.

     

    JANET'S FIRST POST:

    In the configuro step you are executing, the platform does not look correct:

    "C:/ti/xdctools_3_22_04_46/xs" --xdcpath="C:/ti/bios_6_32_05_54/packages;C:/omapl138/syslink/syslink_2_10_05_26/packages;C:/ti/ipc_1_23_05_40/packages;" xdc.tools.configuro -o configPkg -t ti.targets.C674 -p ti.sdo.ipc.examples.platforms.evmOMAPL138.dsp -r debug -c "C:/ti/ccsv5/tools/compiler/c6000" --compileOptions "-g --optimize_with_debug" "../MessageQ_omapl1xx_dsp.cfg"

    You could try unzipping the MessageQ example in syslink_2_10_05_26/examples/archive/ti_platforms_evmOMAPL138_coff_linux and looking at the configuro command in dsp/makefile:

        $(XDC_INSTALL_DIR)/xs --xdcpath="$(subst +,;,$(PKGPATH))" \
                xdc.tools.configuro -o configuro \
                -t ti.targets.C674 -c $(CGT_C674_INSTALL_DIR) \
                -p ti.platforms.evmOMAPL138:dsp -b ../shared/config.bld \
                -r release Dsp.cfg

    You will see this platform in shared/config.bld, and it has SR0 and SR1 memory regions that are not present in the platform that you are using.

     JANEST"S SECOND POST:

     

    It looks like the right config.bld with the SR0 and SR1 memory sections is still not included in the configuro step.  Here is how you can add it to your project:

    1. Right-click on the project and select "Build Options..."

    2. Under Build -> XDCTools, select "Advanced Options".  There you will see "Build configuration file (-b)", and you can browse to the config.bld file for the example.

    You can always change the names of SR_0 and SR_1 in the config.bld to match the names in your .cfg file.  I would copy the config.bld file before changing it, so that the original example will not be broken.