mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
arch/arm/src/lpc17xx/lpc17_allocateheap.c: Fix some errors introduced in my last change. Noted by Pavel Pisa
This commit is contained in:
@@ -263,12 +263,12 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
|
|||||||
* stack lie in SRAM?
|
* stack lie in SRAM?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (g_idlestack >= CONFIG_RAM_START &&
|
if (g_idle_topstack >= CONFIG_RAM_START &&
|
||||||
g_idlestack < CONFIG_RAM_END)
|
g_idle_topstack < CONFIG_RAM_END)
|
||||||
{
|
{
|
||||||
/* Yes, then the SRAM heap starts in SRAM after the IDLE stack */
|
/* Yes, then the SRAM heap starts in SRAM after the IDLE stack */
|
||||||
|
|
||||||
sram_start = g_idlestack;
|
sram_start = g_idle_topstack;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -389,12 +389,12 @@ void up_addregion(void)
|
|||||||
* stack lie in SDRAM?
|
* stack lie in SDRAM?
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (g_idlestack >= LPC17_EXTDRAM_CS0 &&
|
if (g_idle_topstack >= LPC17_EXTDRAM_CS0 &&
|
||||||
g_idlestack < dram_end)
|
g_idle_topstack < dram_end)
|
||||||
{
|
{
|
||||||
/* Yes, then the SDRAM heap starts in SDRAM after the IDLE stack */
|
/* Yes, then the SDRAM heap starts in SDRAM after the IDLE stack */
|
||||||
|
|
||||||
dram_start = g_idlestack;
|
dram_start = g_idle_topstack;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -413,7 +413,7 @@ void up_addregion(void)
|
|||||||
|
|
||||||
/* Add external DRAM heap memory to the user heap */
|
/* Add external DRAM heap memory to the user heap */
|
||||||
|
|
||||||
kumm_addregion(dram_start, heap_size);
|
kumm_addregion((FAR void *)dram_start, heap_size);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user