SAM3U-EK using Embedded C++

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

ARMKid
Posts: 12
Joined: Wed May 26, 2010 9:46 am

SAM3U-EK using Embedded C++

Wed May 26, 2010 10:14 am

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 :)
Rob
Posts: 2
Joined: Tue Apr 20, 2010 9:53 am

Re: SAM3U-EK using Embedded C++

Fri Jun 04, 2010 4:14 pm

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
Crossware
Posts: 8
Joined: Sat Oct 17, 2009 3:13 pm

Re: SAM3U-EK using Embedded C++

Fri Jun 11, 2010 9:29 pm

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
MagnusU
Posts: 5
Joined: Thu Jul 08, 2010 9:32 am

Re: SAM3U-EK using Embedded C++

Thu Aug 12, 2010 4:15 pm

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
honarbacht
Contact:
Location: Düsseldorf, Germany
Posts: 2
Joined: Sun May 13, 2007 1:39 pm

Re: SAM3U-EK using Embedded C++

Mon Sep 27, 2010 11:24 am

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.
Arasch Honarbacht
ubisys technologies GmbH

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 3 guests