[Ovmsdev] Coding in vehicle_twizy - Memory section issue

Julien NOZAIS julien.nozais at ext.uni.lu
Fri Jan 9 00:28:32 HKT 2015


Hi everybody, best wishes for 2015.

I came across a memory limit while working on my project, I hope you could help me with it.
I am working on the vehicle_twizy.c file. So far I added about 300 lines of running code, and I started getting the compilation error "can not fit the section", which in general appears when you have too many modules enabled while compiling.

    Error - section '.idata_net.o_i' can not fit the section. Section '.idata_net.o_i' length=0x00000035

I identified that the memory issue is happening as I add more code, and disappearing when I comment the code, independently of the nature of the code. I first resorted to switching to less memory intensive variables such as INT8.

I then tried to put as many of my variables as I could in a separate memory section. I used a pragma directive in the same fashion that is used for the battery monitoring system extension.

    #pragma udata overlay vehicle_overlay_data2

It helped for a while, but at some point as I was writing calls to the writesdo(..) function a few times, it started again. I guess writesdo's arguments are stored in a memory section that was already at almost full capacity. I thought there would have been some margin before running into this kind of memory problem.

For now my workaround is to remove the battery monitoring from the compilation, as it leaves enough space for my code to run.

Do you have any comments or ideas on this ?

Best regards,

Julien
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.teslaclub.hk/pipermail/ovmsdev/attachments/20150108/5afadbef/attachment.html>


More information about the OvmsDev mailing list