Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 22733

Compiler/MSP430G2231: Program will not fit into available memory [...]

$
0
0

Part Number:MSP430G2231

Tool/software: TI C/C++ Compiler

Hello,


I'm trying to use BMP280 sensor with my MSP430G2231. My SPI communication seems to be ok but when i try ton convert the temperature thanks to the formula of the documentation, i've got this error :

"../lnk_msp430g2231.cmd", line 95: error #10099-D: program will not fit into available memory.  placement with alignment fails for section ".text" size 0x946 .  Available memory ranges:
   FLASH        size: 0x7e0        unused: 0x7d2        max hole: 0x7d2     
error #10010: errors encountered during linking; "Test_Capteur.out" not built

here is my code, if i comment this function there is no error :

double bmp280_compensate_T_double(long signed int adc_T, unsigned int dig_T1f, signed int dig_T2f, signed int dig_T3f)
{
	long long signed int t_fine;
	int var1, var2, T;
	var1 = (  (((double)adc_T)/16384.0) - (((double)dig_T1f)/1024.0)  ) * ((double)dig_T2f);


	var2 =  (     ( ( ((double)adc_T)/131072.0 ) - ( ((double)dig_T1f)/8192.0 ) ) *  (  ( ((double)adc_T)/131072.0 ) -  ( ((double) dig_T1f)/8192.0 ) )      ) *   (((double)dig_T3f));


	var2 = ((((double)adc_T)/131072.0 – ((double)dig_T1f)/8192.0) * (((double)adc_T)/131072.0 – ((double) dig_T1f)/8192.0)) * ((double)dig_T3f);
	t_fine = (long long signed int)(var1 + var2);
	T = (var1 + var2) * 5120.0;

	return T;
}

any help ?

Thanks !


Viewing all articles
Browse latest Browse all 22733

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>