Hello All,
Does any one have any code example of LPC802 in C++? if possible please share.
With Regards
Kamil
With only 16k of flash, you are going to struggle to get much of a C++ application running on a LPC802, unless you use a very small set of C++ features - basically, don't use anything bu the very simplest library calls, no templates, (standard) I/O etc.
You might find this tutorial useful:
C++ on microcontrollers 1 - introduction, and an output pin class - Wouter van Ooijen
Part 2 shows using C++ on an LPC1114 which has 32k of flash, but a similar Cortex-M0 controller.
Hello converse, Thanks for your quick reply, yes as per customer they want to use very small code with some library such TOTP ( using hmackey) , it seems he has this library (in cpp) used in atmel device, now they want to use our device and wanted to port this library in LPC.
I have asked them to use "New project" from LPCXpresso and use C++ code option and then add this library. but it seems it is giving lots of compilation error. so they need our help have C++ code example and add this library and compile, rest he will develop his code on top of that.
Customer has shared *.Cpp and *.h file of TOTP library. let me know if you want to look into it. As i never used C++ so i have very little idea of how to resolve those error.
With Regards
kami
Hello converse as the Atmel device was of 32kb, so customer is agreeing to use LPC804 (32kb) device. we have two option either we can use c++ code in our LPC804 and integrate c++files and header or we can have converter those c++ files and header to c and use it with LPCXpresso.
With Regards
Kamil
If it compiled and ran on a 32kb Atmel device, it should be OK on the LPC804 device, given similar functionality - no need to convert to C. I can't look at your source code, but if you tell me what the errors are, I may be able to help.
converse there are lots absurd error it is throwing. let me work on it to reduce number of error to few then it will be easy to share those error.