• Resolved

Compiling CC2540 code in SDCC



I am a student and a part of my graduation assignment involves programming the CC2540 chip. The problem is that I'm not able to use the IAR compiler since I don't have a license. That's why I'm trying to use SDCC for compiling the SimpleBLE peripheral and proceed from there. 

Now I have a few questions about this,

- Has anyone been able to port the code to SDCC?

also, I have been trying to port the code to SDCC myself for the last few days and I want to know before I proceed,

- Is it possible to port the code to SDCC? or are there some (protected) files which only IAR can use?


I hope you can answer my questions.

Thanks in advance,


Gijs de Graaf

  • Genius 10665 points

    As far as I know, this is not possible. The libraries are built for IAR, and I believe IAR and SDCC use different C runtime models.

    You can use a 30 day evaluation version of IAR. If 30 days is not enough, you should check if your university has any IAR licenses or could purchase some. You should check if IAR offer academic discounts as may software companies do.

  • In reply to hec:

    Is it possible for me to build a library for SDCC or is the code closed source?

  • Genius 10665 points

    In reply to Gijs de Graaf:

    The code is closed source.

  • In reply to hec:

    The code is closed-source, but that does preclude TI from providing pre-built libraries that are SDCC-compatible? It would be no different to the current situation w.r.t. the IAR compiler (where we are provided with object files), but allow students/hobbyists to join in the fun. :-) 

  • In reply to Aidan Steele:

    I would also really appreciate pre-built CC2540 libraries for SDCC. We're a small startup who want to do interesting things with BLE but can't afford the IAR compiler yet.

  • In reply to Aidan Steele:

    I agree.   While I'm sure the IAR tools are good, their hefty pricetag precludes hobbyists and students from creating something cool with the CC25xx series / BTE.   It shouldn't take 4 months for someone to compile the source so I am assuming TI has no intention of supporting the student and hobbyist community.   Someone in management should look at the success of Arduino and what it has done for Atmel, then look at how few embedded engineers you can find online evangelizing TI components.  Perhaps you should revisit who is important, old well-funded engineers, or every up and coming kid...  and as an old engineer, I'd like some SDCC compatible libraries too.  Do you guys own a piece of IAR or something?

  • In reply to Murray Macdonald:

    Since some time has gone since initial question: Is there meanwhile a lib for CC2420 and SDCC?

    Or has someone successfully used the delivered IAR lib with SDCC?

  • In reply to Martin Maurer:

    I would like to show my support for this notion too.  I'm fortunate enough to be a student at a university with an IAR license, but it bothers me that I won't be able to play with this cool new stuff  when I graduate soon.  Especially for all the iOS developers, like me, who flocked to BLE as the first BT type supported by Apple for a general piconet communication without the need for joining MFI.  The barrier of entry now is certainly lower than the cost of that, but the IAR cost is still keeping out the ones who should be your prized customers - up and coming engineers and developers.  Could someone at TI please inform us of the reason for this?

  • In reply to Jay Coggin:

    TI-BLE 1.3 was released some days ago. Is there perhaps a change on this topic?

    Is IAR still the only compiler useable to build software for TI's BLE?

  • In reply to Martin Maurer:

    Yes, IAR is still the only compiler.