From 944d9107dbe472e9d684fddd1d0d001e4d769f06 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 28 Jan 2014 15:05:19 -0600 Subject: SAMA5: More variables-in-SDRAM stuff --- nuttx/ChangeLog | 7 ++++++- nuttx/arch/arm/src/sama5/sam_boot.c | 12 ++++++------ nuttx/configs/sama5d3x-ek/README.txt | 3 +++ 3 files changed, 15 insertions(+), 7 deletions(-) (limited to 'nuttx') diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 2dc61edcb..412346d1f 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -6522,5 +6522,10 @@ to fix 'Error: .size expression for idle_stack does not evaluate to a constant" (2014-1-25). * arch/arm/include/efm32, arch/arm/src/efm32, and configs/efm32-dk360: - Removed all EFM32 support. Not yet readyto be fielded (2014-1-17). + Removed all EFM32 support. Not yet readyto be fielded (2014-1-27). + * arch/arm/src/armv7-a/arm_head.S, sama5/sam_boot.c, and several other + files: Not supports execution from NOR FLASH with .data and .bss in + SDRAM. This was not possible prior to this because .bss and .data + were initialized before SDRAM was configured. This logic is still + kind buggy. (2014-1-28). diff --git a/nuttx/arch/arm/src/sama5/sam_boot.c b/nuttx/arch/arm/src/sama5/sam_boot.c index 8b95c7538..8d15c646c 100644 --- a/nuttx/arch/arm/src/sama5/sam_boot.c +++ b/nuttx/arch/arm/src/sama5/sam_boot.c @@ -1,7 +1,7 @@ /**************************************************************************** * arch/arm/src/sama5/sam_boot.c * - * Copyright (C) 2013 Gregory Nutt. All rights reserved. + * Copyright (C) 2013-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt * * Redistribution and use in source and binary forms, with or without @@ -627,9 +627,9 @@ void up_boot(void) sam_clockconfig(); +#ifdef CONFIG_ARCH_FPU /* Initialize the FPU */ -#ifdef CONFIG_ARCH_FPU arm_fpuconfig(); #endif @@ -645,20 +645,20 @@ void up_boot(void) sam_boardinitialize(); +#ifdef NEED_SDRAM_REMAPPING /* SDRAM was configured in a temporary state to support low-level * initialization. Now that the SDRAM has been fully initialized, * we can reconfigure the SDRAM in its final, fully cache-able state. */ -#ifdef NEED_SDRAM_REMAPPING sam_remap(); #endif +#ifdef CONFIG_BOOT_SDRAM_DATA /* If .data and .bss reside in SDRAM, then initialize the data sections * now after SDRAM has been initialized. */ -#ifdef CONFIG_BOOT_SDRAM_DATA arm_data_initialize(); #endif @@ -666,21 +666,21 @@ void up_boot(void) sam_lowsetup(); +#ifdef USE_EARLYSERIALINIT /* Perform early serial initialization if we are going to use the serial * driver. */ -#ifdef USE_EARLYSERIALINIT sam_earlyserialinit(); #endif +#ifdef CONFIG_NUTTX_KERNEL /* For the case of the separate user-/kernel-space build, perform whatever * platform specific initialization of the user memory is required. * Normally this just means initializing the user space .data and .bss * segments. */ -#ifdef CONFIG_NUTTX_KERNEL sam_userspace(); #endif } diff --git a/nuttx/configs/sama5d3x-ek/README.txt b/nuttx/configs/sama5d3x-ek/README.txt index 218b50000..6cde91a9b 100644 --- a/nuttx/configs/sama5d3x-ek/README.txt +++ b/nuttx/configs/sama5d3x-ek/README.txt @@ -3120,6 +3120,9 @@ To-Do List Perhaps there are some issues with SDRAM when uses as the primary heap? + UPDATE: If I turn memory management debug on, the crash does not + occur. This needs some further investigation and a little TLC. + 5) HSCMI TX DMA support is currently commented out. 6) I believe that there is an issue when the internal AT25 FLASH is -- cgit v1.2.3