again encountered with not enough RAM

General discussion on mikroC PRO for 8051.
Post Reply
Author
Message
weather
Posts: 5
Joined: 14 Aug 2010 10:34

again encountered with not enough RAM

#1 Post by weather » 16 Oct 2010 09:05

hi

i am trying all the way to solve my problem by removing most of the error still 1 error not allow to my program to compile s
that is as below

0 1 mikroc8051.exe -MSF -DBG -pAT89C51RD2fn\weather_1.mcp51" -SP"C:\Program Files\Mikroelektronika\mikroC PRO for 8051\defs\" -SP"C:\STUDENT\hiral\" -SP"C:\Program Files\Mikroelektronika\mikroC PRO for 8051\Uses\ATMEL\"

library used:

"weather_1.c" "__Lib_Math.mcl" "__Lib_MathDouble.mcl" "__Lib_System.mcl" "__Lib_Delays.mcl" "__Lib_UART.mcl" "__Lib_CType.mcl" "__Lib_CStdlib.mcl" "__Lib_GlcdFonts.mcl" "__Lib_Glcd.mcl"

Code: Select all

line       message no                               text                                                                       unit

0                125                      All files Preprocessed in 16 ms  
0                121                      Compilation Started                                                             weather_1.c
108             122                      Compiled Successfully                                                          weather_1.c
0                126                      All files Compiled in 78 ms  
0                362                      Not enough RAM '?lstr9_weather_1'                                         weather_1.c
0                102                      Finished (with errors): 16 Oct 2010, 13:06:25                           weather_1.mcp51
here i strike with word '?lstr9 which is not used in my program so what it does mean?

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: again encountered with not enough RAM

#2 Post by filip » 20 Oct 2010 10:51

Hi,

Based on this error report, I can assume that some literal string in weather_1.c file is using more RAM,
so there is no RAM left for the remainder of the program.

Try optimizing your code so it fits in the MCUs RAM memory, or if this is not possible, use a MCU with more RAM.

Regards,
Filip.

adam1234
Posts: 11
Joined: 07 Jul 2010 23:20

Re: again encountered with not enough RAM

#3 Post by adam1234 » 05 Nov 2010 12:52

Hello I have a problem

I wrote a program which is use the One wire, Glcd, and some own functions.
When i build the program without using the Glcd , it's running perfectly, but when i use the Glcd funtions i got errors.

Without Glcd:

0 1 mikroc8051.exe -MSF -DBG -pAT89S8253 -EC -DL -O11111114 -fo10 -N"C:\Users\PC\Desktop\MikroC_projects\Motor3\motor.mcp51" -SP"C:\Program Files\Mikroelektronika\mikroC PRO for 8051\defs\" -SP"C:\Users\PC\Desktop\MikroC_projects\Motor3\" -SP"C:\Users\PC\Desktop\MikroC_projects\Motor2\" -SP"C:\Program Files\Mikroelektronika\mikroC PRO for 8051\Uses\ATMEL\" "motor.c" "__Lib_Math.mcl" "__Lib_MathDouble.mcl" "__Lib_System.mcl" "__Lib_Delays.mcl" "__Lib_EEPROM_rwb.mcl" "__Lib_SPI_SPCR.mcl" "__Lib_UART_Timer1.mcl" "__Lib_CType.mcl" "__Lib_CString.mcl" "__Lib_CStdlib.mcl" "__Lib_CMath.mcl" "__Lib_Conversions.mcl" "__Lib_Sprintf.mcl" "__Lib_PrintOut.mcl" "__Lib_Sprinti.mcl" "__Lib_Sprintl.mcl" "__Lib_Time.mcl" "__Lib_Trigonometry.mcl" "__Lib_Button.mcl" "__Lib_Keypad4x4.mcl" "__Lib_Manchester.mcl" "__Lib_OneWire.mcl" "__Lib_PS2.mcl" "__Lib_Sound.mcl" "__Lib_SoftI2C.mcl" "__Lib_SoftSPI.mcl" "__Lib_SoftUART.mcl" "__Lib_PortExpander.mcl" "__Lib_CANSPI.mcl" "__Lib_GlcdFonts.mcl" "__Lib_Glcd.mcl" "__Lib_LcdConsts.mcl" "__Lib_Lcd.mcl" "__Lib_RS485.mcl" "__Lib_T6963C.mcl" "__Lib_SPIGlcd.mcl" "__Lib_SPILcd.mcl" "__Lib_SPILcd8.mcl" "__Lib_SPIT6963C.mcl" "__Lib_EthEnc28j60.mcl"


Used BDATA RAM (bytes): 9 (56%) Free BDATA RAM (bytes): 7 (44%) Used BDATA RAM (bytes): 9 (56%) Free BDATA RAM (bytes): 7 (44%)
Used DATA RAM (bytes): 86 (83%) Free DATA RAM (bytes): 18 (17%) Used DATA RAM (bytes): 86 (83%) Free DATA RAM (bytes): 18 (17%)
Used IDATA RAM (bytes): 0 (1%) Free IDATA RAM (bytes): 128 (99%) Used IDATA RAM (bytes): 0 (1%) Free IDATA RAM (bytes): 128 (99%)
Used ROM (bytes): 3480 (28%) Free ROM (bytes): 8808 (72%) Used ROM (bytes): 3480 (28%) Free ROM (bytes): 8808 (72%)

With Glcd:

0 1 mikroc8051.exe -MSF -DBG -pAT89S8253 -EC -DL -O11111114 -fo10 -N"C:\Users\PC\Desktop\MikroC_projects\Motor3\motor.mcp51" -SP"C:\Program Files\Mikroelektronika\mikroC PRO for 8051\defs\" -SP"C:\Users\PC\Desktop\MikroC_projects\Motor3\" -SP"C:\Users\PC\Desktop\MikroC_projects\Motor2\" -SP"C:\Program Files\Mikroelektronika\mikroC PRO for 8051\Uses\ATMEL\" "motor.c" "__Lib_Math.mcl" "__Lib_MathDouble.mcl" "__Lib_System.mcl" "__Lib_Delays.mcl" "__Lib_EEPROM_rwb.mcl" "__Lib_SPI_SPCR.mcl" "__Lib_UART_Timer1.mcl" "__Lib_CType.mcl" "__Lib_CString.mcl" "__Lib_CStdlib.mcl" "__Lib_CMath.mcl" "__Lib_Conversions.mcl" "__Lib_Sprintf.mcl" "__Lib_PrintOut.mcl" "__Lib_Sprinti.mcl" "__Lib_Sprintl.mcl" "__Lib_Time.mcl" "__Lib_Trigonometry.mcl" "__Lib_Button.mcl" "__Lib_Keypad4x4.mcl" "__Lib_Manchester.mcl" "__Lib_OneWire.mcl" "__Lib_PS2.mcl" "__Lib_Sound.mcl" "__Lib_SoftI2C.mcl" "__Lib_SoftSPI.mcl" "__Lib_SoftUART.mcl" "__Lib_PortExpander.mcl" "__Lib_CANSPI.mcl" "__Lib_GlcdFonts.mcl" "__Lib_Glcd.mcl" "__Lib_LcdConsts.mcl" "__Lib_Lcd.mcl" "__Lib_RS485.mcl" "__Lib_T6963C.mcl" "__Lib_SPIGlcd.mcl" "__Lib_SPILcd.mcl" "__Lib_SPILcd8.mcl" "__Lib_SPIT6963C.mcl" "__Lib_EthEnc28j60.mcl"

271 362 Not enough RAM 'color' __Lib_Glcd.c
389 362 Not enough RAM 'NumberOfCyc' __Lib_Delays.c
104 362 Not enough RAM 'ddata' __Lib_Glcd.c
30 362 Not enough RAM 'page' __Lib_Glcd.c
50 362 Not enough RAM 'x_pos' __Lib_Glcd.c
65 362 Not enough RAM 'local' __Lib_Glcd.c
39 362 Not enough RAM 'x_pos' __Lib_Glcd.c
0 102 Finished (with errors): 05 nov. 2010, 12:49:55 motor.mcp51

I've got this errors

Not enough RAM, Why?
Please help me, what can i do?

User avatar
filip
mikroElektronika team
Posts: 11874
Joined: 25 Jan 2008 09:56

Re: again encountered with not enough RAM

#4 Post by filip » 08 Nov 2010 10:59

Hi,

Please, like I said earlier, try optimizing your code so it fits in the MCUs RAM memory, or if this is not possible, use a MCU with more RAM.

Regards,
Filip.

kage
Posts: 1
Joined: 29 Jan 2020 23:59

Re: again encountered with not enough RAM

#5 Post by kage » 30 Jan 2020 00:05

I switched from a large memory model to a small memory model and the "362 RAM error" went away??? Im using the 89S51 CPU
FYI..Im really a newbie and have very little time with this program but I know that my code was correct and fought this for hours

outThere
Posts: 1
Joined: 03 Jun 2020 02:08

Re: again encountered with not enough RAM

#6 Post by outThere » 08 Sep 2020 03:07

from what i understand the large memory model takes into account external ram where the small memory model is only RAM on the processor so w/ the large you were inadvertently trying to write to non existent external RAM.

Post Reply

Return to “mikroC PRO for 8051 General”