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.

SMARTRFcc2510 sw example & IAR issues in debugging

Other Parts Discussed in Thread: CC2540, CC2510

hello everybody

please  I am using IAR , I  downloaded  latest 7.6 today   size limited  ,  I  followed instruction to get 16K limit for Simpilicti compiling .

I can compile  no problem but when I try to dowloadand debug ( using kit and a CCdebugger)  I   get  this error

Tue Oct 26 15:01:05 2010: User error: Your application is too large. This version of IAR Embedded Workbench has a code limitation of 4096 bytes.

please what is wrong ?

thank you

bye

Carlo

  • Hi Carlo,

    You will need a patch from IAR to fix this issue, as the --ks_version option was unfortunately not included in the base release of the kickstart edition of EW8051 7.60.

    The patch can be downloaded from the IAR web pages. Go to www.iar.com and select the "My pages" tab. Then, click the link called "Login to view your free Evaluation and KickStart editions" (i.e. don't clik the "Login to My Pages" link). On the new page that appears, use the login credentials  you used for downloading the kickstart version. After successful login, you will get a list of all the kickstart versions of IAR you have downloaded. Go to EW8051 and click the "Upgrade to ..." button. You should now see all the available patches. I recommend that you install all of them.

    Hope this helps.

  • Hi M

    thank you very much  I am downloading now

    bye

    Carlo

  •  

    I followed M's instructions and downloaded the patches but this is what i get when trying to compile/link the simple DEBUG tutorial that comes with the Workbench:

    Tutor.c 

    [Su002]: Unexpected command line arguments:
              --ks_version
    Error while running C/C++ Compiler
    Done. 1 error(s), 0 warning(s)

    Apparently it doesn't take this option any more. I don't know if the patch fixed the code size because this sample code is too small to test that. Any ideas?

    Of course if i remove that ks option it compiles fine. Is there a way to find out if this think can compile/link more than 4K of code without actually writing that size code?

     

    Regards,

    M.L.

  • Just found this on the patch release notes:

    Release notes for the Texas Instruments / Chipcon driver version 7.60.3

    Important information

    • Starting with version 7.40A of IAR Embedded Workbench for 8051, this driver was renamed to "Texas Instruments" in all IDE dialog boxes.

    New features

    • None

    Known Problems

    • EW18593
      It is not possible to set breakpoints when using preprocessed C source code with #line statements unless you write the absolute path for the file e.g: #line 3 "c:\\path\\file.c"

    • Known problems that are common for all drivers are listed here.

    Program Corrections

    • EW20949: Support for handling --ks_version reenabled.   <-----------------------------------------------------------------------------------------------------------------------

    But how do you get this to work?

     

    M.L.

     

  • I definately need to apologize for the real "dumb" mistake i just made. Please disregard my previous 2 posts. I entered "ks_version" in the Compiler extra options tab instead of the Linker extra options tab.

     

    Sorry once again,

     

    Best,

    M.L.

  • Hello everybody

    I am still blocked !

    I followed instruction , downloading 7.6  applying patches  and then  the commnad in the extra of the linker ...

    NO WAY !  it is not working ,  here is the message I got  whan I compiler cimplicity examples  for  1110

         Error[Og008]: Code size limit exceeded (4096 code bytes) for this version of the compiler

     

    Please where am I wrong ?  did you test yourserlf ?

    any suggestion ?

    thank you

    bye

    Carlo

  • Hi Carlo,

    Here's a detailed list of what I did on my Dell laptop running Win XP w/SP3 to test this.
     
    First, I installed IAR v7.60 Kickstart version (no patches, just the plain vanilla version from the web).
     
    Next, I made a small project for CC1110, making sure the code size was larger than 4kB.
    When building, without the --ks_version linker option, I get the following error:
     
    [...]
    Fatal Error[e89]: Too much object code produced (more than 0x1000 bytes) for this package
     
    Fatal! Execution terminated...
    Error while running Linker
    [...]
     
    this is expected. Then, I add the --ks_version option to the linker. This gives the following build result:
     
    [...]
     6 178 bytes of CODE  memory
        16 bytes of DATA  memory
       211 bytes of IDATA memory
         8 bits  of BIT   memory
     
    Errors: none
    Warnings: none
    [...]
     
    So, apparently, I'm good to go. However, when trying to download to the target, the following dialog window appears:



     
     
    This is also expected, knowing that the --ks_version was not supported fully in the plain version.
     
    So I proceed by logging in on www.iar.com (using the link Login to view your free Evaluation and KickStart editions) and selecting the following two patches from the list of available patches for v7.60:
     
    6. IAR Systems Embedded Workbench for 8051 patch 7.60.3
    This patch enables the --ks_version command line option in the Texas Instruments debugger driver.

    7. IAR Systems Embedded Workbench for 8051 patch 7.60.4
    This update adds hardware debugging support for the CC2540 device family to C-SPY. It also installs updated device configuration files for all CC devices from Texas Instruments.
     
    After restarting IAR, I rebuild the project. I can now download and debug the application via CC Debugger.

  • Hi M

    thank you but ...

    No way it is not working ...

    my error is differnet , it says  :    Error[Og008]: Code size limit exceeded (4096 code bytes) for this version of the compiler

    So it seems even compiler is limited ...

    so let me recap :

    winXp Sp3 ( as yours )  , I downloaded today kickstart from IAR  ( it is 7.60.1     so 60.1 instead of your 60 ) .

    I install it pure dafault ,  I try to compile   simplicity example  swrc133_SW_example.zip   example for mini -dk .

    I  run it default and get the error .

    I put the option in the linker  --ks_version   but it is no use ...

    I tested  on 2 pc  myself  and my collegue tested on his  no way ...

    could you give a try please ?

    thank you

    bye

    Carlo

     

     

     

     

  • I'm finally beginning to remember... When you want to compile the software examples for the CC1110/CC2510 Mini kits, there's a couple of things you need to do for this to work.

    As you have noticed, if you take the example *as is* and compile with the kick start version of IAR, you will get the following error message:

    Error[Og008]: Code size limit exceeded (4096 code bytes) for this version of the compiler

    You get this error because the project uses "Multi-file Compilation", i.e. treating the complete set of C files as one compilation unit. However, the compiler in the kick start version does not support compilation unis that generates code larger than 4kB. So you have to turn Multi-file Compilation off. You can do this in the project options --> C/C++ Compiler --> Language.

    After turning the option off and recompiling, you will get another error:

    Fatal Error[e89]: Too much object code produced (more than 0x1000 bytes) for this package

    This is because the --ks_version linker option is not set. Go to the project options --> Linker --> Extra Options and add --ks_version (remember to download the patch you need for this option to work with IAR EW8051 KS 7.60). Alas, when rebuilding, you will get yet another error:

    Fatal Error[e90]: Can only generate UBROF output from these files

    The reason is that the extended version of the kick start version (i.e. when using the --ks_version option) of IAR only supports generating debug files. However, the project is by default set up to generate both the debug output file and the flash image in Intel HEX format. To fix this, go to project options --> Linker --> Output and deselect "Allow C-SPY-specific extra output file".

    Now, finally, the project will build without any errors.

    Hope this helps :-)

  • I got this part working. But my question is: How do i generate an ".hex" file to flash the CC1110? 

    I tried to generate the .hex file (using the Kickstart extended version) but it does not work. Is that the intent?  How do i get my program (>4K) into flash?

     

    Regards,

    M.L.

  • You can of course use IAR Embedded Workbench to download your app to the target (you program the flash when you download and debug the target). However, IAR can not be used to generate HEX files when you use the --ks_version option. That's intentional.

    Note that if you do have a .hex file, you can use SmartRF Flash Programmer to write (and read) the image to the flash.

  • hi all,

    I downloaded IAR Embedded workbench, that is 30days trail version(not code size limit )

    whenever i am building with application i got these error

    Error[Li016]: size limit exceeded: 52072 > 32768

    Error while running Linker

    i am using 30 days trail version then it shouldn't show above error, then why it is showing.

    help me how to get out from this issue.

  • The CC2510 device has 32kB of flash...