EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

LPC2378 & EFSL

Started by Mauro Lenz June 27, 2013
Hi all,
I'm having a problem using EFSL MCI library on LPC2378 using IAR
Workbench. At a first moment, my aplication crashed when I use the
malloc() function for allocate memory for my variables (pointers). It
works well for a small time and after it crashed, every on a diferent
call of malloc(). Well, initially I solve (or not) the problem using
vectors on place of pointers (temporarily, until I find a definitive
solution) and it works very well. Now, after several tests whith the
equipment, I have a similar problem calling the sprintf() function
(sprintf() also uses ponters inside).

Has anyone worked with the EFSL library? Anyone ever had the same problem?

P.S. The firmeware ran on a LPC2138 device without crashes for one year.
I have change the device because LPC2338 don't have MCI interface for SD
card. The only thing different in the two applications is the SD
interface library. On LPC2138 I also use EFSL, but with SPI interface
with SD card and on LPC2378 with MCI interface.

Thanks in advance for reply.

Atenciosamente,

Mauro L. Lenz
Fone: (55) 8115-6944
Skype: mauro_eafs

"Ajude a combater o Spam. Ao encaminhar uma mensagem, apague o e-mail do remetente e utilize o campo CCo quando enviar para mais de um destinatio."

An Engineer's Guide to the LPC2100 Series

What is the compiler you are using, did you setup the newlib properly? Also
you may need to setup the startup properly too, the heap has to have some
memory space to be used.
2013/6/27 Mauro Lenz

> **
> Hi all,
> I'm having a problem using EFSL MCI library on LPC2378 using IAR
> Workbench. At a first moment, my aplication crashed when I use the
> malloc() function for allocate memory for my variables (pointers). It
> works well for a small time and after it crashed, every on a diferent
> call of malloc(). Well, initially I solve (or not) the problem using
> vectors on place of pointers (temporarily, until I find a definitive
> solution) and it works very well. Now, after several tests whith the
> equipment, I have a similar problem calling the sprintf() function
> (sprintf() also uses ponters inside).
>
> Has anyone worked with the EFSL library? Anyone ever had the same problem?
>
> P.S. The firmeware ran on a LPC2138 device without crashes for one year.
> I have change the device because LPC2338 don't have MCI interface for SD
> card. The only thing different in the two applications is the SD
> interface library. On LPC2138 I also use EFSL, but with SPI interface
> with SD card and on LPC2378 with MCI interface.
>
> Thanks in advance for reply.
>
> Atenciosamente,
>
> Mauro L. Lenz
> Fone: (55) 8115-6944
> Skype: mauro_eafs
>
> "Ajude a combater o Spam. Ao encaminhar uma mensagem, apague o e-mail do
> remetente e utilize o campo CCo quando enviar para mais de um destinatio."
>
>
>

--
Skype: felipeanl
[Non-text portions of this message have been removed]

Hi Felipe,
Thanks for the answer and sorry for the late replay. I was out for a few
days.
I use the IAR compiler. I have revised the SD card library and found
some places that it alocate a lot of heap memory without necessity. I've
also revised the stack usage of the project and descover that a have a
stack overflow on one point.
So, solving this problems it is working fine at the moment.

Anyone has a example application using FatFs whit MCI interface and
using IAR compiler?

Atenciosamente,

Mauro L. Lenz
Fone: (55) 8115-6944
Skype: mauro_eafs

"Ajude a combater o Spam. Ao encaminhar uma mensagem, apague o e-mail do remetente e utilize o campo CCo quando enviar para mais de um destinatio."

Em 27/06/2013 23:16, Felipe de Andrade Neves Lavratti escreveu:
> What is the compiler you are using, did you setup the newlib properly? Also
> you may need to setup the startup properly too, the heap has to have some
> memory space to be used.
> 2013/6/27 Mauro Lenz > **
>> Hi all,
>> I'm having a problem using EFSL MCI library on LPC2378 using IAR
>> Workbench. At a first moment, my aplication crashed when I use the
>> malloc() function for allocate memory for my variables (pointers). It
>> works well for a small time and after it crashed, every on a diferent
>> call of malloc(). Well, initially I solve (or not) the problem using
>> vectors on place of pointers (temporarily, until I find a definitive
>> solution) and it works very well. Now, after several tests whith the
>> equipment, I have a similar problem calling the sprintf() function
>> (sprintf() also uses ponters inside).
>>
>> Has anyone worked with the EFSL library? Anyone ever had the same problem?
>>
>> P.S. The firmeware ran on a LPC2138 device without crashes for one year.
>> I have change the device because LPC2338 don't have MCI interface for SD
>> card. The only thing different in the two applications is the SD
>> interface library. On LPC2138 I also use EFSL, but with SPI interface
>> with SD card and on LPC2378 with MCI interface.
>>
>> Thanks in advance for reply.
>>
>> Atenciosamente,
>>
>> Mauro L. Lenz
>> Fone: (55) 8115-6944
>> Skype: mauro_eafs
>>
>> "Ajude a combater o Spam. Ao encaminhar uma mensagem, apague o e-mail do
>> remetente e utilize o campo CCo quando enviar para mais de um destinatio."
>>
>>
>>


The 2024 Embedded Online Conference