Page 1 of 1

SAM3U-EK using Embedded C++

Posted: Wed May 26, 2010 10:14 am
by ARMKid
Hello everyone,
I'm trying to create a project combining C and C++ code for the Atmel SAM3U4C core using IAR EWARM, for this I'm trying to use one of the Sample Project for the SAM3U-EK and compile it with “embedded C++” language option selected, but with no luck.

Does anyone ever tried to compile any one of the sample project in C++ mode (Embedded C++ or Extended EC++)?

Is there any sample start up project or any start up code for the SAM3U-EK using C++ ?

Any help will be most appreciated :)

Re: SAM3U-EK using Embedded C++

Posted: Fri Jun 04, 2010 4:14 pm
by Rob
Hello

I am also looking for a way to write C++ code on an embedded platform. Are there any books or website on this topic?

Kind Regards
Rob

Re: SAM3U-EK using Embedded C++

Posted: Fri Jun 11, 2010 9:29 pm
by Crossware
Crossware has an Embedded C++ compiler that supports the SAM3U chips. It's part of the Crossware Development Suite for ARM.

Here are some links:

http://www.crossware.com/arm/compiler.htm

http://www.crossware.com/press/september09/sam3u.htm

http://www.crossware.com/press/january10/sam3uapps.htm

If you have any questions, please ask.

Regards Crossware

Re: SAM3U-EK using Embedded C++

Posted: Thu Aug 12, 2010 4:15 pm
by MagnusU
For AT91SAM3U C++ development, I recommend you try Atollic TrueSTUDIO/AT91SAM, which is a well integrated Eclipse based development tool of commercial quality for AT91SAM3U development.

http://www.atollic.com/index.php/truestudio
http://www.atollic.com/index.php/truest ... gets/atmel
http://www.atollic.com/index.php/videotutorials

/Magnus

Re: SAM3U-EK using Embedded C++

Posted: Mon Sep 27, 2010 11:24 am
by honarbacht
We are doing this for several years now (since EWARM 4.40). As of 5.00 it has become even simpler. Actually, use a startup file for your particular Cortex-M3 device. In this file, the final call should be to __iar_program_start, which will handle all of the C and C++ initialization (including global object constructors). Provide your copy of __low_level_init() and you are done. You should also provide enough heap memory. If you use heap memory from different threads (threads of a real-time OS or interrupt context), you also need to override the mutex for heap access. Then, you can use nearly all of STL functionality as well, i.e. vector, map, list, string, sstream etc. However, be aware of potential heap fragmentation. This requires careful design of your application. In addition, IAR embedded C++ does not support exception handling (for obvious reasons). We did not experience any major problem and we use C++ extensively.