LPC1769 malloc function

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC1769 malloc function

972 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by albert85 on Sat Feb 18 05:50:08 MST 2012
I'm using LPC1769 with CMSISv2p00_LPC17xx lib and want to allocate memory dynamically like this:

char *buffer = (char*)malloc(10 * sizeof (char));

But I get this error message:

DescriptionResourcePathLocationType
make: *** [UOP.axf] Error 1UOP C/C++ Problem

Does anyone know where the problem is?
0 项奖励
回复
3 回复数

887 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by albert85 on Sun Feb 19 05:35:49 MST 2012
Problem solved!
I've just selected Redlib(nohost) in the project settings.
0 项奖励
回复

887 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by albert85 on Sat Feb 18 23:04:47 MST 2012
Here is my project.
0 项奖励
回复

887 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Sat Feb 18 06:53:35 MST 2012
That is an error from make, rather than the compiler/linker. Is this a managed project (as created using the project wizard), or one where you are supplying your own make file?

I suggest that you post a cut down project that shows up the problem.  Details of how to export a project from within LPCXpresso can be found here:

http://support.code-red-tech.com/CodeRedWiki/ImportExport

Delete the Debug/Release directories, plus any .launch files before exporting to keep the size of the exported project down.

Regards,
CodeRedSupport.
0 项奖励
回复