diff Small_CPU/CPU2-RTE.ld @ 433:aa286a4926c2 Improve_BatteryGasGauge

Detect startup after power off: Introduced a variable in memory area which is not initialized during startup. In case of a start from power off the memory cell will be initialized (persistant as long as RTE is powered) and charge counter is set to 0 signaling the user to do a complete charge to calibrate the counter.
author ideenmodellierer
date Sun, 23 Feb 2020 21:09:56 +0100
parents 321df89d5710
children
line wrap: on
line diff
--- a/Small_CPU/CPU2-RTE.ld	Tue Feb 18 12:41:45 2020 +0100
+++ b/Small_CPU/CPU2-RTE.ld	Sun Feb 23 21:09:56 2020 +0100
@@ -181,7 +181,15 @@
 		*(.heap*)
 		__HeapLimit = .;
 	} > RAM
-
+	
+	/* .noinit section contains data which will not be change during startup */
+   .noinit  :
+   {
+     . = ALIGN(4);
+     *(.noinit*)
+     _end = . ;
+   }  > RAM
+  
 	/* .stack_dummy section doesn't contains any symbols. It is only
 	 * used for linker to calculate size of stack sections, and assign
 	 * values to stack symbols later */